Bug 784805 - SIGSEGV with QT4 based applications in Xdmx X11-Server
Summary: SIGSEGV with QT4 based applications in Xdmx X11-Server
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: qt
Version: 16
Hardware: i386
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-26 09:52 UTC by b465504
Modified: 2012-06-19 13:32 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-06-19 09:03:06 UTC
Type: ---
Embargoed:


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

Description b465504 2012-01-26 09:52:00 UTC
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 16:44:52 UTC
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 16:52:57 UTC
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 16:57:29 UTC
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 17:45:32 UTC
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 18:01:46 UTC
Created attachment 557715 [details]
Backtrace + debuginfo KeePassX

Comment 6 b465504 2012-01-26 18:02:36 UTC
Created attachment 557716 [details]
Backtrace + debuginfo PSI

Comment 7 Rex Dieter 2012-01-26 18:08:57 UTC
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 18:21:20 UTC
Created attachment 557720 [details]
Backtrace + debuginfo KeePassX (more debuginfo)

Comment 9 b465504 2012-01-26 18:22:03 UTC
Created attachment 557721 [details]
Backtrace + debuginfo PSI (more debuginfo)

Comment 10 b465504 2012-01-26 18:25:20 UTC
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 18:41:50 UTC
Unfortunately compiling with debugging information doesn't produce any additional lines of backtrace.

Comment 12 Rex Dieter 2012-01-26 19:42:58 UTC
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 14:01:54 UTC
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 14:07:12 UTC
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 14:56:43 UTC
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 16:20:16 UTC
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 13:34:10 UTC
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 09:03:06 UTC
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 13:32:24 UTC
Thanks for the update


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