Bug 72303 - Invalid g_source_remove use leads to error with new glib (2.39)
Summary: Invalid g_source_remove use leads to error with new glib (2.39)
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-04 10:56 UTC by Sebastien Bacher
Modified: 2013-12-04 16:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Sebastien Bacher 2013-12-04 10:56:53 UTC
The issue seems to happen every time the status change (e.g when you get online), when using glib 2.39

The issue has been reported on launchpad, https://bugs.launchpad.net/ubuntu/+source/telepathy-gabble/+bug/1257686

The glib change that makes it error out on such invalid use is
https://git.gnome.org/browse/glib/commit/?id=a919be3d39150328874ff647fb2c2be7af3df996

"#0 0x00007f0d21694789 in g_logv (log_domain=0x7f0d216d0e2e "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffff08ab988) at /build/buildd/glib2.0-2.39.1/./glib/gmessages.c:1019
domain = 0x0
data = 0x0
depth = 1
log_func = 0x426a30 <_start+272>
domain_fatal_mask = <optimized out>
masquerade_fatal = 0
test_level = <optimized out>
was_fatal = <optimized out>
was_recursion = <optimized out>
msg = 0x1f140e0 "Source ID 4 was not found when attempting to remove it"
msg_alloc = 0x1f140e0 "Source ID 4 was not found when attempting to remove it"
i = 3
#1 0x00007f0d21694922 in g_log (log_domain=log_domain@entry=0x7f0d216d0e2e "GLib", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7f0d216d84b0 "Source ID %u was not found when attempting to remove it") at /build/buildd/glib2.0-2.39.1/./glib/gmessages.c:1059
args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7ffff08aba60, reg_save_area = 0x7ffff08ab9a0}}
#2 0x00007f0d2168c77c in g_source_remove (tag=4) at /build/buildd/glib2.0-2.39.1/./glib/gmain.c:2210
source = 0x0
__FUNCTION__ = "g_source_remove"
#3 0x00007f0d1f85cadc in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
No symbol table info available.
#4 0x00007f0d1f85c40c in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
No symbol table info available.
#5 0x00007f0d21b5a9c8 in g_cclosure_marshal_generic (closure=0x183b040, return_gvalue=0x0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=0x0) at /build/buildd/glib2.0-2.39.1/./gobject/gclosure.c:1454
rtype = <optimized out>
rvalue = 0x7ffff08abc10
n_args = 5
atypes = <optimized out>
i = <optimized out>
cif = {abi = FFI_UNIX64, nargs = 5, arg_types = 0x7ffff08abbd0, rtype = 0x7f0d1f85ced0 <ffi_type_void>, bytes = 0, flags = 0}
cc = 0x183b040
enum_tmpval = <optimized out>
tmpval_used = 0
#6 0x00007f0d21b5a188 in g_closure_invoke (closure=0x183b040, return_value=0x0, n_param_values=4, param_values=0x7ffff08abea0, invocation_hint=0x7ffff08abe40) at /build/buildd/glib2.0-2.39.1/./gobject/gclosure.c:777
marshal = 0x425100 <g_cclosure_marshal_generic@plt>
marshal_data = 0x0
in_marshal = 0
real_closure = 0x183b020
__FUNCTION__ = "g_closure_invoke"
#7 0x00007f0d21b6bb4d in signal_emit_unlocked_R (node=node@entry=0x181a6b0, detail=detail@entry=0, instance=instance@entry=0x181ac30, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7ffff08abea0) at /build/buildd/glib2.0-2.39.1/./gobject/gsignal.c:3586
tmp = <optimized out>
handler = 0x180fc10
accumulator = 0x0
emission = {next = 0x0, instance = 0x181ac30, ihint = {signal_id = 6, detail = 0, run_type = G_SIGNAL_RUN_FIRST}, state = EMISSION_RUN, chain_type = 4}
handler_list = 0x180fc10
return_accu = 0x0
accu = {g_type = 0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
signal_id = 6
max_sequential_handler_number = 348
return_value_altered = 0
#8 0x00007f0d21b73839 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7ffff08ac068) at /build/buildd/glib2.0-2.39.1/./gobject/gsignal.c:3330
instance_and_params = 0x7ffff08abea0
signal_return_type = <optimized out>
param_values = 0x7ffff08abeb8
i = <optimized out>
n_params = <optimized out>
__FUNCTION__ = "g_signal_emit_valist"
#9 0x00007f0d21b73af2 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at /build/buildd/glib2.0-2.39.1/./gobject/gsignal.c:3386
var_args = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7ffff08ac140, reg_save_area = 0x7ffff08ac080}}
#10 0x00007f0d223a75f6 in ?? () from /usr/lib/x86_64-linux-gnu/libtelepathy-glib.so.0
No symbol table info available.
#11 0x00007f0d1f85cadc in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
No symbol table info available.
#12 0x00007f0d1f85c40c in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
No symbol table info available.
#13 0x00007f0d21b5a9c8 in g_cclosure_marshal_generic (closure=0x7ffff08ac5b0, return_gvalue=0x0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=0x7f0d2249f550) at /build/buildd/glib2.0-2.39.1/./gobject/gclosure.c:1454
rtype = <optimized out>
rvalue = 0x7ffff08ac340
n_args = 5
atypes = <optimized out>
i = <optimized out>
cif = {abi = FFI_UNIX64, nargs = 5, arg_types = 0x7ffff08ac300, rtype = 0x7f0d1f85ced0 <ffi_type_void>, bytes = 0, flags = 0}
cc = 0x7ffff08ac5b0
enum_tmpval = <optimized out>
tmpval_used = 0
#14 0x00007f0d22c467dd in ?? () from /usr/lib/x86_64-linux-gnu/libdbus-glib-1.so.2
No symbol table info available.
#15 0x00007f0d22a0fe36 in ?? () from /lib/x86_64-linux-gnu/libdbus-1.so.3
No symbol table info available.
#16 0x00007f0d22a02a01 in dbus_connection_dispatch () from /lib/x86_64-linux-gnu/libdbus-1.so.3
No symbol table info available.
#17 0x00007f0d22c43c95 in ?? () from /usr/lib/x86_64-linux-gnu/libdbus-glib-1.so.2
No symbol table info available.
#18 0x00007f0d2168d8c4 in g_main_dispatch (context=0x18162e0) at /build/buildd/glib2.0-2.39.1/./glib/gmain.c:3066
dispatch = 0x7f0d22c43c80
prev_source = 0x0
was_in_call = 0
user_data = 0x0
callback = 0x0
cb_funcs = <optimized out>
cb_data = 0x0
need_destroy = <optimized out>
source = 0x1816400
current = 0x1824960
i = 0
#19 g_main_context_dispatch (context=context@entry=0x18162e0) at /build/buildd/glib2.0-2.39.1/./glib/gmain.c:3640
No locals.
#20 0x00007f0d2168db08 in g_main_context_iterate (context=0x18162e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/buildd/glib2.0-2.39.1/./glib/gmain.c:3711
max_priority = 0
timeout = 0
some_ready = 1
nfds = <optimized out>
allocated_nfds = 4
fds = 0x187d110
#21 0x00007f0d2168df0a in g_main_loop_run (loop=0x1823530) at /build/buildd/glib2.0-2.39.1/./glib/gmain.c:3905
__FUNCTION__ = "g_main_loop_run"
#22 0x00007f0d2247b932 in tp_run_connection_manager () from /usr/lib/x86_64-linux-gnu/libtelepathy-glib.so.0
No symbol table info available.
#23 0x0000000000426d0c in gabble_main ()
No symbol table info available.
#24 0x00007f0d21081de5 in __libc_start_main (main=0x426900 <main>, argc=1, ubp_av=0x7ffff08aca98, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffff08aca88) at libc-start.c:260
result = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -6268019489097837004, 4352288, 140737229015696, 0, 0, 6267995207025366580, 6276266821584885300}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x4a4670 <__libc_csu_init>, 0x7ffff08aca98}, data = {prev = 0x0, cleanup = 0x0, canceltype = 4867696}}}
not_first_call = <optimized out>
#25 0x0000000000426949 in _start ()
No symbol table info available. "
Comment 1 Martin Pitt 2013-12-04 10:59:18 UTC
Confirming, since that glib update Jabber (through t-gabble) cannot connect due to this crash.
Comment 2 Sebastien Bacher 2013-12-04 11:03:01 UTC
Seems like it could be rather a bug in telepathy-glib, other connectors have the same issue, e.g telepathy-salut

"#0  0xb72e015d in g_logv (log_domain=log_domain@entry=0xb732040e "GLib", 
    log_level=<optimized out>, log_level@entry=G_LOG_LEVEL_CRITICAL, 
    format=format@entry=0xb7326dcc "Source ID %u was not found when attempting to remove it", args=args@entry=0xbfb5dddc "\005")
    at /build/buildd/glib2.0-2.39.1/./glib/gmessages.c:1019
#1  0xb72e0273 in g_log (log_domain=log_domain@entry=0xb732040e "GLib", 
    log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, 
    format=format@entry=0xb7326dcc "Source ID %u was not found when attempting to remove it") at /build/buildd/glib2.0-2.39.1/./glib/gmessages.c:1059
#2  0xb72d7a5c in g_source_remove (tag=5)
    at /build/buildd/glib2.0-2.39.1/./glib/gmain.c:2210
#3  0xb71af8ab in no_more_connections (conn=0x9d419e8) at run.c:113
#4  0xb73a7549 in g_cclosure_marshal_VOID__VOIDv (closure=0x9d4c888, 
    return_value=0x0, instance=0x9d419e8, args=0xbfb5dfac "", 
    marshal_data=0x0, n_params=0, param_types=0x0)
    at /build/buildd/glib2.0-2.39.1/./gobject/gmarshal.c:115
#5  0xb73a5aee in _g_closure_invoke_va (closure=closure@entry=0x9d4c888, 
    return_value=return_value@entry=0x0, instance=instance@entry=0x9d419e8, 
    args=args@entry=0xbfb5dfac "", n_params=0, param_types=0x0)
    at /build/buildd/glib2.0-2.39.1/./gobject/gclosure.c:840
#6  0xb73bee70 in g_signal_emit_valist (instance=instance@entry=0x9d419e8, 
    signal_id=signal_id@entry=7, detail=detail@entry=0, 
    var_args=var_args@entry=0xbfb5dfac "")
    at /build/buildd/glib2.0-2.39.1/./gobject/gsignal.c:3238
#7  0xb73bf9e3 in g_signal_emit (instance=instance@entry=0x9d419e8, 
    signal_id=7, detail=detail@entry=0)
    at /build/buildd/glib2.0-2.39.1/./gobject/gsignal.c:3386
#8  0xb70c5def in connection_shutdown_finished_cb (conn=0x9d54108, 
    data=0x9d419e8) at base-connection-manager.c:642
#9  0xb73a7549 in g_cclosure_marshal_VOID__VOIDv (closure=0x9d4f450, 
    return_value=0x0, instance=0x9d54108, args=0xbfb5e17c "\r", 
    marshal_data=0x0, n_params=0, param_types=0x0)
    at /build/buildd/glib2.0-2.39.1/./gobject/gmarshal.c:115
#10 0xb73a5aee in _g_closure_invoke_va (closure=closure@entry=0x9d4f450, 
    return_value=return_value@entry=0x0, instance=instance@entry=0x9d54108, 
    args=args@entry=0xbfb5e17c "\r", n_params=0, param_types=0x0)
    at /build/buildd/glib2.0-2.39.1/./gobject/gclosure.c:840
#11 0xb73bee70 in g_signal_emit_valist (instance=instance@entry=0x9d54108, 
    signal_id=signal_id@entry=21, detail=detail@entry=0, 
    var_args=var_args@entry=0xbfb5e17c "\r")
    at /build/buildd/glib2.0-2.39.1/./gobject/gsignal.c:3238
#12 0xb73bf9e3 in g_signal_emit (instance=instance@entry=0x9d54108, 
    signal_id=21, detail=detail@entry=0)
    at /build/buildd/glib2.0-2.39.1/./gobject/gsignal.c:3386
#13 0xb70c3c27 in tp_base_connection_finish_shutdown (self=0x9d54108)
    at base-connection.c:2896
#14 0x0807f310 in ?? ()
#15 0xb7455515 in g_simple_async_result_complete (simple=0x9d37618)
    at /build/buildd/glib2.0-2.39.1/./gio/gsimpleasyncresult.c:777
#16 0xb769e640 in ?? ()
   from /usr/lib/telepathy/salut-0/lib/libwocky-telepathy-salut-0.8.1.so
..."
Comment 3 Simon McVittie 2013-12-04 13:13:26 UTC
Already fixed in git for 0.20.5 (if ever released), 0.22.1 and 0.23.1. Sorry, no release yet (I think all the maintainers are doing other things).

http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=3c1c43cc2a13df3d5f56e20d49c7bd136486b372
Comment 4 Sebastien Bacher 2013-12-04 16:12:00 UTC
Thanks Simon, the fix is indeed working!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.