[BUG] Memory accumulation when using load_image in a loop
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 30/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- rust
- Domaine
- computer-vision
Piste de recherche
Commencez par exécuter la boucle fournie dans src/main.rs:6 et inspectez le wrapper load_image dans src/image/mod.rs:317, ainsi que le chemin natif af_load_image signalé. Vérifiez si le chargement répété d’images conserve de la mémoire du périphérique et identifiez le comportement pertinent de nettoyage ou de propriété. La tâche est terminée lorsque la reproduction n’accumule plus de mémoire jusqu’à provoquer une erreur de mémoire insuffisante, avec un test de régression pour le chargement répété.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
The following program crashed. But why?
use arrayfire::*;
fn main() {
let mut y =constant!(0 as u8;1);
for i in 0..1000 {
let x = load_image::<u8>("2dzs/robot_2dz.png".to_string(), true);
let z = or(&x, &y, true);
y = z.copy();
println!("i={}", i);
}
println!("max(y)={:#?}", max_all(&y));
}
i=0
i=1
i=2
i=3
i=4
i=5
i=6
i=7
i=8
i=9
i=10
i=11
i=12
i=13
i=14
i=15
i=16
i=17
i=18
i=19
i=20
i=21
i=22
i=23
i=24
i=25
i=26
i=27
i=28
i=29
i=30
i=31
i=32
i=33
i=34
i=35
i=36
i=37
i=38
i=39
i=40
i=41
i=42
i=43
i=44
i=45
i=46
i=47
i=48
i=49
i=50
i=51
thread 'main' panicked at 'Error message: System or Device ran out of memory
Last error: In function af_load_image
In file src/api/c/imageio.cpp:393
0# 0x00007F4FC1A299AF in /opt/arrayfire/lib/libafcuda.so.3
1# 0x0000560F6F590AFF in target/debug/crash
2# 0x0000560F6F590099 in target/debug/crash
3# 0x0000560F6F5903AB in target/debug/crash
4# 0x0000560F6F59031E in target/debug/crash
5# 0x0000560F6F58FC41 in target/debug/crash
6# 0x0000560F6F5A707F in target/debug/crash
7# 0x0000560F6F58FC10 in target/debug/crash
8# 0x0000560F6F5902EC in target/debug/crash
9# 0x00007F4FFB823510 in /lib/x86_64-linux-gnu/libc.so.6
10# __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
11# 0x0000560F6F58FB15 in target/debug/crash
', /home/joe/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/arrayfire-3.8.0/src/core/error.rs:37:14
stack backtrace:
0: rust_begin_unwind
at /rustc/c07a8b4e09f356c7468b69c50cac7fc5b5000b8a/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/c07a8b4e09f356c7468b69c50cac7fc5b5000b8a/library/core/src/panicking.rs:142:14
2: arrayfire::core::error::handle_error_general
at /home/joe/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/arrayfire-3.8.0/src/core/error.rs:37:14
3: arrayfire::core::error::Callback::call
at /home/joe/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/arrayfire-3.8.0/src/core/error.rs:29:9
4: arrayfire::core::error::HANDLE_ERROR
at /home/joe/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/arrayfire-3.8.0/src/core/error.rs:95:5
5: arrayfire::image::load_image
at /home/joe/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/arrayfire-3.8.0/src/image/mod.rs:317:9
6: crash::main
at ./src/main.rs:6:17
7: core::ops::function::FnOnce::call_once
at /rustc/c07a8b4e09f356c7468b69c50cac7fc5b5000b8a/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
- Langage dominant
- Rust
- Étoiles
- 827
- Forks
- 59
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de arrayfire/arrayfire-rust
-
Bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
arrayfire/arrayfire-rust#388 ·
-
Bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
arrayfire/arrayfire-rust#387 ·
-
Bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
arrayfire/arrayfire-rust#386 ·
-
Bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
arrayfire/arrayfire-rust#384 ·
-
Bug
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
arrayfire/arrayfire-rust#385 · 1 commentaire ·
Toutes les issues de arrayfire/arrayfire-rust
Issues similaires
-
Browser (wasm) relay client cannot connect to relays whose URL has a trailing-dot FQDN hostname Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
n0-computer/iroh#4550 ·
-
impl detach for native Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
paritytech/zombienet-sdk#591 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
farion1231/cc-switch#7638 · 1 commentaire ·
-
onnx-ir re-exports ModelProto and GraphProto but not NodeProto, AttributeProto and AttributeType Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100