[Scilab-Dev] scilab-5.0.3 segfault on solaris: strlen()

Gerard Henry Gerard.Henry at cmi.univ-mrs.fr
Mon Jan 12 20:47:08 CET 2009


thanks for your reply. But i'm pessimist, because, i've already:
 > locale
LANG=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

perhaps, if i set LANG=C, i don't need to add:
--enable-build-localization

?


Jonathan Blanchard wrote:
> Oups sorry I forgot to mention that you might also need to build
> Scilab inside another local. If your using a build script defining
> LANG="C" will help. Well it fixed my problem as Scilab was always
> failing to build in my en_CA local.
> 
> Jonathan Blanchard
> 
> 
> 
> On Mon, Jan 12, 2009 at 3:31 PM, Gerard Henry
> <Gerard.Henry at cmi.univ-mrs.fr> wrote:
>> i tried, by adding:
>> --enable-build-localization
>>
>> and now, the make hangs here:
>> ./bin/scilab -ns -nwni -f
>> modules/functions/scripts/buildmacros/buildmacros.sce
>> Warning: Localization issue: Error while binding the domain from
>> /local/apps/src/scilab-5.0.3/../locale/ or
>> /local/apps/src/scilab-5.0.3/locale/: Switch to the default language
>> (English).
>>
>>
>> the debugger sais that there is a thread waiting:
>> Attached to process 12493 with 3 LWPs
>> t at 1 (l at 1) stopped in __lwp_park at 0xfa9a47fb
>> 0xfa9a47fb: __lwp_park+0x000b:  jae      __lwp_park+0x19        [
>> 0xfa9a4809, .+0xe ]
>> Current function is basin
>>   34                  call
>> zzledt(string,len(string),lline,status,menusflag,0)
>>
>> (dbx) lwp l at 2
>> t at 2 (l at 2) stopped in _read at 0xfa9a52a7
>> 0xfa9a52a7: _read+0x0007:       jae      _read+0x13     [ 0xfa9a52b3, .+0xc
>> ]
>> (dbx) list
>> dbx: warning: No source file
>> (dbx) where
>> =>[1] _read(0x0, 0xfa9d680c, 0x1), at 0xfa9a52a7
>>  [2] __filbuf(0xfa9d1c10, 0xfd287c44, 0xfa57efb8, 0xfd273ed8), at 0xfa9881a4
>>  [3] gchar_no_echo(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfd273f00
>>  [4] TermReadAndProcess(0xfa470200, 0xfd287c44, 0xfa57efd8, 0xfd27247a,
>> 0xfa470200, 0xfa9ce000), at 0xfd272c6c
>>  [5] getCommandLine(0xfa470200, 0xfa9ce000, 0xfa57efec), at 0xfd272398
>>  [6] watchGetCommandLine(0x0), at 0xfd27247a
>>  [7] _thr_setup(0xfa470200), at 0xfa9a44b7
>>  [8] _lwp_start(0x0, 0xfa9d680c, 0x1, 0xfd288174, 0x0, 0xfd287c44), at
>> 0xfa9a47a0
>> (dbx) kill
>>
>> Why does it hang on a read? what's the meaning of the read in this context?
>> When i kill the lwp 2, the make finishes, and i can launch scilab, but it is
>> unusable:
>>> ./bin/scilab -nogui
>>                                !--error 42
>> Incompatible input argument.
>>
>>
>>
>> Jonathan Blanchard wrote:
>>> Ah the joys of Scilab on Solaris.
>>>
>>> I remember having a similar issue quite a while ago. If I remember
>>> correctly it was something about localization. Either enabling or
>>> disabling it kind of fixed the problem.
>>>
>>> Jonathan Blanchard
>>>
>>>
>>>
>>> On Sat, Jan 10, 2009 at 4:12 PM, Gerard Henry
>>> <Gerard.Henry at cmi.univ-mrs.fr> wrote:
>>>> Gerard Henry wrote:
>>>>> hello all,
>>>>> after successfully compiling scilab on opensolaris, i did the same job
>>>>> on solaris 10, make went fine, but when i execute, it segfaults. Looking
>>>>> with the debugger, i got:
>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>> 0xfa855891 in strlen () from /usr/lib/libc.so.1
>>>>> (gdb) where
>>>>> #0  0xfa855891 in strlen () from /usr/lib/libc.so.1
>>>>> #1  0xfac62160 in callFunctionFromGateway ()
>>>>>  from /local/apps/src/scilab-5.0.3/modules/core/.libs/libscicore.so.5
>>>>> #2  0xfd297571 in gw_io ()
>>>>>  from /local/apps/src/scilab-5.0.3/modules/io/.libs/libsciio.so.5
>>>>> #3  0xfac51df3 in callinterf_ ()
>>>>>  from /local/apps/src/scilab-5.0.3/modules/core/.libs/libscicore.so.5
>>>>> #4  0xfac5ef42 in scirun_ ()
>>>>>  from /local/apps/src/scilab-5.0.3/modules/core/.libs/libscicore.so.5
>>>>> #5  0xfac4d54b in realmain ()
>>>>>  from /local/apps/src/scilab-5.0.3/modules/core/.libs/libscicore.so.5
>>>>> #6  0xfd242ad0 in mainscic ()
>>>>>  from /local/apps/src/scilab-5.0.3/modules/shell/.libs/libscishell.so.5
>>>>> #7  0x08050d7d in main ()
>>>>>
>>>>> even a "make clean" becomes impossible, because:
>>>>> devel1 at nemo:~/src/scilab-5.0.3$ make clean
>>>>> ./bin/scilab: line 453: 13413 Segmentation Fault      (core dumped)
>>>>> "$SCILABBIN" "$@"
>>>>> ./bin/scilab: line 453: 13439 Segmentation Fault      (core dumped)
>>>>> "$SCILABBIN" "$@"
>>>>> make: *** [clean-doc] Error 139
>>>>>
>>>>> Any idea?
>>>>>
>>>>> thanks in advance for help,
>>>>>
>>>>> gerard
>>>>>
>>>>> PS: some notes in french:
>>>>> http://www.latp.univ-mrs.fr/support/doku.php?id=scilab
>>>>>
>>>> after recompiling with -g, i have more information:
>>>> t at 1 (l at 1) program terminated by signal SEGV (no mapping at the fault
>>>> address)
>>>> 0xfa705891: strlen+0x0031:      cmpb     $0x00000000,(%eax)
>>>> Current function is callFunctionFromGateway
>>>>  36           if (*(Tab[Fin-1].f) != NULL) (*(Tab[Fin-1].f))
>>>> (Tab[Fin-1].name,(unsigned long)strlen(Tab[Fin-1].name));
>>>>
>>>> (dbx) where
>>>> current thread: t at 1
>>>>  [1] strlen(0xe, 0x0), at 0xfa705891
>>>> =>[2] callFunctionFromGateway(Tab = 0xfd2be908), line 36 in
>>>> "callFunctionFromGateway.c"
>>>>  [3] gw_io(), line 102 in "gw_io.c"
>>>>  [4] callinterf_(k = 0xfab07b04), line 155 in "callinterf.c"
>>>>  [5] scirun_(startupCode = 0x8081358
>>>> "exec('modules/functions/scripts/buildmacros/buildmacros.sce',-1)",
>>>> startupCode_len = 64), line 147 in "scirun.c"
>>>>  [6] realmain(no_startup_flag_l = 1, initial_script = 0x8046f3f
>>>> "modules/functions/scripts/buildmacros/buildmacros.sce",
>>>> initial_script_type
>>>> = SCILAB_SCRIPT, memory = 180000), line 145 in "realmain.c"
>>>>  [7] mainscic(argc = 5, argv = 0x8046e00), line 132 in "mainscic.c"
>>>>  [8] main(argc = 5, argv = 0x8046e00), line 26 in "main_linux.c"
>>>>
>>>>
>>>> is it possible that the value of Fin is out of range? Who set the value
>>>> of
>>>> Fin?
>>>>
>>>> thanks for help,
>>>>
>>>> gerard
>>>>
>>>> --
>>>> Gerard HENRY
>>>> LATP UMR6632
>>>> 39, rue F. Joliot Curie
>>>> 13453 MARSEILLE Cedex 13
>>>> Tel.: 04 91 11 35 53 Fax.: 04 91 11 35 52
>>>>
>>
>> --
>> Gerard HENRY
>> LATP UMR6632
>> 39, rue F. Joliot Curie
>> 13453 MARSEILLE Cedex 13
>> Tel.: 04 91 11 35 53 Fax.: 04 91 11 35 52
>>


-- 
Gerard HENRY
LATP UMR6632
39, rue F. Joliot Curie
13453 MARSEILLE Cedex 13
Tel.: 04 91 11 35 53 Fax.: 04 91 11 35 52



More information about the dev mailing list