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 752827 - rss: sigsegv if I'm trying to add second channel without waiting to finish first
rss: sigsegv if I'm trying to add second channel without waiting to finish first
Status: RESOLVED FIXED
Product: libgrss
Classification: Other
Component: General
0.7.x
Other Linux
: High normal
: ---
Assigned To: Libgrss Maintainers
Libgrss Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-07-24 13:34 UTC by Igor Gnatenko
Modified: 2015-07-26 17:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
feed-channel: Clear cancellable pointer after cancelling (1012 bytes, patch)
2015-07-26 17:37 UTC, Carlos Garnacho
committed Details | Review

Description Igor Gnatenko 2015-07-24 13:34:27 UTC


Thread 5 (Thread 0x7fffe5d75700 (LWP 21561))

  • #0 syscall
  • #1 g_cond_wait_until
  • #2 g_async_queue_pop_intern_unlocked
  • #3 g_async_queue_timeout_pop
  • #4 g_thread_pool_thread_proxy
  • #5 g_thread_proxy
  • #6 start_thread
  • #7 clone

Thread 1 (Thread 0x7ffff7f0d900 (LWP 21513))

  • #0 g_cancellable_cancel
  • #1 grss_feed_channel_fetch_cancel
    at feed-channel.c line 1277
  • #2 cancel_all_pending
    at feeds-pool.c line 72
  • #3 remove_currently_listened
    at feeds-pool.c line 84
  • #4 grss_feeds_pool_listen
    at feeds-pool.c line 238
  • #5 feeds_retrieve_cb
    at tracker-miner-rss.c line 1190
  • #6 g_simple_async_result_complete
  • #7 tracker_sparql_backend_real_query_async_co
    at /home/brain/jhbuild/checkout/tracker/src/libtracker-sparql-backend/tracker-backend.vala line 108
  • #8 g_simple_async_result_complete
  • #9 complete_in_idle_cb
  • #10 g_main_context_dispatch
  • #11 g_main_context_iterate.isra
  • #12 g_main_loop_run
  • #13 main
    at tracker-main.c line 162


I have not looked into backtrace yet, so probably bug in libgrss
Comment 1 Roberto Guido 2015-07-25 17:09:51 UTC
I can guess the issue is about missing clearing of the GCancellable in grss_feed_channel_fetch_cancel(), but how can I replicate this issue?
Comment 2 Igor Gnatenko 2015-07-25 17:14:47 UTC
(In reply to Roberto Guido from comment #1)
> I can guess the issue is about missing clearing of the GCancellable in
> grss_feed_channel_fetch_cancel(), but how can I replicate this issue?

Run tracker RSS miner from master. Add channel via miner utility, when you see that it fetching feeds - add another  channel. You will see crash.
Comment 3 Igor Gnatenko 2015-07-25 17:43:49 UTC
How do I:
$ tracker reset -r && tracker control -s && killall tracker-miner-rss && ~/jhbuild/install/libexec/tracker-miner-rss -v 3
[snipped]
(tracker-miner-rss:9694): Tracker-DEBUG: Miner:'RSS' noticed store availability has changed to AVAILABLE


In another terminal:
$ ~/jhbuild/install/libexec/tracker-miner-rss -a https://planet.gnome.org/atom.xml

miner gets:
(tracker-miner-rss:9694): Tracker-DEBUG: Indexing channel 'https://planet.gnome.org/atom.xml'
Tracker-Message:   '(null)' (https://planet.gnome.org/atom.xml) - update interval of 20 minutes
Tracker-Message: Retrieving and scheduling feeds...


Again in another terminal (don't wait while grss will fetch items):
$ ~/jhbuild/install/libexec/tracker-miner-rss -a https://planet.fedoraproject.org/atom.xml

miner gets:
(tracker-miner-rss:9694): Tracker-DEBUG: Indexing channel 'https://planet.fedoraproject.org/atom.xml'
Tracker-Message:   '(null)' (https://planet.fedoraproject.org/atom.xml) - update interval of 20 minutes
Segmentation fault (core dumped)
Comment 4 Carlos Garnacho 2015-07-26 17:37:24 UTC
Created attachment 308183 [details] [review]
feed-channel: Clear cancellable pointer after cancelling

Otherwise the pointer will be left pointing to the previous cancellable
location, and crash if we try grss_feed_channel_fetch_all_finish() again,
because it will try to cancel all previous operations first.
Comment 5 Igor Gnatenko 2015-07-26 17:40:55 UTC
Attachment 308183 [details] pushed as 192d664 - feed-channel: Clear cancellable pointer after cancelling