Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

additional testcases including testcase_218 exposing parser deadlock #185

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

additional testcases including testcase_218 exposing parser deadlock #185

wants to merge 1 commit into from

Conversation

debris
Copy link
Contributor

@debris debris commented May 14, 2016

No description provided.

@debris
Copy link
Contributor Author

debris commented May 14, 2016

test passed on buildbot... it's weird. on my machine (osx 10.11.1) test_218 hangs

lldb backtrace

lldb docopt-582cf2d96bafce10 -- 218
(lldb) target create "docopt-582cf2d96bafce10"
Current executable set to 'docopt-582cf2d96bafce10' (x86_64).
(lldb) settings set -- target.run-args  "218"
(lldb) r
Process 9813 launched: '/Users/marek/projects/ethcore/docopt.rs/target/debug/docopt-582cf2d96bafce10' (x86_64)

running 1 test
Process 9813 stopped
* thread #1: tid = 0x5075b, 0x00007fff95911f5e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    frame #0: 0x00007fff95911f5e libsystem_kernel.dylib`__psynch_cvwait + 10
libsystem_kernel.dylib`__psynch_cvwait:
->  0x7fff95911f5e <+10>: jae    0x7fff95911f68            ; <+20>
    0x7fff95911f60 <+12>: movq   %rax, %rdi
    0x7fff95911f63 <+15>: jmp    0x7fff9590d3ef            ; cerror_nocancel
    0x7fff95911f68 <+20>: retq
(lldb) bt all
* thread #1: tid = 0x5075b, 0x00007fff95911f5e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
  * frame #0: 0x00007fff95911f5e libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff9129373d libsystem_pthread.dylib`_pthread_cond_wait + 767
    frame #2: 0x00000001001b9bf9 docopt-582cf2d96bafce10`std::thread::park::hf65e42cf7cf0690b + 297
    frame #3: 0x00000001001c03a2 docopt-582cf2d96bafce10`std::sync::mpsc::blocking::WaitToken::wait::h7355d1e8fe9bf863 + 50
    frame #4: 0x00000001000b94ee docopt-582cf2d96bafce10`_$LT$std..sync..mpsc..Receiver$LT$T$GT$$GT$::recv::hb6d60caa436215b3 + 3534
    frame #5: 0x00000001000a7d30 docopt-582cf2d96bafce10`test::run_tests_console::h90e0b91429aafff4 + 6752
    frame #6: 0x00000001000a5272 docopt-582cf2d96bafce10`test::test_main::hbaa0fd33a7e40623 + 258
    frame #7: 0x00000001000ab32f docopt-582cf2d96bafce10`test::test_main_static::he404c57ea2db8df6 + 2687
    frame #8: 0x00000001000a4167 docopt-582cf2d96bafce10`docopt::__test::main::h2732d7a03be2cea5 + 23 at lib.rs:1
    frame #9: 0x00000001001c5313 docopt-582cf2d96bafce10`std::sys_common::unwind::try::try_fn::hf5d123c03b60f222 + 35
    frame #10: 0x00000001001c2aac docopt-582cf2d96bafce10`__rust_try + 12
    frame #11: 0x00000001001c5155 docopt-582cf2d96bafce10`std::rt::lang_start::hb87e98f24ba5d300 + 533
    frame #12: 0x00000001000a419a docopt-582cf2d96bafce10`main + 42
    frame #13: 0x00007fff8accb5ad libdyld.dylib`start + 1
    frame #14: 0x00007fff8accb5ad libdyld.dylib`start + 1

  thread #2: tid = 0x50772, 0x00007fff959122b2 libsystem_kernel.dylib`__semwait_signal + 10
    frame #0: 0x00007fff959122b2 libsystem_kernel.dylib`__semwait_signal + 10
    frame #1: 0x00007fff9129479b libsystem_pthread.dylib`pthread_join + 444
    frame #2: 0x00000001001c4e8e docopt-582cf2d96bafce10`std::sys::thread::Thread::join::h8a8ccda2bad84519 + 14
    frame #3: 0x00000001000c1e80 docopt-582cf2d96bafce10`std::sys_common::unwind::try::try_fn::h7a2f318c9c72919c + 2816
    frame #4: 0x00000001001c2aac docopt-582cf2d96bafce10`__rust_try + 12
    frame #5: 0x00000001001c2a34 docopt-582cf2d96bafce10`std::sys_common::unwind::inner_try::h03f2e7dcfdd826c0 + 116
    frame #6: 0x00000001000c2dd3 docopt-582cf2d96bafce10`_$LT$F$u20$as$u20$std..boxed..FnBox$LT$A$GT$$GT$::call_box::h412b5ebd26612b98 + 467
    frame #7: 0x00000001001c4d39 docopt-582cf2d96bafce10`std::sys::thread::Thread::new::thread_start::h42a605e44c815beb + 57
    frame #8: 0x00007fff912929b1 libsystem_pthread.dylib`_pthread_body + 131
    frame #9: 0x00007fff9129292e libsystem_pthread.dylib`_pthread_start + 168
    frame #10: 0x00007fff91290385 libsystem_pthread.dylib`thread_start + 13

  thread #3: tid = 0x50773, 0x0000000100010638 docopt-582cf2d96bafce10`core::num::_$LT$impl$u20$u64$GT$::wrapping_add::hb0ecf682950d4d6f + 8 at mod.rs:1673
    frame #0: 0x0000000100010638 docopt-582cf2d96bafce10`core::num::_$LT$impl$u20$u64$GT$::wrapping_add::hb0ecf682950d4d6f + 8 at mod.rs:1673
    frame #1: 0x0000000100010bf6 docopt-582cf2d96bafce10`_$LT$hash..sip..SipHasher$u20$as$u20$hash..Hasher$GT$::finish::hab5772a924132019 + 1254 at sip.rs:100
    frame #2: 0x000000010002fa16 docopt-582cf2d96bafce10`std::collections::hash::table::make_hash::h6111e36ddc1be37b + 54 at table.rs:157
    frame #3: 0x0000000100058f6d docopt-582cf2d96bafce10`_$LT$std..collections..HashMap$LT$K$C$$u20$V$C$$u20$S$GT$$GT$::make_hash::he6f6412f34f321e1 + 29 at map.rs:482
    frame #4: 0x0000000100058f0a docopt-582cf2d96bafce10`_$LT$std..collections..HashMap$LT$K$C$$u20$V$C$$u20$S$GT$$GT$::search_mut::he6c5d5b54c92bd7c + 42 at map.rs:500
    frame #5: 0x0000000100056cb8 docopt-582cf2d96bafce10`_$LT$std..collections..HashMap$LT$K$C$$u20$V$C$$u20$S$GT$$GT$::entry::h9cb264d5b454ecd6 + 104 at map.rs:960
    frame #6: 0x0000000100067d24 docopt-582cf2d96bafce10`docopt::parse::MState::use_flag::h4ebec3509d040445 + 484 at parse.rs:1091
    frame #7: 0x000000010006cae3 docopt-582cf2d96bafce10`docopt::parse::Matcher::states::h88515eb2578dbe78 + 5523 at parse.rs:1312
    frame #8: 0x000000010006b789 docopt-582cf2d96bafce10`docopt::parse::Matcher::states::h88515eb2578dbe78 + 569 at parse.rs:1289
    frame #9: 0x000000010007b670 docopt-582cf2d96bafce10`docopt::parse::Matcher::all_option_states::hc24df8240c062f2c + 304 at parse.rs:1344
    frame #10: 0x000000010006c5f4 docopt-582cf2d96bafce10`docopt::parse::Matcher::states::h88515eb2578dbe78 + 4260 at parse.rs:1285
    frame #11: 0x000000010006c975 docopt-582cf2d96bafce10`docopt::parse::Matcher::states::h88515eb2578dbe78 + 5157 at parse.rs:1294
    frame #12: 0x000000010006bf50 docopt-582cf2d96bafce10`docopt::parse::Matcher::states::h88515eb2578dbe78 + 2560 at parse.rs:1256
    frame #13: 0x000000010002d74d docopt-582cf2d96bafce10`docopt::parse::Matcher::matches::hfa82a995bfee14ba + 205 at parse.rs:1145
    frame #14: 0x00000001000096a2 docopt-582cf2d96bafce10`docopt::parse::Parser::matches::h3b2a662309f5a263 + 242 at parse.rs:87
    frame #15: 0x0000000100007e56 docopt-582cf2d96bafce10`docopt::dopt::Docopt::parse::_$u7b$$u7b$closure$u7d$$u7d$::hc90840e8f6945e7f + 134 at dopt.rs:220
    frame #16: 0x0000000100007c61 docopt-582cf2d96bafce10`_$LT$std..result..Result$LT$T$C$$u20$E$GT$$GT$::and_then::h6d08b9132aab748e + 257 at result.rs:561
    frame #17: 0x00000001000075ab docopt-582cf2d96bafce10`docopt::dopt::Docopt::parse::h8603d0f02bf14970 + 315 at dopt.rs:217
    frame #18: 0x0000000100080260 docopt-582cf2d96bafce10`docopt::test::get_args::h58058adbaf68154c + 1184 at mod.rs:10
    frame #19: 0x000000010009ea18 docopt-582cf2d96bafce10`docopt::test::testcases::test_218_testcases::hb0c5c73dd35e9a68 + 56 at mod.rs:46
    frame #20: 0x00000001000c104c docopt-582cf2d96bafce10`_$LT$F$u20$as$u20$std..boxed..FnBox$LT$A$GT$$GT$::call_box::h7255de43fd0b46d8 + 28
    frame #21: 0x00000001000c351e docopt-582cf2d96bafce10`std::sys_common::unwind::try::try_fn::hc2822a57b50437fa + 478
    frame #22: 0x00000001001c2aac docopt-582cf2d96bafce10`__rust_try + 12
    frame #23: 0x00000001001c2a34 docopt-582cf2d96bafce10`std::sys_common::unwind::inner_try::h03f2e7dcfdd826c0 + 116
    frame #24: 0x00000001000c3905 docopt-582cf2d96bafce10`_$LT$F$u20$as$u20$std..boxed..FnBox$LT$A$GT$$GT$::call_box::h2b061a3d9e6a169e + 421
    frame #25: 0x00000001001c4d39 docopt-582cf2d96bafce10`std::sys::thread::Thread::new::thread_start::h42a605e44c815beb + 57
    frame #26: 0x00007fff912929b1 libsystem_pthread.dylib`_pthread_body + 131
    frame #27: 0x00007fff9129292e libsystem_pthread.dylib`_pthread_start + 168
    frame #28: 0x00007fff91290385 libsystem_pthread.dylib`thread_start + 13

@BurntSushi
Copy link
Member

Weird. I don't know where the hang is occurring? Can you reproduce the bug outside the test harness in a normal program?

Also, I unfortunately can't merge this PR because you edited a generated file (see the top of the file). If you add the tests to testcases.docopt instead, I'd be happy to merge.

@debris
Copy link
Contributor Author

debris commented May 15, 2016

Weird. I don't know where the hang is occurring? Can you reproduce the bug outside the test harness in a normal program?

Yes. That's how I found it.

Also, I unfortunately can't merge this PR because you edited a generated file (see the top of the file). If you add the tests to testcases.docopt instead, I'd be happy to merge.

Sure. I will prepare everything on monday... Will also try to find a reason hang.

@debris
Copy link
Contributor Author

debris commented May 16, 2016

testcases.docopt updated.

I also tried to reproduce the issue on linux machine and I noticed strange thing. Test 218 passes, but it takes ~30 seconds to execute. It's the same on my osx machine. I haven't noticed that before cause I was always killing the process before that time.

short ascii video

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants