After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 664617 - gdbus segfault error 4 in libgio-2.0.so.0.3102.0
gdbus segfault error 4 in libgio-2.0.so.0.3102.0
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
2.31.x
Other Linux
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-11-23 09:06 UTC by jeff
Modified: 2011-11-23 14:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GDBusWorker: continue_writing: initialize flush_async_data if closing (1.66 KB, patch)
2011-11-23 11:23 UTC, Simon McVittie
none Details | Review

Description jeff 2011-11-23 09:06:05 UTC
With glib 2.31.2 many programs like firefox,seamonkey,kdbg,Thunar(when click Enter to open a file) crash with:

gdbus[24293]: segfault at 8 ip b704ee85 sp b5877090 error 4 in libgio-2.0.so.0.3102.0[b6f73000+131000]

The backtrace is:

gdb) r
Starting program: /usr/local/firefox11/firefox 
[Thread debugging using libthread_db enabled]
[New Thread 0xb4ce2b70 (LWP 20990)]

Program received signal SIGSEGV, Segmentation fault.

Thread 3033410416 (LWP 20990)

  • #0 start_flush
    at gdbusprivate.c line 1237
  • #1 continue_writing
    at gdbusprivate.c line 1485
  • #2 continue_writing_in_idle_cb
    at gdbusprivate.c line 1557
  • #3 g_idle_dispatch
    at gmain.c line 4632
  • #4 g_main_dispatch
    at gmain.c line 2513
  • #5 g_main_context_dispatch
    at gmain.c line 3050
  • #6 g_main_context_iterate
    at gmain.c line 3121
  • #7 g_main_loop_run
    at gmain.c line 3315
  • #8 gdbus_shared_thread_func
    at gdbusprivate.c line 276
  • #9 g_thread_proxy
    at gthread.c line 801
  • #10 start_thread
    from /lib/libpthread.so.0
  • #11 clone
    from /lib/libc.so.6

Downgrading glib to 2.31.0 breaks gsettings-desktop-schemas in gnome 3.3.2.
Comment 1 Simon McVittie 2011-11-23 11:06:45 UTC
This might be a regression caused by my changes on Bug #662395, but I can't reproduce the test failure mentioned in that bug. Thanks for providing a backtrace, I'll have a look at it.
Comment 2 Simon McVittie 2011-11-23 11:23:42 UTC
Created attachment 201987 [details] [review]
GDBusWorker: continue_writing: initialize flush_async_data if closing

This was a regression in commit f41178c6c: flush_async_data wasn't
necessarily NULL in the "don't flush" case.

Also move initialization of these variables up so that it's
unconditional, since that's easier to verify than checking
that each branch gets it right.

---

Based on your backtrace, here's what I think is wrong. This is largely untested: it passes tests for me, but then, so did the wrong version.

I notice you're running on a 32-bit architecture - perhaps this bug isn't visible on x86-64 (which is what I'm using)? I'll try building a 32-bit GLib and see whether I can reproduce the crash there.
Comment 3 Simon McVittie 2011-11-23 11:30:51 UTC
This will also need applying on 2.30, otherwise this will regress in 2.30.3.
Comment 4 Simon McVittie 2011-11-23 12:19:05 UTC
Should be fixed in a8ee10cc7 (2.30.3), 968ef5f5f (2.31.3). I can't close this bug (I don't have editbugs privileges).
Comment 5 jeff 2011-11-23 14:10:49 UTC
gdbus-proxy test confirm that the bug was solved so we can close it.

Thanks Simon.