[ncl-install] ncl on solaris 10 sparc core dumps

Mary Haley haley at ucar.edu
Thu Jun 25 07:57:18 MDT 2009


Opesh,

Thanks for the additional output.

I noticed that you are building with an "-m64" option, which I assume
turns on 64-bit addressing. Because of this, you will additionally
need to add:

  -DNGLONG2XINT

to the "StdDefines" line in your $NCARG/config/Sun4Solaris file.

You will then need to rerun "make Everything".  I don't know if this
will fix the problem, however.

If the above doesn't fix it, then try further turning off optimization
with something like "-O0" in the HLU library Makefile; you can add
this to the line that has "-g".

If this still doesn't work, then let me know.  We should probably
take this offline after this, until we get a solution.

Thanks,

--Mary


On Thu, 25 Jun 2009, Alkara, Opesh wrote:

> Mary,
>
> Out of the "hlu only" compilation is enclosed as text file.
>
> Thank you,
> Opesh
>
> -----Original Message-----
> From: Mary Haley [mailto:haley at ucar.edu]
> Sent: Thursday, June 25, 2009 2:05 AM
> To: Alkara, Opesh
> Cc: ncl-install at ucar.edu
> Subject: Re: [ncl-install] ncl on solaris 10 sparc core dumps
>
> Opesh,
>
> Can you send me the output from the compilation, so I can see what
> flags were used?
> I want the one from where you removed optimization for all of the HLU
> library.
>
> Thanks,
>
> --Mary
>
> On Jun 24, 2009, at 2:11 PM, Alkara, Opesh wrote:
>
>> Hi Mary,
>>
>> Thanks for directions. I disabled optimization and re-compiled to
>> generate a new binary but the problem seem to persist. Below is the
>> trace output from core. It looks like these functions call each other
>> recursively and control never returns to calling function. May be a
>> glitch in the condition checks before functions are called? I will
>> continue to investigate further but please let me know if there is
>> something I am missing.
>>
>> -Opesh
>>
>>
>> Reading libc_psr.so.1
>> t at 1 (l at 1) program terminated by signal SEGV (no mapping at the fault
>> address)
>> Current function is _NhlVarToSetArgList
>>    55           register int    i=0;
>> (dbx)
>> (dbx) where
>> current thread: t at 1
>> =>[1] _NhlVarToSetArgList(list = <bad address 0x7f7fdd28>, args = <bad
>> address 0x7f7fdd20>), line 55 in "VarArg.c"
>>   ---- 1 following frame from gwindows -- possible stack overflow
>>   [2] NhlVACreate(pid = 0xffffffff7f805f2c, name = 0x100fe7aa0
>> "hlu", lc
>> = 0x1011881d8, parentid = 0, ... = (nil), ...), line 746 in "Create.c"
>>   [3] AppInitialize(lc = 0x1011881d8, req = 0x10218f3e0, new =
>> 0x10218f150, args = 0xffffffff7f80eb10, nargs = 3), line 538 in
>> "App.c"
>>   [4] CallInitialize(lc = 0x1011881d8, req = 0x10218f3e0, new =
>> 0x10218f150, args = 0xffffffff7f80eb10, nargs = 3), line 266 in
>> "Create.c"
>>   [5] _NhlCreate(pid = 0xffffffff7f81ed7c, name = 0x100fe7aa0
>> "hlu", lc
>> = 0x1011881d8, parentid = 0, args = 0xffffffff7f816c40, nargs = 3,
>> child
>> = (nil)), line 634 in "Create.c"
>>   [6] NhlVACreate(pid = 0xffffffff7f81ed7c, name = 0x100fe7aa0
>> "hlu", lc
>> = 0x1011881d8, parentid = 0, ... = (nil), ...), line 749 in "Create.c"
>>   [7] AppInitialize(lc = 0x1011881d8, req = 0x10218f010, new =
>> 0x10218ed80, args = 0xffffffff7f827960, nargs = 3), line 538 in
>> "App.c"
>>   [8] CallInitialize(lc = 0x1011881d8, req = 0x10218f010, new =
>> 0x10218ed80, args = 0xffffffff7f827960, nargs = 3), line 266 in
>> "Create.c"
>>   [9] _NhlCreate(pid = 0xffffffff7f837bcc, name = 0x100fe7aa0
>> "hlu", lc
>> = 0x1011881d8, parentid = 0, args = 0xffffffff7f82fa90, nargs = 3,
>> child
>> = (nil)), line 634 in "Create.c"
>> [...snip]
>>
>>
>> Flow:
>> ---------
>>
>>
>> Line 634: Create.c (func: _NhlCreate)
>>
>>    633
>>    634      lret = CallInitialize(lc,request,layer,largs,nlargs);
>>    635      (void)NhlFree(request);
>>
>> Line 266: Create.c (func: CallInitialize)
>>
>>    264      if(lc->base_class.layer_initialize != NULL )
>>    265          class =
>> (*(lc->base_class.layer_initialize))(lc,req,new,args,
>>    266                                      nargs);
>>    267      return(MIN(ancestor,class));
>>
>> Line 534: App.c (func: AppInitialize)
>>
>>    533
>>    534          lret = NhlVACreate(&tint,"hlu",NhlappClass,0,
>>    535                  _NhlNappMode,   lang_type,
>>    536                  _NhlNdefApp,    True,
>>    537                  _NhlNnoAppDB,   True,
>>    538                  NULL);
>>
>> Line 749: Create.c (func: NhlVACreate)
>>
>>    748
>>    749      ret = _NhlCreate(pid, name, lc, parentid, args, num_args,
>> NULL);
>>    750
>>
>> [ ] back again to top => Line: 634  Create.c (func: _NhlCreate)
>>
>>
>>
>> -----Original Message-----
>> From: Mary Haley [mailto:haley at ucar.edu]
>> Sent: Wednesday, June 24, 2009 8:30 PM
>> To: Alkara, Opesh
>> Cc: ncl-install at ucar.edu
>> Subject: Re: [ncl-install] ncl on solaris 10 sparc core dumps
>>
>> Hi Opesh,
>>
>> This sounds like an optimization problem. Thanks for the debugging
>> effort here, as it helps determine the problem.
>>
>> Try this:
>>
>>   - cd $NCARG/ni/src/lib/hlu
>>   - Edit the "Makefile" and change all occurences of "-O" to "-g"
>>   - Type:
>>        /bin/rm Create.o
>>        make includes depend all install
>>        cd ../../ncl
>>        make install
>>
>> This should rebuild the HLU library with optimization for "Create.c"
>> taken down a notch.
>> Then, "ncl" will get rebuilt against the new library.
>>
>> If this doesn't work, then try turning off optimization for all *.o
>> files in
>> the HLU library with:
>>
>>        make clean includes depend all install
>>        cd ../../ncl
>>        make install
>>
>> --Mary
>>
>> On Jun 24, 2009, at 8:15 AM, Alkara, Opesh wrote:
>>
>>>
>>> I was not sure whether this post would go to ncl-talk or ncl-
>>> install but
>>> since the problem was more related to how NCL was compiled, I am
>>> posting
>>> this to ncl-install.
>>>
>>> ncl_ncargs-5.1.1 builds successfully on Solaris 10 sparc (64-bit) but
>>> when I try to run the binary it dumps core. I saw stack of core,
>>> found
>>> that 3-4 functions are being called over and over until program
>>> seg-faults. I am using sun studio 12.0 compiler. I removed
>>> optimization
>>> in compilation to see if that fixes the issue but that didn't help.
>>> The
>>> same version of NCL builds fine on solaris 10 x86 64-bit (almost with
>>> same C and F flags as that of sparc build). I searched for function
>>> _NhlCreate and NhlVACreate and found that they are defined within
>>> ni/src/lib/hlu/Create.c, so, I believe the hlu compilation is not
>>> going
>>> well?
>>>
>>> Thanks in advance.
>>>
>>> ---------------------------------
>>>
>>> |user at delta 19:27:01 /var/tmp/ncl_studio/ncl_ncarg-5.1.1|make
>>>
>>>         NCL/NCAR Graphics - Version 5.1.1 Installation Configuration
>>>
>>> System File             Sun4Solaris
>>> Binary Install Directory        /usr/local/ncl_ncarg-5.1.1/bin
>>> Library Install Directory       /usr/local/ncl_ncarg-5.1.1/lib
>>> Include Install Directory       /usr/local/ncl_ncarg-5.1.1/include
>>> Manpage Install Directory       /usr/local/ncl_ncarg-5.1.1/man
>>> Config Install Directory
>>> /usr/local/ncl_ncarg-5.1.1/lib/ncarg/config
>>> Data Base Directory     /usr/local/ncl_ncarg-5.1.1/lib/ncarg/database
>>> Programmer Doc Dir      /usr/local/ncl_ncarg-5.1.1/lib/ncarg/doc
>>> Reloc Obj. Directory    /usr/local/ncl_ncarg-5.1.1/lib/ncarg/robj
>>> Examples Directory      /usr/local/ncl_ncarg-5.1.1/lib/ncarg/examples
>>> Tutorial Directory      /usr/local/ncl_ncarg-5.1.1/lib/ncarg/tutorial
>>> Test Directory          /usr/local/ncl_ncarg-5.1.1/lib/ncarg/tests
>>> X App. Def. Directory   /usr/local/ncl_ncarg-5.1.1/lib/ncarg/xapp
>>> f77 Compiler            f90
>>> f77 Flags               -xarch=sparcvis -m64 -g
>>> -R/usr/local/ncl_ncarg-5.1.1/lib -R/usr/local/lib/gcc-4.3.3 -O
>>> C Compiler              cc
>>> cc Flags                -xarch=sparcvis -m64 -g
>>> -R/usr/local/ncl_ncarg-5.1.1/lib -R/usr/local/lib/gcc-4.3.3 -O
>>> -I./include -I/usr/local/ncl_ncarg-5.1.1/include -I/usr/openwin/
>>> include
>>> -I/usr/dt/include -DSYSV -D_REENTRANT -DByteSwapped -D__64BIT__
>>> -DNeedFuncProto
>>> |user at delta 19:27:02 /var/tmp/ncl_studio/ncl_ncarg-5.1.1|
>>>
>>>
>>> root at delta:/usr/local/ncl_ncarg-5.1.1/bin # ./ncl
>>>  Copyright (C) 1995-2009 - All Rights Reserved
>>>  University Corporation for Atmospheric Research
>>>  NCAR Command Language Version 5.1.1
>>>  The use of this software is governed by a License Agreement.
>>>  See http://www.ncl.ucar.edu/ for more details.
>>> Segmentation Fault (core dumped)
>>> root at delta:/usr/local/ncl_ncarg-5.1.1/bin #
>>>
>>>
>>> root at delta:/usr/local/ncl_ncarg-5.1.1/bin # pstack core
>>> core 'core' of 8361:    ./ncl
>>>  00000001003e1834 _NhlCreate (ffffffff7f81565c, 100a68780,
>>> 100c05e48, 0,
>>> ffffffff7f805458, 3) + 74
>>>  00000001003e2400 NhlVACreate (ffffffff7f81565c, 100a68780,
>>> 100c05e48,
>>> 0, 100dca310, 0) + 80
>>>  000000010048de48 AppInitialize (100c05000, 100dca328, 101bf1ec0,
>>> ffffffff7f816060, 3, ffffffffffffffff) + 128
>>>  00000001003e1708 CallInitialize (100c05e48, 101bf2150, 101bf1ec0,
>>> ffffffff7f816060, 3, ffffffffffffffff) + 68
>>>  00000001003e218c _NhlCreate (ffffffff7f82e33c, 100a68780,
>>> 100c05e48, 2,
>>> ffffffff7f81e138, 3) + 9cc
>>>  00000001003e2400 NhlVACreate (ffffffff7f82e33c, 100a68780,
>>> 100c05e48,
>>> 0, 100dca310, 0) + 80
>>>  000000010048de48 AppInitialize (100c05000, 100dca328, 101bf1af0,
>>> ffffffff7f82ed40, 3, ffffffffffffffff) + 128
>>>  00000001003e1708 CallInitialize (100c05e48, 101bf1d80, 101bf1af0,
>>> ffffffff7f82ed40, 3, ffffffffffffffff) + 68
>>>  00000001003e218c _NhlCreate (ffffffff7f84701c, 100a68780,
>>> 100c05e48, 2,
>>> ffffffff7f836e18, 3) + 9cc
>>>  00000001003e2400 NhlVACreate (ffffffff7f84701c, 100a68780,
>>> 100c05e48,
>>> 0, 100dca310, 0) + 80
>>>  000000010048de48 AppInitialize (100c05000, 100dca328, 101bf1720,
>>> ffffffff7f847a20, 3, ffffffffffffffff) + 128
>>>  00000001003e1708 CallInitialize (100c05e48, 101bf19b0, 101bf1720,
>>> ffffffff7f847a20, 3, ffffffffffffffff) + 68
>>>  00000001003e218c _NhlCreate (ffffffff7f85fcfc, 100a68780,
>>> 100c05e48, 2,
>>> ffffffff7f84faf8, 3) + 9cc
>>>  00000001003e2400 NhlVACreate (ffffffff7f85fcfc, 100a68780,
>>> 100c05e48,
>>> 0, 100dca310, 0) + 80
>>>  000000010048de48 AppInitialize (100c05000, 100dca328, 101bf1350,
>>> ffffffff7f860700, 3, ffffffffffffffff) + 128
>>>  00000001003e1708 CallInitialize (100c05e48, 101bf15e0, 101bf1350,
>>> ffffffff7f860700, 3, ffffffffffffffff) + 68
>>>  00000001003e218c _NhlCreate (ffffffff7f8789dc, 100a68780,
>>> 100c05e48, 2,
>>> ffffffff7f8687d8, 3) + 9cc
>>>  00000001003e2400 NhlVACreate (ffffffff7f8789dc, 100a68780,
>>> 100c05e48,
>>> 0, 100dca310, 0) + 80
>>>  000000010048de48 AppInitialize (100c05000, 100dca328, 101bf0f80,
>>> ffffffff7f8793e0, 3, ffffffffffffffff) + 128
>>>  00000001003e1708 CallInitialize (100c05e48, 101bf1210, 101bf0f80,
>>> ffffffff7f8793e0, 3, ffffffffffffffff) + 68
>>>  00000001003e218c _NhlCreate (ffffffff7f8916bc, 100a68780,
>>> 100c05e48, 2,
>>> ffffffff7f8814b8, 3) + 9cc
>>>
>>> [...snip ]
>>>
>>>  00000001003e2400 NhlVACreate (ffffffff7ffee93c, 100a68780,
>>> 100c05e48,
>>> 0, 100dca310, 0) + 80
>>>  000000010048de48 AppInitialize (100c05000, 100dca328, 101bde5c0,
>>> ffffffff7ffef340, 2, ffffffffffffffff) + 128
>>>  00000001003e1708 CallInitialize (100c05e48, 101bde810, 101bde5c0,
>>> ffffffff7ffef340, 2, ffffffffffffffff) + 68
>>>  00000001003e218c _NhlCreate (ffffffff7ffffa4c, 100a5d8a8,
>>> 100c05e48, 1,
>>> ffffffff7fff7418, 2) + 9cc
>>>  00000001003e2400 NhlVACreate (ffffffff7ffffa4c, 100a5d8a8,
>>> 100c05e48,
>>> 0, 100cde4f8, 1) + 80
>>>  0000000100069dd4 main (1, ffffffff7ffffbf8, ffffffff7ffffc08,
>>> ffffffff7c949468, ffffffff79700140, ffffffff79700180) + 694
>>>  000000010006971c _start (0, 0, 0, 0, 0, 0) + 17c
>>> root at delta:/usr/local/ncl_ncarg-5.1.1/bin #
>>> _______________________________________________
>>> ncl-install mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-install
>>
>
>


More information about the ncl-install mailing list