desktopcouch-service crashed with SIGSEGV

Bug #524566 reported by Krzysztof Klimonda
This bug affects 476 people
Affects Status Importance Assigned to Milestone
desktopcouch
Fix Released
Critical
Chad Miller
desktopcouch (Ubuntu)
Fix Released
Critical
Ken VanDine

Bug Description

Binary package hint: desktopcouch

No idea what happened. It just crashed.

ProblemType: Crash
Architecture: i386
CheckboxSubmission: c796df2c03d28b45a22c8d1850f0e643
CheckboxSystem: bb422ca46d02494cdbc459927a98bc2f
Date: Fri Feb 19 19:05:57 2010
DistroRelease: Ubuntu 10.04
EcryptfsInUse: Yes
ExecutablePath: /usr/lib/desktopcouch/desktopcouch-service
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha i386 (20100201)
InterpreterPath: /usr/bin/python2.6
Package: desktopcouch 0.6.1-0ubuntu1
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/lib/desktopcouch/desktopcouch-service
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.utf8
ProcVersionSignature: Ubuntu 2.6.32-13.18-generic-pae
SegvAnalysis:
 Segfault happened at: 0xb764ba77: movdqu %xmm0,(%esi)
 PC (0xb764ba77) ok
 source "%xmm0" ok
 destination "(%esi)" (0xb72208c5) in non-writable VMA region: 0xb71f6000-0xb722d000 r-xp /lib/libdbus-1.so.3.4.0
SegvReason: writing VMA /lib/libdbus-1.so.3.4.0
Signal: 11
SourcePackage: desktopcouch
StacktraceTop:
 ?? () from /lib/tls/i686/cmov/libc.so.6
 ?? ()
 ?? () from /lib/libdbus-1.so.3
 ?? () from /lib/libdbus-1.so.3
 ?? () from /lib/libdbus-1.so.3
Title: desktopcouch-service crashed with SIGSEGV
Uname: Linux 2.6.32-13-generic-pae i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Related branches

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

StacktraceTop:
 __mempcpy_ssse3 () from /lib/tls/i686/cmov/libc.so.6
 ?? ()
 _dbus_message_loader_queue_messages (loader=0xb72208c5)
 _dbus_transport_get_dispatch_status (transport=0x8c12d48)
 _dbus_transport_queue_messages (transport=0x8c12d48)

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 desktopcouch (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Omer Akram (om26er)
Changed in desktopcouch (Ubuntu):
status: New → Confirmed
Revision history for this message
Chad Miller (cmiller) wrote :
Download full text (4.5 KiB)

Source-package 'dbus' doesn't make "-dbg" packages. Had to rebuild.

Full stacktrace:

#0 0x00e39aeb in _dbus_list_unlink (list=0xb76bcb5c, link=0x88da83c) at dbus-list.c:517
#1 0x00e39de9 in _dbus_list_remove_link (list=0xb76bcb5c, link=0x88da83c) at dbus-list.c:537
#2 0x00e39e3a in _dbus_list_pop_last (list=0xb76bcb5c) at dbus-list.c:689
#3 0x00e28a63 in _dbus_validate_signature_with_reason (type_str=0xb76bcc1c, type_pos=0, len=1)
    at dbus-marshal-validate.c:218
#4 0x00e28d5c in validate_body_helper (reader=0xb76bcc98, byte_order=<value optimized out>, walk_reader_to_end=1,
    p=0x88dec32 "u", end=0x88df410 "", new_p=0xb76bcd24) at dbus-marshal-validate.c:558
#5 0x00e29022 in validate_body_helper (reader=0xb76bcda0, byte_order=<value optimized out>, walk_reader_to_end=0,
    p=0x88dec30 "\005\001u", end=0x88df410 "", new_p=0xb76bcdf4) at dbus-marshal-validate.c:623
#6 0x00e28fb7 in validate_body_helper (reader=<value optimized out>, byte_order=<value optimized out>,
    walk_reader_to_end=1, p=0x88dec2f "", end=0x88df410 "", new_p=0xb76bce2c) at dbus-marshal-validate.c:477
#7 0x00e2941a in _dbus_validate_body_with_reason (expected_signature=0xe49ca8, expected_signature_start=0,
    byte_order=108, bytes_remaining=0xb76bcf38, value_str=0x88be8dc, value_pos=0, len=2048)
    at dbus-marshal-validate.c:708
#8 0x00e251ff in _dbus_header_load (header=0x88c3394, mode=DBUS_VALIDATION_MODE_DATA_IS_UNTRUSTED,
    validity=0xb76bcfd8, byte_order=108, fields_array_len=45, header_len=64, body_len=102, str=0x88be8dc, start=0,
    len=2048) at dbus-marshal-header.c:987
#9 0x00e2cd37 in load_message (loader=0x88be8d8) at dbus-message.c:3533
#10 _dbus_message_loader_queue_messages (loader=0x88be8d8) at dbus-message.c:3683
#11 0x00e35b69 in _dbus_transport_get_dispatch_status (transport=0x86d9798) at dbus-transport.c:1080
#12 0x00e35cda in _dbus_transport_queue_messages (transport=0x86d9798) at dbus-transport.c:1107
#13 0x00e1fe27 in _dbus_connection_get_dispatch_status_unlocked (connection=0x88c32d8) at dbus-connection.c:4021
#14 0x00e212a0 in check_for_reply_and_update_dispatch_unlocked (connection=0x88c32d8, pending=<value optimized out>)
    at dbus-connection.c:2250
#15 0x00e22262 in _dbus_connection_block_pending_call (pending=0x88c06d0) at dbus-connection.c:2356
#16 0x00e2fa51 in dbus_pending_call_block (pending=0x88da83c) at dbus-pending-call.c:705
#17 0x00fcf2a4 in ?? () from /usr/lib/libgnome-keyring.so.0
#18 0x00fd87c5 in gnome_keyring_find_items_sync () from /usr/lib/libgnome-keyring.so.0
#19 0x003d36f4 in ?? () from /usr/lib/pymodules/python2.6/gtk-2.0/gnomekeyring.so
#20 0x080e0b13 in call_function (f=0x88ddc00, throwflag=0) at ../Python/ceval.c:3750
#21 PyEval_EvalFrameEx (f=0x88ddc00, throwflag=0) at ../Python/ceval.c:2412
#22 0x080e1dc4 in fast_function (f=0x88e0774, throwflag=0) at ../Python/ceval.c:3836
#23 call_function (f=0x88e0774, throwflag=0) at ../Python/ceval.c:3771
#24 PyEval_EvalFrameEx (f=0x88e0774, throwflag=0) at ../Python/ceval.c:2412
#25 0x080e1dc4 in fast_function (f=0xb6d0112c, throwflag=0) at ../Python/ceval.c:3836
#26 call_function (f=0xb6d0112c, throwflag=0) at ../Python/ceval.c:3771
#27 PyEval_EvalF...

Read more...

Changed in desktopcouch (Ubuntu):
assignee: nobody → Chad Miller (cmiller)
importance: Medium → Critical
visibility: private → public
Revision history for this message
Chad Miller (cmiller) wrote :

#3 0x00e28a63 in _dbus_validate_signature_with_reason (type_str=0xb76bcc1c, type_pos=0, len=1)
    at dbus-marshal-validate.c:218
218 _DBUS_POINTER_TO_INT (_dbus_list_pop_last (&element_count_stack));
(gdb) l
213 if (*p != DBUS_TYPE_ARRAY &&
214 *p != DBUS_DICT_ENTRY_BEGIN_CHAR &&
215 *p != DBUS_STRUCT_BEGIN_CHAR)
216 {
217* element_count =
218 _DBUS_POINTER_TO_INT (_dbus_list_pop_last (&element_count_stack));
219
220 ++element_count;
221
222 if (!_dbus_list_append (&element_count_stack,
(gdb) print *p
$17 = 117 'u'

/** #DBUS_TYPE_UINT32 as a string literal instead of a int literal */
#define DBUS_TYPE_UINT32_AS_STRING "u"

#define _DBUS_POINTER_TO_INT(pointer) ((long)(pointer))

Running with "python -u", to unbuffer stdout and stderr, there's more:

*** glibc detected *** python: realloc(): invalid next size: 0x096ac1e8Segmentation fault (core dumped)

Revision history for this message
Chad Miller (cmiller) wrote :

Oh wow, about 2 out of 8 times, it does *not* SEGV on my machine. On one of those, it gives an exception,

2010-03-19 10:33:15,154 - replication of services aborted
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/desktopcouch/replication.py", line 144, in do_all_replication
    remote_oauth_data = oauth_info_for_service(sn)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/replication.py", line 65, in oauth_info_for_service
    return getattr(mod, service_name).get_oauth_data()
  File "/usr/lib/python2.6/dist-packages/desktopcouch/replication_services/ubuntuone.py", line 35, in get_oauth_data
    'oauth-consumer-key': oauth_consumer_key})
IOError

and the other time, it runs properly.

Revision history for this message
Chad Miller (cmiller) wrote :

Since the linked-list functions are unlikely to be the cause, I'm looking downward in the stack. In a fresh CD run, using "testdrive", there is no problem and all of desktopcouch packages are the same as here. Looking at dbus and gnome-keyring next.

Revision history for this message
Chad Miller (cmiller) wrote :

New data point:

process 2980: arguments to dbus_message_unref() were incorrect, assertion "message->generation == _dbus_current_generation" failed in file dbus-message.c line 1396.
This is normally a bug in some application using the D-Bus library.
Segmentation fault (core dumped)

Revision history for this message
Chad Miller (cmiller) wrote :

^Ccmiller@zippy:~/work/canonical/desktopcouch/segv$ PYTHONPATH=`pwd` bin/desktopcouch-service
2010-03-19 15:31:56,826 - Personal couchdb is already running at PID#2935.
python: malloc.c:3574: mremap_chunk: Assertion `((size + offset) & (mp_.pagesize-1)) == 0' failed.
Aborted (core dumped)

Revision history for this message
Chad Miller (cmiller) wrote :

cmiller@zippy:~/work/canonical/desktopcouch/segv$ PYTHONPATH=`pwd` bin/desktopcouch-service
2010-03-19 15:41:24,526 - Personal couchdb is already running at PID#2935.
**
ERROR:gkr-operation.c:380:gkr_operation_block: code should not be reached

Revision history for this message
Chad Miller (cmiller) wrote :
Download full text (5.5 KiB)

(gdb) bt
#0 0x003d7059 in link_before (list=0xbff5e66c, data=0x1) at dbus-list.c:121
#1 _dbus_list_prepend (list=0xbff5e66c, data=0x1) at dbus-list.c:277
#2 0x003d70b9 in _dbus_list_append (list=0xbff5e66c, data=0x1) at dbus-list.c:249
#3 0x003c5a75 in _dbus_validate_signature_with_reason (type_str=0xbff5e72c, type_pos=0, len=11)
    at dbus-marshal-validate.c:222
#4 0x003c5cec in validate_body_helper (reader=0xbff5e7c4, byte_order=<value optimized out>,
    walk_reader_to_end=0, p=0xb6c0563d "a{o(oayay)}", end=0xb6c05774 "", new_p=0xbff5e834)
    at dbus-marshal-validate.c:515
#5 0x003c6088 in validate_body_helper (reader=0xbff5e878, byte_order=<value optimized out>,
    walk_reader_to_end=1, p=0xb6c0563c "\va{o(oayay)}", end=0xb6c05774 "", new_p=0xbff5e904)
    at dbus-marshal-validate.c:594
#6 0x003c6022 in validate_body_helper (reader=0xbff5e980, byte_order=<value optimized out>,
    walk_reader_to_end=0, p=0xb6c05638 "\b\001g", end=0xb6c05774 "", new_p=0xbff5e9d4)
    at dbus-marshal-validate.c:623
#7 0x003c5fb7 in validate_body_helper (reader=<value optimized out>,
    byte_order=<value optimized out>, walk_reader_to_end=1, p=0xb6c05638 "\b\001g", end=0xb6c05774 "",
    new_p=0xbff5ea0c) at dbus-marshal-validate.c:477
#8 0x003c641a in _dbus_validate_body_with_reason (expected_signature=0x3e6ca8,
    expected_signature_start=0, byte_order=108, bytes_remaining=0xbff5eb18, value_str=0xb6c01dfc,
    value_pos=0, len=356) at dbus-marshal-validate.c:708
#9 0x003c21ff in _dbus_header_load (header=0x9a73bc4, mode=DBUS_VALIDATION_MODE_DATA_IS_UNTRUSTED,
    validity=0xbff5ebb8, byte_order=108, fields_array_len=61, header_len=80, body_len=276,
    str=0xb6c01dfc, start=0, len=356) at dbus-marshal-header.c:987
#10 0x003c9d37 in load_message (loader=0xb6c01df8) at dbus-message.c:3533
#11 _dbus_message_loader_queue_messages (loader=0xb6c01df8) at dbus-message.c:3683
#12 0x003d2b69 in _dbus_transport_get_dispatch_status (transport=0xb6c02c68) at dbus-transport.c:1080
#13 0x003d2cda in _dbus_transport_queue_messages (transport=0xb6c02c68) at dbus-transport.c:1107
#14 0x003d3cda in do_reading (transport=0xb6c02c68) at dbus-transport-socket.c:792
#15 0x003d4528 in socket_handle_watch (transport=0xb6c02c68, watch=0xb6c01dd0, flags=1)
    at dbus-transport-socket.c:873
#16 0x003d26c7 in _dbus_transport_handle_watch (transport=0xb6c02c68, watch=0xb6c01dd0, condition=1)
    at dbus-transport.c:865
#17 0x003be324 in _dbus_connection_handle_watch (watch=0xb6c01dd0, condition=1, data=0xb6c020f0)
    at dbus-connection.c:1440
#18 0x003d4cd9 in dbus_watch_handle (watch=0xb6c01dd0, flags=1) at dbus-watch.c:669
#19 0x00396239 in ?? () from /usr/lib/libgnome-keyring.so.0
#20 0x004c284b in g_io_unix_dispatch (source=0x0, callback=0xb6c020f0, user_data=0xb6c01fa0)
    at /build/buildd/glib2.0-2.23.5/glib/giounix.c:162
#21 0x00481395 in g_main_dispatch (context=0x983a1c0) at /build/buildd/glib2.0-2.23.5/glib/gmain.c:1960
#22 IA__g_main_context_dispatch (context=0x983a1c0) at /build/buildd/glib2.0-2.23.5/glib/gmain.c:2513
#23 0x00485088 in g_main_context_iterate (context=0x983a1c0, block=<value optimized out>, dispatch=1,
    self=0x96528a0) at /bui...

Read more...

Revision history for this message
Chad Miller (cmiller) wrote :

cmiller@zippy:~/work/canonical/desktopcouch/segv$ PYTHONPATH=`pwd` bin/desktopcouch-service
2010-03-19 17:37:40,904 - Personal couchdb is already running at PID#2935.
python: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
Segmentation fault (core dumped)

I begin to doubt these assertion failures will be meaningful.

Revision history for this message
Chad Miller (cmiller) wrote :

Ugh. Okay, after much GDBing, recompiling of DBus packages, and excising of code, I have it narrowed down to desktopcouch/replication_services/ubuntuone.py , where we retrieve credentials we need to authenticate to the user's couchdb in the cloud.

My first idea will be to move that outside the subthread, which entails moving that call up about 4 levels, outside replication proper and into the service, where we might have to be quick so as not to block DBus server calls.

Changed in desktopcouch:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Chad Miller (cmiller)
Revision history for this message
Jason S. Wagner (jasonswagner) wrote :

This occurred immediately after setting up my existing Ubuntu One account from the Me menu on Lucid Beta 1.

Revision history for this message
Tenoch (mignonmexicain) wrote :

Ok So i have no desktop environment. I was able to access the internet by remembering that ctrl + alt + T = open terminal window. I was lucky enough to remember that typing firefox on the terminal window will make my browser open and it did. I am not at all a computer linux literate so please forgive me if this is not the correct place for the bug. So in other words i have no access to the applications by clicking on icons, just by using terminal which scares me because i do not know how to do updates for when the bug is fixed.

Revision history for this message
Chad Miller (cmiller) wrote :

I think I have it avoided. I was trying to use a singleton to cache some data that should not change often (if ever at all), and in the module, I create an instance of the singleton class.

I don't know the cause yet, but that seems to be the cause. If I use module variables to cache the data, there are no crashes. I wish I knew *why*, but SEGVs in multithreaded Python programs are not very easy to debug.

Changed in desktopcouch:
status: Confirmed → In Progress
John Lenton (chipaca)
tags: added: desktop+ u1-lucid
Revision history for this message
Casey J Peter (caseyjp1) wrote :

post patches as of the timestamp. amd64 system. Crash occurs when starting gwibber via 'broadcast'.
Gwibber continues to function after the crash.

tags: added: package
Changed in desktopcouch (Ubuntu):
milestone: none → ubuntu-10.04-beta-2
Changed in desktopcouch:
milestone: none → lucid-beta-2
Revision history for this message
Andrea Caminiti (nrayever) wrote :

I got the same issue here! hope it's solved soon.

Revision history for this message
Simon Osborne (flibblesan) wrote :

Same issue affecting me on 64bit. Glad that it's being looked into.

Revision history for this message
Chad Miller (cmiller) wrote :

Ah, I woke up this morning with some remembrance echoing in my head about Gtk and not making UI objects in subthreads. This is a promising avenue, I think.

Revision history for this message
John O'Brien (jdobrien) wrote :

Chad,

Based on your last comment, is the proposed branch still the avenue you want to take or is this a new road?

Revision history for this message
Jean-Philippe Orsini (jfi) wrote :

Crashed with: [ 80.980681] desktopcouch-se[1829]: segfault at 0 ip 00007f5e7efe6831 sp 00007fff141510a0 error 4 in libdbus-1.so.3.4.0[7f5e7efc2000+3d000]

Revision history for this message
Ank3n (medtraore) wrote :

This is affecting me as well, but lucid-beta continues running after the crash. Thanks for looking into this.

\

Revision history for this message
Schorsch (schorschi-schorsch) wrote :

same for me: crashing on system-startup... no obvious effect to systemstability

Revision history for this message
Andreas Koch (akoch-it) wrote :

same here, it crashs on logon.
but no problem with stability or something.

Revision history for this message
Les Pounder (lespounder) wrote :

This bug also affects 64bit Ubuntu 10.04
(Linux les-studio 2.6.32-17-generic #26-Ubuntu SMP Sat Mar 20 02:23:45 UTC 2010 x86_64 GNU/Linux)

Revision history for this message
Uncle Spellbinder (spellbinder) wrote :

This continues to happen to be on my 32 bit Beta 1 install. The crash occurs less than a minute after boot.

Revision history for this message
Stéphane List (slist) wrote :

I don't know if it's related to this bug or not, but each time I login, I have no button on top of my windows, so I can't move windows, close windows.... each time, I have to set "Visual effect" to normal or "extra" to see the 3 small buttons on the left corner.
BTW, is it possible to have them on the right ?

The Visual effect is not saved, and at each login, it's set to "none".

Revision history for this message
Chad Miller (cmiller) wrote :

There's a patch to libgnome-keyring0 2.29.4git20100322-0ubuntu3 (previous is libgnome-keyring0 2.29.4git20100322-0ubuntu2) that causes this no longer to crash, but now it eats all CPU.

Revision history for this message
Chad Miller (cmiller) wrote :

See also Bug#530605 .

Revision history for this message
Oybon (oybon) wrote :

Yup, I get CPU eating also. Single CPU only though.

Changed in desktopcouch (Ubuntu):
assignee: Chad Miller (cmiller) → Ken VanDine (ken-vandine)
Chad Miller (cmiller)
Changed in desktopcouch:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package desktopcouch - 0.6.3-0ubuntu3

---------------
desktopcouch (0.6.3-0ubuntu3) lucid; urgency=low

  * debian/patches/2-expire_log_files
    - Make log files rotate away so they don't grow out of control.
  * debian/patches/4-lp_524566_gui_in_main_thread
    - Execute GUI operations in the main execution thread only. (LP: #524566)
 -- Ken VanDine <email address hidden> Wed, 31 Mar 2010 09:46:47 -0400

Changed in desktopcouch (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Martin Kaba (kanute) wrote :

I've got this too, a crash on log-in. "desktopcoach-service" closed unexpectedly, but my desktop icons are all there and the system is stable!!!

tags: removed: package
Revision history for this message
Nick Lally (nick-lally) wrote :

I've just downloaded and installed all updates this morning and the desktopcouch service is still crashing on startup.

Chad Miller (cmiller)
Changed in desktopcouch:
status: Fix Committed → Fix Released
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.