dialer-app crashed with SIGSEGV in __GI___pthread_mutex_lock()

Bug #1240400 reported by Martin Pitt
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mir
Invalid
Undecided
Unassigned
unity-mir
Fix Released
Critical
Andreas Pokorny
dialer-app (Ubuntu)
Fix Released
Medium
Unassigned
mir (Ubuntu)
Invalid
Critical
Andreas Pokorny
unity-mir (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I regularly get this crash when running the dialer-app-autopilot tests on the Nexus G4.

Reproducer:
 * Make phone writable
 * Keep display on: adb shell "nohup powerd-cli display on"
 * install packages: adb shell "apt-get install -y ofono-phonesim-autostart dialer-app-autopilot"
 * Run tests: adb shell sudo -u phablet -i bash -ic "autopilot run -v dialer_app"

In a lot of cases, dialer_app.tests.test_calls.TestCalls.test_incoming fails with

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dialer_app/tests/test_calls.py", line 143, in test_incoming
    self.hangup()
  File "/usr/lib/python2.7/dist-packages/dialer_app/tests/test_calls.py", line 190, in hangup
    self.assertThat(fn, Eventually(Equals(None)))
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 417, in assertThat
    raise MismatchError(matchee, matcher, mismatch, verbose)
MismatchError: After 10.0 seconds test failed: None != <autopilot.introspection.dbus.AbstractButton object at 0x2194990>

and the screen just stays black except for the unity panel. Then you get /var/crash/_usr_bin_dialer-app.32011.crash (You get the crash even in cases where the test case doesn't fail, it's apparently some race condition in Mir).

ProblemType: Crash
DistroRelease: Ubuntu 13.10
Package: dialer-app 0.1+13.10.20131011+autopilot0 [origin: unknown]
Uname: Linux 3.4.0-3-mako armv7l
ApportVersion: 2.12.5-0ubuntu2
Architecture: armhf
Date: Wed Oct 16 09:59:34 2013
ExecutablePath: /usr/bin/dialer-app
ExecutableTimestamp: 1381856940
InstallationDate: Installed on 2013-10-15 (0 days ago)
InstallationMedia: Ubuntu 13.10 - armhf (20131015.2)
LocalLibraries: /android/system/lib/libhardware.so /android/system/lib/libdsyscalls.so /android/system/lib/libstlport.so /android/system/lib/libgenlock.so /android/system/lib/libc.so /android/system/lib/libstdc++.so /android/system/lib/libgsl.so /android/system/lib/libEGL.so /android/system/lib/egl/libEGL_adreno200.so /android/system/lib/libGLES_trace.so /android/system/lib/egl/libGLESv1_CM_adreno200.so /android/system/lib/libgccdemangle.so /android/system/lib/libm.so /android/system/lib/libcutils.so /android/system/lib/liblog.so /android/system/lib/libcorkscrew.so /android/system/lib/libGLESv2.so /android/system/lib/libz.so /android/system/lib/egl/libGLESv2_adreno200.so /android/system/lib/libutils.so
MarkForUpload: True
ProcCmdline: dialer-app
ProcCwd: /home/phablet
Signal: 11
SourcePackage: dialer-app
StacktraceTop:
 pthread_mutex_lock () from /lib/arm-linux-gnueabihf/libpthread.so.0
 pthread_mutex_lock () from /lib/arm-linux-gnueabihf/libc.so.6
 mir::client::DisplayConfiguration::copy_to_client() const () from /usr/lib/arm-linux-gnueabihf/libmirclient.so.3
 MirConnection::create_copy_of_display_config() () from /usr/lib/arm-linux-gnueabihf/libmirclient.so.3
 mir_connection_get_display_info () from /usr/lib/arm-linux-gnueabihf/libmirclient.so.3
Title: dialer-app crashed with SIGSEGV in pthread_mutex_lock()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm autopilot cdrom dialout dip nopasswdlogin plugdev sudo tty video

Related branches

Revision history for this message
Martin Pitt (pitti) wrote :
information type: Private → Public
tags: added: qa-touch
removed: third-party-packages
Revision history for this message
Martin Pitt (pitti) wrote :

Running only that one test "autopilot run dialer_app.tests.test_calls.TestCalls.test_incoming" directly in an ssh session to the G4 (as user phablet) reproduces the crash as well, and runs faster.

Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 __GI___pthread_mutex_lock (mutex=0x0) at pthread_mutex_lock.c:50
 pthread_mutex_lock (mutex=<optimized out>) at forward.c:192
 mir::client::DisplayConfiguration::copy_to_client() const () at /usr/include/arm-linux-gnueabihf/c++/4.8/bits/gthr-default.h:748
 MirConnection::create_copy_of_display_config() () at /build/buildd/mir-0.0.15+13.10.20131014/src/client/mir_connection.cpp:363
 mir_connection_get_display_info () at /build/buildd/mir-0.0.15+13.10.20131014/src/client/mir_client_library.cpp:295

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in dialer-app (Ubuntu):
importance: Undecided → Medium
summary: - dialer-app crashed with SIGSEGV in pthread_mutex_lock()
+ dialer-app crashed with SIGSEGV in __GI___pthread_mutex_lock()
tags: removed: need-armhf-retrace
Revision history for this message
Martin Pitt (pitti) wrote :

Adding a Mir task as the stack trace has Mir all over the place.

Revision history for this message
Martin Pitt (pitti) wrote :

Most probably a duplicate of bug 1233988. I'll re-test once that fix lands.

summary: - dialer-app crashed with SIGSEGV in __GI___pthread_mutex_lock()
+ dialer-app crashed with SIGSEGV in __GI___pthread_mutex_lock() [dup of
+ 1233988?]
summary: - dialer-app crashed with SIGSEGV in __GI___pthread_mutex_lock() [dup of
- 1233988?]
+ dialer-app crashed with SIGSEGV in __GI___pthread_mutex_lock()
Revision history for this message
Martin Pitt (pitti) wrote :

Nope, I do have that Mir version, and moreover this is a segfault while bug 1233988 is an ABRT (most probably an assertion failure).

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

This is actually most likely a duplicate of bug 1233988. Even with all the fixes for 1233988, you will still get a abort/crash (qFatal()) if the app can't connect to the server for some reason, but you should also get a "FATAL:..." stderr (I think) message from Qt. Previously, the platform API would ignore the connection problem and used invalid objects, leading to strange crashes in mir.

So, if you can verify that you get the "FATAL: ... " message from qFatal with the newest packages, then this is essentially "dialer-app fails to connect to unity8/mir".

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

The exact error message is "QUbuntu: Could not create application instance" you should get is.

Revision history for this message
Martin Pitt (pitti) wrote :

Alexandros, but dialer-app already connected to Mir.. I see this crash while dialer-app is already visible, it just crashes in the middle of receiving a phone call. (Also, it's NOT a SIGABRT, and I don't see any "FATAL:" messages anywhere)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 1233988, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

Revision history for this message
Martin Pitt (pitti) wrote :

Unduping for the rationale above, quickly discussed with Daniel on IRC.

Revision history for this message
Martin Pitt (pitti) wrote :
Changed in mir:
status: New → Fix Released
Changed in dialer-app (Ubuntu):
status: New → Invalid
Revision history for this message
Bill Filler (bfiller) wrote :

this is not fixed. using build 152 on Nexus 4 the dialer-app autopilot tests (from trunk, where the test in question is re-enabled), I get the same problem as described in the original bug. Screen goes black and then the shell crashes. I am going to re-add the try catch in the dialer-app autopilot test so it doesn't fail.

Changed in mir:
status: Fix Released → Confirmed
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

I can reproduce that even without using autopilot, just start dialer-app from command line:

dialer-app --desktop_file_hint=/usr/share/applications/dialer-app.desktop

Then call the phone and answer the call in the snap decision. The focus will get back to the dialer-app, and as soon as you try to interact with the app, the screen will turn black, and trying to interact with the shell makes it crash.

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

This bug was fixed in the package dialer-app - 0.1+14.04.20140130-0ubuntu1

---------------
dialer-app (0.1+14.04.20140130-0ubuntu1) trusty; urgency=low

  [ Bill Filler ]
  * o not pass the phone number as a parameter when pushing the live
    call view for an outgoing call. The correct value will be taken from
    the callManager. This fixes the problem of the header not updating
    when switching between multiple calls. Re-add try catch around
    autopilot test as the underlying mir/shell crash has not been fixed

  [ Martin Pitt ]
  * tests: Drop expected crash for LP#1240400, it's fixed now. (LP:
    #1240400)

  [ Gustavo Pichorim Boiko ]
  * Implement support for switching calls.
  * Fix a typo in the default avatar setting on history page.
  * Fix the call duration parsing by using Qt.formatTime() to split
    hours, minutes and seconds. (LP: #1242772)
  * o not pass the phone number as a parameter when pushing the live
    call view for an outgoing call. The correct value will be taken from
    the callManager. This fixes the problem of the header not updating
    when switching between multiple calls. Re-add try catch around
    autopilot test as the underlying mir/shell crash has not been fixed

  [ Omer Akram ]
  * Load testability driver if QT_LOAD_TESTABILITY is in the
    environment.

  [ Dimitri John Ledkov ]
  * Drop executing qmake, to query a variable, which is then not used.
    Adjust dependency on any:arch python, fixes cross-compilation.
    build-dependency installation.
 -- Ubuntu daily release <email address hidden> Thu, 30 Jan 2014 17:06:44 +0000

Changed in dialer-app (Ubuntu):
status: Invalid → Fix Released
kevin gunn (kgunn72)
Changed in mir (Ubuntu):
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in mir:
assignee: nobody → rosa maria (rprosamaria383)
Changed in dialer-app (Ubuntu):
assignee: nobody → rosa maria (rprosamaria383)
assignee: rosa maria (rprosamaria383) → nobody
assignee: nobody → rosa maria (rprosamaria383)
kevin gunn (kgunn72)
Changed in mir (Ubuntu):
assignee: Daniel van Vugt (vanvugt) → Andreas Pokorny (andreas-pokorny)
Changed in dialer-app (Ubuntu):
assignee: rosa maria (rprosamaria383) → nobody
Changed in mir:
assignee: rosa maria (rprosamaria383) → nobody
Changed in mir (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

I can reproduce the issue easily too. But only when I start dialer-app from the command line. Additionally dialer-app does not crash as far as I can tell, it only terminates due to unity8 crashing.

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

just a short update - the crash does not occur when the application is launched with upstart-launch-app

Revision history for this message
Martin Pitt (pitti) wrote :

So should this be marked as duplicate of bug 1263182, or should Mir be fixed to not crash in this case?

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

A fix for that bug would hide the issue here, but we should not crash in that case.

When the incoming call is accepted another session is created for another dialer-app which for some reason is not launched. The final crash happens in unity-mir ApplicationManager::suspendApplication application_manager.cpp:226 (initiated by the user switching applications or going back to phone shell/launcher) when it tries to defocus and suspend the session.

I now try to investigate why the application session is invalid.

no longer affects: unity8
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

ApplicationManager only uses the app-id to track processes, and hence mismatches start/stop reports and authorization request.

no longer affects: dialer-app
Changed in unity-mir:
assignee: nobody → Andreas Pokorny (andreas-pokorny)
kevin gunn (kgunn72)
Changed in unity-mir:
status: New → Confirmed
importance: Undecided → High
importance: High → Critical
status: Confirmed → In Progress
Changed in mir:
status: Confirmed → Invalid
Changed in mir (Ubuntu):
status: In Progress → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-mir - 0.3+14.04.20140311.1-0ubuntu1

---------------
unity-mir (0.3+14.04.20140311.1-0ubuntu1) trusty; urgency=low

  [ Michael Zanetti ]
  * expose ApplicationImage's sourceSize (LP: #1282126)

  [ Andreas Pokorny ]
  * Use the process id found in the mir::shell::Session to match it with
    the Application object. (LP: #1281075)

  [ thomas-voss ]
  * Switch to QT_NO_KEYWORDS and with that account for changes in
    process-cpp.

  [ CI bot ]
  * [cmake] Use XXX_LDFLAGS for libraries found with pkg_check_modules.
    Using the pkg given LDFLAGS resolves linking issues when cross-
    compiling
  * Add dev scripts to support cross-compilation Adapted cross compile
    scripts from mir project to support cross compilation using a basic
    armhf chroot environment populated using debootstrap - the build
    dependencies are parsed from debian/control These scripts are
    intended for development purposes only
  * Bugfix for unity-mir crash when multiple application instances with
    the same appId get started & stopped. This change also introduces
    further mocks for mir and unity-mir classes and a refactored
    ApplicationManager. The log traces where extended with more
    information on the touched application objects. (LP: #1240400)
 -- Ubuntu daily release <email address hidden> Tue, 11 Mar 2014 03:40:58 +0000

Changed in unity-mir (Ubuntu):
status: New → Fix Released
Gerry Boland (gerboland)
Changed in unity-mir:
status: In Progress → 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.