Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jun 2005 18:02:58 +0300
From:      Kyryll A Mirnenko <mirya@matrix.ua>
To:        freebsd-questions@freebsd.org
Subject:   broken threads in qt33
Message-ID:  <42B58922.1060601@matrix.ua>

next in thread | raw e-mail | index | archive | help
Need an expert view on the problem:
1) got 5.3 w/ qt33 from ports working ok
2) moving to 5.4 -> all threaded qt apps start producing "Mutex init 
failure" (src/tools/qmutex_unix.cpp in qt33 srcs) on initialization & 
aborting
3) ok, recompiled the port -> the apps are strarting ok, but fail on run 
for different reason:
   a) most of 'em (e.g. KDE games, kmail) abort w/ message:

"Fatal error 'Recurse on a private mutex.' at line 988 in file 
/usr/src/lib/libpthread/thread/thr_mutex.c (errno = 0)
Abort trap (core dumped)"

   b)`gwenview` produces endless flow of

"Wait condition wait failure: Invalid argument"

messages when trying to scroll its directory listing when it creates 
thumbnails

   c) `uic` just hangs up somewhere in endless waiting eating up all the 
CPU time (no messages)

I've made a simple dump of what `kgoldrunner` does w/ 'em & see it calling:
- QRealMutexPrivate::QRealMutexPrivate(true) // creates recursive mutex
- then two locks on that mutex
- assert in pthread.so
- as you can see from the sources the assertion is rased when mutex has 
MUTEX_FLAGS_PRIVATE flag set
- the problem is that flag seems to be never set in qt sources

qt33 is compiled WITH_KDE_PATCHES, but that seems not to be the reason :).
Here's .qmake.cache created after configuration stage:

CONFIG +=  nocrosscompiler dlopen_opengl minimal-config small-config 
medium-config large-config full-config styles tools kernel widgets 
dialogs iconview workspace net
work canvas table xml opengl sql release dll thread largefile stl ipv6 
system-mng mng system-jpeg jpeg system-png png gif system-zlib cups nas 
bigcodecs x11sm xshape
xinerama xcursor xrandr xrender xftfreetype tablet xkb dylib create_prl 
link_prl
QMAKESPEC = /usr/local/share/qt/mkspecs/freebsd-g++
QT_SOURCE_TREE = /usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.4
QT_BUILD_TREE = /usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.4
QMAKE_ABSOLUTE_SOURCE_ROOT = $$QT_SOURCE_TREE
QT_PRODUCT=qt-free
styles += windows motif mac platinum sgi cde motifplus
kbd-drivers += tty
mouse-drivers += pc
QMAKE_MOC=/usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.4/bin/moc
QMAKE_UIC=/usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.4/bin/uic -L 
$$QT_BUILD_TREE/plugins
QMAKE_QMAKE=/usr/local/bin/qmake
QMAKE_MOC_SRC=/usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.4/src/moc
INCLUDEPATH+=/usr/local/include/freetype2
QMAKE_LIBS_X11=-lXft -lfreetype -lfontconfig $$QMAKE_LIBS_X11
QMAKE_INCDIR_QT=/usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.4/include
QMAKE_LIBDIR_QT=/usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.4/lib
QMAKE_RTLDIR_QT=/usr/X11R6/lib
OBJECTS_DIR=.obj/release-shared-mt
MOC_DIR=.moc/release-shared-mt
QMAKE_LIBS_QT+=-lmng
QMAKE_LIBS_QT_THREAD+=-lmng
QMAKE_LIBS_QT+=-ljpeg
QMAKE_LIBS_QT_THREAD+=-ljpeg
QMAKE_LIBS_QT+=-lpng
QMAKE_LIBS_QT_THREAD+=-lpng
QMAKE_LIBS_QT+=-lz
QMAKE_LIBS_QT_THREAD+=-lz
QMAKE_LIBS_X11 = -lXinerama $$QMAKE_LIBS_X11
QMAKE_LIBS_X11 = -lXcursor $$QMAKE_LIBS_X11
QMAKE_LIBS_X11 = -lXrandr $$QMAKE_LIBS_X11
QMAKE_LIBS_X11 = -lXrender $$QMAKE_LIBS_X11
QMAKE_LIBS_X11 = -lXi $$QMAKE_LIBS_X11
QMAKE_LIBDIR_FLAGS+= -L/usr/local/lib
INCPATH+=/usr/local/include
QT_INSTALL_PREFIX=/usr/X11R6
docs.path=/usr/X11R6/share/doc/qt
headers.path=/usr/X11R6/include
plugins.path=/usr/X11R6/lib/plugins
libs.path=/usr/X11R6/lib
bins.path=/usr/X11R6/bin
data.path=/usr/X11R6/share/qt
translations.path=/usr/X11R6/translations
QMAKE_CFLAGS+=-fno-exceptions
QMAKE_CXXFLAGS+=-fno-exceptions
QMAKE_LFLAGS+=-fno-exceptions

/etc/make.conf contains:

WITH_DEBUG=no
WITH_DROPSHADOW=yes
CFLAGS=-O2 -pipe -march=pentium2
COPTFLAGS=-O2 -pipe -march=pentium2
NO_CPU_CFLAGS=true
NO_COPT_CFLAGS=true

/etc/libmap.conf is:

libc_r.so.5     libpthread.so.1
libc_r.so       libpthread.so

If need more info, more experiment results, reply




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42B58922.1060601>