[Bug 455987] New: "LANG=de_DE yast2" segfaults with yast2 gtk
https://bugzilla.novell.com/show_bug.cgi?id=455987 Summary: "LANG=de_DE yast2" segfaults with yast2 gtk Product: openSUSE 11.1 Version: Beta 5 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 AssignedTo: mmeeks@novell.com ReportedBy: ug@novell.com QAContact: jsrain@novell.com Found By: --- I have installed a gnome desktop and so yast2-gtk is used. When I run "LANG=de_DE yast2" it segfaults. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User ug@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c1 --- Comment #1 from Uwe Gansert <ug@novell.com> 2008-12-03 06:19:53 MST --- hm. I just noticed, it's a bit more complicate: this works but yast is in english then: sevy:~ # export LC_ALL=en_US sevy:~ # LANG=de_DE yast2 this segfaults sevy:~ # export LC_ALL=de_DE sevy:~ # LANG=de_DE yast2 /sbin/yast2: line 437: 16880 Speicherzugriffsfehler $y2ccbin $Y2UI_ARGS "$@" -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User mmeeks@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c2 Michael Meeks <mmeeks@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |ug@novell.com --- Comment #2 from Michael Meeks <mmeeks@novell.com> 2008-12-03 07:05:42 MST --- wow, that is bad: can you launch it from the menus successfully ? Sadly (sic.) it works fine for me here; any chance you can do some more debugging ? if you enable the debug install repo and do: sudo zypper in -y yast2-control-center-gnome-debuginfo glib2-debuginfo gnome-main-menu-debuginfo gtk2-debuginfo then: gdb /usr/lib/YaST2/bin/y2controlcenter-gnome run<enter> and when it crashes - it'd be wonderful to have the backtrace if possible; then we can nail this. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User ug@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c3 Uwe Gansert <ug@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|ug@novell.com | --- Comment #3 from Uwe Gansert <ug@novell.com> 2008-12-03 07:23:00 MST --- yes, I can start it from the menus successfully. unfortunately there is no RC2 debug install-repository -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User ug@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c4 --- Comment #4 from Uwe Gansert <ug@novell.com> 2008-12-03 07:34:35 MST --- Created an attachment (id=257720) --> (https://bugzilla.novell.com/attachment.cgi?id=257720) strace I dont know if it helps but this is the strace output -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User mmeeks@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c5 --- Comment #5 from Michael Meeks <mmeeks@novell.com> 2008-12-03 08:40:53 MST --- Oh - fun ;-) it crashes parsing .desktop files: so - any chance of a gdb trace even without debugging symbols: hopefully that'd be useful. Also, can you attach your /usr/share/applications/YaST2/irda.desktop file - just in case there is something odd there. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User ug@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c6 --- Comment #6 from Uwe Gansert <ug@novell.com> 2008-12-03 08:44:19 MST --- Created an attachment (id=257755) --> (https://bugzilla.novell.com/attachment.cgi?id=257755) irda.desktop -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User ug@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c7 --- Comment #7 from Uwe Gansert <ug@novell.com> 2008-12-03 08:50:28 MST --- the backtrace: (no debugging symbols found) Core was generated by `/usr/lib/YaST2/bin/y2controlcenter-gnome'. Program terminated with signal 11, Segmentation fault. #0 0xb6d44068 in g_markup_escape_text () from /usr/lib/libglib-2.0.so.0 (gdb) bt #0 0xb6d44068 in g_markup_escape_text () from /usr/lib/libglib-2.0.so.0 #1 0xb6d453a7 in g_markup_vprintf_escaped () from /usr/lib/libglib-2.0.so.0 #2 0xb6d454c8 in g_markup_printf_escaped () from /usr/lib/libglib-2.0.so.0 #3 0xb7ffbed7 in application_tile_new_full () from /usr/lib/libslab.so.0 #4 0xb7ff8279 in ?? () from /usr/lib/libslab.so.0 #5 0xb7ff85b9 in ?? () from /usr/lib/libslab.so.0 #6 0xb7ff8890 in generate_categories () from /usr/lib/libslab.so.0 #7 0x08049571 in ?? () #8 0xb6ba6705 in __libc_start_main () from /lib/libc.so.6 #9 0x08049361 in ?? () -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User mmeeks@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c8 Michael Meeks <mmeeks@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |ug@novell.com --- Comment #8 from Michael Meeks <mmeeks@novell.com> 2008-12-03 10:57:48 MST --- Wow - this is a cool bug :-) I love crashes that low down. A couple of things: is this related to UTF-8 support. Can you do: LANG=de_DE.UTF-8 and see if that improves it ? Then - I guess it's specific to the string; Is there no chance you can get a glib2-debuginfo package from somewhere, such that we can print the: gchar* g_markup_escape_text (const gchar *text, gssize length) text parameter printed. Any older glib2 would do - I doubt much-if-anything has changed there recently. I suspect some -odd- stuff in one of the german translations, perhaps with some XML character popping up in a .desktop name, or ... well something like that :-) And so sorry I can't reproduce it; is this a stock / normal beta5 install ? and if so, can you attach the output of: zypper se yast2 > /tmp/log And attach the log, I guess one of the tools is causing the grief, and I just have a different set installed. Thanks again. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User ug@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c9 --- Comment #9 from Uwe Gansert <ug@novell.com> 2008-12-04 02:28:53 MST --- LANG=de_DE.UTF8 /usr/lib/YaST2/bin/y2controlcenter-gnome core does not make a change - it still segfaults but this works again: export LC_ALL=de_DE.UTF8 LANG=de_DE.UTF8 /usr/lib/YaST2/bin/y2controlcenter-gnome core even this works: export LC_ALL=de_DE.UTF8 LANG=de_DE /usr/lib/YaST2/bin/y2controlcenter-gnome core it seems to be directly connected to the LC_ALL variable It's an RC2 but I'll try to install an RC1 where we have debuginfo packages -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User ug@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c10 --- Comment #10 from Uwe Gansert <ug@novell.com> 2008-12-04 02:29:23 MST --- Created an attachment (id=257958) --> (https://bugzilla.novell.com/attachment.cgi?id=257958) "zypper se" log -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User mmeeks@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c11 Michael Meeks <mmeeks@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|ug@novell.com | --- Comment #11 from Michael Meeks <mmeeks@novell.com> 2008-12-04 04:42:43 MST --- ok - so what is your LC_ALL beforehand ? [ are you in the habit of tweaking your l10n environment variables ? - if so, you -really- want the UTF-8 variants ] I've got a matching package selection here, and still life is good for me, if I run with LANG=de_DE I get: LANG=de_DE /usr/lib/YaST2/bin/y2controlcenter-gnome (y2controlcenter-gnome:8330): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 25: Invalid UTF-8 encoded text - not valid '<b>Start Unterst?tzung</b>' (y2controlcenter-gnome:8330): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 25: Invalid UTF-8 encoded text - not valid '<b>Start Unterst?tzung</b>' Segmentation fault with utf-8 life is good again. I had to install several extra packages to get that: yast2-metapackage-handler, yast2-sudo, yast2-trans-de (update), yast2-branding-openSUSE perhaps one of them is related - anyhow; I have enough to debug here; thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User mmeeks@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c12 Michael Meeks <mmeeks@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|YaST2 |GNOME Summary|"LANG=de_DE yast2" segfaults with yast2 gtk |glib sometimes returns locale encoded strings | |from keyfiles ... --- Comment #12 from Michael Meeks <mmeeks@novell.com> 2008-12-04 07:59:13 MST --- So - this is a glib bug I believe, not a very serious one but ... ;-) For some reason we are somewhat hesitant to bind the UTF-8 charset to the textdomain - which causes invalid UTF-8 to pop through gettext, and our API to the upper levels where it causes grief like this. suggested patch. --- glib-2.18.2/glib/gkeyfile.c.old +++ glib-2.18.2/glib/gkeyfile.c @@ -1795,7 +1795,7 @@ if (has_gettext) { - if (bind_textdomain_codeset (key_file->gettext_domain, NULL)) + if (bind_textdomain_codeset (key_file->gettext_domain, "UTF-8")) translated_value = g_strdup (translated); else translated_value = g_locale_to_utf8 (translated, filed up-stream as: http://bugzilla.gnome.org/show_bug.cgi?id=563235 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User mmeeks@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c13 Michael Meeks <mmeeks@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |federico@novell.com --- Comment #13 from Michael Meeks <mmeeks@novell.com> 2008-12-04 11:08:11 MST --- Embarassing - this is our own patch - and an apparently slightly buggy one at that; Federico - any ideas ? and/or can we fix our patch ? :-) and/or who wrote this ? [ I was wondering why we do that bind_textdomain_codeset in the hot path, for every single key - surely there is some huge potential performance issue here ? ]. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User mmeeks@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c14 Michael Meeks <mmeeks@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|mmeeks@novell.com |vuntz@novell.com --- Comment #14 from Michael Meeks <mmeeks@novell.com> 2008-12-08 03:26:43 MST --- Vincent - the .spec file suggests this is your patch :-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User vuntz@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c15 --- Comment #15 from Vincent Untz <vuntz@novell.com> 2008-12-08 03:44:45 MST --- (In reply to comment #13 from Michael Meeks)
[ I was wondering why we do that bind_textdomain_codeset in the hot path, for every single key - surely there is some huge potential performance issue here ? ].
Well, key_file->gettext_domain can be different in different calls, so that's why it's done this way. But we can probably cache all this information in a hash table. As for why it's NULL and not UTF-8... hrm. I would guess it's because the patch was based on an Ubuntu patch and it's done this way there ;-) But yeah, I'd say we want UTF-8 there. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User vuntz@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c16 --- Comment #16 from Vincent Untz <vuntz@novell.com> 2008-12-08 04:53:39 MST --- Actually, bind_textdomain_codeset() should be called earlier. Re the potential performance issue: note that this is only happening for 3 keys (Name, GenericName, Comment), so it's not every key. Still, I made this happen only once in case we use the default gettext domain (desktop_translations). We still do a strcmp(), but well, that's okay. Building the package to test it locally, and I'll submit afterwards. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=455987 User vuntz@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=455987#c17 Vincent Untz <vuntz@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #17 from Vincent Untz <vuntz@novell.com> 2008-12-08 05:43:05 MST --- Updated patch works, submitted to oS:F (submission #4236). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com