I am trying to run valgrind on a multithreaded websockets based program, to
check for memory leaks. Valgrind crashes in the middle of the program with
following errors:

--17214-- REDIR: 0x6e44620 (libc.so.6:__memcpy_chk) redirected to 0x4a28770
(_vgnU_ifunc_wrapper)
--17214-- REDIR: 0x6e7c2a0 (libc.so.6:__memcpy_chk_avx_unaligned)
redirected to 0x4c34e10 (__memcpy_chk)

valgrind: m_translate.c:1772 (vgPlain_translate): Assertion 'tres.status ==
VexTransOK' failed.

host stacktrace:
==17214==    at 0x38086843: show_sched_status_wrk (m_libcassert.c:378)
==17214==    by 0x38086944: report_and_quit (m_libcassert.c:449)
==17214==    by 0x38086AD1: vgPlain_assert_fail (m_libcassert.c:515)
==17214==    by 0x380A5606: vgPlain_translate (m_translate.c:1772)
==17214==    by 0x380DB83B: handle_chain_me (scheduler.c:1076)
==17214==    by 0x380DD36F: vgPlain_scheduler (scheduler.c:1420)
==17214==    by 0x380EC716: thread_wrapper (syswrap-linux.c:103)
==17214==    by 0x380EC716: run_a_thread_NORETURN (syswrap-linux.c:156)
==17214==    by 0x380EC9AA: vgModuleLocal_start_thread_NORETURN
(syswrap-linux.c:329)
==17214==    by 0x3811619D: ??? (in
/usr/local/lib/valgrind/memcheck-amd64-linux)
==17214==    by 0xDEADBEEFDEADBEEE: ???
==17214==    by 0xDEADBEEFDEADBEEE: ???
==17214==    by 0xDEADBEEFDEADBEEE: ???

sched status:
  running_tid=3

Thread 1: status = VgTs_WaitSys (lwpid 17214)
==17214==    at 0x516C9DD: pthread_join (pthread_join.c:90)
==17214==    by 0x6546B96: std::thread::join() (in
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21)
==17214==    by 0xE6A489: WebSocketServer::StartThreadService()
(WebSocket-Server.cc:364)
==17214==    by 0xE6A11D: WebSocketServer::run() (WebSocket-Server.cc:321)
==17214==    by 0xE5EFCA: main (kws-WebSocket-Server.cc:37)

Thread 2: status = VgTs_WaitSys (lwpid 17215)
==17214==    at 0x6E29B5D: ??? (syscall-template.S:84)
==17214==    by 0x1612440: _lws_plat_service_tsi (lws-plat-unix.c:147)
==17214==    by 0x1600AAD: lws_service_tsi (service.c:1159)
==17214==    by 0xE6A14B: WebSocketServer::ThreadService(unsigned int)
(WebSocket-Server.cc:325)
==17214==    by 0xE74AC1: void std::_Mem_fn_base<void
(WebSocketServer::*)(unsigned int), true>::operator()<unsigned int,
void>(WebSocketServer*, unsigned int&&) const (functional:600)
==17214==    by 0xE74A3E: void std::_Bind_simple<std::_Mem_fn<void
(WebSocketServer::*)(unsigned int)> (WebSocketServer*, unsigned
int)>::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (functional:1531)
==17214==    by 0xE748F5: std::_Bind_simple<std::_Mem_fn<void
(WebSocketServer::*)(unsigned int)> (WebSocketServer*, unsigned
int)>::operator()() (functional:1520)
==17214==    by 0xE74885:
std::thread::_Impl<std::_Bind_simple<std::_Mem_fn<void
(WebSocketServer::*)(unsigned int)> (WebSocketServer*, unsigned int)>
>::_M_run() (thread:115)
==17214==    by 0x6546C7F: ??? (in
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21)
==17214==    by 0x516B709: start_thread (pthread_create.c:333)
==17214==    by 0x6E3582C: clone (clone.S:109)

Thread 3: status = VgTs_Runnable (lwpid 17216)
==17214==    at 0x1497463: sgemm_kernel (sgemm_kernel_16x4_haswell.S:1284)


  I have tried changing the operating system (from fedora to mint and
ubuntu). I also checked out the latest valgrind valgrind --version

valgrind-3.13.0.SVN to see if that will help me alleviate the issue. It did
not help. Can someone please advise how to get around this issue.
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to