Status: Unconfirmed Owner: ---- Labels: OS-Linux Area-Misc Size-Medium Type-Bug
New issue 23244 by timurrrr: Data race in third_party/libevent http://code.google.com/p/chromium/issues/detail?id=23244 Chrome Version : r27359 OS + version : Linux The data race was detected using ThreadSanitizer (see http://code.google.com/p/data-race-test/wiki/ThreadSanitizer ) The race can be proved using RaceChecker class (see http://code.google.com/p/data-race-test/wiki/RaceCheckerClass ) What steps will reproduce the problem? 1. Apply the attached patch * adds RaceChecker class files into libevent, * adds dependencies for these files * puts RaceChecker calls into libevent code 2. gclient runhooks --force && hammer -C build net_unittests 3. RACECHECKER=2 RACECHECKER_SLEEP_MS=5 ./sconsbuild/Debug/net_unittests --gtest_filter="*KDE*" What happens instead? [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from ProxyConfigServiceLinuxTest [ RUN ] ProxyConfigServiceLinuxTest.KDEConfigParser RACECHECKER: write at 0x97adb70 RACECHECKER: read at 0x97adb70 RACECHECKER: write at 0x97adb70 RACECHECKER: read at 0x97adb70 RACECHECKER: write at 0x97adb70 Race found between these points === writer: ./sconsbuild/Debug/net_unittests(RaceChecker_BEGIN+0x2b)[0x8952d65] ./sconsbuild/Debug/net_unittests[0x89518ca] ./sconsbuild/Debug/net_unittests(event_add+0xfa)[0x8950e16] ./sconsbuild/Debug/net_unittests(_ZN4base19MessagePumpLibevent19WatchFileDescriptorEibNS0_4ModeEPNS0_21FileDescriptorWatcherEPNS0_7WatcherE+0x474)[0x8772fdc] ./sconsbuild/Debug/net_unittests(_ZN16MessageLoopForIO19WatchFileDescriptorEibNS_4ModeEPN4base19MessagePumpLibevent21FileDescriptorWatcherEPNS2_7WatcherE+0x46)[0x8769dec] ./sconsbuild/Debug/net_unittests[0x86e65ca] ./sconsbuild/Debug/net_unittests(_ZN3net23ProxyConfigServiceLinux8Delegate26SetupAndFetchInitialConfigEP11MessageLoopS3_P16MessageLoopForIO+0x18c)[0x86e805a] ./sconsbuild/Debug/net_unittests(_ZN3net23ProxyConfigServiceLinux26SetupAndFetchInitialConfigEP11MessageLoopS2_P16MessageLoopForIO+0x33)[0x859ebf7] ./sconsbuild/Debug/net_unittests(_ZN17SynchConfigGetter20SetupAndInitialFetchEv+0xde)[0x859ecd8] ./sconsbuild/Debug/net_unittests(_ZN3net48ProxyConfigServiceLinuxTest_KDEConfigParser_Test8TestBodyEv+0xdeb)[0x8597661] === reader: ./sconsbuild/Debug/net_unittests(RaceChecker_BEGIN+0x2b)[0x8952d65] ./sconsbuild/Debug/net_unittests[0x8950491] ./sconsbuild/Debug/net_unittests(event_base_loop+0xbf)[0x8950807] ./sconsbuild/Debug/net_unittests(_ZN4base19MessagePumpLibevent3RunEPNS_11MessagePump8DelegateE+0x18a)[0x8772a5c] ./sconsbuild/Debug/net_unittests(_ZN11MessageLoop11RunInternalEv+0x137)[0x876aebb] ./sconsbuild/Debug/net_unittests(_ZN11MessageLoop10RunHandlerEv+0x11)[0x876aed5] ./sconsbuild/Debug/net_unittests(_ZN11MessageLoop3RunEv+0x23)[0x876af79] ./sconsbuild/Debug/net_unittests(_ZN4base6Thread3RunEP11MessageLoop+0x11)[0x879b089] ./sconsbuild/Debug/net_unittests(_ZN4base6Thread10ThreadMainEv+0xe1)[0x879b459] The racing accesses are "(base->event_count > 0)" (line 349) and "base->event_count++" (line 960) Attachments: libevent_race.patch 12.0 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 -~----------~----~----~----~------~----~------~--~---
