https://bugs.winehq.org/show_bug.cgi?id=39187
--- Comment #4 from stjepan.zlatic@gmail.com --- (In reply to Sebastian Lackner from comment #3)
Are you by any chance using the winepulse audio driver (which is included in Ubuntu and Fedora packages)? I can only reproduce the problem with winepulse, not with winealsa. The deadlock occurs because winepulse tries to create a new thread during the process deinitialization phase.
I switched from winepulse to winealsa and the result is still the same..