Bug 1796 - Lokalize segfaults after recent system updates
: Lokalize segfaults after recent system updates
Status: RESOLVED WORKSFORME
Product: Desktop Bugs
Classification: ROSA Desktop
Component: Main Packages
: Fresh
: All Linux
: Normal normal
: ---
Assigned To: Eugene Shatokhin
: ROSA Linux Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-19 15:47 MSK by JDronova
Modified: 2013-09-23 18:33 MSD (History)
4 users (show)

See Also:
RPM Package: lokalize-4.9.4-1-rosa2012.1.i586:main
ISO-related:
Bad POT generating:
Upstream:


Attachments
segfault log0 (15.98 KB, text/plain)
2013-04-16 14:17 MSD, JDronova
Details
segfault_log1 (15.72 KB, text/plain)
2013-04-16 23:30 MSD, JDronova
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JDronova 2013-03-19 15:47:30 MSK
After one of updates (don't remeber exactly which one it was) my Lokalize started segfaulting. Here is the gdb output:

lokalize(6130) GettextCatalog::GettextExportPlugin::save: Saving gettext plural form
lokalize(6130) GettextCatalog::GettextExportPlugin::save: Saving gettext plural form
QFile::remove: Empty or null file name
Detaching after fork from child process 6902.
Detaching after fork from child process 6921.
Detaching after fork from child process 6946.
Detaching after fork from child process 6954.

Program received signal SIGSEGV, Segmentation fault.
0xb6743ba7 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
(gdb) bt
#0  0xb6743ba7 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#1  0xb6dc4881 in ?? () from /usr/lib/libQtGui.so.4
#2  0xb70f36ab in ?? () from /usr/lib/libQtGui.so.4
#3  0xb67555ba in QMetaCallEvent::placeMetaCall(QObject*) () from /usr/lib/libQtCore.so.4
#4  0xb675a29b in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#5  0xb69e76ec in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#6  0xb69e971f in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#7  0xb798fd01 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#8  0xb6743bbe in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#9  0xb67476b0 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#10 0xb6747a9c in QCoreApplication::sendPostedEvents(QObject*, int) () from /usr/lib/libQtCore.so.4
#11 0xb6774db4 in ?? () from /usr/lib/libQtCore.so.4
#12 0xb584c8b3 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#13 0xb584cc50 in ?? () from /lib/libglib-2.0.so.0
#14 0xb584cd31 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#15 0xb6774f38 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#16 0xb6a93a8a in ?? () from /usr/lib/libQtGui.so.4
#17 0xb67426cc in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#18 0xb67429b9 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#19 0xb6747b4d in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#20 0xb69e1804 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#21 0x08072c85 in ?? ()
#22 0xb63027b5 in __libc_start_main () from /lib/i686/libc.so.6
#23 0x08073929 in _start ()
(gdb)
Comment 1 Denis Silakov 2013-03-26 14:50:02 MSK
Does the latest lokalize (4.9.5) has this issue?
Comment 2 JDronova 2013-03-26 17:09:14 MSK
(In reply to comment #1)
> Does the latest lokalize (4.9.5) has this issue?

Yes it does. Log is the same. lokalize-4.9.5-1-rosa2012.1.i586
Comment 3 JDronova 2013-04-15 20:20:57 MSD
guys pleeeease say something :'(
Comment 4 Aleksandr Kazantcev 2013-04-15 22:17:14 MSD
Where is it segfault? Now run lokalize and it work (in i568) system.
Comment 5 JDronova 2013-04-16 01:26:45 MSD
(In reply to comment #4)
> Where is it segfault? Now run lokalize and it work (in i568) system.

Ok, I'm not asking anymore to please somebody say something. If it works on your machine, so should do everywhere. Fine. Forget it.
Comment 6 Eugene Shatokhin 2013-04-16 10:52:53 MSD
Sorry for not responding earlier.

1. Could you please install 'qt4-debuginfo' then run lokalize again and post the backtrace of the crash here? The debug symbols will make it easier to see what is going on.

2. Does the crash happen each time you use lokalize?

3. In what conditions does the segfault happen? When starting lokalize, or saving some file, or in some other situation? That is, what can one do to reproduce the problem?
Comment 7 JDronova 2013-04-16 14:17:59 MSD
Created attachment 1300 [details]
segfault log0

1. Here is the console output of the recent crush after installing 'qt4-debuginfo' (see attachment). Or should I run it with some additional arguments? Sorry for asking. The log from running it within gdb is always the same (see 1st message)
2. Yes. 
3. The crush happens with 99% frequency after trying to open any .po file. Very seldom — just after running for some time.
Comment 8 Aleksandr Kazantcev 2013-04-16 14:30:17 MSD
please attach example of .po that crashed Lokalize
Comment 9 JDronova 2013-04-16 14:56:28 MSD
*ANY* .po file from local svn tree or from anyplace. Forgot to mention that the segfaults happen only while running from KDE. In openbox for example everything works OK (same .po files!), no crashes at all.
Comment 10 Eugene Shatokhin 2013-04-16 19:23:03 MSD
(In reply to comment #7)
> 1. <...> Or should I run it with some additional
> arguments?

1. No, no additional arguments should be needed. It looks like there could be a problem in qt4-debuginfo with source line info or something else missing. This is a story for another bug, however.

2. Please install kdesdk4-debuginfo and kdelibs4-debuginfo too. This is not crucial but may help a bit. 

When lokalize crashes again, please execute the following commands in GDB and post their output here:

  thread apply all bt
  info registers

The first one will give us the backtrace of all running threads rather than just of the crashed one, may help to see what exactly the application was doing.

The contents of the registers at the time of crash output by the second command are also useful.

3. As for the crash itself, I still cannot reproduce it. Perhaps, another data race.

From the source and binary code of QCoreApplication::notifyInternal(), it seems, the crash happens when executing this statement:
(qt4-4.8.4-1-rosa/src/corelib/kernel/qcoreapplication.cpp:934)

  ++threadData->loopLevel;

Still have to find out why it crashed, need to dig deeper...
Comment 11 JDronova 2013-04-16 23:30:55 MSD
Created attachment 1301 [details]
segfault_log1

Ok here's the GDB output with 'thread apply all bt' & 'info registers' and simple console ouput after installing kdesdk4-debuginfo and kdelibs4-debuginfo.
Comment 12 Eugene Shatokhin 2013-04-17 17:37:39 MSD
Thanks, that info is useful, it confirms that the crash happened when QCoreApplication::notifyInternal() was called for a broken object. This time the crash happened in the statement before that increment:

QThreadData *threadData = d->threadData;

There is a similar bug in KDE bug tracker already:
https://bugs.kde.org/show_bug.cgi?id=317559

I have added all the data I got to that bug, perhaps Nick Shaforostoff could help.
Comment 13 Eugene Shatokhin 2013-09-23 18:33:04 MSD
The problem no longer shows up in lokalize 1.5 (KDE 4.10.5). If it does, please reopen this bug.