Project

General

Profile

Bug #1094

gui-install crashing

Added by Andrzej Szeszo about 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Caiman (Installer)
Target version:
Start date:
2011-06-07
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

gui-install on the live dvd built using packages from http://pkg.openindiana.org/dev-il repository is crashing after pressing 'next' button on the timezone/date/time selection screen. gui-install seems to go past that screen when run on the installed system.

pre-generated images with broken installer can be found here:

http://dlc-int.openindiana.org/151/

Sample backtrace:

OpenIndiana (powered by illumos)    SunOS 5.11    oi_151    May 2011
jack@openindiana:~$ sudo gdb gui-install
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying" 
and "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.11"...
(gdb) r
Starting program: /usr/bin/gui-install 
warning: Lowest section in /usr/lib/libthread.so.1 is .dynamic at 00000074
warning: Lowest section in /usr/lib/libpthread.so.1 is .dynamic at 00000074
warning: Lowest section in /lib/librt.so.1 is .dynamic at 00000074
[New LWP 1]
[New LWP 2]
[New LWP 3]
warning: Lowest section in /lib/libdl.so.1 is .dynamic at 00000074
[New LWP 4]
[New LWP 5]
[New LWP 6]
[New LWP 7]
[LWP 5 exited]
[New LWP 8]

Program received signal SIGSEGV, Segmentation fault.
0xfdd01fb4 in strcmp () from /usr/lib/libc.so.1
(gdb) bt
#0  0xfdd01fb4 in strcmp () from /usr/lib/libc.so.1
#1  0xfef4fc24 in substitute_chinese_language () from /usr/snadm/lib/liborchestrator.so.1
#2  0xfef4e1d9 in get_lang_entry () from /usr/snadm/lib/liborchestrator.so.1
#3  0xfef4ecab in build_ll_list () from /usr/snadm/lib/liborchestrator.so.1
#4  0xfef4d974 in om_get_lang_info () from /usr/snadm/lib/liborchestrator.so.1
#5  0x08080acf in orchestrator_om_get_available_languages ()
#6  0x08067075 in language_init ()
#7  0x080675f5 in language_screen_init ()
#8  0x08060b4b in on_nextbutton_clicked ()
#9  0xfdf77711 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0
#10 0xfdf5fa23 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#11 0xfdf76652 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0
#12 0xfdf7594a in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#13 0xfdf75ab0 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#14 0xfe4d8b1d in gtk_button_clicked () from /usr/lib/libgtk-x11-2.0.so.0
#15 0xfe4d9a47 in gtk_real_button_released () from /usr/lib/libgtk-x11-2.0.so.0
#16 0xfdf77711 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0
#17 0xfdf5fd1a in g_type_class_meta_marshal () from /usr/lib/libgobject-2.0.so.0
#18 0xfdf5fa23 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#19 0xfdf76216 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0
#20 0xfdf7594a in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#21 0xfdf75ab0 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#22 0xfe4d8aa1 in gtk_button_released () from /usr/lib/libgtk-x11-2.0.so.0
#23 0xfe4d9862 in gtk_button_button_release () from /usr/lib/libgtk-x11-2.0.so.0
#24 0xfe58400b in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0
#25 0xfdf5fd1a in g_type_class_meta_marshal () from /usr/lib/libgobject-2.0.so.0
#26 0xfdf5fa23 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#27 0xfdf76dae in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0
#28 0xfdf75756 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#29 0xfdf75ab0 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#30 0xfe6aaac5 in gtk_widget_event_internal () from /usr/lib/libgtk-x11-2.0.so.0
#31 0xfe6aa6f2 in gtk_widget_event () from /usr/lib/libgtk-x11-2.0.so.0
#32 0xfe582ae3 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#33 0xfe5817f7 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#34 0xfe1cec0d in gdk_event_dispatch () from /usr/lib/libgdk-x11-2.0.so.0
#35 0xfde5a0c7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#36 0xfde5a775 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#37 0xfde5adb3 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#38 0xfe5810a3 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#39 0x0806001a in main ()
(gdb) 


Files

liborchestrator-fix-1094.patch (2.38 KB) liborchestrator-fix-1094.patch Proposed fix for the above issues Guido Berhörster, 2011-06-08 12:30 PM
liborchestrator-zh-locale.diff (5.47 KB) liborchestrator-zh-locale.diff Albert Lee, 2011-06-16 05:08 PM

History

#1

Updated by Guido Berhörster about 9 years ago

The for-loop in substitute_chinese_language in liborchestrator/locale.c:1677 presupposes that the array of structs chinese_values is NULL-terminated which it actually isn't.

#2

Updated by Guido Berhörster about 9 years ago

The code has further issues, in two cases it does not check whether the return value of substitute_chinese_language is NULL before calling strdup on it and it throws away the returned pointer and thus leaks memory.
The crashes were apparently triggered by missing/wrong Chinese locale names.

#3

Updated by Ryo Murakawa about 9 years ago

This problem happened when user selects Japanese.

#4

Updated by Ken Mays about 9 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 90

GUI Installer was fixed yesterday.

#5

Updated by Albert Lee about 9 years ago

I've separately prepared what should be a more robust fix, this should handle locales with encodings (zh_CN.UTF-8) correctly, handle POSIX/C locales more consistently, and also removes some memory leaks.

#6

Updated by Guido Berhörster about 9 years ago

Albert Lee wrote:

I've separately prepared what should be a more robust fix, this should handle locales with encodings (zh_CN.UTF-8) correctly, handle POSIX/C locales more consistently, and also removes some memory leaks.

The changes look fine. Andrzej, can you include this in the next respin and add it to the MQ repo?

#7

Updated by Andrzej Szeszo about 9 years ago

The patch is not 100% ;) Albert, when you have a spare moment, would you be able to tweak it so locale.c compiles? Otherwise I'll look at it tomorrow. Thanks!

[aszeszo@ultra liborchestrator]$ make
/opt/sunstudio12.1/bin/cc -xc99=%none -O  -Xa -I/home/aszeszo/oi151/install/proto/root_i386/usr/include -I/usr/include -I.  -I/home/aszeszo/oi151/install/proto/root_i386/usr/include/admin  -I../libtd/  -I../liblogsvc  -I../libti -Di386 -I/home/aszeszo/oi151/install/proto/root_i386/usr/include -I/usr/include -I.  -I/home/aszeszo/oi151/install/proto/root_i386/usr/include/admin  -I../libtd/  -I../liblogsvc  -I../libti -Di386 -c -o objs/i386/locale.o locale.c
"locale.c", line 659: warning: statement not reached
"locale.c", line 777: syntax error before or at: {
"locale.c", line 779: invalid type combination
"locale.c", line 779: identifier redefined: sub
    current : pointer to char
    previous: pointer to char : "locale.c", line 640
"locale.c", line 779: warning: declaration can not follow a statement
"locale.c", line 780: identifier redefined: code
    current : pointer to char
    previous: pointer to char : "locale.c", line 643
"locale.c", line 780: warning: declaration can not follow a statement
"locale.c", line 781: warning: declaration can not follow a statement
"locale.c", line 783: undefined symbol: lang_name
"locale.c", line 789: warning: improper pointer/integer combination: arg #1
"locale.c", line 793: warning: improper pointer/integer combination: arg #1
"locale.c", line 796: warning: argument #1 is incompatible with prototype:
    prototype: pointer to pointer to char : "locale.c", line 121
    argument : pointer to char
"locale.c", line 796: prototype mismatch: 2 args passed, 1 expected
"locale.c", line 799: undefined symbol: search_list
"locale.c", line 799: warning: improper pointer/integer combination: op "=" 
"locale.c", line 806: warning: improper pointer/integer combination: arg #2
"locale.c", line 815: warning: improper pointer/integer combination: op "=" 
"locale.c", line 1596: warning: argument #1 is incompatible with prototype:
    prototype: pointer to pointer to char : "locale.c", line 121
    argument : pointer to char
"locale.c", line 1596: prototype mismatch: 2 args passed, 1 expected
"locale.c", line 1685: warning: old-style declaration or incorrect type for: code
"locale.c", line 1686: syntax error before or at: 408
"locale.c", line 1686: warning: old-style declaration or incorrect type for: om_set_error
"locale.c", line 1686: identifier redeclared: om_set_error
    current : function() returning int
    previous: function(short) returning void : "./orchestrator_api.h", line 549
"locale.c", line 1687: warning: old-style declaration or incorrect type for: sub
"locale.c", line 1688: syntax error before or at: }
"locale.c", line 105: warning: static function called but not defined: get_lang_entry()
cc: acomp failed for locale.c
*** Error code 1
make: Fatal error: Command failed for target `objs/i386/locale.o'
Current working directory /home/aszeszo/oi151/install/usr/src/lib/liborchestrator
[aszeszo@ultra liborchestrator]$ 
#8

Updated by Albert Lee about 9 years ago

Sorry, extra '{' on line 657. (Don't have a build env. for caiman up).

#9

Updated by Albert Lee about 9 years ago

  • Assignee changed from OI Caiman to Albert Lee
#10

Updated by Albert Lee almost 9 years ago

  • Status changed from Feedback to Resolved

This was included in the shipped installer.

Also available in: Atom PDF