View Issue Details

IDProjectCategoryView StatusLast Update
0002963Slicer4Core: Base Codepublic2014-03-06 06:16
Reporterpieper Assigned Topieper  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformlinuxOSubuntuOS Version10.10
Product Version 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.3.0 
Summary0002963: crash on exit - dcmtk global dictionary
Description

The GlobalDcmDataDictionary class instance is being destructed twice and this leads to a crash.

Setting a breakpoint in the destructor, these are the two stack traces. One is from the ctkDICOM library and one is from the general process shutdown.

(gdb) where
#0 GlobalDcmDataDictionary::~GlobalDcmDataDictionary (this=0x7ffff641fc20 <dcmDataDict>, __in_chrg=<optimized out>)
at /home/pieper/slicer4/latest/Slicer-superbuild/DCMTK/dcmdata/libsrc/dcdict.cc:799
0000001 0x00007fffd509d901 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
0000002 0x00007fffd509d985 in exit () from /lib/x86_64-linux-gnu/libc.so.6
0000003 0x00007fffd5083774 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
0000004 0x00000000004054f9 in _start ()

and

(gdb) where
#0 GlobalDcmDataDictionary::~GlobalDcmDataDictionary (this=0x7ffff641fc20 <dcmDataDict>, __in_chrg=<optimized out>)
at /home/pieper/slicer4/latest/Slicer-superbuild/DCMTK/dcmdata/libsrc/dcdict.cc:799
0000001 0x00007fffd509dd1d in cxa_finalize () from /lib/x86_64-linux-gnu/libc.so.6
0000002 0x00007ffff5c721d3 in
do_global_dtors_aux ()
from /home/pieper/slicer4/latest/Slicer-superbuild/CTK-build/CTK-build/bin/libCTKDICOMCore.so.0.1
0000003 0x00007fffffffd2f0 in ?? ()
0000004 0x00007ffff7de991e in ?? () from /lib64/ld-linux-x86-64.so.2
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Steps To Reproduce

Reproducible with the FRSN2012Vis test.

TagsNo tags attached.

Relationships

duplicate of 0003040 closedjcfr Building DCMTK in shared mode prevents crash at startup 

Activities

jcfr

jcfr

2013-02-23 19:49

administrator   ~0008028

See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=21772

Could you confirm that the dcmtk library listed in the CMakeCache.txt of both "Slicer inner build" and "ITKv4 build" directories are the same.

pieper

pieper

2013-02-24 10:28

administrator   ~0008031

Yes, they are the same (see below). I will try a fresh rebuild with the new ITK.

pieper@flint:~/slicer4/latest/Slicer-superbuild$ grep DCMTK_DIR Slicer-build/CMakeCache.txt ITKv4-build/CMakeCache.txt
Slicer-build/CMakeCache.txt:DCMTK_DIR:PATH=/home/pieper/slicer4/latest/Slicer-superbuild/DCMTK-install
ITKv4-build/CMakeCache.txt:DCMTK_DIR:PATH=/home/pieper/slicer4/latest/Slicer-superbuild/DCMTK-install

jcfr

jcfr

2013-02-24 10:41

administrator   ~0008032

What about the variables like: DCMTK_(.+)_LIBRARY ?

pieper

pieper

2013-02-24 11:22

administrator   ~0008033

Too late to check - the build tree is gone.

pieper

pieper

2013-02-24 13:26

administrator   ~0008036

Fresh build with r21773 (new ITKv4) gives same crash on exit (trave below).

And all the paths point to the superbuild tree - for example:

pieper@flint:~/slicer4/latest/Slicer-superbuild$ grep DCMTK_dcmdata Slicer-build/CMakeCache.txt ITKv4-build/CMakeCache.txt | grep LIBRARY | grep FILEPATH
Slicer-build/CMakeCache.txt:DCMTK_dcmdata_LIBRARY_DEBUG:FILEPATH=/home/pieper/slicer4/latest/Slicer-superbuild/DCMTK-install/lib/libdcmdata.a
Slicer-build/CMakeCache.txt:DCMTK_dcmdata_LIBRARY_RELEASE:FILEPATH=/home/pieper/slicer4/latest/Slicer-superbuild/DCMTK-install/lib/libdcmdata.a
ITKv4-build/CMakeCache.txt:DCMTK_dcmdata_LIBRARY_DEBUG:FILEPATH=/home/pieper/slicer4/latest/Slicer-superbuild/DCMTK-install/lib/libdcmdata.a
ITKv4-build/CMakeCache.txt:DCMTK_dcmdata_LIBRARY_RELEASE:FILEPATH=/home/pieper/slicer4/latest/Slicer-superbuild/DCMTK-install/lib/libdcmdata.a

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5f645e4 in OFListBase::base_empty (this=0x20) at /home/pieper/slicer4/latest/Slicer-superbuild/DCMTK/ofstd/include/dcmtk/ofstd/oflist.h:123
123 OFBool base_empty() const { return afterLast == afterLast->next; }
(gdb) where
#0 0x00007ffff5f645e4 in OFListBase::base_empty (this=0x20) at /home/pieper/slicer4/latest/Slicer-superbuild/DCMTK/ofstd/include/dcmtk/ofstd/oflist.h:123
0000001 0x00007ffff5f6474a in OFList<DcmDictEntry*>::empty (this=0x20) at /home/pieper/slicer4/latest/Slicer-superbuild/DCMTK/ofstd/include/dcmtk/ofstd/oflist.h:347
0000002 0x00007ffff5f637f6 in DcmDictEntryList::empty (this=0x20) at /home/pieper/slicer4/latest/Slicer-superbuild/DCMTK/dcmdata/libsrc/dchashdi.cc:121
0000003 0x00007ffff5f63491 in DcmDictEntryList::clear (this=0x20) at /home/pieper/slicer4/latest/Slicer-superbuild/DCMTK/dcmdata/libsrc/dchashdi.cc:43
0000004 0x00007ffff5f63419 in DcmDictEntryList::~DcmDictEntryList (this=0x20, in_chrg=<optimized out>)
at /home/pieper/slicer4/latest/Slicer-superbuild/DCMTK/dcmdata/libsrc/dchashdi.cc:37
0000005 0x00007ffff5f63da6 in DcmHashDict::clear (this=0x31f52f0) at /home/pieper/slicer4/latest/Slicer-superbuild/DCMTK/dcmdata/libsrc/dchashdi.cc:259
0000006 0x00007ffff5f4866a in DcmDataDictionary::clear (this=0x31f52f0) at /home/pieper/slicer4/latest/Slicer-superbuild/DCMTK/dcmdata/libsrc/dcdict.cc:128
0000007 0x00007ffff5f485fd in DcmDataDictionary::~DcmDataDictionary (this=0x31f52f0, __in_chrg=<optimized out>)
at /home/pieper/slicer4/latest/Slicer-superbuild/DCMTK/dcmdata/libsrc/dcdict.cc:122
0000008 0x00007ffff5f4af23 in GlobalDcmDataDictionary::~GlobalDcmDataDictionary (this=0x7ffff641fc20 <dcmDataDict>,
in_chrg=<optimized out>)
at /home/pieper/slicer4/latest/Slicer-superbuild/DCMTK/dcmdata/libsrc/dcdict.cc:799
0000009 0x00007fffd50e9d1d in cxa_finalize () from /lib/x86_64-linux-gnu/libc.so.6
0000010 0x00007ffff5c721d3 in
do_global_dtors_aux () from /home/pieper/slicer4/latest/Slicer-superbuild/CTK-build/CTK-build/bin/libCTKDICOMCore.so.0.1
0000011 0x00007fffffffd2f0 in ?? ()
0000012 0x00007ffff7de991e in ?? () from /lib64/ld-linux-x86-64.so.2
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

pieper

pieper

2013-05-09 10:39

administrator   ~0008598

Fixed by building dcmtk as shared library

Issue History

Date Modified Username Field Change
2013-02-19 10:33 pieper New Issue
2013-02-19 10:33 pieper Status new => assigned
2013-02-19 10:33 pieper Assigned To => pieper
2013-02-23 19:49 jcfr Note Added: 0008028
2013-02-24 10:28 pieper Note Added: 0008031
2013-02-24 10:41 jcfr Note Added: 0008032
2013-02-24 11:22 pieper Note Added: 0008033
2013-02-24 13:26 pieper Note Added: 0008036
2013-05-09 10:38 pieper Relationship added duplicate of 0003040
2013-05-09 10:39 pieper Note Added: 0008598
2013-05-09 10:39 pieper Status assigned => closed
2013-05-09 10:39 pieper Resolution open => fixed
2013-05-09 10:39 pieper Fixed in Version => Slicer 4.3.0
2014-03-06 06:16 jcfr Target Version => Slicer 4.3.0