GNOME Bugzilla – Bug 744861
tests: fix a race in context-test
Last modified: 2015-02-20 23:18:19 UTC
There is a random crash due to a race when destroying the timeout source. Although I don't quite get what the request_failed is supposed to check, this patch fixes this race. ==25889== Invalid read of size 8 ==25889== at 0x5D531E5: g_source_destroy (gmain.c:1224) ==25889== by 0x4037B4: request_failed (context-test.c:22) ==25889== by 0x5AC9F63: _g_closure_invoke_va (gclosure.c:831) ==25889== by 0x5AE3B5F: g_signal_emit_valist (gsignal.c:3218) ==25889== by 0x5AE43AE: g_signal_emit (gsignal.c:3365) ==25889== by 0x4E9C66E: soup_message_finished (soup-message.c:1141) ==25889== by 0x4EACC3A: request_finished (soup-server.c:1132) ==25889== by 0x4EA1784: soup_message_io_finished (soup-message-io.c:173) ==25889== by 0x4EAB56E: soup_server_finalize (soup-server.c:226) ==25889== by 0x5ACED85: g_object_unref (gobject.c:3170) ==25889== by 0x40583F: soup_test_server_quit_unref (test-utils.c:509) ==25889== by 0x4045DB: main (context-test.c:352) ==25889== Address 0x7be1c30 is 32 bytes inside a block of size 104 free'd ==25889== at 0x4C2ACE9: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==25889== by 0x5D5A7FE: g_free (gmem.c:190) ==25889== by 0x5D51D57: g_source_unref_internal (gmain.c:2032) ==25889== by 0x5D54C1F: g_main_dispatch (gmain.c:3138) ==25889== by 0x5D54C1F: g_main_context_dispatch (gmain.c:3710) ==25889== by 0x5D54E87: g_main_context_iterate.isra.29 (gmain.c:3781) ==25889== by 0x5D551B1: g_main_loop_run (gmain.c:3975) ==25889== by 0x4050E4: run_server_thread (test-utils.c:311) ==25889== by 0x5D7B7B4: g_thread_proxy (gthread.c:764) ==25889== by 0x6D4F529: start_thread (pthread_create.c:310) ==25889== by 0x614479C: clone (clone.S:109)
Created attachment 297451 [details] [review] tests: fix a race in context-test
Comment on attachment 297451 [details] [review] tests: fix a race in context-test >source. Although I don't quite get what the request_failed is supposed >to check, this patch fixes this race. yeah, I'm not quite sure why the timeout is there now either, but the patch looks right
Attachment 297451 [details] pushed as 4d5db07 - tests: fix a race in context-test