geoclue-master crashed with SIGABRT in __kernel_vsyscall()

Bug #738584 reported by Allysman
148
This bug affects 22 people
Affects Status Importance Assigned to Milestone
GeoClue
Won't Fix
Medium
geoclue (Ubuntu)
Fix Released
Medium
Mathieu Trudel-Lapierre
Natty
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: geoclue

Just whatever this report says :)

ProblemType: Crash
DistroRelease: Ubuntu 11.04
Package: geoclue 0.12.0-1ubuntu7
ProcVersionSignature: Ubuntu 2.6.38-7.36-generic 2.6.38
Uname: Linux 2.6.38-7-generic i686
Architecture: i386
Date: Sun Mar 20 02:09:07 2011
EcryptfsInUse: Yes
ExecutablePath: /usr/lib/geoclue/geoclue-master
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20110302)
ProcCmdline: /usr/lib/geoclue/geoclue-master
ProcEnviron:
 SHELL=/bin/bash
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
Signal: 6
SourcePackage: geoclue
StacktraceTop:
 __kernel_vsyscall ()
 raise () from /lib/i386-linux-gnu/libc.so.6
 abort () from /lib/i386-linux-gnu/libc.so.6
 g_assertion_message () from /lib/libglib-2.0.so.0
 g_assertion_message_expr () from /lib/libglib-2.0.so.0
Title: geoclue-master crashed with SIGABRT in __kernel_vsyscall()
UpgradeStatus: Upgraded to natty on 2011-03-18 (2 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Related branches

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

StacktraceTop:
 __kernel_vsyscall ()
 raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
 abort () at abort.c:92
 g_assertion_message (domain=0x0, file=0x804f779 "master-provider.c", line=822, func=0x804fb20 "gc_master_provider_initialize_interfaces", message=<value optimized out>) at /build/buildd/glib2.0-2.28.3/./glib/gtestutils.c:1358
 g_assertion_message_expr (domain=0x0, file=0x804f779 "master-provider.c", line=822, func=0x804fb20 "gc_master_provider_initialize_interfaces", expr=0x804f7d1 "priv->position == NULL") at /build/buildd/glib2.0-2.28.3/./glib/gtestutils.c:1369

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 geoclue (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
visibility: private → public
Changed in geoclue (Ubuntu):
status: New → In Progress
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Revision history for this message
In , Mathieu Trudel-Lapierre (cyphermox) wrote :

Created attachment 45388
full stack trace

From the downstream bug report: https://bugs.edge.launchpad.net/ubuntu/+source/geoclue/+bug/738584

Apparently the master provider crashes in some cases, possibly more likely after a resume from suspend:

 __kernel_vsyscall ()
 raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
 abort () at abort.c:92
 g_assertion_message (domain=0x0, file=0x804f779 "master-provider.c", line=822, func=0x804fb20 "gc_master_provider_initialize_interfaces", message=<value optimized out>) at /build/buildd/glib2.0-2.28.3/./glib/gtestutils.c:1358
 g_assertion_message_expr (domain=0x0, file=0x804f779 "master-provider.c", line=822, func=0x804fb20 "gc_master_provider_initialize_interfaces", expr=0x804f7d1 "priv->position == NULL") at /build/buildd/glib2.0-2.28.3/./glib/gtestutils.c:1369

Looks like in this particular case priv->position is not NULL.

Revision history for this message
In , Mathieu Trudel-Lapierre (cyphermox) wrote :

Created attachment 45389
don't assert for position/address to be NULL when initializing interfaces

I'm not certain of the exact case since I haven't been able to reproduce the crash at all, no matter how hard I tried, but I think the following would make sense:

@@ -819,20 +819,20 @@
        }

        if (priv->interfaces & GC_IFACE_POSITION) {
- g_assert (priv->position == NULL);
-
- priv->position = geoclue_position_new (priv->service,
- priv->path);
- g_signal_connect (G_OBJECT (priv->position), "position-changed",
- G_CALLBACK (position_changed), provider);
+ if (priv->position == NULL) {
+ priv->position = geoclue_position_new (priv->service,
+ priv->path);
+ g_signal_connect (G_OBJECT (priv->position), "position-changed",
+ G_CALLBACK (position_changed), provider);
+ }
        }
        if (priv->interfaces & GC_IFACE_ADDRESS) {

If for some reason the position object isn't NULL (e.g. which I guess could be possible on resume, see below), merrily carry on.

I think what's happening is in the case of this bug report, the system resumes and NM quickly cycles through the various states, probably fast enough to online that the master provider gets to call:

        /* update connection-cacheable providers */
        if (status == GEOCLUE_CONNECTIVITY_ONLINE &&
            priv->provides & GEOCLUE_PROVIDE_CACHEABLE_ON_CONNECTION) {
                /* intialize to fill cache (this will handle status change) */
                if (gc_master_provider_initialize (provider)) {
                        gc_master_provider_deinitialize (provider);
                }

Tries to initialize the interfaces, and fails because position or address are already filled.

Attached is the "full" patch for the piece of code I added above. Might be cleaner to deinit it and fill it back though.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Is anyone able to systematically reproduce this issue, for instance, after resuming from suspend?

I have a possible patch built in a package on my PPA: https://edge.launchpad.net/~mathieu-tl/+archive/build-tests/+sourcepub/1635719/+listing-archive-extra

I haven't been able to reproduce the crash but this fix makes some sense.

Changed in geoclue:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Ryota Ozaki (ozaki-ryota+launchpad) wrote :

I encountered the problem always when resuming. It happened two times for a week but it happened sometimes not always.

If you have any ideas to make it reproducible, I will try them. If not, I will try the package for some time though, is it enough to ensure if the bug disappeared or not?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I haven't a clue how to reproduce the issue -- I have tried a number of things with no luck.

So yes, you can try to test with the package if the bug disappears or not, although it's much more valuable if you can reproduce the crash by resuming every once in a while with the official packages :)

I think it might be related to whether or not the network is available after resume, but I haven't really been able to see the crash in those cases either.

Revision history for this message
Ryota Ozaki (ozaki-ryota+launchpad) wrote :

I'm sorry for late replying. I'm trying your package for several days and haven't encountered the issue :-)

After that, I tried to reproduce the issue again, but ended up giving up. (However, I encountered it once again during I didn't pay attention to it...)

I'll keep using the package for more a few days to confirm the issue really disappeared.

tags: added: bugpattern-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package geoclue - 0.12.0-1ubuntu9

---------------
geoclue (0.12.0-1ubuntu9) oneiric; urgency=low

  * debian/patches/lp_738584.patch:
    - Don't fail if on resume, position / address providers are already inited
      when we try to prepare interfaces. (LP: #738584)
 -- Mathieu Trudel-Lapierre <email address hidden> Thu, 07 Apr 2011 11:22:33 -0400

Changed in geoclue (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Ken VanDine (ken-vandine) wrote :

There doesn't seem to be a reliable way to reproduce this crash, but this patch does seem to fix it. I guess the best way to verify this bug is to resume from suspend a few times and verify the geoclue-master process is still running.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted geoclue into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in geoclue (Ubuntu Natty):
status: New → Fix Committed
tags: added: verification-needed
dino99 (9d9)
Changed in geoclue (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
In , Zeeshan Ali (zeenix) wrote :

Closing all bugs on old geoclue. If your bug still applies to new geoclue, please do re-open, I really don't have time to go through each and every bug and evaluate separately. :( Apologies for any inconvenience caused by this change.

Changed in geoclue:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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