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 771338 - rhythmbox crashed with SIGSEGV in get_url_cb ( grl-net-wc.c )
rhythmbox crashed with SIGSEGV in get_url_cb ( grl-net-wc.c )
Status: RESOLVED OBSOLETE
Product: grilo
Classification: Other
Component: plugins
0.3.x
Other Linux
: Normal critical
: ---
Assigned To: Victor Toso
grilo-maint
: 771497 771622 773329 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-09-13 01:25 UTC by gnome.vrb
Modified: 2018-09-24 09:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Debug logs ( export GRL_DEBUG=*:* ) (64.99 KB, text/plain)
2016-09-14 03:49 UTC, gnome.vrb
  Details
net: Check for throttling only if set (1.03 KB, patch)
2016-09-15 15:45 UTC, Victor Toso
none Details | Review
tests: add stress test to grl-net-wc (2.17 KB, patch)
2016-09-15 15:45 UTC, Victor Toso
none Details | Review
tests: avoid critical warning on test (756 bytes, patch)
2016-09-15 15:45 UTC, Victor Toso
none Details | Review
net: Check for throttling only if set (1.17 KB, patch)
2016-09-19 14:43 UTC, Victor Toso
committed Details | Review
tests: add stress test to grl-net-wc (2.37 KB, patch)
2016-09-19 14:43 UTC, Victor Toso
committed Details | Review
tests: avoid critical warning on test (760 bytes, patch)
2016-09-19 14:43 UTC, Victor Toso
committed Details | Review
tests: don't always consider the threshold (1.33 KB, patch)
2016-09-19 15:11 UTC, Victor Toso
needs-work Details | Review
tests: include lib-net into make check (696 bytes, patch)
2016-09-19 15:11 UTC, Victor Toso
committed Details | Review

Description gnome.vrb 2016-09-13 01:25:53 UTC
(gdb) bt
  • #0 __GI_raise
    at ../sysdeps/unix/sysv/linux/raise.c line 58
  • #1 __GI_abort
    at abort.c line 89
  • #2 g_assertion_message
  • #3 g_assertion_message_expr
    at ././glib/gtestutils.c line 2452
  • #4 get_url_cb
    at grl-net-wc.c line 730
  • #5 g_timeout_dispatch
    at ././glib/gmain.c line 4672
  • #6 g_main_context_dispatch
    at ././glib/gmain.c line 3201
  • #7 g_main_context_dispatch
    at ././glib/gmain.c line 3854
  • #8 g_main_context_iterate
    at ././glib/gmain.c line 3927
  • #9 g_main_context_iteration
    at ././glib/gmain.c line 3988
  • #10 g_application_run
    at ././gio/gapplication.c line 2381
  • #11 rb_application_run
    at rb-application.c line 655
  • #12 main
    at main.c line 88

Comment 1 gnome.vrb 2016-09-13 01:27:17 UTC
Steps to reproduce:

1. Open Rhythmbox.
2. Click on 'Jamendo' and then on 'Radio France' in side pane.
3. Repeat [2]
4. Rhythmbox crashes.
Comment 2 gnome.vrb 2016-09-13 01:35:38 UTC
A kind and honest request to grilo developers:

Please do a minimal check of libgrilo changes against rhythmbox, like the following:

1. Click the grilo sources in the side pane a few times at random.
2. Try playing a couple of tracks from Jamendo / Radio france.
3. Enable / Disable the grilo plugin a few times ( optional ) 

This will save time and effort on both rhythmbox and grilo side. Thanks for understanding.
Comment 3 gnome.vrb 2016-09-13 02:27:45 UTC
(gdb) p c
$10 = (struct request_clos *) 0x1408530
(gdb) p *c
$11 = {
  self = 0x140a220 [GrlNetWc], 
  url = 0x23a7ef0 "http://www.franceinfo.fr/player", 
  result = 0x1c261f0, 
  cancellable = 0x7fa9e8013d40 [GCancellable], 
  headers = 0x0, 
  source_id = 3385
}
(gdb) p d
$12 = (struct request_clos *) 0x2ab9210
(gdb) p *d
$13 = {
  self = 0x140a220 [GrlNetWc], 
  url = 0x2c4a370 "http://www.franceinter.fr/player", 
  result = 0x29d10a0, 
  cancellable = 0x7fa9e8013d40 [GCancellable], 
  headers = 0x0, 
  source_id = 3384
}
(gdb)
Comment 4 gnome.vrb 2016-09-14 03:48:13 UTC
Issue reproducible with grilo-test-ui-0.3.

Steps to reproduce:

1. Start grilo-test-ui-0.3
2. Double click "Radio France" as soon as the window loads.
3. grilo-test-ui-0.3 crashes.
Comment 5 gnome.vrb 2016-09-14 03:49:24 UTC
Created attachment 335481 [details]
Debug logs ( export GRL_DEBUG=*:* )
Comment 6 Victor Toso 2016-09-15 14:58:48 UTC
Likely, my fault
Comment 7 Victor Toso 2016-09-15 15:45:40 UTC
Created attachment 335653 [details] [review]
net: Check for throttling only if set

Otherwise, we might add several 0 seconds delay on multiple fetch
requests leading to unexpected behavior (assertion)
Comment 8 Victor Toso 2016-09-15 15:45:45 UTC
Created attachment 335654 [details] [review]
tests: add stress test to grl-net-wc
Comment 9 Victor Toso 2016-09-15 15:45:51 UTC
Created attachment 335655 [details] [review]
tests: avoid critical warning on test

As timeout might not be used.
Comment 10 Victor Toso 2016-09-15 20:18:24 UTC
*** Bug 771497 has been marked as a duplicate of this bug. ***
Comment 11 gnome.vrb 2016-09-15 23:14:41 UTC
Not seeing the crash after applying the patch. Thanks Victor !

Can you please add "lib-net" to the test suite, so that it runs with "make check".
Comment 12 Bastien Nocera 2016-09-16 09:18:58 UTC
Review of attachment 335653 [details] [review]:

Add a comment above that condition, otherwise it looks like it's reversed.
Comment 13 Bastien Nocera 2016-09-16 09:20:26 UTC
Review of attachment 335654 [details] [review]:

Sure. Please add some comments about what each section is doing (setting up server, launching client tests).
Comment 14 Bastien Nocera 2016-09-16 09:20:57 UTC
Review of attachment 335655 [details] [review]:

::: tests/lib-net.c
@@ +119,2 @@
   if (f->num_operations == 0) {
+    if (f->timeout)

f->timeout > 0
Comment 15 Adrien Plazas 2016-09-18 15:38:44 UTC
*** Bug 771622 has been marked as a duplicate of this bug. ***
Comment 16 Victor Toso 2016-09-19 14:43:21 UTC
Created attachment 335860 [details] [review]
net: Check for throttling only if set

Otherwise, we might add several 0 seconds delay on multiple fetch
requests leading to unexpected behavior (assertion)
Comment 17 Victor Toso 2016-09-19 14:43:27 UTC
Created attachment 335861 [details] [review]
tests: add stress test to grl-net-wc
Comment 18 Victor Toso 2016-09-19 14:43:33 UTC
Created attachment 335862 [details] [review]
tests: avoid critical warning on test

As timeout might not be used.
Comment 19 Victor Toso 2016-09-19 14:56:49 UTC
(In reply to vrishab from comment #11)
> Not seeing the crash after applying the patch. Thanks Victor !
> 
> Can you please add "lib-net" to the test suite, so that it runs with "make
> check".

Soon. I found a small issue with small delay test, I'll fix it and submit a patch to include it on test suite too.

Thanks for testing.
Comment 20 Victor Toso 2016-09-19 15:11:02 UTC
Created attachment 335866 [details] [review]
tests: don't always consider the threshold

The threshold should not be considered when requested delay is 0,
otherwise the expected_time could be before the requested_time.
Comment 21 Victor Toso 2016-09-19 15:11:09 UTC
Created attachment 335867 [details] [review]
tests: include lib-net into make check
Comment 22 Bastien Nocera 2016-09-21 13:21:52 UTC
Review of attachment 335860 [details] [review]:

Looks fine.
Comment 23 Bastien Nocera 2016-09-21 13:22:37 UTC
Review of attachment 335861 [details] [review]:

Sure.
Comment 24 Bastien Nocera 2016-09-21 13:23:05 UTC
Review of attachment 335862 [details] [review]:

Yep.
Comment 25 Bastien Nocera 2016-09-21 13:25:07 UTC
Review of attachment 335866 [details] [review]:

> don't always consider the threshold
> 
> The threshold should not be considered when requested delay is 0,
> otherwise the expected_time could be before the requested_time.

I don't understand what this is trying to fix.

::: tests/lib-net.c
@@ +139,2 @@
   /* Some THRESOLD seems necessary as the test time happens before the actual
    * GrlNetWc computation. This test is more about throttling working then

"than precision"
Comment 26 Bastien Nocera 2016-09-21 13:25:26 UTC
Review of attachment 335867 [details] [review]:

Sure.
Comment 27 Victor Toso 2016-09-22 08:15:24 UTC
Attachment 335860 [details] pushed as ca91b28 - net: Check for throttling only if set
Attachment 335861 [details] pushed as e97d89d - tests: add stress test to grl-net-wc
Attachment 335862 [details] pushed as 41f66e9 - tests: avoid critical warning on test
Attachment 335867 [details] pushed as 6ffe445 - tests: include lib-net into make check
Comment 28 Victor Toso 2016-10-21 20:36:29 UTC
*** Bug 773329 has been marked as a duplicate of this bug. ***
Comment 29 Mario Sánchez Prada 2017-02-13 11:23:57 UTC
Just for the record, I can very easily reproduce this crash too in the GNOME Games flatpak from the stable gnome-3-22 branch (still using grilo 0.3.2), just by having a few (10-20) ROMS to load covers from: it crashes in no time while trying to fetch the data.

Fortunately, this seems fixed in the nightly channel due to the fix here (thanks!), meaning that we can cherry pick that to build the flatpak bundle for Games in the stable repo, but it would be even better if there was a stable release of grilo including it, that could be used without patching.

I checked the dates the latest releases of grilo happened and couldn't find a clear pattern to predict when the next one would happen. Any idea?
Comment 30 Victor Toso 2017-02-13 12:42:42 UTC
(In reply to Mario Sánchez Prada from comment #29)
> I checked the dates the latest releases of grilo happened and couldn't find
> a clear pattern to predict when the next one would happen. Any idea?

Yep. Time for a new release, I'll roll one tomorrow. Thanks for the ping :)
Comment 31 GNOME Infrastructure Team 2018-09-24 09:48:38 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/grilo/issues/101.