[poppler] XRef::fetch mutex lock
Albert Astals Cid
aacid at kde.org
Wed Mar 27 03:41:25 PDT 2013
Why do we pass around the recursion integer around?
Wouldn't a real recursive mutex be enough?
I'm asking because i have a document here (that sadly i can't share) that is deadlocking
itself there because we are not passing the recursion integer everywhere (we lose it in DCTStream::DCTStream)
as shown in this backtrace
#0 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1 0x00007ffff599217c in _L_lock_982 () from /lib/x86_64-linux-gnu/libpthread.so.0
#2 0x00007ffff5991fcb in __GI___pthread_mutex_lock (mutex=0x71dc10) at pthread_mutex_lock.c:64
#3 0x00007ffff5f02f73 in MutexLocker::MutexLocker (this=0x7fffffffcfb0, mutexA=0x71dc10, modeA=DoLockMutex) at /home/tsdgeos/devel/poppler/goo/GooMutex.h:72
#4 0x00007ffff5fac8e2 in XRef::fetch (this=0x71db50, num=5, gen=0, obj=0x7fffffffd0b0, recursion=0) at /home/tsdgeos/devel/poppler/poppler/XRef.cc:1137
#5 0x00007ffff5f8a013 in Object::fetch (this=0x71fe08, xref=0x71db50, obj=0x7fffffffd0b0, recursion=0) at /home/tsdgeos/devel/poppler/poppler/Object.cc:122
#6 0x00007ffff5f19de4 in Dict::lookup (this=0x71fb60, key=0x7ffff606fbba "Height", obj=0x7fffffffd0b0, recursion=0) at /home/tsdgeos/devel/poppler/poppler/Dict.cc:256
#7 0x00007ffff5f032e9 in Object::dictLookup (this=0x7fffffffd5a0, key=0x7ffff606fbba "Height", obj=0x7fffffffd0b0, recursion=0) at /home/tsdgeos/devel/poppler/poppler/Object.h:315
#8 0x00007ffff601f8a3 in DCTStream::DCTStream (this=0x7832b0, strA=0x720780, colorXformA=-1, dict=0x7fffffffd5a0) at /home/tsdgeos/devel/poppler/poppler/DCTStream.cc:72
#9 0x00007ffff5f9bf6d in Stream::makeFilter (this=0x720780, name=0x71fef0 "DCTDecode", str=0x720780, params=0x7fffffffd1e0, recursion=1, dict=0x7fffffffd5a0) at /home/tsdgeos/devel/poppler/poppler/Stream.cc:311
#10 0x00007ffff5f9b71a in Stream::addFilters (this=0x720780, dict=0x7fffffffd5a0, recursion=1) at /home/tsdgeos/devel/poppler/poppler/Stream.cc:184
#11 0x00007ffff5f9204b in Parser::makeStream (this=0x71fcd0, dict=0x7fffffffd5a0, fileKey=0x0, encAlgorithm=cryptRC4, keyLength=1146103040, objNum=3, objGen=0, recursion=1, strict=false) at /home/tsdgeos/devel/poppler/poppler/Parser.cc:280
#12 0x00007ffff5f918e6 in Parser::getObj (this=0x71fcd0, obj=0x7fffffffd5a0, simpleOnly=false, fileKey=0x0, encAlgorithm=cryptRC4, keyLength=1146103040, objNum=3, objGen=0, recursion=0, strict=false) at /home/tsdgeos/devel/poppler/poppler/Parser.cc:131
#13 0x00007ffff5facdd3 in XRef::fetch (this=0x71db50, num=3, gen=0, obj=0x7fffffffd5a0, recursion=0) at /home/tsdgeos/devel/poppler/poppler/XRef.cc:1197
#14 0x00007ffff5f8a013 in Object::fetch (this=0x71e128, xref=0x71db50, obj=0x7fffffffd5a0, recursion=0) at /home/tsdgeos/devel/poppler/poppler/Object.cc:122
#15 0x00007ffff5f19de4 in Dict::lookup (this=0x71e660, key=0x7206e0 "Im1", obj=0x7fffffffd5a0, recursion=0) at /home/tsdgeos/devel/poppler/poppler/Dict.cc:256
#16 0x00007ffff5f032e9 in Object::dictLookup (this=0x71e598, key=0x7206e0 "Im1", obj=0x7fffffffd5a0, recursion=0) at /home/tsdgeos/devel/poppler/poppler/Object.h:315
#17 0x00007ffff5f2a647 in GfxResources::lookupXObject (this=0x71e590, name=0x7206e0 "Im1", obj=0x7fffffffd5a0) at /home/tsdgeos/devel/poppler/poppler/Gfx.cc:411
#18 0x00007ffff5f3f41e in Gfx::opXObject (this=0x71e440, args=0x7fffffffd720, numArgs=1) at /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4114
#19 0x00007ffff5f2bfd6 in Gfx::execOp (this=0x71e440, cmd=0x7fffffffd6e0, args=0x7fffffffd720, numArgs=1) at /home/tsdgeos/devel/poppler/poppler/Gfx.cc:858
#20 0x00007ffff5f2b82b in Gfx::go (this=0x71e440, topLevel=true) at /home/tsdgeos/devel/poppler/poppler/Gfx.cc:717
Cheers,
Albert
More information about the poppler
mailing list