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

SIGILL in collectionstest #31029

Closed
dotdash opened this issue Jan 19, 2016 · 6 comments
Closed

SIGILL in collectionstest #31029

dotdash opened this issue Jan 19, 2016 · 6 comments

Comments

@dotdash
Copy link
Contributor

dotdash commented Jan 19, 2016

I'm getting a reproducable test failure with a SIGILL failures on Linux x86_64.

Backtrace:

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 0x7ffff47ff700 (LWP 22366)]
0x00005555556974e6 in sys_common::unwind::begin_unwind_inner::h59e609190038c574Rbt ()
(gdb) bt
#0  0x00005555556974e6 in sys_common::unwind::begin_unwind_inner::h59e609190038c574Rbt ()
#1  0x0000555555697f19 in sys_common::unwind::begin_unwind_fmt::h3cefed2b0a5c8147Xat ()
#2  0x00005555556a6532 in rust_begin_unwind ()
#3  0x00005555556ee880 in panicking::panic_fmt::hacab3d7465b1a2ebRZL ()
#4  0x00005555556ee829 in panicking::panic::h246db642899fee22oYL ()
#5  0x0000555555588339 in btree::map::IntoIter$LT$K$C$$u20$V$GT$.Iterator::next::h3381813257745463815 ()
#6  0x0000555555587f6b in btree::map::BTreeMap$LT$K$C$$u20$V$GT$.Drop::drop::h3725823349679420947 ()
#7  0x0000555555587e82 in btree::map::test_basic_large::haadc38722012d61eXyb ()
#8  0x000055555566ff37 in boxed::F.FnBox$LT$A$GT$::call_box::h5492873241474973492 ()
#9  0x00005555556729ac in sys_common::unwind::try::try_fn::h1695233641128253362 ()
#10 0x00005555556a64c9 in __rust_try ()
#11 0x00005555556a163c in sys_common::unwind::try::inner_try::had5cb7522d108c40p8s ()
#12 0x0000555555672d2b in boxed::F.FnBox$LT$A$GT$::call_box::h2919579301942330468 ()
#13 0x00005555556a8284 in sys::thread::Thread::new::thread_start::hbbeaa7fe2a2abc9ditx ()
#14 0x00007ffff79c1284 in start_thread (arg=0x7ffff47ff700) at pthread_create.c:333
#15 0x00007ffff74e874d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

cc @gankro

@alexcrichton
Copy link
Member

cc @gereeter, #30426

@dotdash
Copy link
Contributor Author

dotdash commented Jan 19, 2016

This seems to be the panic in unwrap_unchecked, which depends on debug assertions being enabled. Do the buildbots have those?

@alexcrichton
Copy link
Member

Nah unfortunately we always build the standard library without debug assertions :(

@gereeter
Copy link
Contributor

What options have you configured your Rust build with? Also, I'm assuming that this is a double-panic abort, since that is what I saw earlier, so if you comment out BTreeMap's destructor, you should see a proper panic message with the actual error.

@gereeter
Copy link
Contributor

I think I accidentally turned off debug assertions at some point while working on #30426 - this is my fault, sorry. I've reproduced on my computer with just --enable-debug-assertions:

        thread 'btree::map::test_basic_large' panicked at 'assertion failed: idx <= node.len()', src/libcollections/btree/node.rs:700
stack backtrace:
   1:      0x375d13bf428 - sys::backtrace::tracing::imp::write::h04d113a23f92dc85kju
   2:      0x375d13c7af7 - panicking::default_handler::h80171f446718b158mwy
   3:      0x375d138670e - sys_common::unwind::begin_unwind_inner::h996123888c11f344Rbt
   4:      0x375d1387798 - sys_common::unwind::begin_unwind_fmt::hb94bf4aab76db4d7Xat
   5:      0x375d13bcbb1 - rust_begin_unwind
   6:      0x375d14236ef - panicking::panic_fmt::hd38cddc432a305fbRZL
   7:      0x375d1423008 - panicking::panic::h32607c42eb190b3boYL
   8:       0x36484f1a66 - btree::map::BTreeMap<K, V>::remove::h11058900178034209718
   9:       0x36484ef838 - btree::map::test_basic_large::he236ebd0d3bf9d02Xyb
  10:      0x375d1ad28c6 - boxed::F.FnBox<A>::call_box::h13039866824781652362
  11:      0x375d1ad534b - sys_common::unwind::try::try_fn::h8239963937927191743
  12:      0x375d13bcb48 - __rust_try
  13:      0x375d13b10db - sys_common::unwind::try::inner_try::hb1d5bbff41ba6227p8s
  14:      0x375d1ad56ca - boxed::F.FnBox<A>::call_box::h6628856905804677820
  15:      0x375d13c5a63 - sys::thread::Thread::new::thread_start::h0fc09666d697035citx
  16:      0x375d10d34a3 - start_thread
  17:      0x375d0bf513c - clone
  18:                0x0 - <unknown>

I don't think that this assertion is incredibly worrisome, since the last time I dealt with something like this it was just an ordering issue where I adjusted the length of a node after creating a handle to it instead of the more correct other way around - this triggers a debug assertion but doesn't actually generate bad code.

@gereeter
Copy link
Contributor

I think I found the bug is in merge (adjusting the left node's length after copying things into it), and as expected, it only affects builds with debug assertions turned on. I'm testing the fix now.

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

3 participants