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 724847 - Segmentation fault on "gsettings list-recursively"
Segmentation fault on "gsettings list-recursively"
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gsettings
2.39.x
Other Linux
: Normal normal
: ---
Assigned To: Allison Karlitskaya (desrt)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-02-21 02:23 UTC by sworddragon2
Modified: 2016-07-04 14:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GDB backtrace (1.62 KB, text/plain)
2014-02-21 02:23 UTC, sworddragon2
  Details
[PATCH] gsettings: Don't crash when no schemas are installed (1.50 KB, patch)
2016-02-24 18:02 UTC, Jan Alexander Steffens (heftig)
accepted-commit_now Details | Review

Description sworddragon2 2014-02-21 02:23:40 UTC
Created attachment 269868 [details]
GDB backtrace

After doing a "dpkg-reconfigure --force -a" on my system I have noticed that "gsettings list-recursively" is crashing. In the attachments is a GDB backtrace with debug symbols.
Comment 1 Allison Karlitskaya (desrt) 2014-02-21 03:19:24 UTC
Confirming: gsettings list-recursively will indeed segfault if no valid schema sources are found.
Comment 2 sworddragon2 2014-02-21 03:47:51 UTC
I'm also wondering which package on "dpkg-reconfigure --force -a" caused the schema to disappear as I'm noticing a weird behavior of my system. Some applications are already complaining about the missing schema and my cache doesn't build up anymore which results in missing icons and an empty startmenu.

Maybe I can figure it out on reinstalling every package and making some intersections if this problem is reproducible. But I have encountered a really serious bug.
Comment 3 Koop Mast (kwm) 2015-11-18 16:09:59 UTC
This just happened to me with glib 2.44.1 and 2.46.2.

gsettings list crashes when there are no glib schema files installed.

gsettingsschema.c:g_settings_schema_source_new_from_directory() returns NULL if gschemas.compiled is not present/no schemas are installed in the glib-2.0/schemas directory. Which results in  settingsschema.c:g_settings_schema_source_ref() to try look at a element in a NULL pointer.

Program terminated with signal SIGSEGV, Segmentation fault.
  • #0 g_settings_schema_source_ref
    at gsettingsschema.c line 210
  • #0 g_settings_schema_source_ref
    at gsettingsschema.c line 210
  • #1 main
    at gsettings-tool.c line 700

Comment 4 Jan Alexander Steffens (heftig) 2016-02-24 18:02:56 UTC
Created attachment 322262 [details] [review]
[PATCH] gsettings: Don't crash when no schemas are installed

Still doesn't behave well ("gsettings help" causes an error),
but at least there's no segfault anymore.
Comment 5 Matthias Clasen 2016-02-25 19:10:47 UTC
Review of attachment 322262 [details] [review]:

looks good to me