libqt4 4:4.7.1-0ubuntu10, 11 and 12 produce segfault in VirtualBox (libqtgui4)

Bug #725959 reported by Francesc Vicent
62
This bug affects 6 people
Affects Status Importance Assigned to Milestone
qt4-x11 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Qt has new multitouch support in Ubuntu. The current multitouch patch does not properly handle the case where there's a touch event but no widget where the touch occurred. When this happens, the qt library crashes the application.

=====
Original bug report:

Binary package hint: libqtgui4

Before finishing the boot process of the guest OS (Windows7 64bit), VirtualBox closes unexpectedly and the following error can be seen in syslog:

VirtualBox[12482]: segfault at 0 ip 00007faa37287a63 sp 00007fff35f443e0 error 4 in libQtGui.so.4.7.1[7faa37055000+a51000]

Ubunty Release:
Description: Ubuntu Natty (development branch)
Release: 11.04 (x64)

Tags: patch natty
Revision history for this message
Francesc Vicent (fransex) wrote :

Downgrading libqtgui4 (and libqtcore4) to 4:4.7.1-0ubuntu10 did not help,

To have VirtualBox working again ,I had to downgrade to 4:4.7.1-0ubuntu10 by installing two packages:

dpkg -i \
 libqtcore4_4.7.1-0ubuntu9_amd64.deb \
 libqtgui4_4.7.1-0ubuntu9_amd64.deb

that can be found in the pool/main/q/qt4-x11/ subdirectory of the mirrors.

Revision history for this message
Felix Geyer (debfx) wrote :

Hasn't apport caught the crash?
A backtrace would be really helpful.

Revision history for this message
Francesc Vicent (fransex) wrote :
Download full text (26.8 KiB)

Thanks Felix, sorry, apport didn't pop up. I backtraced it using gdb, in case it is not enough, please tell me how I can help.

GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 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-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/lib/virtualbox/VirtualBox...(no debugging symbols found)...done.
(gdb) attach 1033
Attaching to program: /usr/lib/virtualbox/VirtualBox, process 1033
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
[New Thread 0x7f818b6c7700 (LWP 1111)]
[New Thread 0x7f8174a9a700 (LWP 1063)]
[New Thread 0x7f817529b700 (LWP 1062)]
[New Thread 0x7f818c690700 (LWP 1061)]
[New Thread 0x7f817eb96700 (LWP 1060)]
[New Thread 0x7f817ec17700 (LWP 1059)]
[New Thread 0x7f817ecd8700 (LWP 1058)]
[New Thread 0x7f817ed09700 (LWP 1057)]
[New Thread 0x7f8182fe8700 (LWP 1055)]
[New Thread 0x7f818831f700 (LWP 1054)]
[New Thread 0x7f8189d80700 (LWP 1053)]
[New Thread 0x7f818a009700 (LWP 1050)]
[New Thread 0x7f818af70700 (LWP 1049)]
[New Thread 0x7f818b1fb700 (LWP 1048)]
[New Thread 0x7f818b3c5700 (LWP 1047)]
[New Thread 0x7f818b646700 (LWP 1046)]
[New Thread 0x7f81a458c700 (LWP 1038)]
[New Thread 0x7f81a45b7700 (LWP 1037)]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /usr/lib/virtualbox/VBoxRT.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/virtualbox/VBoxRT.so
Reading symbols from /lib/libcrypt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libcrypto.so.0.9.8...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypto.so.0.9.8
Reading symbols from /usr/lib/libxml2.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /usr/lib/libcurl.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libcurl.so.4
Reading ...

Revision history for this message
Francesc Vicent (fransex) wrote :

More info:

The error occurs when I try to interact with the guest OS (Windows7 64bit).

I'm running VirtualBox 4.0.4 from contrib at oracle's. The machine is a MacBookPro5,5.

summary: - libqt4 4:4.7.1-0ubuntu11 produces segfault in VirtualBox (libqtgui)
+ libqt4 4:4.7.1-0ubuntu11 produces segfault in VirtualBox (libqtgui4)
summary: - libqt4 4:4.7.1-0ubuntu11 produces segfault in VirtualBox (libqtgui4)
+ libqt4 4:4.7.1-0ubuntu10 and 11 produce segfault in VirtualBox
+ (libqtgui4)
Changed in qt4-x11 (Ubuntu):
status: New → Confirmed
Revision history for this message
Francesc Vicent (fransex) wrote : Re: libqt4 4:4.7.1-0ubuntu10 and 11 produce segfault in VirtualBox (libqtgui4)

I've attached the output of strace, with the options "-s128 -f", a 3 MB 7z file that once decompressed become 85!

In case they are not the right ones, please let me know which to use.

Revision history for this message
Felix Geyer (debfx) wrote :

The default backtrace is fine but could you create a new one after installing libqt4-dbg.
Does Qt 4:4.7.1-0ubuntu12 fix the issue?

Revision history for this message
Francesc Vicent (fransex) wrote :

Ok, installing libqt4-dbg now, I'll send the trace as soon as possible.

No Qt 4:4.7.1-0ubuntu12 makes VirtualBox crash much earlier :( I'll be opening another bug report soon.

Revision history for this message
Francesc Vicent (fransex) wrote :

For Qt 4:4.7.1-0ubuntu12 I've opened bug 727198: https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/727198

Attached you can find the strace and the gdb full backtrace, once installed libqt4-dbg.

Revision history for this message
Francesc Vicent (fransex) wrote :

Answers to the questions from Michael Thayer, found in the duplicate bug #726980

 * Are you using VirtualBox 4.0.4? Yes, I am.
 * What guest systems are you using, and does this affect all VMs you use? Just Windows7 64bit.
 * Does this happen as soon as the VMs start? No, as soon as I move the mouse.
 * Do the guest systems have Guest Additions installed? (If this happens as soon as the VMs start the question about Guest Additions is probably not relevant.) Yes, it is, also the Extension Pack.
 * Are you using the USB mouse emulation? I don't think so, I'm using standard pointer.
 * Did this use to work, and if so, do you have any idea what might have changed? Yes, this worked fine until 4:4.7.1-0ubuntu10, last working version is 4:4.7.1-0ubuntu9
 * And could you provide a log file from a crashing VM session? Yes, already provided them. In case you need anything else, please ask.

Revision history for this message
Jason Reusch (jason-reusch) wrote :

I can confirm the downgrade also worked for me.

dpkg -i \
 libqtcore4_4.7.1-0ubuntu9_amd64.deb \
 libqtgui4_4.7.1-0ubuntu9_amd64.deb

Revision history for this message
Felix Geyer (debfx) wrote :

> Reading symbols from /usr/lib/libQtGui.so.4...warning: the debug information found in "/usr/lib/debug//usr/lib/libQtGui.so.4.7.1" does not match "/usr/lib/libQtGui.so.4" (CRC mismatch).

Please make sure that libqt4-dbg and libqtgui4 are at the same version and post another backtrace.

summary: - libqt4 4:4.7.1-0ubuntu10 and 11 produce segfault in VirtualBox
+ libqt4 4:4.7.1-0ubuntu10, 11 and 12 produce segfault in VirtualBox
(libqtgui4)
Revision history for this message
Francesc Vicent (fransex) wrote :

I've found out that in version 4:4.7.1-0ubuntu12 actually suffers the same bug: VirtualBox crashes at the same stage (when insteracting with the guest OS). Thus, I've marked bug #727198 as a duplicate of this one and modified the summary.

I attach the traces from strace and gdb using version 4:4.7.1-0ubuntu12. In case you need more info, please let me know.

description: updated
Revision history for this message
Felix Geyer (debfx) wrote :

Still the same ...

Before posting backtraces please check that all packages are up-to-date and no packages conflict (e.g. libqtcore4, libqtgui4 and libqt4-dbg are at the same version).

Revision history for this message
Francesc Vicent (fransex) wrote :

I'm very sorry, the second time, I was 'sure' that all three of them were version 12 I'm uploading a good version now.

In case it helps, here you are some info from gdb, that is was also in the last gdb trace:

Program received signal SIGSEGV, Segmentation fault.
QETWidget::translateXI2Event (this=0x2753ef0, event=<value optimized out>) at kernel/qapplication_x11.cpp:5250
5250 kernel/qapplication_x11.cpp: The file or directory doesn't exist. # translated from catalan #
        in kernel/qapplication_x11.cpp

Revision history for this message
Francesc Vicent (fransex) wrote :

I've seen that the segfault occurs at any stage of the guest OS boot process.

As Jason Reusch reported in bug #726980, it crashes when using the mouse over the window, even at very early boot stages, when no information of the guest has been displayed yet.

I've been using the system with only keyboard and it works fine, no segfault at all. I hope it helps.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

This is due to the new multitouch support in qt in Ubuntu. The macbook has a multitouch trackpad, so you're seeing multitouch events passed from it through vbox and somehow crashing qt. I'm taking a closer look now.

Changed in qt4-x11 (Ubuntu):
assignee: nobody → Chase Douglas (chasedouglas)
status: Confirmed → Triaged
status: Triaged → In Progress
importance: Undecided → Medium
Revision history for this message
Chase Douglas (chasedouglas) wrote :

Hi Francesc,

Would you be able to provide a core dump to help us debug? When you're attached in gdb, issue the command "generate-core-file". Then upload the core dump as an attachment to this bug.

Thanks!

Revision history for this message
Chase Douglas (chasedouglas) wrote :

I believe on inspection of the code that I have found the bug. I will build a test package and attach it here.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

I've uploaded a new version of the package to my xorg-unstable ppa. You can see the package here:

https://launchpad.net/~utouch-team/+archive/xorg-unstable/+packages

Please test it out, once it's done building and has been published for your architecture, by doing the following:

$ sudo add-apt-repository ppa:utouch-team/xorg-unstable
$ sudo apt-get install libqtgui4

This should pull in all the new test qt packages. Note that the repository also has xorg-server updates, and I would suggest not upgrading to them during testing, just so we can be sure that the qt fix alone is enough to resolve the issue.

After you have tested the package, remove the ppa:

$ sudo apt-get install ppa-purge
$ sudo ppa-purge ppa:utouch-team/xorg-unstable

Thanks!

Revision history for this message
Francesc Vicent (fransex) wrote :

Sorry Chase, it doesn't appear to be working, the behavior was the same.

These three packages were upgraded before testing, was it ok?:

 - xinput amd64 1.5.3-2ubuntu1~utouch2 [26,4 kB]
 - xserver-common all 2:1.9.99.902-2ubuntu2~utouch1 [1214 kB]
 - xserver-xorg-core amd64 2:1.9.99.902-2ubuntu2~utouch1 [1769 kB]

About that core dump, is it better with these packages or without them?

Revision history for this message
Francesc Vicent (fransex) wrote :

Sorry, I've read your comment better, I'm trying to do the test as you said.

Revision history for this message
Francesc Vicent (fransex) wrote :

Sorry Chase, I've just read your comment better, I'm trying to do the test as you said.

Revision history for this message
Francesc Vicent (fransex) wrote :

When I try to install your libqtgui4, nothing happens:

No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

I'll wait and see if it gets built later.

Revision history for this message
Hernando Torque (htorque) wrote :

No change here (on amd64), same backtrace.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

Francesc,

The build finished right about the same time as your last comment :). I have verified that on amd64 the package is available for installation now, so you should be able to test as well.

Revision history for this message
Mingming Ren (portis25) wrote :

I just downloaded libqt4-gui_4.7.1-0ubuntu13~test1_amd64.deb and installed, unfortunately it still crashes virtualbox.

Revision history for this message
Francesc Vicent (fransex) wrote :

Now I've tried it well and continues to crash :(

I attach the two traces, I'll attach two core dumps (pre and post-crash) in the next comments, because they are huge.

I upgraded the following packages, and only them:

- libqt4-dbg
- libqt4-dbus
- libqt4-declarative
- libqt4-designer
- libqt4-help
- libqt4-network
- libqt4-opengl
- libqt4-qt3support
- libqt4-script
- libqt4-scripttools
- libqt4-sql
- libqt4-sql-mysql
- libqt4-sql-sqlite
- libqt4-svg
- libqt4-test
- libqt4-xml
- libqt4-xmlpatterns
- libqtcore4
- libqtgui4

Revision history for this message
Francesc Vicent (fransex) wrote :

The core dumps are too big, I haven't been able to upload the 200 MB file as attachment. I'm trying to upload it to a FTP server.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

Hi Francesc,

I was able to test the bug out here, and I can reproduce. You don't need to upload a core dump.

I believe the original bug I saw is the culprit, but I mishandled the packaging of the patch when I uploaded the test package to my ppa. I'm redoing it now.

Philip Muškovac (yofel)
tags: added: natty
Revision history for this message
Chase Douglas (chasedouglas) wrote :

I've pushed a ~test2 package to my ppa. Please test it once it's finished building. I've tested it here locally and it fixes things for me. Note that after installing the package you should log out and back in to restart X. When I tested, it appears that the qt crash can cause the master pointer button state to be left incorrect.

I've also attached a patch that applies against the current qt package and should fix the issue. Upon confirmation, the qt4-x11 package should be uploaded with this fix.

description: updated
Revision history for this message
Hernando Torque (htorque) wrote :

Seems fixed here (amd64).

Revision history for this message
Chase Douglas (chasedouglas) wrote :

Since it's been verified by myself and another user, I'm going to subscribe ubuntu-sponsors for upload handling and set the bug state appropriately.

Changed in qt4-x11 (Ubuntu):
status: In Progress → New
assignee: Chase Douglas (chasedouglas) → nobody
Revision history for this message
Francesc Vicent (fransex) wrote :

Yes, now it works, many thanks!

Felix Geyer (debfx)
Changed in qt4-x11 (Ubuntu):
status: New → Fix Committed
Revision history for this message
Jonathan Riddell (jr) wrote :

Thanks, I'm currently packaging Qt 4.7.2 and will it include it in the upload of that after alpha freeze

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qt4-x11 - 4:4.7.2-0ubuntu1

---------------
qt4-x11 (4:4.7.2-0ubuntu1) natty; urgency=low

  [ Jonathan Riddell ]
  * New upstream release
  * Remove 17_add_postgresql_8.3_support.diff now upstream
  * Remove 22_use___GLIBC__.diff now upstream
  * Remove kubuntu_19_gtkstyle_inactive_background.diff now upstream
  * Remove kubuntu_20_gtkstyle_tabwidget_focus.diff now upstream
  * Remove kubuntu_25_qsortfilterproxymodel.diff now upstream

  [ Chase Douglas ]
  * If no widget is found on touch begin, stop processing touch (LP:
    #725959)

  [ Felix Geyer ]
  * Add kubuntu_29_egl_qglcontext_stubs.diff to retain ABI/API compatibility
    when Qt is built with EGL support. (LP: #707794)
 -- Jonathan Riddell <email address hidden> Thu, 03 Mar 2011 10:51:40 +0000

Changed in qt4-x11 (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.