https://bugs.winehq.org/show_bug.cgi?id=39097
Bug ID: 39097 Summary: comdlg32/tests/filedlg.c hangs under valgrind Product: Wine Version: 1.7.49 Hardware: x86 OS: Linux Status: NEW Keywords: download, source, testcase, valgrind Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: austinenglish@gmail.com CC: sebastian@fds-team.de Distribution: Fedora
Regression, introduced by:
[austin@localhost wine-valgrind]$ git bisect good 4a1629c4117fda9eca63b6f56ea45771dc9734ac is the first bad commit commit 4a1629c4117fda9eca63b6f56ea45771dc9734ac Author: Sebastian Lackner sebastian@fds-team.de Date: Fri Jul 17 06:46:47 2015 +0200
ntdll: Avoid possible deadlock by using _exit() in NtTerminateProcess.
When threads are killed with SIGQUIT some locks can be in an undefined state, and it not safe to call exit handlers.
:040000 040000 f8e2115ed5cca792efaf44c7d8e4ffd84255f1aa 5f5b86ac550c0d754ed0fdb5a89540bd5947a967 M dlls
Using valgrind from svn: [austin@localhost valgrind]$ svn info Path: . Working Copy Root Path: /home/austin/src/valgrind URL: svn://svn.valgrind.org/valgrind/trunk Relative URL: ^/trunk Repository Root: svn://svn.valgrind.org/valgrind Repository UUID: a5019735-40e9-0310-863c-91ae7b9d1cf9 Revision: 15540 Node Kind: directory Schedule: normal Last Changed Author: philippe Last Changed Rev: 15540 Last Changed Date: 2015-08-13 18:49:32 -0400 (Thu, 13 Aug 2015)
https://bugs.winehq.org/show_bug.cgi?id=39097
--- Comment #1 from Austin English austinenglish@gmail.com --- Still present in: austin@austin2:~/src/valgrind$ svn info Path: . Working Copy Root Path: /home/austin/src/valgrind URL: svn://svn.valgrind.org/valgrind/trunk Relative URL: ^/trunk Repository Root: svn://svn.valgrind.org/valgrind Repository UUID: a5019735-40e9-0310-863c-91ae7b9d1cf9 Revision: 16203 Node Kind: directory Schedule: normal Last Changed Author: sewardj Last Changed Rev: 16203 Last Changed Date: 2017-01-19 00:53:13 -0600 (Thu, 19 Jan 2017)
and wine-2.0-rc3-4-gc0b3043
https://bugs.winehq.org/show_bug.cgi?id=39097
--- Comment #2 from Sebastian Lackner sebastian@fds-team.de --- (In reply to Austin English from comment #1)
and wine-2.0-rc3-4-gc0b3043
It looks like your Wine tree is not fully up-to-date, however that shouldn't matter. I am still not able to reproduce this problem, the tests run fine here and end with:
filedlg: 271 tests executed (11 marked as todo, 0 failures), 1 skipped.
Could you attach terminal output?
https://bugs.winehq.org/show_bug.cgi?id=39097
--- Comment #3 from Austin English austinenglish@gmail.com --- (In reply to Sebastian Lackner from comment #2)
(In reply to Austin English from comment #1)
and wine-2.0-rc3-4-gc0b3043
It looks like your Wine tree is not fully up-to-date, however that shouldn't matter. I am still not able to reproduce this problem, the tests run fine here and end with:
filedlg: 271 tests executed (11 marked as todo, 0 failures), 1 skipped.
Could you attach terminal output?
It's pretty useless: austin@austin2:~/wine-valgrind/dlls/comdlg32/tests$ rm *ok ; make filedlg.ok 2>&1 | tee ~/filedlg.txt rm: cannot remove '*ok': No such file or directory ../../../tools/runtest -q -P wine -T ../../.. -M comdlg32.dll -p comdlg32_test.exe.so filedlg && touch filedlg.ok preloader: Warning: failed to reserve range 00110000-68000000 preloader: Warning: failed to reserve range 7f000000-82000000 filedlg.c:932: Tests skipped: some interactive resizable dialog tests (set WINETEST_INTERACTIVE=1)
https://bugs.winehq.org/show_bug.cgi?id=39097
--- Comment #4 from Sebastian Lackner sebastian@fds-team.de --- Could you maybe try to come up with a reduced testcase? As I understand it doesn't affect all tests, so probably there is something special going on in this one. You could try commenting out parts of the code until the hang is gone.
https://bugs.winehq.org/show_bug.cgi?id=39097
--- Comment #5 from Austin English austinenglish@gmail.com --- (In reply to Sebastian Lackner from comment #4)
Could you maybe try to come up with a reduced testcase? As I understand it doesn't affect all tests, so probably there is something special going on in this one. You could try commenting out parts of the code until the hang is gone.
We discussed this on IRC today. I added tracing and it's hanging after all the tests have run. Sebastian suspects valgrind may be handling exit() and _exit() differently. There was a related valgrind bug, https://bugs.kde.org/show_bug.cgi?id=372504, but that's been fixed and I'm running a newer valgrind.
I've made the issue known to upstream valgrind, investigation continues..
https://bugs.winehq.org/show_bug.cgi?id=39097
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.kde.org/show_b | |ug.cgi?id=376027
--- Comment #6 from Austin English austinenglish@gmail.com --- Valgrind bug: https://bugs.kde.org/show_bug.cgi?id=376027
https://bugs.winehq.org/show_bug.cgi?id=39097
--- Comment #7 from Austin English austinenglish@gmail.com --- I still see this in wine-4.0-rc1-30-gf760079a71
At least these tests are affected: touch dlls/comdlg32/tests/filedlg.ok # FIXME touch dlls/comdlg32/tests/itemdlg.ok # FIXME touch dlls/crypt32/tests/chain.ok # FIXME touch dlls/dbghelp/tests/dbghelp.ok # FIXME touch dlls/dinput8/tests/device.ok # hangs with 1% usage touch dlls/mmdevapi/tests/propstore.ok # FIXME touch dlls/mmdevapi/tests/mmdevenum.ok # FIXME touch dlls/mmdevapi/tests/render.ok # hangs with 0.2% usage touch dlls/msvcp140/tests/msvcp140.ok # FIXME touch dlls/ole32/tests/dragdrop.ok # FIXME touch dlls/ole32/tests/moniker.ok # FIXME touch dlls/ole32/tests/ole_server.ok # hangs with 1% usage touch dlls/oleaut32/tests/usrmarshal.ok # hangs with 0% usage touch dlls/qmgr/tests/enum_files.ok # hangs with 1% usage touch dlls/qmgr/tests/enum_jobs.ok # hangs with 0% usage touch dlls/qmgr/tests/file.ok # hangs with 1.8% usage touch dlls/qmgr/tests/job.ok # hangs with 1% usage touch dlls/riched20/tests/editor.ok # hangs with 1% usage touch dlls/rpcrt4/tests/ndr_marshall.ok # hangs with 0.1% usage touch dlls/shell32/tests/ebrowser.ok # hangs with 0% usage touch dlls/shell32/tests/shlview.ok # hangs with 0% usage touch dlls/urlmon/tests/sec_mgr.ok # hangs with 1% usage touch dlls/user32/tests/sysparams.ok # hangs with 1% usage touch dlls/vcomp/tests/vcomp.ok # hangs with 1% usage
though I often see a new one when running again. Reverting the patch fixes all of these hangs.
I'm not sure what would be helpful here, if anyone has any ideas, I'm happy to oblige.
https://bugs.winehq.org/show_bug.cgi?id=39097
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|comdlg32/tests/filedlg.c |several tests hangs under |hangs under valgrind |valgrind due to use of | |_exit (rather than exit) in | |NtTerminateProcess()
--- Comment #8 from Austin English austinenglish@gmail.com --- For anyone else running my scripts (which I'm pretty sure is no one, but just in case ;), I've added a workaround to always use exit(): https://github.com/austin987/wine-valgrind-scripts/commit/77e751d4b045123033...
This allows me to continue running the tests with a lot less trouble.
https://bugs.winehq.org/show_bug.cgi?id=39097
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major