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..