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 759280 - g_regex_match CRITICALs when running rygel
g_regex_match CRITICALs when running rygel
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
1.6.x
Other All
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2015-12-10 00:20 UTC by Debarshi Ray
Modified: 2016-04-21 14:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libtracker-data: Silence a CRITICAL (1.03 KB, patch)
2015-12-10 00:22 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2015-12-10 00:20:49 UTC
Running rygel with G_DEBUG=fatal-criticals leads to this:

(gdb) bt full
  • #0 g_logv
    at gmessages.c line 324
  • #1 g_logv
    at gmessages.c line 1081
  • #2 g_log
    at gmessages.c line 1119
  • #3 g_return_if_fail_warning
    at gmessages.c line 1128
  • #4 g_regex_match_full
    at gregex.c line 1793
  • #5 g_regex_match
    at gregex.c line 1711
  • #6 function_sparql_regex
    at tracker-db-interface-sqlite.c line 564
  • #7 sqlite3VdbeExec
    at sqlite3.c line 74538
  • #8 sqlite3_step
    at sqlite3.c line 71540
  • #9 sqlite3_step
    at sqlite3.c line 6065
  • #10 db_cursor_iter_next
    at tracker-db-interface-sqlite.c line 891
  • #11 db_cursor_iter_next
    at tracker-db-interface-sqlite.c line 2173
  • #12 rygel_tracker_search_container_get_children_count_co
    at /home/rishi/devel/rygel/git/rygel/src/plugins/tracker/rygel-tracker-search-container.vala line 222
  • #13 rygel_tracker_search_container_get_children_count_ready
    at /home/rishi/devel/rygel/git/rygel/src/plugins/tracker/rygel-tracker-search-container.vala line 220
  • #14 g_simple_async_result_complete
    at gsimpleasyncresult.c line 801
  • #15 rygel_tracker_selection_query_real_execute_co
    at /home/rishi/devel/rygel/git/rygel/src/plugins/tracker/rygel-tracker-selection-query.vala line 82
  • #16 rygel_tracker_selection_query_execute_ready
    at /home/rishi/devel/rygel/git/rygel/src/plugins/tracker/rygel-tracker-selection-query.vala line 91
  • #17 g_simple_async_result_complete
    at gsimpleasyncresult.c line 801
  • #18 tracker_sparql_backend_real_query_async_co
    at /home/carlos/Source/gnome/tracker/src/libtracker-sparql-backend/tracker-backend.vala line 108
  • #19 g_simple_async_result_complete
    at gsimpleasyncresult.c line 801
  • #20 complete_in_idle_cb
    at gsimpleasyncresult.c line 813
  • #21 g_main_context_dispatch
    at gmain.c line 3154
  • #22 g_main_context_dispatch
    at gmain.c line 3769
  • #23 g_main_context_iterate
    at gmain.c line 3840
  • #24 g_main_loop_run
    at gmain.c line 4034
  • #25 rygel_main_run
    at /home/rishi/devel/rygel/git/rygel/src/rygel/rygel-main.vala line 87
  • #26 rygel_main_main
    at /home/rishi/devel/rygel/git/rygel/src/rygel/rygel-main.vala line 303
  • #27 main
    at /home/rishi/devel/rygel/git/rygel/src/rygel/rygel-main.vala line 276

Comment 1 Debarshi Ray 2015-12-10 00:22:55 UTC
Created attachment 317085 [details] [review]
libtracker-data: Silence a CRITICAL
Comment 2 Jens Georg 2015-12-10 07:42:47 UTC
I'm also curious where that NULL is coming from.
Comment 3 Debarshi Ray 2015-12-10 12:13:21 UTC
From #tracker on GIMPNet:

11:42 <rishi> ssam2: aleksander0m: garnacho: Hey! Does this make sense:         
      https://bugzilla.gnome.org/show_bug.cgi?id=759280 ?
11:47 <garnacho> rishi: I'm principle yes, I'm curious to which query triggers  
      this though
11:48 <garnacho> I guess you could receive nulls on things like . FILTER        
      (REGEX(nco:fullname(?u), ...)) if fullname is actually null
11:48 <rishi> Something from rygel. I can dig it out a bit later.
11:51 <garnacho> rishi: no worries, I think I can imagine other scenarios       
      where you may pass nothing there
12:09 <garnacho> rishi: and suspicions confirmed, please push :)
12:10 <rishi> garnacho: Ok.
Comment 4 Carlos Garnacho 2015-12-10 12:16:24 UTC
FWIW, this may happen on queries where the regex value is unbound and not actually present for the element at hand, eg:

  select ?u { ?u a nco:Contact . FILTER (REGEX (nco:fullname(?u), "foo"))}

The sqlite engine would typically make this invisible (never pass nulls to regex()) if the query ensures the value is bound, eg:

  select ?u { ?u a nco:Contact ; nco:fullname ?fullname . FILTER (REGEX (?fullname, "foo"))}
Comment 5 Debarshi Ray 2015-12-10 12:18:47 UTC
Push to master and all the way down to tracker-1.2.
Comment 6 Debarshi Ray 2016-04-21 14:50:30 UTC
Comment on attachment 317085 [details] [review]
libtracker-data: Silence a CRITICAL

Forgot to update the status.
Comment 7 Jens Georg 2016-04-21 14:52:59 UTC
Could you track down where that was coming from in Rygel?