Reqwest and valgrind, valgrind error, maybe tokio related

Hi all,

I have a library that use reqwest and so all of it dependencies.

When I try to run it through valgrid I get a segmentation fault from Valgrid itself. The library works just fine.

Do you guys have any idea? Should it be reported somewhere?

Thread 6 seems to be the interesting on from the logs:

vex: the `impossible' happened:                                                                                                                                                                                                               
   isZeroU                                                                                                                                                                                                                                    
vex storage: T total 2888494232 bytes allocated                                                                                                                                                                                               
vex storage: P total 640 bytes allocated                                                                                                                                                                                                      
                                                                                                                                                                                                                                              
valgrind: the 'impossible' happened:                                                                                                                                                                                                          
   LibVEX called failure_exit().                                                                                                                                                                                                              
                                                                                                                                                                                                                                              
host stacktrace:                                                                                                                                                                                                                              
==1800==    at 0x38083F48: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x38084064: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x380842A1: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x380842CA: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x3809F682: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x38145428: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x3815256D: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x38156692: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x381572C6: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x38159188: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x3815A1D6: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x3814320C: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x380A1C0B: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x380D296B: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x380D45CF: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x380E3946: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x380E3E1A: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0x3810C62D: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)                                                                                                                                                                    
==1800==    by 0xDEADBEEFDEADBEEE: ???                                                                                                                                                                                                        
==1800==    by 0xDEADBEEFDEADBEEE: ???                                                                                                                                                                                                        
==1800==    by 0xDEADBEEFDEADBEEE: ???                                                                                                                                                                                                        
                                                                                                                                                                                                                                              
sched status:                                                                                                                                                                                                                                 
  running_tid=6                                                                                                                                                                                                                               
                                                                                                                                                                                                                                             

Thread 4: status = VgTs_WaitSys (lwpid 1803)
==1800==    at 0x555C360: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.S:185)
==1800==    by 0x486803: bioProcessBackgroundJobs (bio.c:176)
==1800==    by 0x55566B9: start_thread (pthread_create.c:333)
==1800==    by 0x587341C: clone (clone.S:109)

Thread 5: status = VgTs_WaitSys (lwpid 1804)
==1800==    at 0x555C709: pthread_cond_timedwait@@GLIBC_2.3.2 (pthread_cond_timedwait.S:225)
==1800==    by 0x8F02660: std::sys::unix::condvar::Condvar::wait_timeout::h0aa9df9c85be00cc (condvar.rs:100)
==1800==    by 0x8EF44B4: wait_timeout (condvar.rs:51)
==1800==    by 0x8EF44B4: wait_timeout<()> (condvar.rs:405) 
==1800==    by 0x8EF44B4: std::thread::park_timeout::h068bd3b13cd3a054 (mod.rs:1006)
==1800==    by 0x8543D26: reqwest::wait::timeout::ha56081736f03906f (wait.rs:26)
==1800==    by 0x8542DF9: reqwest::client::ClientHandle::execute_request::hfcbef3ceb995d84e (client.rs:636)
==1800==    by 0x8540911: reqwest::client::Client::execute::h4c33da72957b5f11 (client.rs:487)
==1800==    by 0x851DDF7: reqwest::request::RequestBuilder::send::h462e2e97ca954c44 (request.rs:507)
==1800==    by 0x845DB8E: telemetrics::send_telemetrics::h669093a996305359 (lib.rs:87)
==1800==    by 0x845D267: telemetrics::start_telemetrics::h05e762338212b318 (lib.rs:26)
==1800==    by 0x8401179: core::ops::function::FnOnce::call_once::h276c83181aba8ae1 (function.rs:231)
==1800==    by 0x841DA78: std::sys_common::backtrace::__rust_begin_short_backtrace::hfd51a247499d68bd (backtrace.rs:136)
==1800==    by 0x841FA15: std::thread::Builder::spawn_unchecked::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h93fb2833a32c4d9e (mod.rs:470)
==1800==    by 0x8423368: _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h9fd743ef18b49f67 (panic.rs:315)
==1800==    by 0x840D76A: std::panicking::try::do_call::h7f86d7a85eca3c71 (panicking.rs:293)
==1800==    by 0x8F045F9: __rust_maybe_catch_panic (lib.rs:85)
==1800==    by 0x840D334: std::panicking::try::ha660ed41de5571d8 (panicking.rs:272)
==1800==    by 0x8423378: std::panic::catch_unwind::h63b17a2daa711eec (panic.rs:394)
==1800==    by 0x841F213: std::thread::Builder::spawn_unchecked::_$u7b$$u7b$closure$u7d$$u7d$::h0c5e05bc14a79835 (mod.rs:469)
==1800==    by 0x840113C: core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h732536660a21524c (function.rs:231)
==1800==    by 0x8EF33CE: _$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h805c3cc89d534c05 (boxed.rs:704)
==1800==    by 0x8F0395F: call_once<(),alloc::boxed::Box<FnOnce<()>>> (boxed.rs:704)
==1800==    by 0x8F0395F: start_thread (thread.rs:13)
==1800==    by 0x8F0395F: std::sys::unix::thread::Thread::new::thread_start::h6f10b78f26c98dc6 (thread.rs:79)
==1800==    by 0x55566B9: start_thread (pthread_create.c:333)
==1800==    by 0x587341C: clone (clone.S:109)

Thread 6: status = VgTs_Runnable (lwpid 1805)
==1800==    at 0x8742F40: ecp_nistz256_avx2_gather_w7 (ecp_nistz256-x86_64.s:5051)
==1800==    by 0x86601BA: ecp_nistz256_points_mul (ecp_nistz256.c:1237)
==1800==    by 0x865B6A3: EC_POINTs_mul (ec_lib.c:942)
==1800==    by 0x865B77E: EC_POINT_mul (ec_lib.c:962)
==1800==    by 0x86592BF: ec_key_simple_generate_key (ec_key.c:232)
==1800==    by 0x867D5F2: EVP_PKEY_keygen (pmeth_gn.c:108)
==1800==    by 0x85F408B: ssl_generate_pkey (s3_lib.c:4688) 
==1800==    by 0x860DEC6: tls_construct_cke_ecdhe (statem_clnt.c:3136)
==1800==    by 0x860DEC6: tls_construct_client_key_exchange (statem_clnt.c:3343)
==1800==    by 0x860BD3D: write_state_machine (statem.c:843)
==1800==    by 0x860BD3D: state_machine (statem.c:443)
==1800==    by 0x85FC226: SSL_do_handshake (ssl_lib.c:3599) 
==1800==    by 0x84F170D: openssl::ssl::MidHandshakeSslStream$LT$S$GT$::handshake::h6fe43fc287e98b4f (mod.rs:3285)
==1800==    by 0x851F2CD: native_tls::imp::MidHandshakeTlsStream$LT$S$GT$::handshake::h5606873c6f60789e (openssl.rs:208)
==1800==    by 0x84DF37D: native_tls::MidHandshakeTlsStream$LT$S$GT$::handshake::hafba6d5e55a4c7a5 (lib.rs:245)
==1800==    by 0x84F2998: _$LT$hyper_tls..client..Handshaking$LT$T$GT$$u20$as$u20$futures..future..Future$GT$::poll::h1290c370ed390b69 (client.rs:155)
==1800==    by 0x84D778E: _$LT$futures..future..map..Map$LT$A$C$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::h9e3ff048fefd5734 (map.rs:30)
==1800==    by 0x85AF8C6: _$LT$futures..future..map_err..MapErr$LT$A$C$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::h2c79d189894dd4bb (map_err.rs:30)
==1800==    by 0x8484615: futures::future::chain::Chain$LT$A$C$B$C$C$GT$::poll::hbdc4f4353fcbc050 (chain.rs:32)
==1800==    by 0x84DC04A: _$LT$futures..future..and_then..AndThen$LT$A$C$B$C$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::he9fc1f0ef9dcdd29 (and_then.rs:32)
==1800==    by 0x8513E2B: _$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::hb06431a0152de8d6 (mod.rs:113)
==1800==    by 0x84F35FB: _$LT$hyper_tls..client..HttpsConnecting$LT$T$GT$$u20$as$u20$futures..future..Future$GT$::poll::h996bc3358226f1ff (client.rs:133)
==1800==    by 0x847F94B: futures::future::chain::Chain$LT$A$C$B$C$C$GT$::poll::h676facbb82ca27e7 (chain.rs:26)
==1800==    by 0x84DBF5A: _$LT$futures..future..and_then..AndThen$LT$A$C$B$C$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::h8c18fd7a7aed1565 (and_then.rs:32)
==1800==    by 0x8513E6B: _$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::hfb6098b26297f715 (mod.rs:113)
==1800==    by 0x85B0933: _$LT$futures..future..map_err..MapErr$LT$A$C$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::hb0db33d59921eaaa (map_err.rs:30)
==1800==    by 0x8482D6F: futures::future::chain::Chain$LT$A$C$B$C$C$GT$::poll::haf8553317336ab14 (chain.rs:26)
==1800==    by 0x84DC01A: _$LT$futures..future..and_then..AndThen$LT$A$C$B$C$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::hde8feb9eedce2b14 (and_then.rs:32)
==1800==    by 0x84F3C8A: _$LT$futures..future..either..Either$LT$A$C$B$GT$$u20$as$u20$futures..future..Future$GT$::poll::hd5410fac3c9c3f0d (either.rs:35)
==1800==    by 0x84A74F4: _$LT$hyper..common..lazy..Lazy$LT$F$C$R$GT$$u20$as$u20$futures..future..Future$GT$::poll::h9335fc1659c39b9b (lazy.rs:55)
==1800==    by 0x847258C: _$LT$futures..future..select2..Select2$LT$A$C$B$GT$$u20$as$u20$futures..future..Future$GT$::poll::ha8b43fa19cd10234 (select2.rs:29)
==1800==    by 0x84D8077: _$LT$futures..future..map..Map$LT$A$C$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::hed3928bdcff4214a (map.rs:30)
==1800==    by 0x848208F: futures::future::chain::Chain$LT$A$C$B$C$C$GT$::poll::h82e11201fcdd4536 (chain.rs:26)
==1800==    by 0x858981A: _$LT$futures..future..or_else..OrElse$LT$A$C$B$C$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::h51af8f6ded41308b (or_else.rs:32)
==1800==    by 0x847A7EF: futures::future::chain::Chain$LT$A$C$B$C$C$GT$::poll::h105c2c2619f3f8e2 (chain.rs:26)
==1800==    by 0x84DBE6A: _$LT$futures..future..and_then..AndThen$LT$A$C$B$C$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::h18bfd69010ba6896 (and_then.rs:32)
==1800==    by 0x85576A2: hyper::client::Client$LT$C$C$B$GT$::retryably_send_request::_$u7b$$u7b$closure$u7d$$u7d$::h566f5180eac9c4be (mod.rs:266)
==1800==    by 0x84D8DFA: _$LT$futures..future..poll_fn..PollFn$LT$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::h662cef87badde6ad (poll_fn.rs:43)
==1800==    by 0x8799B7B: _$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::hbb0c0e5b277fce63 (mod.rs:113)
==1800==    by 0x876BA9B: _$LT$hyper..client..ResponseFuture$u20$as$u20$futures..future..Future$GT$::poll::h71078b314d089b12 (mod.rs:613)
==1800==    by 0x8571859: _$LT$reqwest..async_impl..client..PendingRequest$u20$as$u20$futures..future..Future$GT$::poll::hc16c8f7f52d2a50b (client.rs:726)
==1800==    by 0x85714EB: _$LT$reqwest..async_impl..client..Pending$u20$as$u20$futures..future..Future$GT$::poll::h2cb2141a82ab7396 (client.rs:708)
==1800==    by 0x8541A54: reqwest::client::ClientHandle::new::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::had8129d9e2b1f52a (client.rs:572)
==1800==    by 0x84D8E82: _$LT$futures..future..poll_fn..PollFn$LT$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::he2deb6f2d975ceb1 (poll_fn.rs:43)
==1800==    by 0x87D47C4: _$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::hc75032c6fff2ebb0 (mod.rs:113)
==1800==    by 0x87C92C3: futures::task_impl::Spawn$LT$T$GT$::poll_future_notify::_$u7b$$u7b$closure$u7d$$u7d$::ha46a4da97aaf2e8d (in /home/simo/rediSQL/target/debug/libredis_sql.so)
==1800==    by 0x87C9420: futures::task_impl::Spawn$LT$T$GT$::enter::_$u7b$$u7b$closure$u7d$$u7d$::h75d008267ceab8b5 (in /home/simo/rediSQL/target/debug/libredis_sql.so)
==1800==    by 0x87CDB55: futures::task_impl::std::set::hb6d249db99b0a21a (mod.rs:78)
==1800==    by 0x87C93BE: futures::task_impl::Spawn$LT$T$GT$::enter::h8d44021d4204cec2 (mod.rs:399)
==1800==    by 0x87C91E7: futures::task_impl::Spawn$LT$T$GT$::poll_fn_notify::hedd218a8993cd2cf (mod.rs:291)
==1800==    by 0x87C9297: futures::task_impl::Spawn$LT$T$GT$::poll_future_notify::h310adf088b7ad1ec (mod.rs:329)
==1800==    by 0x87D0333: tokio_current_thread::scheduler::Scheduled$LT$U$GT$::tick::h1023c51bd6075cb5 (scheduler.rs:351)
==1800==    by 0x87D1043: tokio_current_thread::scheduler::Scheduler$LT$U$GT$::tick::_$u7b$$u7b$closure$u7d$$u7d$::hdd6509c0cdb2a2cf (in /home/simo/rediSQL/target/debug/libredis_sql.so)
==1800==    by 0x87C5DB3: tokio_current_thread::Borrow$LT$U$GT$::enter::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h326b3b42e3d6586b (in /home/simo/rediSQL/target/debug/libredis_sql.so)
==1800==    by 0x87C5AF2: tokio_current_thread::CurrentRunner::set_spawn::h77ededb91d226fd2 (lib.rs:825)
==1800==    by 0x87C5C81: tokio_current_thread::Borrow$LT$U$GT$::enter::_$u7b$$u7b$closure$u7d$$u7d$::hc022f47d232b0c01 (lib.rs:788)
==1800==    by 0x87C8230: std::thread::local::LocalKey$LT$T$GT$::try_with::hdd29c34b000e17ef (local.rs:299)
==1800==    by 0x87C7AD7: std::thread::local::LocalKey$LT$T$GT$::with::hc3c2a94471b92d31 (local.rs:245)
==1800==    by 0x87C5BD0: tokio_current_thread::Borrow$LT$U$GT$::enter::he28f7ebbe8c9fff6 (lib.rs:786)
==1800==    by 0x87D0F32: tokio_current_thread::scheduler::Scheduler$LT$U$GT$::tick::hb2114eb570068ae3 (scheduler.rs:330)
==1800==    by 0x87C5F87: tokio_current_thread::Entered$LT$P$GT$::tick::h75d5200d83031a72 (lib.rs:612)
==1800==    by 0x84C521D: tokio_current_thread::Entered$LT$P$GT$::block_on::ha4d8984405718588 (lib.rs:502)
==1800==    by 0x85594C5: tokio::runtime::current_thread::runtime::Runtime::block_on::_$u7b$$u7b$closure$u7d$$u7d$::h78061ca78df553e9 (runtime.rs:200)
==1800==    by 0x85593E8: tokio::runtime::current_thread::runtime::Runtime::enter::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h8c5d895cbaaa3196 (runtime.rs:241)
==1800==    by 0x84DFFC3: tokio_executor::global::with_default::_$u7b$$u7b$closure$u7d$$u7d$::hc5ed738ba87248b6 (global.rs:209)
==1800==    by 0x85482F2: std::thread::local::LocalKey$LT$T$GT$::try_with::h2869f9ceaaaf322f (local.rs:299)
==1800==    by 0x85479DC: std::thread::local::LocalKey$LT$T$GT$::with::h7aa46b82544173e0 (local.rs:245)
==1800==    by 0x84DFE69: tokio_executor::global::with_default::h513626a176b6db15 (global.rs:178)
==1800==    by 0x85592FE: tokio::runtime::current_thread::runtime::Runtime::enter::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hff28cf12828beed8 (runtime.rs:239)
==1800==    by 0x84DF7EC: tokio_timer::timer::handle::with_default::_$u7b$$u7b$closure$u7d$$u7d$::hb8160bdcb008215f (handle.rs:94)
==1800==    by 0x8547DA6: std::thread::local::LocalKey$LT$T$GT$::try_with::h0d3546d0430e5db0 (local.rs:299)
==1800==    by 0x854796C: std::thread::local::LocalKey$LT$T$GT$::with::h70eb33ad7a8f3e5d (local.rs:245)
==1800==    by 0x84DF5F7: tokio_timer::timer::handle::with_default::hfe5c50c0443e3926 (handle.rs:81)
==1800==    by 0x8559288: tokio::runtime::current_thread::runtime::Runtime::enter::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h00f559b05cab957e (runtime.rs:232)
==1800==    by 0x84A03E6: tokio_timer::clock::clock::with_default::_$u7b$$u7b$closure$u7d$$u7d$::hf44fc723223e6973 (clock.rs:141)
==1800==    by 0x8548ABE: std::thread::local::LocalKey$LT$T$GT$::try_with::hc8d59cacf2ce54ce (local.rs:299)
==1800==    by 0x8547AAC: std::thread::local::LocalKey$LT$T$GT$::with::h9b867e0655b9508d (local.rs:245)
==1800==    by 0x84A02BB: tokio_timer::clock::clock::with_default::h5f381ffd39e3e9db (clock.rs:124)
==1800==    by 0x8559221: tokio::runtime::current_thread::runtime::Runtime::enter::_$u7b$$u7b$closure$u7d$$u7d$::hca1d5144c0c79e5c (runtime.rs:231)
==1800==    by 0x858AF69: tokio_reactor::with_default::_$u7b$$u7b$closure$u7d$$u7d$::h97724cc7bc78d542 (lib.rs:237)
==1800==    by 0x8548802: std::thread::local::LocalKey$LT$T$GT$::try_with::h94d90d2a25eb8bf5 (local.rs:299)
==1800==    by 0x85478FC: std::thread::local::LocalKey$LT$T$GT$::with::h6c086343fe92530b (local.rs:245)
==1800==    by 0x858AD10: tokio_reactor::with_default::hda60ceaa9e991db0 (lib.rs:217)
==1800==    by 0x8559147: tokio::runtime::current_thread::runtime::Runtime::enter::h41e669e48319d8d8 (runtime.rs:230)
==1800==    by 0x8559472: tokio::runtime::current_thread::runtime::Runtime::block_on::h95b9919fcee6f62c (runtime.rs:198)
==1800==    by 0x854240E: reqwest::client::ClientHandle::new::_$u7b$$u7b$closure$u7d$$u7d$::h00c93a385ab11f40 (client.rs:591)
==1800==    by 0x852FA12: std::sys_common::backtrace::__rust_begin_short_backtrace::hef9faa9be1549913 (backtrace.rs:136)
==1800==    by 0x858CA25: std::thread::Builder::spawn_unchecked::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hecf210279a2f9867 (mod.rs:470)
==1800==    by 0x8589D35: _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::hcdf40c2f18df042f (panic.rs:315)
==1800==    by 0x84A2FD9: std::panicking::try::do_call::h4837ab2514165150 (panicking.rs:293)
==1800==    by 0x8F045F9: __rust_maybe_catch_panic (lib.rs:85)
==1800==    by 0x84A2BBF: std::panicking::try::hc4f7a594833a751e (panicking.rs:272)
==1800==    by 0x858BDA5: std::panic::catch_unwind::h0e2b2176dd2cfa4c (panic.rs:394)
==1800==    by 0x858C7FF: std::thread::Builder::spawn_unchecked::_$u7b$$u7b$closure$u7d$$u7d$::h43d3065ee6366c5a (mod.rs:469)
==1800==    by 0x858D5B3: core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h52e0bbc119bcebbd (function.rs:231)
==1800==    by 0x8EF33CE: _$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h805c3cc89d534c05 (boxed.rs:704)
==1800==    by 0x8F0395F: call_once<(),alloc::boxed::Box<FnOnce<()>>> (boxed.rs:704)
==1800==    by 0x8F0395F: start_thread (thread.rs:13)
==1800==    by 0x8F0395F: std::sys::unix::thread::Thread::new::thread_start::h6f10b78f26c98dc6 (thread.rs:79)
==1800==    by 0x55566B9: start_thread (pthread_create.c:333)
==1800==    by 0x587341C: clone (clone.S:109)

Thread 7: status = VgTs_WaitSys (lwpid 1807)
==1800==    at 0x555C360: pthread_cond_wait@@GLIBC_2.3.2 (pthread_cond_wait.S:185)
==1800==    by 0x8EF4162: wait (condvar.rs:69)
==1800==    by 0x8EF4162: wait (condvar.rs:41)
==1800==    by 0x8EF4162: wait<()> (condvar.rs:204)
==1800==    by 0x8EF4162: std::thread::park::h34020169cb9d16a0 (mod.rs:911)
==1800==    by 0x8EFC371: std::sync::mpsc::blocking::WaitToken::wait::hb92b5a1a5d508783 (blocking.rs:71)
==1800==    by 0x893A0D8: std::sync::mpsc::oneshot::Packet$LT$T$GT$::recv::h8c41b6b83fe4e1ea (oneshot.rs:146)
==1800==    by 0x8924E4A: std::sync::mpsc::Receiver$LT$T$GT$::recv::h0c0aa4d6cbe50637 (mod.rs:1189)
==1800==    by 0x892AF12: futures_cpupool::Inner::work::h21efc1282824bf02 (lib.rs:255)
==1800==    by 0x892BE63: futures_cpupool::Builder::create::_$u7b$$u7b$closure$u7d$$u7d$::hd2447b1925606d67 (in /home/simo/rediSQL/target/debug/libredis_sql.so)
==1800==    by 0x8931FC1: std::sys_common::backtrace::__rust_begin_short_backtrace::h47748e76916a1777 (backtrace.rs:136)
==1800==    by 0x8936B40: std::thread::Builder::spawn_unchecked::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h683a3d1418a5f8d6 (mod.rs:470)
==1800==    by 0x8931850: _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::he30a5dbae1a22ae2 (panic.rs:315)
==1800==    by 0x8927156: std::panicking::try::do_call::h1c2214f24763dbad (panicking.rs:293)
==1800==    by 0x8F045F9: __rust_maybe_catch_panic (lib.rs:85)
==1800==    by 0x8926F9F: std::panicking::try::h9389efabb7912b62 (panicking.rs:272)
==1800==    by 0x8932122: std::panic::catch_unwind::h6b76ecbfa514b3a5 (panic.rs:394)
==1800==    by 0x8936931: std::thread::Builder::spawn_unchecked::_$u7b$$u7b$closure$u7d$$u7d$::hd5fc6e3921823962 (mod.rs:469)
==1800==    by 0x8927183: core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::hc5359158a51c29fd (function.rs:231)
==1800==    by 0x8EF33CE: _$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h805c3cc89d534c05 (boxed.rs:704)
==1800==    by 0x8F0395F: call_once<(),alloc::boxed::Box<FnOnce<()>>> (boxed.rs:704)
==1800==    by 0x8F0395F: start_thread (thread.rs:13)
==1800==    by 0x8F0395F: std::sys::unix::thread::Thread::new::thread_start::h6f10b78f26c98dc6 (thread.rs:79)
==1800==    by 0x55566B9: start_thread (pthread_create.c:333)
==1800==    by 0x587341C: clone (clone.S:109)



Thread 9: status = VgTs_WaitSys (lwpid 1810)
==1800==    at 0x555F26D: __lll_lock_wait (lowlevellock.S:135)
==1800==    by 0x5558DBC: pthread_mutex_lock (pthread_mutex_lock.c:80)
==1800==    by 0x8939496: std::sys::unix::mutex::Mutex::lock::hcd59c45f1a133328 (mutex.rs:55)
==1800==    by 0x893189D: std::sys_common::mutex::Mutex::raw_lock::hc798026d3991343a (in /home/simo/rediSQL/target/debug/libredis_sql.so)
==1800==    by 0x8935E54: std::sync::mutex::Mutex$LT$T$GT$::lock::h78bf1ca4ad56a683 (mutex.rs:220)
==1800==    by 0x892AEAE: futures_cpupool::Inner::work::h21efc1282824bf02 (lib.rs:255)
==1800==    by 0x892BE63: futures_cpupool::Builder::create::_$u7b$$u7b$closure$u7d$$u7d$::hd2447b1925606d67 (in /home/simo/rediSQL/target/debug/libredis_sql.so)
==1800==    by 0x8931FC1: std::sys_common::backtrace::__rust_begin_short_backtrace::h47748e76916a1777 (backtrace.rs:136)
==1800==    by 0x8936B40: std::thread::Builder::spawn_unchecked::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h683a3d1418a5f8d6 (mod.rs:470)
==1800==    by 0x8931850: _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::he30a5dbae1a22ae2 (panic.rs:315)
==1800==    by 0x8927156: std::panicking::try::do_call::h1c2214f24763dbad (panicking.rs:293)
==1800==    by 0x8F045F9: __rust_maybe_catch_panic (lib.rs:85)
==1800==    by 0x8926F9F: std::panicking::try::h9389efabb7912b62 (panicking.rs:272)
==1800==    by 0x8932122: std::panic::catch_unwind::h6b76ecbfa514b3a5 (panic.rs:394)
==1800==    by 0x8936931: std::thread::Builder::spawn_unchecked::_$u7b$$u7b$closure$u7d$$u7d$::hd5fc6e3921823962 (mod.rs:469)
==1800==    by 0x8927183: core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::hc5359158a51c29fd (function.rs:231)
==1800==    by 0x8EF33CE: _$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h805c3cc89d534c05 (boxed.rs:704)
==1800==    by 0x8F0395F: call_once<(),alloc::boxed::Box<FnOnce<()>>> (boxed.rs:704)
==1800==    by 0x8F0395F: start_thread (thread.rs:13)
==1800==    by 0x8F0395F: std::sys::unix::thread::Thread::new::thread_start::h6f10b78f26c98dc6 (thread.rs:79)
==1800==    by 0x55566B9: start_thread (pthread_create.c:333)
==1800==    by 0x587341C: clone (clone.S:109)

Thread 10: status = VgTs_WaitSys (lwpid 1811)
==1800==    at 0x555F26D: __lll_lock_wait (lowlevellock.S:135)
==1800==    by 0x5558DBC: pthread_mutex_lock (pthread_mutex_lock.c:80)
==1800==    by 0x8939496: std::sys::unix::mutex::Mutex::lock::hcd59c45f1a133328 (mutex.rs:55)
==1800==    by 0x893189D: std::sys_common::mutex::Mutex::raw_lock::hc798026d3991343a (in /home/simo/rediSQL/target/debug/libredis_sql.so)
==1800==    by 0x8935E54: std::sync::mutex::Mutex$LT$T$GT$::lock::h78bf1ca4ad56a683 (mutex.rs:220)
==1800==    by 0x892AEAE: futures_cpupool::Inner::work::h21efc1282824bf02 (lib.rs:255)
==1800==    by 0x892BE63: futures_cpupool::Builder::create::_$u7b$$u7b$closure$u7d$$u7d$::hd2447b1925606d67 (in /home/simo/rediSQL/target/debug/libredis_sql.so)
==1800==    by 0x8931FC1: std::sys_common::backtrace::__rust_begin_short_backtrace::h47748e76916a1777 (backtrace.rs:136)
==1800==    by 0x8936B40: std::thread::Builder::spawn_unchecked::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h683a3d1418a5f8d6 (mod.rs:470)
==1800==    by 0x8931850: _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::he30a5dbae1a22ae2 (panic.rs:315)
==1800==    by 0x8927156: std::panicking::try::do_call::h1c2214f24763dbad (panicking.rs:293)
==1800==    by 0x8F045F9: __rust_maybe_catch_panic (lib.rs:85)
==1800==    by 0x8926F9F: std::panicking::try::h9389efabb7912b62 (panicking.rs:272)
==1800==    by 0x8932122: std::panic::catch_unwind::h6b76ecbfa514b3a5 (panic.rs:394)
==1800==    by 0x8936931: std::thread::Builder::spawn_unchecked::_$u7b$$u7b$closure$u7d$$u7d$::hd5fc6e3921823962 (mod.rs:469)
==1800==    by 0x8927183: core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::hc5359158a51c29fd (function.rs:231)
==1800==    by 0x8EF33CE: _$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h805c3cc89d534c05 (boxed.rs:704)
==1800==    by 0x8F0395F: call_once<(),alloc::boxed::Box<FnOnce<()>>> (boxed.rs:704)
==1800==    by 0x8F0395F: start_thread (thread.rs:13)
==1800==    by 0x8F0395F: std::sys::unix::thread::Thread::new::thread_start::h6f10b78f26c98dc6 (thread.rs:79)
==1800==    by 0x55566B9: start_thread (pthread_create.c:333)
==1800==    by 0x587341C: clone (clone.S:109)

Sounds like a valgrind bug to me.

2 Likes

It could definitely be! Let me ask them also.

Was indeed a bug in valgrind!

Fortunately the bug was fixed in more modern versions of the software, I fix the issue moving to valgrind 3.14

2 Likes

π version is always the best version no matter the program! :smile:

2 Likes