GNOME Bugzilla – Bug 661628
search in gnome-shell causes segfault in _shell_app_match_search_terms
Last modified: 2011-10-22 20:08:14 UTC
gnome-shell 3.2.0 on Fedora 15 x86_64 with any version of glibc 2.14 log in click on "Activities" then click in "Type to search..." start typing "F-i-r" and crash. (gdb) cont Continuing. [New Thread 0x7fc76c8ff700 (LWP 3913)] Program received signal SIGSEGV, Segmentation fault. __strstr_sse2 (haystack_start=0x0, needle_start=0x3c41d30 "em") at ../string/strstr.c:63 63 while (*haystack && *needle) (gdb) bt
+ Trace 228780
Did you try with another glibc where this does not happen, or why did you mention glibc? Or did you mix it up with glib mentioned in the stacktrace? :)
Created attachment 198971 [details] gdb thread apply all bt full output
Hi Andre, I am mentioning glibc because of this in me dmesg: [ 948.499599] gnome-shell[2321]: segfault at 0 ip 00007fc07e3d79d4 sp 00007fffc6136d80 error 4 in libc-2.14.1.so[7fc07e34a000+18e000] $ rpm -qf /lib64/libc-2.14.1.so glibc-2.14.1-1.x86_64 I tried all builds of glibc for Fedora 15 and I also tried the latest glibc built as of today, which is glibc-2.14.90-11. Even though the segfault is in libc, I think gnome-shell is causing it by passing in invalid pointers. Hence my creating a ticket here and not with Fedora. I built GNOME 3.2.0 against glibc-2.14-5. I upgraded from GNOME 3.1.5 and this started happening. I don't know much about GNOME other than I have been happy with GNOME 3, so I have been doing the upgrade myself to versions 3.1.5 and 3.2.0. Fedora 15 doesn't have any builds for this. GNOME 3.1.5 worked perfectly. gnome-do works, so I have installed it so that I can find stuff. With the gnome-shell search being busted, it's hard to use... I used it all the time, instead of click on "Applications". I am a layman but doesn't haystack_start=0x0 mean bad/invalid pointer? Looking at http://git.gnome.org/browse/gnome-shell/tree/src/shell-app.c?id=3.2.0 Under what conditions could either of these return bad pointer data? p = strstr (app->casefolded_name, term); p = strstr (app->casefolded_exec, term); p = strstr (app->casefolded_description, term); I have attached a gdb full bt for your perusal. Thread 1 is near the bottom and where crash is. Thanks for any pointers you can offer up.
(In reply to comment #3) > Even though the segfault is in libc, I think gnome-shell is causing it by > passing in invalid pointers. glibc is the GNU version of the base library that is used by all C programs on the system. When programs pass invalid pointers, crashes happen in glibc, but as you say, it's not glibc's fault at all (in general). > I am a layman but doesn't haystack_start=0x0 mean bad/invalid pointer? Yes, you're not such a newbie as you pretend... ;-) > Looking at > http://git.gnome.org/browse/gnome-shell/tree/src/shell-app.c?id=3.2.0 > > Under what conditions could either of these return bad pointer data? > p = strstr (app->casefolded_name, term); > p = strstr (app->casefolded_exec, term); > p = strstr (app->casefolded_description, term); > > > I have attached a gdb full bt for your perusal. Thread 1 is near the bottom and > where crash is. > > Thanks for any pointers you can offer up. I think devs have all they need now, thanks! I'm copying the relevant stack here for convenience:
+ Trace 228793
Created attachment 199668 [details] .desktop causing crash confirming, I've got it on openSUSE Factory with gnome-shell 3.2.1 when attached .desktop was installed (incorrectly in /usr/share/applications, it should be ma mime entry).
One thing worth noting is that gnome-shell should probably completely ignore a .desktop file without an Exec or a Name key since those .desktop files should be considered invalid.
Should we implement this in gmenu?
(In reply to comment #7) > Should we implement this in gmenu? Sounds reasonable. desktop_entry_load() in desktop-entries.c should be changed to look if the exec of the appinfo is null or not (apparently, the name can never be null).
OK, I filed bug 662409.
Everyone, When the supplied patch is applied to gnome-menus 3.2.0.1, I no longer get any segfaults when searching in gnome-shell 3.2.0 Thanks guys!