strange static object related crashes

Jos van den Oever <[email protected]>
Newsgroups gmane.comp.kde.devel.koffice
Organization KO GmbH
Message-ID <[email protected]>
Hi all,

Yesterday I spent quite some time with David Faure to figure out why I was 
getting so many crashes on the build server. I could get a backtrace for this 
command
  kpresenter --nocrashhandler --profile-filename feaifeo --benchmark-loading 
kofficetests/interoperability/kpresenter/MSPowerpoint2000/mp00_3d_bar_cylinder_chart.ppt

No-body was able to get the same crash. Running valgrind was not working 
because valgrind did not understand some assembler in Qt 4.7.0. So I 
recompiled Qt with the option 
  -no-sse2
Now valgrind did provide a backtrace (2nd one below). After recompiling koffice 
on this new Qt, the crash disappeared. I am posting this for reference.
  KDE 4.5.3, Qt 4.7.0 , KOffice trunk
  gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
  
Cheers,
Jos

[Thread debugging using libthread_db enabled]
[New Thread 0xb1517b70 (LWP 1664)]
[Thread 0xb1517b70 (LWP 1664) exited]
[New Thread 0xb1517b70 (LWP 1665)]
[New Thread 0xb0bffb70 (LWP 1666)]
[Thread 0xb1517b70 (LWP 1665) exited]
[Thread 0xb0bffb70 (LWP 1666) exited]

Program received signal SIGSEGV, Segmentation fault.
0xb5f2b547 in _mm_andnot_si128 (data=0x80a9022, length=43)
    at /usr/lib/gcc/i486-linux-gnu/4.4.3/include/emmintrin.h:1239
1239      return (__m128i)__builtin_ia32_pandn128 ((__v2di)__A, (__v2di)__B);
#0  0xb5f2b547 in _mm_andnot_si128 (data=0x80a9022, length=43)
    at /usr/lib/gcc/i486-linux-gnu/4.4.3/include/emmintrin.h:1239
#1  toLatin1_helper (data=0x80a9022, length=43)
    at /data/ko-devel/src/qt-everywhere-opensource-
src-4.7.0/src/corelib/tools/qstring.cpp:3516
#2  0xb5f2b803 in QString::toLatin1 (this=0xbfffed90)
    at /data/ko-devel/src/qt-everywhere-opensource-
src-4.7.0/src/corelib/tools/qstring.cpp:3584
#3  0xb603abee in QIconvCodec::convertFromUnicode (this=0x80cb588, 
    uc=0x80a9022, len=43, convState=0x0)
    at /data/ko-devel/src/qt-everywhere-opensource-
src-4.7.0/src/corelib/codecs/qiconvcodec.cpp:349
#4  0xb6034525 in QTextCodec::fromUnicode (this=0x80cb588, str=...)
    at /data/ko-devel/src/qt-everywhere-opensource-
src-4.7.0/src/corelib/codecs/qtextcodec.cpp:1375
#5  0xb5f2b940 in QString::toLocal8Bit (this=0x81f6890)
    at /data/ko-devel/src/qt-everywhere-opensource-
src-4.7.0/src/corelib/tools/qstring.cpp:3642
#6  0xb5f71034 in locale_encode (f=...)
    at /data/ko-devel/src/qt-everywhere-opensource-
src-4.7.0/src/corelib/io/qfile.cpp:71
#7  0xb5f7202b in QFile::encodeName (fileName=...)
    at /data/ko-devel/src/qt-everywhere-opensource-
src-4.7.0/src/corelib/io/qfile.cpp:482
#8  0xb5fc1674 in QFSFileEnginePrivate::nativeInitFileName (this=0x81f6880)
    at /data/ko-devel/src/qt-everywhere-opensource-
src-4.7.0/src/corelib/io/qfsfileengine_unix.cpp:203
#9  0xb5fb9e65 in QFSFileEngine (this=0x80cb1b0, file=...)
    at /data/ko-devel/src/qt-everywhere-opensource-
src-4.7.0/src/corelib/io/qfsfileengine.cpp:238
#10 0xb5f5f0be in QAbstractFileEngine::create (fileName=...)
    at /data/ko-devel/src/qt-everywhere-opensource-
src-4.7.0/src/corelib/io/qabstractfileengine.cpp:203
#11 0xb5f76798 in QFileInfoPrivate::initFileEngine (this=0x80cb380, file=...)
    at /data/ko-devel/src/qt-everywhere-opensource-
src-4.7.0/src/corelib/io/qfileinfo.cpp:73
#12 0xb5f77062 in QFileInfo (this=0xbffff02c, file=...)
    at /data/ko-devel/src/qt-everywhere-opensource-
src-4.7.0/src/corelib/io/qfileinfo.cpp:290
#13 0xb6209430 in KConfigIniBackend::createEnclosing (this=0x8092f58)
    at /home/ko-devel/src/kdelibs-4.5.3/kdecore/config/kconfigini.cpp:529
#14 0xb61f48db in KConfig::sync (this=0x809bea0)
    at /home/ko-devel/src/kdelibs-4.5.3/kdecore/config/kconfig.cpp:297
#15 0xb61f4d98 in ~KConfig (this=0x809bea0, __in_chrg=<value optimized out>)
    at /home/ko-devel/src/kdelibs-4.5.3/kdecore/config/kconfig.cpp:194
#16 0xb62107aa in ~KSharedConfig (this=0x809bea0, 
    __in_chrg=<value optimized out>)
    at /home/ko-devel/src/kdelibs-4.5.3/kdecore/config/ksharedconfig.cpp:74
#17 0xb62bc48a in KSharedPtr<KSharedConfig>::attach (this=0x8077ee0, 
    __in_chrg=<value optimized out>)
    at /home/ko-devel/src/kdelibs-4.5.3/kdecore/util/ksharedptr.h:214
#18 KSharedPtr<KSharedConfig>::operator= (this=0x8077ee0, 
    __in_chrg=<value optimized out>)
    at /home/ko-devel/src/kdelibs-4.5.3/kdecore/util/ksharedptr.h:97
#19 ~KComponentDataPrivate (this=0x8077ee0, __in_chrg=<value optimized out>)
    at /home/ko-devel/src/kdelibs-4.5.3/kdecore/kernel/kcomponentdata_p.h:56
#20 0xb62bc188 in KComponentDataPrivate::deref (this=0x805abc0, 
    __in_chrg=<value optimized out>)
    at /home/ko-devel/src/kdelibs-4.5.3/kdecore/kernel/kcomponentdata_p.h:74
#21 ~KComponentData (this=0x805abc0, __in_chrg=<value optimized out>)
    at /home/ko-devel/src/kdelibs-4.5.3/kdecore/kernel/kcomponentdata.cpp:123
#22 0xb62b8c08 in ~KGlobalPrivate ()
    at /home/ko-devel/src/kdelibs-4.5.3/kdecore/kernel/kglobal.cpp:92
#23 destroy ()
    at /home/ko-devel/src/kdelibs-4.5.3/kdecore/kernel/kglobal.cpp:116
#24 0xb62109cb in ~KCleanUpGlobalStatic (this=0xb6417810, 
    __in_chrg=<value optimized out>)
    at /home/ko-devel/src/kdelibs-4.5.3/kdecore/kernel/kglobal.h:62
#25 0xb5b35588 in __cxa_finalize (d=0xb64177e0) at cxa_finalize.c:56
#26 0xb61f0474 in __do_global_dtors_aux ()
   from /home/ko-devel/local/kde/lib/libkdecore.so.5
#27 0xb63da8c0 in _fini () from /home/ko-devel/local/kde/lib/libkdecore.so.5
#28 0xb7ff1216 in _dl_fini () at dl-fini.c:248
#29 0xb5b351bf in __run_exit_handlers (status=0, listp=0xb5c5c324, 
    run_list_atexit=true) at exit.c:78
#30 0xb5b3522f in *__GI_exit (status=0) at exit.c:100
#31 0xb5b1cbde in __libc_start_main (main=0x8048780 <main>, argc=6, 
    ubp_av=0xbffff6f4, init=0x80487c0 <__libc_csu_init>, 
    fini=0x80487b0 <__libc_csu_fini>, rtld_fini=0xb7ff1030 <_dl_fini>, 
    stack_end=0xbffff6ec) at libc-start.c:258
#32 0x080486e1 in _start ()


==9361== Invalid read of size 4
==9361==    at 0x47C952A: QBasicAtomicInt::deref() (qatomic_i386.h:132)
==9361==    by 0x605F116: QHash<int, QTextCodec*>::operator=(QHash<int, 
QTextCodec*> const&) (qhash.h:593)
==9361==    by 0x605E7CF: QHash<int, QTextCodec*>::clear() (qhash.h:574)
==9361==    by 0x605C415: QTextCodec::codecForMib(int) (qtextcodec.cpp:1086)
==9361==    by 0x606287A: QIconvCodec::QIconvCodec() (qiconvcodec.cpp:96)
==9361==    by 0x605BBAB: setup() (qtextcodec.cpp:808)
==9361==    by 0x605CB70: QTextCodec::codecForLocale() (qtextcodec.cpp:1239)
==9361==    by 0x5F542E0: QString::toLocal8Bit() const (qstring.cpp:3641)
==9361==    by 0x5F99887: locale_encode(QString const&) (qfile.cpp:71)
==9361==    by 0x5F9A87E: QFile::encodeName(QString const&) (qfile.cpp:482)
==9361==    by 0x5FE9EC7: QFSFileEnginePrivate::nativeInitFileName() 
(qfsfileengine_unix.cpp:203)
==9361==    by 0x5FE26B8: QFSFileEngine::QFSFileEngine(QString const&) 
(qfsfileengine.cpp:238)
==9361==  Address 0x703bc70 is 8 bytes inside a block of size 32 free'd
==9361==    at 0x4024931: operator delete(void*) (vg_replace_malloc.c:387)
==9361==    by 0x5F1EF4B: QHashData::free_helper(void (*)(QHashData::Node*)) 
(qhash.cpp:278)
==9361==    by 0x605F0CF: QHash<int, QTextCodec*>::freeData(QHashData*) 
(qhash.h:568)
==9361==    by 0x605E797: QHash<int, QTextCodec*>::~QHash() (qhash.h:284)
==9361==    by 0x63C71BE: __run_exit_handlers (exit.c:78)
==9361==    by 0x63C722E: exit (exit.c:100)
==9361==    by 0x63AEBDD: (below main) (libc-start.c:258)
==9361== 
==9361== Invalid read of size 4
==9361==    at 0x47C952A: QBasicAtomicInt::deref() (qatomic_i386.h:132)
==9361==    by 0x605EE62: QHash<QByteArray, 
QTextCodec*>::operator=(QHash<QByteArray, QTextCodec*> const&) (qhash.h:593)
==9361==    by 0x605E537: QHash<QByteArray, QTextCodec*>::clear() 
(qhash.h:574)
==9361==    by 0x605C0FC: QTextCodec::codecForName(QByteArray const&) 
(qtextcodec.cpp:1042)
==9361==    by 0x5FB42E8: QTextCodec::codecForName(char const*) 
(qtextcodec.h:67)
==9361==    by 0x605AF62: setupLocaleMapper() (qtextcodec.cpp:598)





-- 
Jos van den Oever, software architect
+49 391 25 19 15 53
http://kogmbh.com/legal/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.