WINE (in win2k+ emulation mode) triggers an internal error in libpthread when trying to run various applications (such as Firefox). How-To-Repeat: 1.) Install emulators/wine 2.) Run winecfg to generate basic configuration. Acknowledge configuration program with Ok without changing any settings. 3.) fetch 'http://sunsite.rediris.es/pub/mozilla.org/firefox/releases/.5.0.4/win32/en-US/Firefox Setup 1.5.0.4.exe' 4.) Run wine 'Firefox Setup 1.5.0.4.exe'. Complete the installer with default choices. 5.) Run wine ~/.wine/drive_c/Program\ Files/Mozilla\ Firefox/firefox.exe
Additional note: When running Firefox with 'wine-kthread' instead (also installed by the wine port), the error changes to Fatal error 'Uninitialized mutex in pthread_mutex_trylock_basic' at line 496 in file /usr/src/lib/libpthread/thread/thr_mutex.c (errno = 2)
Forgot to include the original error message: Fatal error 'thr_resume_wrapper: thread has returned from _thread_switch' at line 1125 in file /usr/src/lib/libpthread/thread/thr_kern.c (errno = 22)
State Changed From-To: open->closed This is not a problem with the threads library. WINE is known to abuse usage of %gs which is reserved for use by the threads library.
State Changed From-To: closed->suspended After some further discussion on the mailing lists (q.v.), the conclusion seems to be that Wine on FreeBSD is going to need to be modified to work with the thread libraries. I'm going to mark this 'suspended' until someone can figure out an appropriate shim to do this. The problem is serious and extant, so IMHO it shouldn't really be closed.
Responsible Changed From-To: freebsd-threads->gerald
State Changed From-To: suspended->closed I just realized that this was addressed by a change I committed earlier this week: date: 2007/08/07 04:33:40; author: gerald; state: Exp; lines: +6 -1 Switch to libthr as the default threading library on versions of FreeBSD where it isn't the default yet. Wine wants all threads to be PTHREAD_SCOPE_SYSTEM (visible by kernel) so wineserver can access threads inside wine processes. With libthr all threads are PTHREAD_SCOPE_SYSTEM by default. With libkse the initial thread is not which prevents wineserver from sending signals to it directly, for instance.