Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 394533

Summary: app-office/libreoffice crashes in QtCore on exit
Product: Gentoo Linux Reporter: Tomáš Chvátal (RETIRED) <scarabeus>
Component: New packagesAssignee: Gentoo Office Team <office>
Status: RESOLVED FIXED    
Severity: critical CC: egorov_egor, freedesktop-bugs, qt, suka, write2David
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: valgrind log

Description Tomáš Chvátal (RETIRED) gentoo-dev 2011-12-13 08:21:07 UTC
This bug is not possible to reproduce on openSUSE so maybe our patchset and their patchset differ.

This bug is quite annoying because it bothers user with next launch asking for file restoration...

Full backtrace:

Program received signal SIGSEGV, Segmentation fault.
QCoreApplication::notifyInternal (this=0x6f64c0, receiver=0x76a780, event=0x7fffffffdc30) at kernel/qcoreapplication.cpp:787
787     kernel/qcoreapplication.cpp: Adresář nebo soubor neexistuje.
        in kernel/qcoreapplication.cpp

#0  QCoreApplication::notifyInternal (this=0x6f64c0, receiver=0x76a780, event=0x7fffffffdc30)
    at kernel/qcoreapplication.cpp:787
#1  0x00007fffecd18fea in sendEvent (event=0x7fffffffdc30, receiver=<optimized out>) at kernel/qcoreapplication.h:215
#2  QObjectPrivate::setParent_helper (this=0x773f00, o=0x0) at kernel/qobject.cpp:1981
#3  0x00007fffecd1b399 in QObject::~QObject (this=0x773ed0, __in_chrg=<optimized out>) at kernel/qobject.cpp:954
#4  0x00007fffecd1e8d9 in QSocketNotifier::~QSocketNotifier (this=0x773ed0, __in_chrg=<optimized out>)
    at kernel/qsocketnotifier.cpp:229
#5  0x00007fffe4698f2f in qDBusRemoveWatch (watch=0x78baa0, data=0x76a780) at qdbusintegrator.cpp:301
#6  0x00007fffe4241b0b in _dbus_watch_list_remove_watch (watch_list=0x76e6e0, watch=0x78baa0)
    at /var/tmp/portage/sys-apps/dbus-1.4.16-r2/work/dbus-1.4.16/dbus/dbus-watch.c:402
#7  0x00007fffe42403c4 in free_watches (transport=<optimized out>)
    at /var/tmp/portage/sys-apps/dbus-1.4.16-r2/work/dbus-1.4.16/dbus/dbus-transport-socket.c:81
#8  0x00007fffe4240439 in socket_disconnect (transport=0x76e720)
    at /var/tmp/portage/sys-apps/dbus-1.4.16-r2/work/dbus-1.4.16/dbus/dbus-transport-socket.c:987
#9  0x00007fffe423f844 in _dbus_transport_disconnect (transport=0x76e720)
    at /var/tmp/portage/sys-apps/dbus-1.4.16-r2/work/dbus-1.4.16/dbus/dbus-transport.c:507
#10 _dbus_transport_disconnect (transport=0x76e720)
    at /var/tmp/portage/sys-apps/dbus-1.4.16-r2/work/dbus-1.4.16/dbus/dbus-transport.c:498
#11 0x00007fffe422e352 in _dbus_connection_close_possibly_shared_and_unlock (connection=0x76e490)
    at /var/tmp/portage/sys-apps/dbus-1.4.16-r2/work/dbus-1.4.16/dbus/dbus-connection.c:2811
#12 0x00007fffe4699e46 in q_dbus_connection_close (connection=<optimized out>) at qdbus_symbols_p.h:113
#13 QDBusConnectionPrivate::closeConnection (this=0x76a780) at qdbusintegrator.cpp:1045
#14 0x00007fffe469fca3 in QDBusConnectionPrivate::~QDBusConnectionPrivate (this=0x76a780, __in_chrg=<optimized out>)
    at qdbusintegrator.cpp:1005
#15 0x00007fffe46a0159 in QDBusConnectionPrivate::~QDBusConnectionPrivate (this=0x76a780, __in_chrg=<optimized out>)
    at qdbusintegrator.cpp:1016
#16 0x00007fffe4695613 in ~QDBusDefaultConnection (this=0x78c750, __in_chrg=<optimized out>) at qdbusconnection.cpp:978
#17 QGlobalStaticDeleter<QDBusDefaultConnection>::~QGlobalStaticDeleter (this=0x7fffe48f5068, __in_chrg=<optimized out>)
    at ../../include/QtCore/../../src/corelib/global/qglobal.h:1823
#18 0x00007ffff6e25409 in __run_exit_handlers (status=0, listp=0x7ffff716f488, run_list_atexit=true) at exit.c:78
#19 0x00007ffff6e25495 in __GI_exit (status=<optimized out>) at exit.c:100
#20 0x00007ffff6e0f194 in __libc_start_main (main=0x400660 <main>, argc=1, ubp_av=0x7fffffffdf98, init=<optimized out>, 
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdf88) at libc-start.c:258
#21 0x00000000004006a1 in _start ()

"Adresar nebo soubor neexistuje == File or directory not found"
Comment 1 Davide Pesavento (RETIRED) gentoo-dev 2011-12-13 08:52:54 UTC
Which version of libreoffice and qt?
Comment 2 Tomáš Chvátal (RETIRED) gentoo-dev 2011-12-13 09:33:21 UTC
3.5/master (didn't test 3.4).

Latest testing qt.
Comment 3 Alex Alexander (RETIRED) gentoo-dev 2012-01-26 22:27:15 UTC
I just tested libreoffice-3.5.0.1 w/ qt-4.7.4, doesn't seem to crash.
Perhaps it was fixed in this libreoffice version? :)
Comment 4 Johannes Huber (RETIRED) gentoo-dev 2012-01-27 11:32:18 UTC
<johu> tampakrap: and did scarabeus check the qt libreoffice crash bug?
<tampakrap> johu: scarabeus can't test it anymore, he moved his hd that had gentoo on a server
<tampakrap> so, if we can't reproduce we can close it
Comment 5 Egor Y. Egorov 2012-01-30 10:19:18 UTC
On my system bug still exist with stable Qt (4.7.4) and libreoffice-3.5.0.1
Reproduse:
1. run soffice
2. close main window
Result:
in log messages see
kernel: soffice.bin[4027]: segfault at 7fb21f302cd0 ip 0000003985162078 sp 00007fff708ed330 error 4 in libQtCore.so.4.7.4[3985000000+28a000]

How can I help in the diagnosis?
Comment 6 Egor Y. Egorov 2012-01-30 10:24:37 UTC
$ gdb /usr/lib/libreoffice/program/soffice.bin 
GNU gdb (Gentoo 7.3.1 p2) 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-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/lib64/libreoffice/program/soffice.bin...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/lib64/libreoffice/program/soffice.bin 
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff58c4700 (LWP 12210)]
[New Thread 0x7fffec25a700 (LWP 12219)]
[New Thread 0x7fffeba59700 (LWP 12220)]
[New Thread 0x7fffe9716700 (LWP 12221)]
[New Thread 0x7fffe8a6e700 (LWP 12230)]
[New Thread 0x7fffe3dac700 (LWP 12233)]
[Thread 0x7fffe3dac700 (LWP 12233) exited]
[Thread 0x7fffec25a700 (LWP 12219) exited]
[New Thread 0x7fffec25a700 (LWP 12253)]
[Thread 0x7fffe9716700 (LWP 12221) exited]
[Thread 0x7fffec25a700 (LWP 12253) exited]                                                                                                   
[New Thread 0x7fffec25a700 (LWP 12254)]                                                                                                      
[Thread 0x7fffec25a700 (LWP 12254) exited]                                                                                                   
[Thread 0x7fffeba59700 (LWP 12220) exited]                                                                                                   
[Thread 0x7fffe8a6e700 (LWP 12230) exited]                                                                                                   
                                                                                                                                             
Program received signal SIGSEGV, Segmentation fault.                                                                                         
0x0000003985162078 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4                              
(gdb) bt                                                                                                                                     
#0  0x0000003985162078 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4                          
#1  0x0000003985174c35 in QObjectPrivate::setParent_helper(QObject*) () from /usr/lib64/qt4/libQtCore.so.4                                   
#2  0x0000003985179591 in QObject::~QObject() () from /usr/lib64/qt4/libQtCore.so.4                                                          
#3  0x000000398517cc49 in QSocketNotifier::~QSocketNotifier() () from /usr/lib64/qt4/libQtCore.so.4                                          
#4  0x000000398a420787 in ?? () from /usr/lib64/qt4/libQtDBus.so.4                                                                           
#5  0x00007ffff127154b in ?? () from /usr/lib64/libdbus-1.so.3                                                                               
#6  0x00007ffff1270a4e in ?? () from /usr/lib64/libdbus-1.so.3                                                                               
#7  0x00007ffff1270ac9 in ?? () from /usr/lib64/libdbus-1.so.3                                                                               
#8  0x00007ffff126f147 in ?? () from /usr/lib64/libdbus-1.so.3                                                                               
#9  0x00007ffff125d4e2 in ?? () from /usr/lib64/libdbus-1.so.3                                                                               
#10 0x000000398a41b32e in ?? () from /usr/lib64/qt4/libQtDBus.so.4                                                                           
#11 0x000000398a41f922 in ?? () from /usr/lib64/qt4/libQtDBus.so.4                                                                           
#12 0x000000398a41fe49 in ?? () from /usr/lib64/qt4/libQtDBus.so.4                                                                           
#13 0x000000398a4172d0 in ?? () from /usr/lib64/qt4/libQtDBus.so.4                                                                           
#14 0x000000397f0383b1 in ?? () from /lib64/libc.so.6
#15 0x000000397f038405 in exit () from /lib64/libc.so.6
#16 0x000000397f0220a4 in __libc_start_main () from /lib64/libc.so.6
#17 0x0000000000400679 in ?? ()
#18 0x00007fffffffd658 in ?? ()
#19 0x000000000000001c in ?? ()
#20 0x0000000000000001 in ?? ()
#21 0x00007fffffffdaaf in ?? ()
#22 0x0000000000000000 in ?? ()
(gdb)
Comment 7 Davide Pesavento (RETIRED) gentoo-dev 2012-01-30 10:57:22 UTC
Reopening
Comment 8 Egor Y. Egorov 2012-01-31 11:08:50 UTC
same with Qt-4.8
Comment 9 Markos Chandras (RETIRED) gentoo-dev 2012-02-03 18:31:08 UTC
I am not surprised his maintainer acted like that. CC'ing suka@ in case he is still interested in the office packages
Comment 10 Davide Pesavento (RETIRED) gentoo-dev 2012-02-04 12:03:30 UTC
Readding qt@g.o since this might be a bug in Qt libraries.
Comment 11 Markos Chandras (RETIRED) gentoo-dev 2012-02-08 18:35:27 UTC
Can we please have an emerge -pv libreoffice so we can see the used flags used by that? Is this still reproducible with Qt-4.8?
Comment 12 Egor Y. Egorov 2012-02-09 03:36:10 UTC
$ emerge -pv libreoffice qt-core

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ~] x11-libs/qt-core-4.8.0-r1  USE="exceptions glib iconv qt3support ssl (-aqua) (-c++0x) -debug -optimized-qmake -pch (-qpa)" 0 kB
[ebuild   R   ~] app-office/libreoffice-3.5.0.1  USE="branding dbus gtk java jemalloc kde mysql odk opengl postgres svg vba xmlsec (-aqua) -binfilter -debug -eds -gnome -graphite -gstreamer -gtk3 -nsplugin -pdfimport -test -webdav" 0 kB

Total: 2 packages (2 reinstalls), Size of downloads: 0 kB

Bug still exist
Comment 13 Tomáš Chvátal (RETIRED) gentoo-dev 2012-02-15 12:19:30 UTC
(gdb) bt full
#0  QCoreApplication::notifyInternal (this=0x7a96984b70, receiver=0x7a96a35c90, event=0x392c09a1cf0) at kernel/qcoreapplication.cpp:787
        threadData = 0x7a9695f380
        returnValue = <optimized out>
        result = false
        cbdata = {0x7a96a35c90, 0x392c09a1cf0, 0x392c09a1c8f}
        d = 0x7a96a2b7f0
#1  0x00000313107407b2 in sendEvent (event=0x392c09a1cf0, receiver=<optimized out>) at kernel/qcoreapplication.h:215
No locals.
#2  QObjectPrivate::setParent_helper (this=0x7a96a3edb0, o=0x0) at kernel/qobject.cpp:1981
        e = {<QEvent> = {_vptr.QEvent = 0x31310a68ab0, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x31310806120 "QEvent", data = 0x31310806b00, extradata = 0x0}}, 
            d = 0x0, t = 71, posted = 0, spont = 0, m_accept = 1, reserved = 0}, c = 0x7a96a3ed80}
        index = 1
        parentD = 0x7a96a2b7f0
        q = 0x7a96a3ed80
#3  0x0000031310742e6b in QObject::~QObject (this=0x7a96a3ed80, __in_chrg=<optimized out>) at kernel/qobject.cpp:954
        d = 0x7a96a3edb0
#4  0x0000031310746fed in QSocketNotifier::~QSocketNotifier (this=0x7a96a3ed80, __in_chrg=<optimized out>) at kernel/qsocketnotifier.cpp:229
No locals.
#5  0x0000031307f0b6ef in qDBusRemoveWatch (watch=0x7a96a315f0, data=0x7a96a35c90) at qdbusintegrator.cpp:301
        d = 0x7a96a35c90
        fd = 13
        locker = {<QDBusMutexLocker> = {<QDBusLockerBase> = {<No data fields>}, self = <optimized out>, mutex = 0x7a96a35cd8, action = <optimized out>}, <No data fields>}
        i = {i = 0x7a96a3efe0}
#6  0x0000031307aaec7b in _dbus_watch_list_remove_watch (watch_list=0x7a96a31430, watch=0x7a96a315f0) at /var/tmp/portage/sys-apps/dbus-1.4.16/work/dbus-1.4.16/dbus/dbus-watch.c:402
No locals.
#7  0x0000031307aacfb8 in free_watches (transport=<optimized out>) at /var/tmp/portage/sys-apps/dbus-1.4.16/work/dbus-1.4.16/dbus/dbus-transport-socket.c:81
        socket_transport = 0x7a96a31470
#8  0x0000031307aad05d in socket_disconnect (transport=0x7a96a31470) at /var/tmp/portage/sys-apps/dbus-1.4.16/work/dbus-1.4.16/dbus/dbus-transport-socket.c:987
        socket_transport = 0x7a96a31470
#9  0x0000031307aabe98 in _dbus_transport_disconnect (transport=0x7a96a31470) at /var/tmp/portage/sys-apps/dbus-1.4.16/work/dbus-1.4.16/dbus/dbus-transport.c:507
No locals.
#10 _dbus_transport_disconnect (transport=0x7a96a31470) at /var/tmp/portage/sys-apps/dbus-1.4.16/work/dbus-1.4.16/dbus/dbus-transport.c:498
No locals.
#11 0x0000031307a95da6 in _dbus_connection_close_possibly_shared_and_unlock (connection=0x7a96a3b980) at /var/tmp/portage/sys-apps/dbus-1.4.16/work/dbus-1.4.16/dbus/dbus-connection.c:2811
        status = <optimized out>
#12 0x0000031307f0c7f6 in q_dbus_connection_close (connection=<optimized out>) at qdbus_symbols_p.h:113
No locals.
#13 QDBusConnectionPrivate::closeConnection (this=0x7a96a35c90) at qdbusintegrator.cpp:1045
        oldMode = QDBusConnectionPrivate::ClientMode
#14 0x0000031307f12c83 in QDBusConnectionPrivate::~QDBusConnectionPrivate (this=0x7a96a35c90, __in_chrg=<optimized out>) at qdbusintegrator.cpp:1005
No locals.
#15 0x0000031307f1315d in QDBusConnectionPrivate::~QDBusConnectionPrivate (this=0x7a96a35c90, __in_chrg=<optimized out>) at qdbusintegrator.cpp:1016
No locals.
#16 0x0000031307f076c3 in ~QDBusDefaultConnection (this=0x7a96a305f0, __in_chrg=<optimized out>) at qdbusconnection.cpp:978
No locals.
#17 QGlobalStaticDeleter<QDBusDefaultConnection>::~QGlobalStaticDeleter (this=0x31308170078, __in_chrg=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1823
No locals.
#18 0x000003131a68a2f9 in __run_exit_handlers (status=0, listp=0x3131a9d1488, run_list_atexit=true) at exit.c:78
        atfct = <optimized out>
        onfct = <optimized out>
        cxafct = <optimized out>
---Type <return> to continue, or q <return> to quit---
        f = <optimized out>
#19 0x000003131a68a385 in __GI_exit (status=<optimized out>) at exit.c:100
No locals.
#20 0x000003131a673f94 in __libc_start_main (main=0x7a96683860 <main>, argc=1, ubp_av=0x392c09a20e8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x392c09a20d8) at libc-start.c:266
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -3748449385886076448, 526509422760, 3928831434976, 0, 0, -3684133540194504224, -3612764402812800544}, mask_was_saved = 0}}, priv = {
            pad = {0x0, 0x0, 0x392c09a20f8, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = -1063640840}}}
        not_first_call = <optimized out>
#21 0x0000007a966838d1 in _start ()
No symbol table info available.

Different trace.
Comment 14 Tomáš Chvátal (RETIRED) gentoo-dev 2012-02-15 12:20:09 UTC
The only relevant flags seem to be dbus and kde that needs to be on to get this crash.
Comment 15 Markos Chandras (RETIRED) gentoo-dev 2012-02-15 21:16:24 UTC
Pacho, why did you reassign the bug? libreoffice has not maintainer. Check the metadata.xml file
Comment 16 Pacho Ramos gentoo-dev 2012-02-16 08:55:22 UTC
(In reply to comment #15)
> Pacho, why did you reassign the bug? libreoffice has not maintainer. Check the
> metadata.xml file

Because openoffice mail alias already lists 5 people, metadatas should be fixed then
Comment 17 Tomáš Chvátal (RETIRED) gentoo-dev 2012-02-16 10:00:42 UTC
I wonder if this can't be caused by something in dbus itself, not qt.

What do you think guys?
Comment 18 Davide Pesavento (RETIRED) gentoo-dev 2012-02-16 11:17:27 UTC
(In reply to comment #17)
> I wonder if this can't be caused by something in dbus itself, not qt.
> 
> What do you think guys?

Totally possible. I had a look at opensuse patches for Qt 4.7.4 some time ago and I didn't find anything that seemed related to this crash. So yes, it might be a bug in libdbus...
Comment 19 Tomáš Chvátal (RETIRED) gentoo-dev 2012-02-16 11:38:05 UTC
@fdo:
what do you guys think? Might this be issue with dbus? Currently reproducable on both 1.4.16 versions.
Comment 20 Tomáš Chvátal (RETIRED) gentoo-dev 2012-02-16 11:44:02 UTC
1.4.18 tested now, also affected.
Comment 21 Tomáš Chvátal (RETIRED) gentoo-dev 2012-02-20 14:03:04 UTC
Ok, so I would need someone who has this issue to attach to valgrind and try to trace it.

Valgrind sadly does not support AVX instructions, which my system is built with :(
Comment 22 Egor Y. Egorov 2012-02-22 13:25:26 UTC
app-office/libreoffice-bin-3.4.5.2-r1 is not affected by this bug.
Comment 23 Andreas K. Hüttel archtester gentoo-dev 2012-02-22 13:43:42 UTC
Created attachment 302811 [details]
valgrind log

(In reply to comment #21)
> Ok, so I would need someone who has this issue to attach to valgrind and try to
> trace it.
> 
> Valgrind sadly does not support AVX instructions, which my system is built with
> :(

Log is attached...
Comment 24 Tomáš Chvátal (RETIRED) gentoo-dev 2012-02-28 15:59:00 UTC
Raising severity as you can't avoid this under KDE.

Also debian has same issue:
https://bugs.launchpad.net/bugs/925049
Comment 25 Tomáš Chvátal (RETIRED) gentoo-dev 2012-03-01 11:47:04 UTC
Fixed in git, will be included in 3.5.1 and later versions.

http://cgit.freedesktop.org/libreoffice/core/commit/?id=24f4cd9983aa2bc9d642c40a8fef19d7fe7b98a6