staticanalysis / data-race-test

Automatically exported from code.google.com/p/data-race-test
0 stars 0 forks source link

ASSERT SegmentSet::Validate (thread_sanitizer.cc:2380) !Segment::HappensBefore(GetSID(i), GetSID(j)) #22

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This happens on TSan/Pin on Windows when running Chromium net_unittests.

BAD at line 2215: 1 0 T6/S424878 T12/S427684
   [0:948048; 1:279; 2:387; 3:306; 4:17; 5:1; 6:12; 7:33; 9:97;]
   [0:950633; 1:279; 2:387; 3:306; 4:19; 5:1; 6:12; 7:33; 9:216; 12:35;]
T0
    #0   
    #1  NtWaitForSingleObject C:\Windows\SysWOW64\ntdll.dll
    #2  WaitForSingleObjectEx C:\Windows\syswow64\kernel32.dll
    #3  WaitForSingleObjectEx C:\Windows\syswow64\kernel32.dll
    #4  base::WaitableEvent::TimedWait base\waitable_event_win.cc:63
    #5  net::TCPPinger::Worker::TimedWaitForResult net\socket\tcp_pinger.h:108
    #6  net::TCPPinger::Ping net\socket\tcp_pinger.h:57
    #7  net::TestServerLauncher::WaitToStart net\socket\ssl_test_util.cc:321
    #8  net::TestServerLauncher::Start net\socket\ssl_test_util.cc:298
    #9  SSLClientSocketTest::StartOKServer net\socket\ssl_client_socket_unittest.cc:35
    #10 SSLClientSocketTest_Read_FullDuplex_Test::TestBody net\socket\ssl_client_socket_unittest.cc:261
    #11 testing::Test::Run testing\gtest\src\gtest.cc:2060
T1
    #0   
    #1  ZwTerminateThread C:\Windows\SysWOW64\ntdll.dll
    #2  LdrShutdownThread C:\Windows\SysWOW64\ntdll.dll
    #3  TpAllocPool C:\Windows\SysWOW64\ntdll.dll
    #4  TpCallbackMayRunLong C:\Windows\SysWOW64\ntdll.dll
    #5  BaseThreadInitThunk C:\Windows\syswow64\kernel32.dll
T2
    #0   
    #1  ZwTerminateThread C:\Windows\SysWOW64\ntdll.dll
    #2  LdrShutdownThread C:\Windows\SysWOW64\ntdll.dll
    #3  TpAllocPool C:\Windows\SysWOW64\ntdll.dll
    #4  TpCallbackMayRunLong C:\Windows\SysWOW64\ntdll.dll
    #5  BaseThreadInitThunk C:\Windows\syswow64\kernel32.dll
T3
    #0   
    #1  ZwTerminateThread C:\Windows\SysWOW64\ntdll.dll
    #2  LdrShutdownThread C:\Windows\SysWOW64\ntdll.dll
    #3  TpAllocPool C:\Windows\SysWOW64\ntdll.dll
    #4  TpCallbackMayRunLong C:\Windows\SysWOW64\ntdll.dll
    #5  BaseThreadInitThunk C:\Windows\syswow64\kernel32.dll
T4
    #0   
    #1  ZwWaitForWorkViaWorkerFactory C:\Windows\SysWOW64\ntdll.dll
    #2  RtlMultiByteToUnicodeSize C:\Windows\SysWOW64\ntdll.dll
    #3  TpCallbackMayRunLong C:\Windows\SysWOW64\ntdll.dll
    #4  BaseThreadInitThunk C:\Windows\syswow64\kernel32.dll
T5
    #0   
    #1  ZwTerminateThread C:\Windows\SysWOW64\ntdll.dll
    #2  LdrShutdownThread C:\Windows\SysWOW64\ntdll.dll
    #3  TpSimpleTryPost C:\Windows\SysWOW64\ntdll.dll
    #4  TpSimpleTryPost C:\Windows\SysWOW64\ntdll.dll
    #5  BaseThreadInitThunk C:\Windows\syswow64\kernel32.dll
T7
    #0   
    #1  ZwWaitForWorkViaWorkerFactory C:\Windows\SysWOW64\ntdll.dll
    #2  RtlMultiByteToUnicodeSize C:\Windows\SysWOW64\ntdll.dll
    #3  TpCallbackMayRunLong C:\Windows\SysWOW64\ntdll.dll
    #4  BaseThreadInitThunk C:\Windows\syswow64\kernel32.dll
T8
    #0   
    #1  ZwTerminateThread C:\Windows\SysWOW64\ntdll.dll
    #2  LdrShutdownThread C:\Windows\SysWOW64\ntdll.dll
    #3  TpSimpleTryPost C:\Windows\SysWOW64\ntdll.dll
    #4  TpSimpleTryPost C:\Windows\SysWOW64\ntdll.dll
    #5  BaseThreadInitThunk C:\Windows\syswow64\kernel32.dll
T10
    #0   
    #1  ZwTerminateThread C:\Windows\SysWOW64\ntdll.dll
    #2  LdrShutdownThread C:\Windows\SysWOW64\ntdll.dll
    #3  TpSimpleTryPost C:\Windows\SysWOW64\ntdll.dll
    #4  TpSimpleTryPost C:\Windows\SysWOW64\ntdll.dll
    #5  BaseThreadInitThunk C:\Windows\syswow64\kernel32.dll
T11
    #0   
    #1  NtWaitForMultipleObjects C:\Windows\SysWOW64\ntdll.dll
    #2  TpSimpleTryPost C:\Windows\SysWOW64\ntdll.dll
    #3  TpSimpleTryPost C:\Windows\SysWOW64\ntdll.dll
    #4  BaseThreadInitThunk C:\Windows\syswow64\kernel32.dll
T12
    #0  RtlLeaveCriticalSection C:\Windows\SysWOW64\ntdll.dll
    #1  unnamedImageEntryPoint C:\Windows\system32\mswsock.dll
    #2  unnamedImageEntryPoint C:\Windows\system32\mswsock.dll
    #3  unnamedImageEntryPoint C:\Windows\system32\mswsock.dll
    #4  connect C:\Windows\syswow64\WS2_32.dll
    #5  net::TCPClientSocketWin::DoConnect net\socket\tcp_client_socket_win.cc:342
    #6  net::TCPClientSocketWin::Connect net\socket\tcp_client_socket_win.cc:305
    #7  net::TCPPinger::Worker::DoConnect net\socket\tcp_pinger.h:89
    #8  DispatchToMethod<net::TCPPinger::Worker,void (__thiscall net::TCPPinger::Worker::*)(void)> base\tuple.h:412
    #9  RunnableMethod<net::TCPPinger::Worker,void (__thiscall net::TCPPinger::Worker::*)(void),Tuple0>::Run base\task.h:289
    #10 MessageLoop::RunTask base\message_loop.cc:320
    #11 MessageLoop::DeferOrRunPendingTask base\message_loop.cc:328

Original issue reported on code.google.com by timurrrr on 16 Feb 2010 at 10:51

GoogleCodeExporter commented 9 years ago
Follow-up:
shorter reproducer is net_unittests --gtest_filter="SSL*:TCP*"

Original comment by timurrrr on 16 Feb 2010 at 1:54

GoogleCodeExporter commented 9 years ago
--gtest_filter='*TCP* is enough

Original comment by konstant...@gmail.com on 23 Feb 2010 at 1:15

GoogleCodeExporter commented 9 years ago
r1730 converts this failure into a warning. 
For some reason, we are joinging a thread which is not dead yet. 
Hm... 

Original comment by konstant...@gmail.com on 23 Feb 2010 at 1:28