I updated to new lyx release on NetBSD 2.1. I saw my previous patch to workaround the core dump exit issue for NetBSD didn't apply any more, so I didn't patch it. This old patch (now not used) was simply:
+/* For some reason it doesn't indicate it is locked on NetBSD + resulting in a Error detected by libpthread: Destroying locked mutex. +*/ +#if !defined(__NetBSD__) if (locked()) +#endif unlock(); When I exited, lyx core dumped with this error: lyx: Error detected by libpthread: Destroying locked mutex. Detected by file "/home/builds/ab/netbsd-2-1-RELEASE/src/lib/libpthread/pthread_ mutex.c", line 135, function "pthread_mutex_destroy". See pthread(3) for information. (Same as before.) And the backtrace of the core dump showed last lyx steps: #30 0x082bcbcd in QLComboBox::~QLComboBox() () #31 0x08113e63 in std::_Deque_iterator<int, int&, int*> std::__copy<std::_Deque_iterator<int, int const&, int const*>, std::_Deque_iterator<int, int&, int*> >(std::_Deque_iterator<int, int const&, int const*>, std::_Deque_iterator<int, int const&, int const*>, std::_Deque_iterator<int, int&, int*>, std::random_access_iterator_tag) () #32 0x08151dd9 in LyXServer::callback(LyXServer*, std::string const&) () #33 0x080797d2 in QComboBox::setAutoCompletion(bool) () Now I see that lyx-devel/src/frontends/qt2/lyx_gui.C revision 1.30.2.11 says "Don't unlock QApplication's mutex as it leads to undefined behaviour (and crashes NetBSD)." And the ChangeLog said: * lyx_gui.C (LApplication d-tor): remove code to unlock QApplication mutex as we didn't lock the thing in the first place; undefined behaviour. And the unlock() was removed. I don't know this code, but I think it was locked somewhere. I am the lyx maintainer for pkgsrc and for NetBSD. I am using the following for our lyx-qt package for LQApplication::~LQApplication() in src/frontends/qt2/lyx_gui.C: +#if defined(__NetBSD__) && defined(QT_THREAD_SUPPORT) + unlock(); +#endif Please consider including that in the official release of lyx. (Probably checking for QT_THREAD_SUPPORT can be removed though.) Please unlock() on NetBSD. I am not subscribed to this list. Please carbon-copy me on any discussion. Jeremy C. Reed technical support & remote administration http://www.pugetsoundtechnology.com/