Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'assertion failed: list.len() == 0', /libnative/io/timer_timerfd.rs:166 #12684

Closed
mvdnes opened this issue Mar 4, 2014 · 6 comments
Closed

Comments

@mvdnes
Copy link
Contributor

mvdnes commented Mar 4, 2014

Error

task '<unnamed>' failed at 'assertion failed: list.len() == 0', /build/buildd/rust-nightly-201403040405~3c0d098~precise/src/libnative/io/timer_timerfd.rs:166
task '<unnamed>' failed at 'receiving on a closed channel', /build/buildd/rust-nightly-201403040405~3c0d098~precise/src/libstd/comm/mod.rs:507
task '<unnamed>' failed at 'sending on a closed channel', /build/buildd/rust-nightly-201403040405~3c0d098~precise/src/libstd/comm/mod.rs:368
task failed during unwinding (double-failure - total drag!)
rust must abort now. so sorry.
Illegal instruction (core dumped)

Version

Latest nightly (rust-nightly_201403040405~3c0d098~precise_amd64.deb) from http://ppa.launchpad.net/hansjorg/rust/:

s0828599@u0009747:~/playground/rboy/src$ rustc -v
rustc 0.10-pre
host: x86_64-unknown-linux-gnu
s0828599@u0009747:~/playground/rboy/src$ uname -a
Linux u0009747 3.5.0-46-generic #70~precise1-Ubuntu SMP Thu Jan 9 23:55:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Additional information

This error happens in my Gameboy color emulator https://github.com/mvdnes/rboy, after switching from the 'normal' starting and spawning. The problem started when I switched to spawning my thread with libnative. (Another stange thing, when starting main in native my SDL window would not quit.) I use timer::periodic to slow down the emulator. Given the error, I assume that is the place the error could lie.

@pethin
Copy link

pethin commented Mar 4, 2014

Using timers with libnative on Linux is broken right now. #12689

@thestinger
Copy link
Contributor

I doubt that #12689 is the cause of this problem. While using usleep is broken, it's won't cause a failure or memory safety issue (except in a contrived example). I think sleeping/timers needs to be redesigned rather than just patched up though.

@pethin
Copy link

pethin commented Mar 4, 2014

@thestinger True. Timers do show strange behavior on libnative though.

@alexcrichton
Copy link
Member

#12689 is unrelated to this. I am unable to reproduce this with small test cases, and a large project is difficult to debug. Is it possible to minimize this assertion that you're seeing?

@mvdnes
Copy link
Contributor Author

mvdnes commented Mar 5, 2014

I was able to trigger the same error message in the following code:

extern crate native;

fn main() {
    native::task::spawn(proc() customtask());
}

fn customtask() {
    let mut timer = std::io::timer::Timer::new().unwrap();
    let periodic = timer.periodic(100);
    periodic.recv();
}

@alexcrichton
Copy link
Member

Thanks! I'll investigate soon.

bors added a commit to rust-lang-ci/rust that referenced this issue Jul 25, 2022
…ykril

fix: ignore renames for crate root

close rust-lang#12684 . I just ignore renames for crate root in `rename_mod` func.
flip1995 pushed a commit to flip1995/rust that referenced this issue May 2, 2024
…Frednet

Don't suggest `Box::default()` in functions with differing generics

Fixes rust-lang#12684

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants