a fellow NetBSD user and I independently came across two crashes in Calibre, which seemed to have in common that they both occurred due to calls from the libMagickCore-6.Q16.so.2 library. (The version is ImageMagick-6.8.8.5)
The common pattern is that something from ImageMagic calls a "gomp" library function (which is a library that comes with gcc and is the gnu implementation of the OpenMP API (a parallel programming toolkit)). That function then calls a semaphore function, which crashes, probably because the semaphore is invalid.
Below I reproduce the stack backtraces from the original reports.
The original thread for my report is at http://mail-index.netbsd.org/netbsd-use ... 14494.html.
Any ideas what might be going on here?
Their stack backtrace is this:
Code: Select all
#0 0x00007f7ff740656d in sem_wait (sem=0x7f7fd81fda80) at /archive/foreign/src/lib/libpthread/sem.c:260
#1 0x00007f7fd12034e9 in omp_set_lock (lock=0x7f7fd81fda80) at /archive/foreign/src/external/gpl3/gcc/dist/libgomp/config/posix/lock.c:138
#2 0x00007f7fd4f149b5 in DestroyExceptionInfo () from /usr/pkg/lib/libMagickCore-6.Q16.so.2
#3 0x00007f7fd4f49235 in IsEventLogging () from /usr/pkg/lib/libMagickCore-6.Q16.so.2
#4 0x00007f7fd56eb354 in NewPixelWand () from /usr/pkg/lib/libMagickWand-6.Q16.so.2
#5 0x00007f7fd56eb4c2 in NewPixelWands () from /usr/pkg/lib/libMagickWand-6.Q16.so.2
#6 0x00007f7fd56e97fa in NewPixelIterator () from /usr/pkg/lib/libMagickWand-6.Q16.so.2
#7 0x00007f7fd5a03ec3 in magick_Image_has_transparent_pixels () from /usr/pkg/lib/calibre/calibre/plugins/magick.so
#8 0x00007f7ff78cd4c8 in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#9 0x00007f7ff78cde47 in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2.7.so.1.0
#10 0x00007f7ff78ccf98 in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#11 0x00007f7ff78cde47 in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2.7.so.1.0
#12 0x00007f7ff78ccf98 in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#13 0x00007f7ff78cde47 in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2.7.so.1.0
#14 0x00007f7ff78ccf98 in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#15 0x00007f7ff78cde47 in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2.7.so.1.0
#16 0x00007f7ff78ccf98 in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#17 0x00007f7ff78cde47 in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2.7.so.1.0
#18 0x00007f7ff7866d76 in function_call () from /usr/pkg/lib/libpython2.7.so.1.0
#19 0x00007f7ff7846a98 in PyObject_Call () from /usr/pkg/lib/libpython2.7.so.1.0
#20 0x00007f7ff78cab54 in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#21 0x00007f7ff78cde47 in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2.7.so.1.0
#22 0x00007f7ff78ccf98 in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#23 0x00007f7ff78cde47 in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2.7.so.1.0
#24 0x00007f7ff78ccf98 in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#25 0x00007f7ff78cd560 in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#26 0x00007f7ff78cde47 in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2.7.so.1.0
#27 0x00007f7ff7866ca8 in function_call () from /usr/pkg/lib/libpython2.7.so.1.0
#28 0x00007f7ff7846a98 in PyObject_Call () from /usr/pkg/lib/libpython2.7.so.1.0
#29 0x00007f7ff7853908 in instancemethod_call () from /usr/pkg/lib/libpython2.7.so.1.0
#30 0x00007f7ff7846a98 in PyObject_Call () from /usr/pkg/lib/libpython2.7.so.1.0
#31 0x00007f7ff78c7d40 in PyEval_CallObjectWithKeywords () from /usr/pkg/lib/libpython2.7.so.1.0
#32 0x00007f7feb8122ea in sip_api_invoke_slot () from /usr/pkg/lib/python2.7/site-packages/sip.so
#33 0x00007f7fec3e066f in PyQtProxy::invokeSlot(qpycore_slot const&, void**) () from /usr/pkg/lib/python2.7/site-packages/PyQt4/QtCore.so
#34 0x00007f7fec3e0944 in PyQtProxy::unislot(void**) () from /usr/pkg/lib/python2.7/site-packages/PyQt4/QtCore.so
#35 0x00007f7fec3e1428 in PyQtProxy::qt_metacall(QMetaObject::Call, int, void**) () from /usr/pkg/lib/python2.7/site-packages/PyQt4/QtCore.so
#36 0x00007f7febd9c33e in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/pkg/qt4/lib/libQtCore.so.4
#37 0x00007f7febda31b9 in QSingleShotTimer::timerEvent(QTimerEvent*) () from /usr/pkg/qt4/lib/libQtCore.so.4
#38 0x00007f7febda0038 in QObject::event(QEvent*) () from /usr/pkg/qt4/lib/libQtCore.so.4
#39 0x00007f7fe9effe5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/pkg/qt4/lib/libQtGui.so.4
#40 0x00007f7fe9f05df4 in QApplication::notify(QObject*, QEvent*) () from /usr/pkg/qt4/lib/libQtGui.so.4
#41 0x00007f7feb1bfc5a in sipQApplication::notify(QObject*, QEvent*) () from /usr/pkg/lib/python2.7/site-packages/PyQt4/QtGui.so
#42 0x00007f7febd8c5c0 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/pkg/qt4/lib/libQtCore.so.4
#43 0x00007f7febdb3179 in QTimerInfoList::activateTimers() () from /usr/pkg/qt4/lib/libQtCore.so.4
#44 0x00007f7febdb3935 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/pkg/qt4/lib/libQtCore.so.4
#45 0x00007f7fe9f857ab in QEventDispatcherX11::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/pkg/qt4/lib/libQtGui.so.4
Code: Select all
(gdb) bt
#0 0x0000000d00000024 in ?? ()
#1 0x00007f7ff740947a in ?? () from /usr/lib/libpthread.so.1
#2 0x00007f7ff7406b5c in sem_post () from /usr/lib/libpthread.so.1
#3 0x00007f7f8d206007 in gomp_barrier_wait_end () from /usr/lib/libgomp.so=
=2E1
#4 0x00007f7f8d20644e in ?? () from /usr/lib/libgomp.so.1
#5 0x00007f7ff740b2ce in ?? () from /usr/lib/libpthread.so.1
#6 0x00007f7ff6875d80 in ___lwp_park50 () from /usr/lib/libc.so.12
Cannot access memory at address 0x7f7f8d000000
(gdb) info thread
[New LWP 3]
[New LWP 2]
Id Target Id Frame=20
4 LWP 2 0x00007f7ff6875d6a in ___lwp_park50 () from /usr/lib/libc.so.12
3 LWP 3 0x00007f7ff683938a in _sys___select50 () from /usr/lib/libc.so.12
* 2 LWP 4 0x0000000d00000024 in ?? ()
1 LWP 1 0x00007f7ff6875d6a in ___lwp_park50 () from /usr/lib/libc.so.12
(gdb) thread 1
[Switching to thread 1 (LWP 1)]
#0 0x00007f7ff6875d6a in ___lwp_park50 () from /usr/lib/libc.so.12
(gdb) bt
#0 0x00007f7ff6875d6a in ___lwp_park50 () from /usr/lib/libc.so.12
#1 0x00007f7ff7409d50 in pthread_cond_wait () from /usr/lib/libpthread.so.1
#2 0x00007f7ff7406901 in sem_wait () from /usr/lib/libpthread.so.1
#3 0x00007f7f8d208754 in gomp_sem_wait () from /usr/lib/libgomp.so.1
#4 0x00007f7f8d20602f in gomp_barrier_wait_end () from /usr/lib/libgomp.so.1
#5 0x00007f7f8d20688d in gomp_team_start () from /usr/lib/libgomp.so.1
#6 0x00007f7f9028c499 in ClonePixelCacheRepository () from /usr/pkg/lib/libMagickCore-6.Q16.so.2
#7 0x00007f7f9028d3d2 in OpenPixelCache () from /usr/pkg/lib/libMagickCore-6.Q16.so.2
#8 0x00007f7f90270a92 in GetImagePixelCache () from /usr/pkg/lib/libMagickCore-6.Q16.so.2
#9 0x00007f7f9028dfb4 in SyncImagePixelCache () from /usr/pkg/lib/libMagickCore-6.Q16.so.2
#10 0x00007f7f904c0941 in ReadJPEGImage () from /usr/pkg/lib/libMagickCore-6.Q16.so.2
#11 0x00007f7f902b925b in ReadImage () from /usr/pkg/lib/libMagickCore-6.Q16.so.2
#12 0x00007f7f90285c21 in BlobToImage () from /usr/pkg/lib/libMagickCore-6.Q16.so.2
#13 0x00007f7f90aa5e7c in MagickReadImageBlob () from /usr/pkg/lib/libMagickWand-6.Q16.so.2
#14 0x00007f7f90e06ffa in magick_Image_load () from /usr/pkg/lib/calibre/calibre/plugins/magick.so
#15 0x00007f7ff78468af in PyObject_Call () from /usr/pkg/lib/libpython2.7.so.1.0
#16 0x00007f7ff78caa90 in PyEval_CallObjectWithKeywords () from /usr/pkg/lib/libpython2.7.so.1.0
#17 0x00007f7ff7859783 in methoddescr_call () from /usr/pkg/lib/libpython2.7.so.1.0
#18 0x00007f7ff78468af in PyObject_Call () from /usr/pkg/lib/libpython2.7.so.1.0
#19 0x00007f7ff78cf197 in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#20 0x00007f7ff78d0f2a in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#21 0x00007f7ff78d219a in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2=2E7.so.1.0
#22 0x00007f7ff78cfe8f in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#23 0x00007f7ff78d219a in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2=2E7.so.1.0
#24 0x00007f7ff7867aba in function_call () from /usr/pkg/lib/libpython2.7.so.1.0
#25 0x00007f7ff78468af in PyObject_Call () from /usr/pkg/lib/libpython2.7.so.1.0
#26 0x00007f7ff7853b2c in instancemethod_call () from /usr/pkg/lib/libpython2.7.so.1.0
#27 0x00007f7ff78468af in PyObject_Call () from /usr/pkg/lib/libpython2.7.so.1.0
#28 0x00007f7ff78927ed in slot_tp_call () from /usr/pkg/lib/libpython2.7.so.1.0
#29 0x00007f7ff78468af in PyObject_Call () from /usr/pkg/lib/libpython2.7.so.1.0
#30 0x00007f7ff78cf197 in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#31 0x00007f7ff78d219a in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2.7.so.1.0
#32 0x00007f7ff78cfe8f in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#33 0x00007f7ff78d0f2a in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#34 0x00007f7ff78d219a in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2.7.so.1.0
#35 0x00007f7ff78cfe8f in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.7.so.1.0
#36 0x00007f7ff78d219a in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2.7.so.1.0
#37 0x00007f7ff78d2200 in PyEval_EvalCode () from /usr/pkg/lib/libpython2.7.so.1.0
#38 0x00007f7ff78ea0a1 in run_mod () from /usr/pkg/lib/libpython2.7.so.1.0
#39 0x00007f7ff78ead7c in PyRun_FileExFlags () from /usr/pkg/lib/libpython2.7.so.1.0
#40 0x00007f7ff78eb7d7 in PyRun_SimpleFileExFlags () from /usr/pkg/lib/libpython2.7.so.1.0
#41 0x00007f7ff78fb80a in Py_Main () from /usr/pkg/lib/libpython2.7.so.1.0
#42 0x0000000000400972 in _start ()