Status: Untriaged Owner: [email protected] Labels: Type-Bug Pri-2 OS-All Area-Misc
New issue 24715 by [email protected]: Data race in test_shell http://code.google.com/p/chromium/issues/detail?id=24715 This data race was found using ThreadSanitizer ( http://dev.chromium.org/developers/how-tos/using-valgrind/threadsanitizer ). It may result in writing to *(NULL). The race can be proved using RaceChecker class (see http://code.google.com/p/data-race-test/wiki/RaceCheckerClass ) Details: 1) Apply the attached patch (adds RaceChecker class files into base/..., adds dependencies for these files and puts RaceChecker calls into base/weak_ptr.h) 2) gclient runhooks --force && hammer -C build test_shell_tests 3) RACECHECKER=2 RACECHECKER_SLEEP_MS=50 ./sconsbuild/Debug/test_shell_tests --gtest_filter="*AppCacheUpdateJobTest*" The RaceChecker report looks like the following: Race found between these points === writer: test_shell_tests(_ZN4base8internal13WeakReference4Flag10InvalidateEv+0x23) [0x8f6a81d] test_shell_tests(_ZN4base8internal18WeakReferenceOwner10InvalidateEv+0x1c) [0x8f6a850] test_shell_tests(_ZN4base8internal18WeakReferenceOwnerD1Ev+0x11) [0x8f6a86d] test_shell_tests(_ZN4base14WeakPtrFactoryIN8appcache21AppCacheUpdateJobTestEED1Ev+0x11) [0x8f6a881] test_shell_tests(_ZN27ScopedRunnableMethodFactoryIN8appcache21AppCacheUpdateJobTestEED1Ev+0x11) [0x8f6a895] test_shell_tests(_ZN8appcache21AppCacheUpdateJobTestD2Ev+0x8b)[0x8f6a923] test_shell_tests(_ZN8appcache44AppCacheUpdateJobTest_StartCacheAttempt_TestD0Ev+0x26) [0x8f6aa92] test_shell_tests(_ZN7testing8internal12TestInfoImpl3RunEv+0xec) [0x91092b2] test_shell_tests(_ZN7testing8TestCase3RunEv+0xb9)[0x91093c3] test_shell_tests(_ZN7testing8internal12UnitTestImpl11RunAllTestsEv+0x273) [0x9109f61] test_shell_tests(_ZN7testing8UnitTest3RunEv+0x14)[0x910a0bc] test_shell_tests(main+0x1be)[0x9038dea] /lib32/libc.so.6(__libc_start_main+0xe0)[0xf7318450] test_shell_tests[0x8f4c251] === writer: test_shell_tests(_ZN4base8internal13WeakReference4FlagD1Ev+0x23) [0x8f6c029] test_shell_tests(_ZN4base10RefCountedINS_8internal13WeakReference4FlagEE7ReleaseEv+0x27) [0x8f6c08f] test_shell_tests(_ZN4base8internal13WeakReference4Flag7ReleaseEv+0xae) [0x8f6c14a] test_shell_tests(_ZN13scoped_refptrIN4base8internal13WeakReference4FlagEED1Ev+0x1c) [0x8f6c170] test_shell_tests(_ZN4base8internal13WeakReferenceD1Ev+0x11)[0x8f6c183] test_shell_tests(_ZN4base8internal11WeakPtrBaseD2Ev+0x11)[0x8f6c1eb] test_shell_tests(_ZN4base7WeakPtrIN8appcache21AppCacheUpdateJobTestEED1Ev+0x11) [0x8f6c1ff] test_shell_tests(_ZN27ScopedRunnableMethodFactoryIN8appcache21AppCacheUpdateJobTestEE14RunnableMethodIMS1_FvvE6Tuple0ED0Ev+0x1e) [0x8f6c266] test_shell_tests(_ZN11MessageLoop7RunTaskEP4Task+0xe6)[0x9134f46] test_shell_tests(_ZN11MessageLoop21DeferOrRunPendingTaskERKNS_11PendingTaskE+0x35) [0x91355f9] test_shell_tests(_ZN11MessageLoop6DoWorkEv+0xfb)[0x9135889] test_shell_tests(_ZN4base19MessagePumpLibevent3RunEPNS_11MessagePump8DelegateE+0xda) [0x913db00] test_shell_tests(_ZN11MessageLoop11RunInternalEv+0x137)[0x9135e9b] test_shell_tests(_ZN11MessageLoop10RunHandlerEv+0x11)[0x9135eb5] test_shell_tests(_ZN11MessageLoop3RunEv+0x23)[0x9135f59] test_shell_tests(_ZN4base6Thread3RunEP11MessageLoop+0x11)[0x9162631] test_shell_tests(_ZN4base6Thread10ThreadMainEv+0xe1)[0x9162a01] test_shell_tests[0x9145c12] ThreadSanitizer report is also attached. Is this test-only race? Attachments: weak_ptr_race.patch 11.2 KB weak_ptr_race.report 7.4 KB -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ Automated mail from issue updates at http://crbug.com/ Subscription options: http://groups.google.com/group/chromium-bugs -~----------~----~----~----~------~----~------~--~---
