[Bug 24164] New: Wine is not data-race detector friendly
http://bugs.winehq.org/show_bug.cgi?id=24164 Summary: Wine is not data-race detector friendly Product: Wine Version: 1.2 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs(a)winehq.org ReportedBy: bart.vanassche(a)gmail.com Running Wine under a data-race detector triggers huge numbers of data-race reports on Wine functions. This makes it impossible to analyze data races in application that are running under Wine with Valgrind. An example (Valgrind trunk r11292): $ valgrind --trace-children=yes --vex-iropt-precise-memory-exns=yes --gen-suppressions=all --tool=drd --show-confl-seg=no wine notepad [ ... ] ==1331== Conflicting store by thread 1 at 0x7f00006c size 4 ==1331== at 0x476BD36: RtlEnterCriticalSection (in /usr/lib/wine/ntdll.dll.so ) ==1331== by 0x47811DC: RtlAllocateHeap (in /usr/lib/wine/ntdll.dll.so) ==1331== by 0x4B44408: scmdatabase_autostart_services (in /usr/lib/wine/servi ces.exe.so) ==1331== by 0x4B45C9E: main (in /usr/lib/wine/services.exe.so) ==1331== Allocation context: unknown. [ ... ] ==1331== Conflicting load by thread 1 at 0x7f000128 size 4 ==1331== at 0x477C80F: list_next (in /usr/lib/wine/ntdll.dll.so) ==1331== by 0x477EF7E: HEAP_FindFreeBlock (in /usr/lib/wine/ntdll.dll.so) ==1331== by 0x47812D6: RtlAllocateHeap (in /usr/lib/wine/ntdll.dll.so) ==1331== by 0x4B44408: scmdatabase_autostart_services (in /usr/lib/wine/services.exe.so) ==1331== by 0x4B45C9E: main (in /usr/lib/wine/services.exe.so) ==1331== Allocation context: unknown. [ ... ] ==1331== Conflicting load by thread 1 at 0x7f0047e0 size 4 ==1331== at 0x477C7EC: list_remove (in /usr/lib/wine/ntdll.dll.so) ==1331== by 0x478138D: RtlAllocateHeap (in /usr/lib/wine/ntdll.dll.so) ==1331== by 0x4B44408: scmdatabase_autostart_services (in /usr/lib/wine/services.exe.so) ==1331== by 0x4B45C9E: main (in /usr/lib/wine/services.exe.so) ==1331== Allocation context: unknown. [ ... ] -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=24164 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=24164 --- Comment #1 from Bart Van Assche <bart.vanassche(a)gmail.com> 2010-08-26 11:06:41 --- Note: I have not yet analyzed whether the reported conflicting memory accesses are harmless or not. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=24164 Dan Kegel <dank(a)kegel.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |dank(a)kegel.com Ever Confirmed|0 |1 --- Comment #2 from Dan Kegel <dank(a)kegel.com> 2010-08-26 17:13:25 --- Not surprising. We'll probably need a mondo suppression file like the one we use for memcheck. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=24164 --- Comment #3 from Bart Van Assche <bart.vanassche(a)gmail.com> 2010-08-27 05:15:35 --- (In reply to comment #2)
Not surprising. We'll probably need a mondo suppression file like the one we use for memcheck.
Suppressing everything that is reported by DRD on Wine itself might work but doesn't seem a good idea to me. Not only might this hide real Wine threading issues, but this will also cause slow operation of Valgrind because of the high frequency at which Valgrind has to perform stack matching. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=24164 --- Comment #4 from Dan Kegel <dank(a)kegel.com> 2010-08-27 08:57:32 --- It's not especially good that we need a suppression file for memcheck for wine either, but you have to start somewhere. Somebody needs to start sweeping with the data-race detector and clean up all the errors just like we did with memcheck. (We're still not done with memcheck - we never cleaned up wineboot.) It's a big job, but maybe a few days would help a lot. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=24164 --- Comment #5 from Bart Van Assche <bart.vanassche(a)gmail.com> 2010-08-29 12:37:19 CDT --- Created an attachment (id=30470) --> (http://bugs.winehq.org/attachment.cgi?id=30470) Patch for suppressing the most common false positive data race reports Is the style of the attached patch acceptable ? With that patch applied on top of the Wine git repository no false positive data race reports are produced by Helgrind or DRD when starting applications like Notepad or Wordpad. Notes: - The attached patch has only been tested lightly so far. - The patch only does something meaningful if Wine is built with the Valgrind 3.6.0 headers. Since Valgrind version 3.6.0 has not yet been released, this means the trunk. - The client requests inserted by the patch are only supported by the Helgrind and DRD tools that will be included in Valgrind 3.6.0. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=24164 Bart Van Assche <bart.vanassche(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30470|0 |1 is obsolete| | --- Comment #6 from Bart Van Assche <bart.vanassche(a)gmail.com> 2010-09-01 05:23:17 CDT --- Created an attachment (id=30505) --> (http://bugs.winehq.org/attachment.cgi?id=30505) Patch for suppressing the most common false positive data race reports, version 2 Fixes one real race in heap.c by moving the heap_set_debug_flags() call up. The access pattern of npc->pipe (rpcrt4) should be examined further - I'm not sure it is safe. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=24164 Wylda <wylda(a)volny.cz> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |wylda(a)volny.cz --- Comment #7 from Wylda <wylda(a)volny.cz> 2010-09-01 05:28:54 CDT --- It's better to send any patches to wine-devel for review. Adding keyword anyway. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=24164 --- Comment #8 from Alexandre Julliard <julliard(a)winehq.org> 2010-09-01 06:11:23 CDT --- (In reply to comment #7)
It's better to send any patches to wine-devel for review. Adding keyword anyway.
You certainly don't want to add annotations all over the place. If there are really that many false positives it sounds like the tool needs improving. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=24164 --- Comment #9 from Bart Van Assche <bart.vanassche(a)gmail.com> 2010-09-01 10:09:03 CDT --- (In reply to comment #8)
You certainly don't want to add annotations all over the place. If there are really that many false positives it sounds like the tool needs improving.
I'm afraid that the above statement means you are not familiar with data race detection tools. The annotations I added are necessary for every existing data race detection tool - whether it is DRD, Helgrind or VTune. As an example, the global variable 'server_start_time' is updated by multiple threads without protection by a critical section or any other mutual exclusion primitive. The only way to avoid that data race detection tools complain on such an access pattern is to add a suppression for that access pattern. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=24164 Bart Van Assche <bart.vanassche(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30505|0 |1 is obsolete| | --- Comment #10 from Bart Van Assche <bart.vanassche(a)gmail.com> 2010-09-02 10:25:08 CDT --- Created an attachment (id=30522) --> (http://bugs.winehq.org/attachment.cgi?id=30522) Patch for suppressing the most common false positive data race reports Version three of this patch. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=24164 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish(a)gmail.com -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=24164 --- Comment #11 from Ken Sharp <imwellcushtymelike(a)gmail.com> --- Is this still an issue in Wine 1.7.45 or later? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=24164 joaopa <jeremielapuree(a)yahoo.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree(a)yahoo.fr --- Comment #12 from joaopa <jeremielapuree(a)yahoo.fr> --- Does the bug still occur with wine-6.19? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=24164 --- Comment #13 from joaopa <jeremielapuree(a)yahoo.fr> --- Looks like the bug still occurs with wine-6.19 ==11923== Conflicting load by thread 4 at 0x04e92228 size 4 ==11923== at 0x471D6F5: NtTerminateThread (in /opt/wine-devel/lib/wine/i386-unix/ntdll.so) ==11923== by 0x47045C8: ??? (in /opt/wine-devel/lib/wine/i386-unix/ntdll.so) ==11923== by 0xFFFFFFFD: ??? ==11923== by 0x474733F: ??? ==11923== Allocation context: unknown. ==11923== { -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla