Bug 784805 - SIGSEGV with QT4 based applications in Xdmx X11-Server
SIGSEGV with QT4 based applications in Xdmx X11-Server
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: qt (Show other bugs)
16
i386 Linux
unspecified Severity high
: ---
: ---
Assigned To: Ngo Than
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-26 04:52 EST by b465504
Modified: 2012-06-19 09:32 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-19 05:03:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Backtrace + debuginfo KeePassX (2.12 KB, text/plain)
2012-01-26 13:01 EST, b465504
no flags Details
Backtrace + debuginfo PSI (2.16 KB, text/plain)
2012-01-26 13:02 EST, b465504
no flags Details
Backtrace + debuginfo KeePassX (more debuginfo) (4.33 KB, text/plain)
2012-01-26 13:21 EST, b465504
no flags Details
Backtrace + debuginfo PSI (more debuginfo) (4.96 KB, text/plain)
2012-01-26 13:22 EST, b465504
no flags Details
Backtrace KeePassX (last step before abort SIGSEGV) (10.52 KB, text/plain)
2012-01-27 09:01 EST, b465504
no flags Details

  None (edit)
Description b465504 2012-01-26 04:52:00 EST
Description of problem:
It seems that QT4 linked applications don't work in connection with Xdmx.
But that is rather an assumption.
The applications keepassx and psi abort with SIGSEGV:

--- SNIP gdb bt keepassx ---
#0  0xab97b605 in ?? ()
#1  0x0048ee16 in ?? () from /usr/lib/libQtGui.so.4
#2  0x0041286f in QApplicationPrivate::construct(_XDisplay*, unsigned long, unsigned long) () from /usr/lib/libQtGui.so.4
#3  0x004131bf in QApplication::QApplication(int&, char**, int) () from /usr/lib/libQtGui.so.4
#4  0x08063679 in ?? ()
#5  0x0805d353 in ?? ()
#6  0x011c06b3 in __libc_start_main () from /lib/libc.so.6
#7  0x0805e5c1 in ?? ()
--- SNAP gdb bt keepassx ---

--- SNIP gdb bt psi ---
#0  0x0862f8c0 in QString::shared_null ()
#1  0x00923e16 in ?? () from /usr/lib/libQtGui.so.4
#2  0x008a786f in QApplicationPrivate::construct(_XDisplay*, unsigned long, unsigned long) () from /usr/lib/libQtGui.so.4
#3  0x008a800a in QApplication::QApplication(int&, char**, bool, int) () from /usr/lib/libQtGui.so.4
#4  0x0821d0a2 in ?? ()
#5  0x082f4fcb in ?? ()
#6  0x018e56b3 in __libc_start_main () from /lib/libc.so.6
#7  0x08086a21 in ?? ()
--- SNAP gdb bt psi ---

Keepassx works in a regular X11 environment.
A self compiled keepassx from source works in a Xdmx environment too and has no issues.
Haven't tested the same for psi yet.

Version-Release number of selected component (if applicable):
# rpm -qa kernel-PAE xorg-x11-server-Xdmx keepassx psi qt qt-x11
kernel-PAE-3.2.1-3.fc16.i686
keepassx-0.4.3-2.fc15.i686
xorg-x11-server-Xdmx-1.11.3-1.fc16.i686
kernel-PAE-3.1.0-7.fc16.i686
kernel-PAE-3.1.9-1.fc16.i686
qt-4.8.0-7.fc16.i686
qt-x11-4.8.0-7.fc16.i686
psi-0.14-7.fc16.i686

How reproducible:
Setup Xdmx based X11 environment and execute the mentioned applications from within a terminal.

Steps to Reproduce:
1. #/usr/bin/startx /usr/bin/openbox-session -- /usr/bin/Xdmx :1 -nolisten tcp -input :0,xkb,xfree86,pc105 -param XkbModel evdev -param XkbLayout de -param XkbVariant nodeadkeys -param XkbOptions terminate:ctrl_alt_bksp -display :0 -display 192.168.1.1:0 -norender -noglxproxy +xinerama
2. Open XTerm
3. # keepassx || psi
  
Actual results:
Both applications abort with Segmentation fault

Expected results:
Running Applications

Additional info:
Comment 1 b465504 2012-01-26 11:44:52 EST
The self compiled keepassx is affected too.
It turns out that the path of keepassx binary is relevant.

I compiled the sources without any patches or additional options in several paths.
it works in:
~foobar/src/keepassx-0.4.3/bin/
~foobar/bin/keepassx-0.4.3/bin/

but not in:
~foobar/rpmbuild/BUILD/keepassx-0.4.3/bin/
/tmp/keepassx-0.4.3/bin/

my current workaround (for keepassx) is:
# mkdir -p ~/bin/keepassx-0.4.3/bin
# cp /usr/bin/keepassx ~/bin/keepassx-0.4.3/bin/
# ln -s /usr/share ~/bin/keepassx-0.4.3/
# ln -s ~/bin/keepassx-0.4.3/bin/keepassx ~/bin/
Comment 2 Rex Dieter 2012-01-26 11:52:57 EST
The backtraces you provided lack -debuginfo.

Mind doing
debuginfo-install qt

and post some new backtraces please?

Also, mind some hand holding on creating a minimal, reproducible test-case?  
"Setup Xdmx based X11 environment and execute the mentioned applications from
within a terminal." doesn't help me, as I'm not familiar with Xdmx.
Comment 3 Rex Dieter 2012-01-26 11:57:29 EST
Oh, I see you did provide the steps for me, sorry, I'll see what I can come up with.
Comment 4 b465504 2012-01-26 12:45:32 EST
Here some examples for psi (with same workaround from keepassx)

# mkdir -p ~/psi-0.14_23456789/bin
# cp /usr/bin/psi ~/psi-0.14_23456789/bin/
# ln -s ~/psi-0.14_23456789/bin/psi ~/bin

All the following works too:
/home/abcd/bin/psi-0.14_23456789/bin/psi
/home/abcd/123/1234/123/psi-0.14/bin/psi
/tmp/psi-0.14_234567890123456790/bin/psi
/tmp/psi-0.14_2345678901234567901234/psi

As one can see, there seems to be a connection to the length of the absolute path.
Comment 5 b465504 2012-01-26 13:01:46 EST
Created attachment 557715 [details]
Backtrace + debuginfo KeePassX
Comment 6 b465504 2012-01-26 13:02:36 EST
Created attachment 557716 [details]
Backtrace + debuginfo PSI
Comment 7 Rex Dieter 2012-01-26 13:08:57 EST
Looks like we're still missing some debuginfo

debuginfo-install xorg-x11-server-Xdmx

and/or build your local test binaries with -g compiler flag.
Comment 8 b465504 2012-01-26 13:21:20 EST
Created attachment 557720 [details]
Backtrace + debuginfo KeePassX (more debuginfo)
Comment 9 b465504 2012-01-26 13:22:03 EST
Created attachment 557721 [details]
Backtrace + debuginfo PSI (more debuginfo)
Comment 10 b465504 2012-01-26 13:25:20 EST
I've just replaced the attached back traces.

The new ones are made after installing the following additional debuginnfo packages:
xorg-x11-server-Xdmx
keepassx
expat-2.0.1-11.fc15.i686
fontconfig-2.8.0-4.fc16.i686
freetype-2.4.6-4.fc16.i686
libICE-1.0.7-1.fc16.i686
libSM-1.2.0-2.fc15.i686
libXcursor-1.1.11-3.fc15.i686
libXinerama-1.1.1-2.fc15.i686
libXrandr-1.3.1-2.fc15.i686
libffi-3.0.10-1.fc16.i686
libpng-1.2.46-1.fc16.i686
libuuid-2.20.1-2.1.fc16.i686
libxcb-1.7-3.fc16.i686
psi-0.14-7.fc16.i686
hunspell-1.3.2-1.fc16.i686
keyutils-libs-1.5.2-1.fc16.i686
krb5-libs-1.9.2-4.fc16.i686
libcom_err-1.41.14-2.fc15.i686
Comment 11 b465504 2012-01-26 13:41:50 EST
Unfortunately compiling with debugging information doesn't produce any additional lines of backtrace.
Comment 12 Rex Dieter 2012-01-26 14:42:58 EST
so, we still have, notice the missing data at step 0.   :(

#0  0x00200074 in ?? ()
No symbol table info available.
#1  0xb752ae16 in qt_init (priv=0x814d758, display=0x158, visual=4294967295, colormap=4294967295) at kernel/qapplication_x11.cpp:2313
        type = 3085123584
        length = 1
        data = 0xb73694bc "X\240-"
        format = 0
        after = 0
        ptsz = 344
        argc = 40
        argv = 0x200074
        j = 1
        wacom = {<QObject> = {_vptr.QObject = 0xb7ffefc4, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0xb72eea20 "QObject", data = 0xb72eeac0, extradata = 0xb73672a8}}, static staticMetaObjectExtraData = {objects = 0x0, 
              static_metacall = 0xb72263e0 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>}, d_ptr = {d = 0xb7e341b8}, static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0xb72f77e0 "Qt", data = 0xb72fb100, extradata = 0x0}}}, static staticMetaObject = {d = {
              superdata = 0x814a0e0, stringdata = 0xb7300820 "QLibrary", data = 0xb73008a0, extradata = 0xb73683e8}}, static staticMetaObjectExtraData = {objects = 0x0, static_metacall = 0xb7274b00 <QLibrary::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>}, d = 0xbffff2c4, 
          did_load = 128}
#2  0xb74ae86f in QApplicationPrivate::construct (this=0x814d758, dpy=0x81721f0, visual=135733744, cmap=135733744) at kernel/qapplication.cpp:838
No locals.
#3  0xb74af1bf in QApplication::QApplication (this=0x814d748, argc=@0xbffff4e0, argv=0xbffff574, _internal=263937) at kernel/qapplication.cpp:737
        d = <optimized out>
#4  0x08063679 in KeepassApplication::KeepassApplication (this=0x814d748, argc=@0xbffff4e0, argv=0xbffff574) at Application_X11.cpp:25
Comment 13 b465504 2012-01-27 09:01:54 EST
Created attachment 557864 [details]
Backtrace KeePassX (last step before abort SIGSEGV)

I'm not very familiar with gdb.
I set a breakpoint at the last running function and step to the instruction befor abortion.
Then i made a bt before and after the next step.

Not sure if it helps.
Comment 14 Rex Dieter 2012-01-27 09:07:12 EST
Thanks, better

#0  QX11Info::appRootWindow (screen=-1) at kernel/qx11info_x11.cpp:408
#1  0xb752adfb in qt_init (priv=0x814d758, display=0x158, visual=4294967295, colormap=4294967295) at kernel/qapplication_x11.cpp:2313
#2  0xb74ae86f in QApplicationPrivate::construct (this=0x814d758, dpy=0x63, visual=99, cmap=99) at kernel/qapplication.cpp:838
#3  0xb74af1bf in QApplication::QApplication (this=0x814d748, argc=@0xbffff490, argv=0xbffff524, _internal=17041408) at kernel/qapplication.cpp:737
#4  0x080634c9 in KeepassApplication::KeepassApplication (this=0x814d748, argc=@0xbffff490, argv=0xbffff524) at Application_X11.cpp:25
#5  0x0805d353 in main (argc=1, argv=0xbffff524) at main.cpp:55
Comment 15 b465504 2012-01-27 09:56:43 EST
I should mention that the brakepoint was hit 4 times:

Program received signal SIGSEGV, Segmentation fault.
0x00200074 in ?? ()
(gdb) i b
Num     Type           Disp Enb Address    What
1       breakpoint     keep y   0xb7553770 in QX11Info::appRootWindow(int) at kernel/qx11info_x11.cpp:406
        breakpoint already hit 4 times
(gdb)
Comment 16 b465504 2012-01-27 11:20:16 EST
This schould be a little more convenient to reproduce this issue on non Xdmx environments:
Run the following within Your X11 session:

# Xephyr :2 -screen 640x480 &
# Xephyr :3 -screen 640x480 &
# /usr/bin/startx /usr/bin/openbox -- /usr/bin/Xdmx :1 -nolisten tcp -display :2 -display :3 -norender -noglxproxy +xinerama

If everything works well You got two virtual screens in multi-head mode.
Xdmx should use display :2 for input.
Open a aterminal and run /usr/bin/keepassx
Comment 17 b465504 2012-02-15 08:34:10 EST
After updating the system the work-around used in comment 4 and comment 1 needs to be changed.

Before the update the following worked:
/home/abcd/bin/psi-0.14_23456789/bin/psi
/home/abcd/bin/keepassx-0.4.3/bin/keepassx

After the update I have to use:
/home/abcd/bin/psi-0.14_2345/bin/psi
/home/abcd/bin/keepassx-0.43/bin/keepassx

# rpm -qa kernel-PAE xorg-x11-server-Xdmx keepassx psi qt qt-x11
psi-0.14-7.fc16.i686
kernel-PAE-3.2.5-3.fc16.i686
xorg-x11-server-Xdmx-1.11.4-1.fc16.i686
qt-4.8.0-7.fc16.i686
qt-x11-4.8.0-7.fc16.i686
keepassx-0.4.3-2.fc15.i686
Comment 18 b465504 2012-06-19 05:03:06 EDT
The issue does not exist any more.

Haven't updated my system for a long time so I can't identify the exact point in time where the issue was fixed.

# rpm -qa kernel-PAE xorg-x11-server-Xdmx keepassx psi qt qt-x11
psi-0.14-7.fc16.i686
xorg-x11-server-Xdmx-1.11.4-3.fc16.i686
qt-4.8.1-5.fc16.i686
kernel-PAE-3.3.1-3.fc16.i686
qt-x11-4.8.1-5.fc16.i686
keepassx-0.4.3-2.fc15.i686
Comment 19 Rex Dieter 2012-06-19 09:32:24 EDT
Thanks for the update

Note You need to log in before you can comment on or make changes to this bug.