NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Crash with python / libpthread / libgomp



I was running a program in Python which crashed with a Segmentation
fault.  The backtrace shows a mysterious library libgomp.

It has to do with image processing, because if I remove
OEBPS/images/img0007.jpg from the epub file, the crash does not occur.

My main question is, at first: how to find out which software is at
fault here? Python, libpthread, the mysterious libgomp,
libMagickCore-6.Q16.so.2 (see backtraces), or even
calibre/plugins/magick.so?

What is libgomp? There seems to be no manual page.

This is repeatable for me.

Software and materials used:

- NetBSD/amd64 6.1.1.
- ebook-convert from calibre-1.33.0 from pkgsrc-current.
- python 2.7 (and other pkgsrc things) from stable branch,
  pkgsrc-2014Q1.
- pkgsrc was compiled with the system gcc.
- ebook be_26.epub from http://waterman.mine.nu/~wood/epub/be_26.epub

If I try the same thing on a Linux machine, it works. (The version of
calibre is the "same" but everything else is different of course. The
machine I used was updated yesterday to Xubuntu 14.04).

This is what happens (I added some extra empty lines for clarity):

$ ebook-convert be_26.epub be_26b.epub 


1% Converting input to HTML...
InputFormatPlugin: EPUB Input running
on /tmp/be_26.epub
Found HTML cover OEBPS/text/content001.xhtml
Parsing all content...
34% Running transforms on ebook...
Merging user specified metadata...
Detecting structure...
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Removing fake margins...
Cleaning up manifest...
Trimming unused files from manifest...
Trimming u'OEBPS/images/img0001.jpg' from manifest
Creating EPUB Output...
67% Running EPUB Output plugin
Segmentation fault (core dumped)


$ gdb /usr/pkg/bin/python2.7 python2.7.core 


GNU gdb (GDB) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64--netbsd".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/pkg/bin/python2.7...(no debugging symbols 
found)...done.
[New process 4]
[New process 3]
[New process 2]
[New process 1]
Core was generated by `python2.7'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000000d00000024 in ?? ()
(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.1
#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 
  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.7.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.7.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 ()


(gdb) thread 3
[Switching to thread 3 (LWP 3)]
#0  0x00007f7ff683938a in _sys___select50 () from /usr/lib/libc.so.12
(gdb) bt
#0  0x00007f7ff683938a in _sys___select50 () from /usr/lib/libc.so.12
#1  0x00007f7ff74075bc in __select50 () from /usr/lib/libpthread.so.1
#2  0x00007f7fec1d3d4d in qt_safe_select(int, fd_set*, fd_set*, fd_set*, 
timeval const*) () from /usr/pkg/qt4/lib/libQtCore.so.4
#3  0x00007f7fec1d70a3 in 
QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, 
timeval*) ()
   from /usr/pkg/qt4/lib/libQtCore.so.4
#4  0x00007f7fec1d7c18 in 
QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () 
from /usr/pkg/qt4/lib/libQtCore.so.4
#5  0x00007f7fec1aa77e in 
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from 
/usr/pkg/qt4/lib/libQtCore.so.4
#6  0x00007f7fec1aa9df in 
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from 
/usr/pkg/qt4/lib/libQtCore.so.4
#7  0x00007f7fec0c0f18 in QThread::exec() () from 
/usr/pkg/qt4/lib/libQtCore.so.4
#8  0x00007f7fec0c312e in QThreadPrivate::start(void*) () from 
/usr/pkg/qt4/lib/libQtCore.so.4
#9  0x00007f7ff740b2ce in ?? () from /usr/lib/libpthread.so.1
#10 0x00007f7ff6875d80 in ___lwp_park50 () from /usr/lib/libc.so.12
#11 0x00007f7fd4800000 in ?? ()
#12 0x00007f7ff7fbe740 in ?? ()
#13 0x0000000111110001 in ?? ()
#14 0x0000000033330003 in ?? ()
#15 0x0000000000000000 in ?? ()


(gdb) thread 4
[Switching to thread 4 (LWP 2)]
#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  0x00007f7fe2ac0bf8 in WTF::TCMalloc_PageHeap::scavengerThread() () from 
/usr/pkg/qt4/lib/libjscore.so.4
#3  0x00007f7fe2ac0c27 in WTF::TCMalloc_PageHeap::runScavengerThread(void*) () 
from /usr/pkg/qt4/lib/libjscore.so.4
#4  0x00007f7ff740b2ce in ?? () from /usr/lib/libpthread.so.1
#5  0x00007f7ff6875d80 in ___lwp_park50 () from /usr/lib/libc.so.12
Cannot access memory at address 0x7f7fd4c00000

(gdb) quit

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl    -- 'this bath is too hot.'

Attachment: pgpXZ9WPepubY.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index