Bug 991178

Summary: [abrt] tracker-0.16.1-3.fc19: g_settings_schema_get_value: Process /usr/libexec/tracker-miner-fs was killed by signal 5 (SIGTRAP)
Product: [Fedora] Fedora Reporter: clive gerada <cgerada>
Component: trackerAssignee: Igor Gnatenko <ignatenko>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: cgerada, dakingun, debarshir, q2dg, stephent98
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:a6a83f01f507558c1363186212e1ecd573c974eb
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 17:10:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: dso_list
none
File: environ
none
File: limits
none
File: maps none

Description clive gerada 2013-08-01 19:11:49 UTC
Description of problem:
always get this error after booting.

to reproduce it I just reboot.

Version-Release number of selected component:
tracker-0.16.1-3.fc19

Additional info:
reporter:       libreport-2.1.5
backtrace_rating: 4
cmdline:        /usr/libexec/tracker-miner-fs
crash_function: g_settings_schema_get_value
executable:     /usr/libexec/tracker-miner-fs
kernel:         3.10.3-300.fc19.i686.PAE
runlevel:       N 5
uid:            1000

Truncated backtrace:
Thread no. 1 (7 frames)
 #2 g_settings_schema_get_value at gsettingsschema.c:640
 #3 g_settings_schema_key_init at gsettingsschema.c:751
 #4 g_settings_bind_with_mapping at gsettings.c:2604
 #5 g_settings_bind at gsettings.c:2548
 #6 config_constructed at tracker-config.c:740
 #8 g_object_new_valist at gobject.c:1836
 #10 tracker_config_new at tracker-config.c:774

Comment 1 clive gerada 2013-08-01 19:12:09 UTC
Created attachment 781716 [details]
File: backtrace

Comment 2 clive gerada 2013-08-01 19:12:12 UTC
Created attachment 781717 [details]
File: cgroup

Comment 3 clive gerada 2013-08-01 19:12:17 UTC
Created attachment 781718 [details]
File: core_backtrace

Comment 4 clive gerada 2013-08-01 19:12:24 UTC
Created attachment 781719 [details]
File: dso_list

Comment 5 clive gerada 2013-08-01 19:12:30 UTC
Created attachment 781720 [details]
File: environ

Comment 6 clive gerada 2013-08-01 19:12:33 UTC
Created attachment 781721 [details]
File: limits

Comment 7 clive gerada 2013-08-01 19:12:40 UTC
Created attachment 781723 [details]
File: maps

Comment 8 Steve Tyler 2013-08-05 04:35:24 UTC
The attached backtrace has this message:
        msg = 0x9834958 "Settings schema 'org.freedesktop.Tracker.Miner.Files' does not contain a key named 'sched-idle'"

I'm not a tracker developer, so this is a guess, but what do you get when you verify the tracker package?

$ rpm -V tracker

The sched-idle key shows up with:

$ grep -s sched-idle $(rpm -ql tracker)
Binary file /usr/libexec/tracker-extract matches
Binary file /usr/libexec/tracker-miner-fs matches
/usr/share/glib-2.0/schemas/org.freedesktop.Tracker.Extract.gschema.xml:    <key name="sched-idle" enum="org.freedesktop.Tracker.TrackerSchedIdle">
/usr/share/glib-2.0/schemas/org.freedesktop.Tracker.Miner.Files.gschema.xml:    <key name="sched-idle" enum="org.freedesktop.Tracker.TrackerSchedIdle">

Tested with:
$ rpm -q tracker
tracker-0.16.1-3.fc19.x86_64

Comment 9 Steve Tyler 2013-08-05 07:50:50 UTC
Here's something else to check:
$ gsettings get org.freedesktop.Tracker.Miner.Files sched-idle
'first-index'

Comment 10 Steve Tyler 2013-08-05 08:50:32 UTC
Attempt to reproduce Bug 991178 by renaming key sched-idle to xsched-idle and recompiling schemas.

reporter:       libreport-2.1.6
backtrace_rating: 4
cmdline:        /usr/libexec/tracker-miner-fs
crash_function: g_settings_schema_get_value
executable:     /usr/libexec/tracker-miner-fs
kernel:         3.10.4-300.fc19.x86_64
package:        tracker-0.16.1-3.fc19
reason:         Process /usr/libexec/tracker-miner-fs was killed by signal 5 (SIGTRAP)
runlevel:       N 5
uid:            1000

Comment 11 Steve Tyler 2013-08-05 09:20:42 UTC
Procedure to reproduce:
1. Open in a text editor:
   $ sudo vi /usr/share/glib-2.0/schemas/org.freedesktop.Tracker.Miner.Files.gschema.xml
2. Change "sched-idle" to "xsched-idle".
3. Recompile schemas:
   $ sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
4. Reboot.

abrt reports a problem.
ps shows that /usr/libexec/tracker-store is running:
$ ps -ef | grep -i track

Tested with:
$ qemu-kvm -m 4096 -hda f19-test-4.img -cdrom ~/xfr/fedora/F19/Fedora-19-x86_64-DVD.iso -vga std -boot menu=on

Comment 12 Steve Tyler 2013-08-05 12:50:29 UTC
Reinstalling the tracker package appears to restore the sched-idle key in the xml file and in gschemas.compiled.

The bug here, IMO, is that tracker is crashing on a missing key, instead of logging an error message and continuing normally using a default value for sched-idle.

$ rpm -V tracker
$ gsettings get org.freedesktop.Tracker.Miner.Files sched-idle

$ sudo yum reinstall tracker

$ rpm -V tracker
$ gsettings get org.freedesktop.Tracker.Miner.Files sched-idle

Files:
/usr/share/glib-2.0/schemas/org.freedesktop.Tracker.Miner.Files.gschema.xml
/usr/share/glib-2.0/schemas/gschemas.compiled

$ rpm -q tracker glib2
tracker-0.16.1-3.fc19.x86_64
glib2-2.36.3-2.fc19.x86_64

Tested with:
$ qemu-kvm -m 4096 -hda f19-test-4.img -cdrom ~/xfr/fedora/F19/Fedora-19-x86_64-DVD.iso -vga std -boot menu=on

Comment 13 Steve Tyler 2013-08-06 12:13:21 UTC
(In reply to Steve Tyler from comment #12)
...
> The bug here, IMO, is that tracker is crashing on a missing key, instead of
> logging an error message and continuing normally using a default value for
> sched-idle.
...

The problem isn't with tracker, it is with glib2. The glib2 function g_settings_schema_get_value() calls g_error() when a key cannot be found. The glib2 documentation says:

"Error messages are always fatal, resulting in a call to abort() to terminate the application. This function will result in a core dump; don't use it for errors you expect. Using this function indicates a bug in your program, i.e. an assertion failure."
https://developer.gnome.org/glib/2.36/glib-Message-Logging.html#g-error

Missing keys may be unexpected, but they should not cause the program to dump core and ABRT to report a bug. Missing keys are a configuration bug -- they should be reported in a log file. The appropriate functions are g_warning() and g_critical():
https://developer.gnome.org/glib/2.36/glib-Message-Logging.html#g-warning
https://developer.gnome.org/glib/2.36/glib-Message-Logging.html#g-critical

Source from glib2-debuginfo-2.36.3-2.fc19.x86_64.rpm:
$ less -N usr/src/debug/glib-2.36.3/gio/gsettingsschema.c
...
    630 GVariantIter *
    631 g_settings_schema_get_value (GSettingsSchema *schema,
    632                              const gchar     *key)
    633 {
    634   GVariantIter *iter;
    635   GVariant *value;
    636 
    637   value = gvdb_table_get_raw_value (schema->table, key);
    638 
    639   if G_UNLIKELY (value == NULL || !g_variant_is_of_type (value, G_VARIANT_TYPE_TUPLE))
    640     g_error ("Settings schema '%s' does not contain a key named '%s'", schema->id, key);
    641 
    642   iter = g_variant_iter_new (value);
    643   g_variant_unref (value);
    644 
    645   return iter;
    646 }
...

Comment 14 Steve Tyler 2013-08-09 06:23:26 UTC
Snippet from attached backtrace:
...
Thread 1 (Thread 0xb67a9a00 (LWP 1536)):
#0  g_logv (log_domain=log_domain@entry=0xb75fd058 "GLib-GIO", log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0xb761683c "Settings schema '%s' does not contain a key named '%s'", args=args@entry=0xbff593cc "\020\b\203\t\a\334\005\b\324\377|\267\371\001\067\267\070\022:\267") at gmessages.c:981
...
        msg = 0x9834958 "Settings schema 'org.freedesktop.Tracker.Miner.Files' does not contain a key named 'sched-idle'"
...

Comment 15 Fedora Admin XMLRPC Client 2014-07-26 17:11:35 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 16 Fedora Admin XMLRPC Client 2014-07-27 06:33:30 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 17 Debarshi Ray 2014-10-14 17:09:31 UTC
Also seen in tracker-0.16.4-2.fc20

Comment 18 Debarshi Ray 2014-10-14 17:09:51 UTC
*** Bug 1081722 has been marked as a duplicate of this bug. ***

Comment 19 Debarshi Ray 2014-10-14 17:10:45 UTC
Missing gsettings keys are an indication of a broken system.

Comment 20 Debarshi Ray 2014-10-14 17:19:32 UTC
*** Bug 992918 has been marked as a duplicate of this bug. ***

Comment 21 clive gerada 2015-09-28 12:19:10 UTC
CLOSED