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

Bump rust version and transitive deps. #65

Merged
merged 3 commits into from
Mar 30, 2022

Conversation

adam-azarchs
Copy link
Member

No description provided.

Copy link
Contributor

@pmarks pmarks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@adam-azarchs
Copy link
Member Author

I don't have a mac so I can't do much to debug why the tests are failing with SIGSEGV there.

@luiz10x
Copy link
Contributor

luiz10x commented Mar 28, 2022

I don't have a mac so I can't do much to debug why the tests are failing with SIGSEGV there.

I'm checking that, will update soon

@luiz10x
Copy link
Contributor

luiz10x commented Mar 30, 2022

Bisecting versions, seems like this problem is triggered on libz-sys 1.1.5 (it was working on 1.1.4).
Diff
... which seems to point to rust-lang/libz-sys#89

I started tracking down other viable fixes (use zlib-ng-compat as backend for flate2?), but in the end explicitly declaring libz-sys in Cargo.toml solved the issue. My guess is that different symbols were being pulled from the native zlib vs the static build that was supposed to be used.

Full traceback pointing to gzipped file creation as being the issue:

* thread #4, name = 'tests::test_lr20', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
  * frame #0: 0x0000000100162c48 bamtofastq-f53333f4e9bdae15`init_block(s=0x0000000102014808) at trees.c:119:16 [opt]
    frame #1: 0x0000000100162a3e bamtofastq-f53333f4e9bdae15`zng_tr_init(s=<unavailable>) at trees.c:101:5 [opt] [artificial]
    frame #2: 0x000000010015b58c bamtofastq-f53333f4e9bdae15`deflateResetKeep(strm=0x000000010110d060) at deflate.c:454:5 [opt]
    frame #3: 0x000000010015b12f bamtofastq-f53333f4e9bdae15`deflateReset(strm=0x000000010110d060) at deflate.c:465:11 [opt]
    frame #4: 0x0000000100158ca8 bamtofastq-f53333f4e9bdae15`_$LT$flate2..ffi..c..Deflate$u20$as$u20$flate2..ffi..DeflateBackend$GT$::make::h8659e42d03a3a5cc [inlined] flate2::ffi::c::c_backend::mz_deflateInit2::hc8f1d098469a910d(stream=0x000000010110d060, level=1, method=8, window_bits=<unavailable>, mem_level=8, strategy=0) at c.rs:425:9 [opt]
    frame #5: 0x0000000100158c7c bamtofastq-f53333f4e9bdae15`_$LT$flate2..ffi..c..Deflate$u20$as$u20$flate2..ffi..DeflateBackend$GT$::make::h8659e42d03a3a5cc(level=Compression @ scalar, zlib_header=<unavailable>, window_bits='\x0f') at c.rs:296:23 [opt]
    frame #6: 0x000000010015834a bamtofastq-f53333f4e9bdae15`flate2::mem::Compress::new::he2f4d41f49bebe71(level=<unavailable>, zlib_header=<unavailable>) at mem.rs:202:20 [opt]
    frame #7: 0x000000010000fd76 bamtofastq-f53333f4e9bdae15`flate2::gz::write::gz_encoder::h229943d727ad5117(header=size=10, w=File @ scalar, lvl=<unavailable>) at write.rs:48:36 [opt]
    frame #8: 0x000000010001221c bamtofastq-f53333f4e9bdae15`bamtofastq::FastqWriter::open_gzip_writer::hda9a5b31cd0ad669 [inlined] flate2::gz::GzBuilder::write::he1e1979105edf46a(self=GzBuilder @ 0x00007000042714e8, w=File @ scalar, lvl=Compression @ scalar) at mod.rs:175:9 [opt]
    frame #9: 0x0000000100012196 bamtofastq-f53333f4e9bdae15`bamtofastq::FastqWriter::open_gzip_writer::hda9a5b31cd0ad669 [inlined] flate2::gz::write::GzEncoder$LT$W$GT$::new::h72ccb58a7298adc8(w=File @ scalar, level=Compression @ scalar) at write.rs:64:9 [opt]
    frame #10: 0x000000010001218e bamtofastq-f53333f4e9bdae15`bamtofastq::FastqWriter::open_gzip_writer::hda9a5b31cd0ad669(path=<unavailable>) at main.rs:943:18 [opt]
    frame #11: 0x0000000100007b2a bamtofastq-f53333f4e9bdae15`bamtofastq::FastqWriter::cycle_writers::hbacc755e06a5a19a(self=0x00000001070084a8) at main.rs:932:24 [opt]
    frame #12: 0x0000000100006cbc bamtofastq-f53333f4e9bdae15`bamtofastq::FastqManager::write::h8fd7812239a6efa8 [inlined] bamtofastq::FastqWriter::write::h9e156d2f7d8d0853(self=0x00000001070084a8, r1=0x0000700004271a78, r2=0x0000700004271e60, i1=0x00007000042721d0, i2=0x0000700004272248) at main.rs:906:13 [opt]
    frame #13: 0x0000000100006c38 bamtofastq-f53333f4e9bdae15`bamtofastq::FastqManager::write::h8fd7812239a6efa8 [inlined] bamtofastq::FastqManager::write::_$u7b$$u7b$closure$u7d$$u7d$::hd8f07b98fe9f3e0f(w=0x00000001070084a8) at main.rs:702:46 [opt]
    frame #14: 0x0000000100006c38 bamtofastq-f53333f4e9bdae15`bamtofastq::FastqManager::write::h8fd7812239a6efa8 at option.rs:836:29 [opt]
    frame #15: 0x0000000100006c38 bamtofastq-f53333f4e9bdae15`bamtofastq::FastqManager::write::h8fd7812239a6efa8(self=<unavailable>, rg=<unavailable>, r1=0x0000700004271a78, r2=0x0000700004271e60, i1=0x00007000042721d0, i2=0x0000700004272248) at main.rs:702:13 [opt]
    frame #16: 0x000000010001bd3d bamtofastq-f53333f4e9bdae15`bamtofastq::inner::hc5c69948c61f021e at main.rs:1191:17 [opt]
    frame #17: 0x000000010001b9db bamtofastq-f53333f4e9bdae15`bamtofastq::inner::hc5c69948c61f021e(args=Args @ 0x0000700004272538, cache_size=2, bam=Reader @ 0x0000700004272608) at main.rs:1115:13 [opt]
    frame #18: 0x000000010000875e bamtofastq-f53333f4e9bdae15`bamtofastq::go::he99eccb16eb04141(args=Args @ 0x0000700004272878, cache_size=<unavailable>) at main.rs:1026:13 [opt]
    frame #19: 0x0000000100044d9f bamtofastq-f53333f4e9bdae15`bamtofastq::tests::test_lr20::ha763a948a5462512 at main.rs:1454:29 [opt]
    frame #20: 0x0000000100099b86 bamtofastq-f53333f4e9bdae15`test::__rust_begin_short_backtrace::h606b8852bd2bbc23 [inlined] core::ops::function::FnOnce::call_once::h4e5724399bfb1692 at function.rs:227:5 [opt]
    frame #21: 0x0000000100099b84 bamtofastq-f53333f4e9bdae15`test::__rust_begin_short_backtrace::h606b8852bd2bbc23 at lib.rs:578:5 [opt]
    frame #22: 0x00000001000987fd bamtofastq-f53333f4e9bdae15`test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::hf8a5a8a5a38fe246 [inlined] _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h6061a891aec795e0 at boxed.rs:1636:9 [opt]
    frame #23: 0x00000001000987f7 bamtofastq-f53333f4e9bdae15`test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::hf8a5a8a5a38fe246 [inlined] _$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h71f3e55c57073518 at unwind_safe.rs:271:9 [opt]
    frame #24: 0x00000001000987f7 bamtofastq-f53333f4e9bdae15`test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::hf8a5a8a5a38fe246 [inlined] std::panicking::try::do_call::hbc19fb07fbd4181b at panicking.rs:403:40 [opt]
    frame #25: 0x00000001000987f7 bamtofastq-f53333f4e9bdae15`test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::hf8a5a8a5a38fe246 [inlined] std::panicking::try::hcffb047a7e08a183 at panicking.rs:367:19 [opt]
    frame #26: 0x00000001000987f7 bamtofastq-f53333f4e9bdae15`test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::hf8a5a8a5a38fe246 [inlined] std::panic::catch_unwind::hef165b55618452a9 at panic.rs:129:14 [opt]
    frame #27: 0x00000001000987f7 bamtofastq-f53333f4e9bdae15`test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::hf8a5a8a5a38fe246 [inlined] test::run_test_in_process::h0a9bc9012c2de65d at lib.rs:601:18 [opt]
    frame #28: 0x00000001000987dd bamtofastq-f53333f4e9bdae15`test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::hf8a5a8a5a38fe246 at lib.rs:493:39 [opt]
    frame #29: 0x000000010006647b bamtofastq-f53333f4e9bdae15`std::sys_common::backtrace::__rust_begin_short_backtrace::h0ff1bbf93979654b [inlined] test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::ha592e72caf3d5406 at lib.rs:520:37 [opt]
    frame #30: 0x00000001000663ab bamtofastq-f53333f4e9bdae15`std::sys_common::backtrace::__rust_begin_short_backtrace::h0ff1bbf93979654b at backtrace.rs:125:18 [opt]
    frame #31: 0x000000010006ad44 bamtofastq-f53333f4e9bdae15`core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h2f47c170ad2e9731 [inlined] std::thread::Builder::spawn_unchecked::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h74a27a4ab176d576 at mod.rs:481:17 [opt]
    frame #32: 0x000000010006ad3f bamtofastq-f53333f4e9bdae15`core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h2f47c170ad2e9731 [inlined] _$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h7fc45bb13e840c8a at unwind_safe.rs:271:9 [opt]
    frame #33: 0x000000010006ad3f bamtofastq-f53333f4e9bdae15`core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h2f47c170ad2e9731 [inlined] std::panicking::try::do_call::h7fdaf88137bac608 at panicking.rs:403:40 [opt]
    frame #34: 0x000000010006ad3f bamtofastq-f53333f4e9bdae15`core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h2f47c170ad2e9731 [inlined] std::panicking::try::h5d91459319f64b21 at panicking.rs:367:19 [opt]
    frame #35: 0x000000010006ad3f bamtofastq-f53333f4e9bdae15`core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h2f47c170ad2e9731 [inlined] std::panic::catch_unwind::h5a4189e84e2890ab at panic.rs:129:14 [opt]
    frame #36: 0x000000010006ad3f bamtofastq-f53333f4e9bdae15`core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h2f47c170ad2e9731 [inlined] std::thread::Builder::spawn_unchecked::_$u7b$$u7b$closure$u7d$$u7d$::h8f10c5e699005694 at mod.rs:480:30 [opt]
    frame #37: 0x000000010006acf4 bamtofastq-f53333f4e9bdae15`core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h2f47c170ad2e9731 at function.rs:227:5 [opt]
    frame #38: 0x000000010024bd97 bamtofastq-f53333f4e9bdae15`std::sys::unix::thread::Thread::new::thread_start::h7398a19dadad4e33 [inlined] _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h46000c2c7257bbd0 at boxed.rs:1636:9 [opt]
    frame #39: 0x000000010024bd91 bamtofastq-f53333f4e9bdae15`std::sys::unix::thread::Thread::new::thread_start::h7398a19dadad4e33 [inlined] _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::hc0a3aadd00cb835b at boxed.rs:1636:9 [opt]
    frame #40: 0x000000010024bd8a bamtofastq-f53333f4e9bdae15`std::sys::unix::thread::Thread::new::thread_start::h7398a19dadad4e33 at thread.rs:106:17 [opt]
    frame #41: 0x00007fff208078fc libsystem_pthread.dylib`_pthread_start + 224
    frame #42: 0x00007fff20803443 libsystem_pthread.dylib`thread_start + 15

@adam-azarchs
Copy link
Member Author

I don't love it, but it works.

@adam-azarchs adam-azarchs merged commit 69d439f into master Mar 30, 2022
@adam-azarchs adam-azarchs deleted the azarchs/bump-rust-version branch March 30, 2022 19:28
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

Successfully merging this pull request may close these issues.

3 participants