Bug 235546
Summary: | texmaker: immediately segfaults in non-root account | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Harry Bock <hbock> | ||||
Component: | texmaker | Assignee: | Deji Akingunola <dakingun> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 6 | CC: | bugzilla, kevin, rdieter | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | 1.5-2.fc7 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2007-06-18 16:43:58 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Harry Bock
2007-04-06 22:55:13 UTC
Can you please attach or send me a log of your self-compiled build that doesn't segfault. I've just confirm the crash on x86_64, but like you it has always worked on the i386 system where I use texmaker more often. Same thing happens at mine. Downloaded the source (texmaker-1.5.tar.bz2) and built with qt4 (typed /usr/lib64/qt4 while running BUILD.sh) Qt-Toolkit: qt4-4.2.3-7.fc6.1 qt4-x11-4.2.3-7.fc6.1 qt4-devel-4.2.3-7.fc6.1 This GDB was configured as "x86_64-redhat-linux-gnu". (gdb) exec-file /usr/local/bin/texmaker (gdb) run Starting program: /usr/local/bin/texmaker Using host libthread_db library "/lib64/libthread_db.so.1". (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread 46912496290592 (LWP 4765)] (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) warning: the debug information found in "/usr/lib/debug//usr/lib64/libfreetype.so.6.3.10.debug" does not match "/usr/lib64/libfreetype.so.6" (CRC mismatch). (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) ---Type <return> to continue, or q <return> to quit--- (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 46912496290592 (LWP 4765)] 0x0000003df0873019 in QString::fromLocal8Bit () from /usr/lib64/libQtCore.so.4 (gdb) ran as root: (gdb) exec-file /usr/local/bin/texmaker (gdb) run Starting program: /usr/local/bin/texmaker Using host libthread_db library "/lib64/libthread_db.so.1". (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread 46912496290592 (LWP 5206)] (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) ---Type <return> to continue, or q <return> to quit--- (no debugging symbols found) warning: the debug information found in "/usr/lib/debug//usr/lib64/libfreetype.so.6.3.10.debug" does not match "/usr/lib64/libfreetype.so.6" (CRC mismatch). (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) Program exited normally. (gdb) (In reply to comment #2) > ... > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 46912496290592 (LWP 4765)] > 0x0000003df0873019 in QString::fromLocal8Bit () from /usr/lib64/libQtCore.so.4 > (gdb) > Since the same crashed also occurred with self-built texmaker for Denis, and because of the above trace that doesn't show up when run as root, I'm begining to highly suspect qt4 as the cause of it. It'll be nice if Harry Bock can confirm the segmentation fault does/doesn't with self-built version ran as ordinary user. My apologies, it appears I was still logged in as root when I tested the from-source build, because on my other AMD64 box, it still crashes as a normal user. Sorry for causing the confusion. Thanks for the confirmation Harry. CC'ing the qt4 maintainer, in case he know about it. Hi Rex, Could qt4 be causing this segfault? > Could qt4 be causing this segfault?
Could/possible? yes
Likely? no
imo, looks like a x86_64(64bit) specific issue (based on the evidence so far).
Getting this when I install from yum as well. When I install using the graphical installer from texmaker's site, it works a charm! Getting same error with the last.fm client too... For folks seeing the crash, please: $ yum --enablerepo=extras-debuginfo install texmaker-debuginfo qt4-debuginfo we could then get some (more) useful tracebacks. This bug seems worse than I thought, as it causes beryl to crash and fall back to metacity on the segfault. Full debuginfo bt: (gdb) run Starting program: /usr/local/bin/texmaker [Thread debugging using libthread_db enabled] [New Thread 46912496388896 (LWP 9235)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 46912496388896 (LWP 9235)] 0x0000003ae9073019 in QString::fromLocal8Bit ( str=0x10 <Address 0x10 out of bounds>, size=-1) at tools/qstring.cpp:3293 3293 if (size == 0 || (!*str && size < 0)) (gdb) bt #0 0x0000003ae9073019 in QString::fromLocal8Bit ( str=0x10 <Address 0x10 out of bounds>, size=-1) at tools/qstring.cpp:3293 #1 0x0000003ae90d39dc in QCoreApplication::arguments () at kernel/qcoreapplication.cpp:1621 #2 0x00000033179b07b6 in sm_performSaveYourself (smd=0x7e2ad0) at kernel/qapplication_x11.cpp:4711 #3 0x00000033179b0fc2 in sm_saveYourselfCallback ( smcConn=<value optimized out>, clientData=0x10, saveType=2, shutdown=<value optimized out>, interactStyle=9930800) at kernel/qapplication_x11.cpp:4694 #4 0x0000003ae1806d48 in _SmcProcessMessage () from /usr/lib64/libSM.so.6 #5 0x0000003ae2011ffb in IceProcessMessages () from /usr/lib64/libICE.so.6 #6 0x00000033179ab950 in QSmSocketReceiver::qt_metacall (this=0x7d9be0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffa65b13e0) at .moc/release-shared/qapplication_x11.moc:63 #7 0x0000003ae90e2028 in QMetaObject::activate (sender=0x7e0cb0, from_signal_index=4, to_signal_index=4, argv=0x9c5710) at kernel/qobject.cpp:2937 #8 0x0000003ae90fa06e in QSocketNotifier::activated (this=0x7fffa65b0750, _t1=13) at .moc/release-shared/moc_qsocketnotifier.cpp:80 #9 0x0000003ae90e68df in QSocketNotifier::event (this=0x7e0cb0, e=0x7fffa65b18d0) at kernel/qsocketnotifier.cpp:304 #10 0x000000331796b84c in QApplicationPrivate::notify_helper (this=0x7a3ca0, ---Type <return> to continue, or q <return> to quit--- receiver=0x7e0cb0, e=0x7fffa65b18d0) at kernel/qapplication.cpp:3439 #11 0x000000331797125c in QApplication::notify (this=0x7fffa65b1b30, receiver=0x7e0cb0, e=0x7fffa65b18d0) at kernel/qapplication.cpp:3380 #12 0x0000003ae90ef2ab in socketNotifierSourceDispatch ( source=<value optimized out>) at kernel/qcoreapplication.h:183 #13 0x00000039ee02cf64 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0 #14 0x00000039ee02fd9d in g_main_context_check () from /lib64/libglib-2.0.so.0 #15 0x00000039ee0302ce in g_main_context_iteration () from /lib64/libglib-2.0.so.0 #16 0x0000003ae90ef320 in QEventDispatcherGlib::processEvents (this=0x7ad300, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:366 #17 0x00000033179d689f in QGuiEventDispatcherGlib::processEvents ( this=0x7fffa65b0750, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:178 #18 0x0000003ae90d12c8 in QEventLoop::processEvents ( this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:126 #19 0x0000003ae90d13dd in QEventLoop::exec (this=0x7fffa65b1ae0, flags=@0x7fffa65b1af0) at kernel/qeventloop.cpp:168 #20 0x0000003ae90d33f3 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:730 #21 0x0000000000416330 in main (argc=<value optimized out>, ---Type <return> to continue, or q <return> to quit--- argv=<value optimized out>) at main.cpp:79 It seems to be the way Qt or texmaker handles argument parsing. Can anyone confirm whether qt4-4.3.0 recently pushed to updates helps here? No, it doesn't (on rawhide). However, I now think the problem is with texmaker rather the qt4, texmaker-1.4 compiles and runs O.K with this qt4. Anyone who knows c++ very well might want to help look at main.cpp in the root directory of texmaker source code. (apologies for the possibly silly question but...) Has upstream been consulted? I contacted him once, and he replied something about that version of qt4 not released yet. I'll try and contact him again. I'm sorry the about comment wasn't entirely correct. I actually did contacted him about another issue, for which he complained was due to pre-release qt4-4.2; I believed you (Rex) later provided the solution to that issue. I've written to him about the present issue anyway, sorry for the misinformation. This is a bug in TexMaker. From the Qt 4 documentation: QCoreApplication::QCoreApplication ( int & argc, char ** argv ) [...] Warning: The data pointed to by argc and argv must stay valid for the entire lifetime of the QCoreApplication object. Notice that argc is passed by reference! But TexMaker then does this: TexmakerApp::TexmakerApp( int argc, char ** argv ) : QApplication ( argc, argv ) Here argc is passed by value, then forwarded to QApplication by reference. Once the TexmakerApp::TexmakerApp constructor exits, the reference passed to QApplication is no longer valid, which causes the segfault in QCoreApplication::arguments(). The fix is to change the TexmakerApp constructor to take an int & instead. Created attachment 157065 [details]
Patch to fix reference to local variable causing segfault in QCoreApplication::arguments()
The attached patch should fix it. (Not tested, no x86_64 system here and no
time to build and test this in QEMU.)
Thanks a lot Kevin, the patch just fixed it. I'm off now to submitting it for updates. Kudos to Kevin indeed. Keep up the good work, and you'll receive your "Fedora ninja" merit badge any day now. Updates to all appropriate branches on the way. Thanks again Kevin for the fix, and Rex and everyone else for their contribution. texmaker-1.5-2.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report. texmaker-1.5-2.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report. |