[ncl-talk] Seg fault on draw() after a WRAPIT function call

Alan Brammer abrammer at albany.edu
Tue Jun 30 14:34:41 MDT 2015


I have a bizarre error, where after I have processed data through a fortran
function. When I call the plotting routines I will then get a seg-fault.


pseudo-code

external ex01 "./somefunctions.so"

plot = gsn_csm_map(wks, mpres)
draw(plot)
frame(wks)
;; everything is fine.


ex01::somefunction(data,data2)
printVarSummary(data)
;; everything is still fine.

plot = gsn_csm_map(wks, mpres)
 printVarSummary(plot)
;; everything still good.


draw(plot)  ;; and now we seg fault.


Below is the memory dump I got on one occasion.
I can send the code to one of the devs for further delving if needed.

Thanks,
Alan.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


*** glibc detected *** ncl: free(): invalid next size (normal):
0x000000001d0c7530 ***

======= Backtrace: =========

/lib64/libc.so.6[0x3e89e714af]

/lib64/libc.so.6(cfree+0x4b)[0x3e89e757ab]

ncl(NhlFree+0xe)[0xacc6c5]

ncl(_NhlSetLayerValues+0x659)[0xaa3d5b]

ncl(NhlVASetValues+0xf2)[0xaa42be]

ncl[0xb086f7]

ncl[0xb08cae]

ncl[0xa9761c]

ncl(_NhlDraw+0x7f)[0xa97845]

ncl[0xafd72b]

ncl[0xa9761c]

ncl(_NhlPlotManagerDraw+0xbd)[0xa97999]

ncl(NhlDraw+0xd1)[0xa97af1]

ncl(_NclIDraw+0xaa)[0x8610fb]

ncl(CallINTRINSIC_PROC_CALL+0x43)[0x80e472]

ncl(_NclExecute+0x3e8)[0x8160d5]

ncl(yyparse+0x78f)[0x6d9a59]

ncl(NclDriver+0xc23)[0x6d61b2]

ncl(main+0x9)[0x6d27c1]

/lib64/libc.so.6(__libc_start_main+0xf4)[0x3e89e1d9f4]

ncl(vfprintf+0x729)[0x6d2709]

======= Memory map: ========

00400000-0254a000 r-xp 00000000 00:13 85713900
/nfs/ct12/abrammer/ncl6.3.0/bin/ncl

02749000-0299a000 rw-p 02149000 00:13 85713900
/nfs/ct12/abrammer/ncl6.3.0/bin/ncl

0299a000-06bd9000 rw-p 0299a000 00:00 0

14210000-1d1ba000 rw-p 14210000 00:00 0
[heap]

3e89a00000-3e89a1c000 r-xp 00000000 08:01 5096834
/lib64/ld-2.5.so

3e89c1c000-3e89c1d000 r--p 0001c000 08:01 5096834
/lib64/ld-2.5.so

3e89c1d000-3e89c1e000 rw-p 0001d000 08:01 5096834
/lib64/ld-2.5.so

3e89e00000-3e89f4f000 r-xp 00000000 08:01 5096835
/lib64/libc-2.5.so

3e89f4f000-3e8a14f000 ---p 0014f000 08:01 5096835
/lib64/libc-2.5.so

3e8a14f000-3e8a153000 r--p 0014f000 08:01 5096835
/lib64/libc-2.5.so

3e8a153000-3e8a154000 rw-p 00153000 08:01 5096835
/lib64/libc-2.5.so

3e8a154000-3e8a159000 rw-p 3e8a154000 00:00 0

3e8a200000-3e8a282000 r-xp 00000000 08:01 5096849
/lib64/libm-2.5.so

3e8a282000-3e8a481000 ---p 00082000 08:01 5096849
/lib64/libm-2.5.so

3e8a481000-3e8a482000 r--p 00081000 08:01 5096849
/lib64/libm-2.5.so

3e8a482000-3e8a483000 rw-p 00082000 08:01 5096849
/lib64/libm-2.5.so

3e8a600000-3e8a602000 r-xp 00000000 08:01 5096852
/lib64/libdl-2.5.so

3e8a602000-3e8a802000 ---p 00002000 08:01 5096852
/lib64/libdl-2.5.so

3e8a802000-3e8a803000 r--p 00002000 08:01 5096852
/lib64/libdl-2.5.so

3e8a803000-3e8a804000 rw-p 00003000 08:01 5096852
/lib64/libdl-2.5.so

3e8aa00000-3e8aa14000 r-xp 00000000 08:01 5096841
/lib64/libz.so.1.2.3

3e8aa14000-3e8ac13000 ---p 00014000 08:01 5096841
/lib64/libz.so.1.2.3

3e8ac13000-3e8ac14000 rw-p 00013000 08:01 5096841
/lib64/libz.so.1.2.3

3e8ae00000-3e8ae16000 r-xp 00000000 08:01 5096903
/lib64/libpthread-2.5.so

3e8ae16000-3e8b016000 ---p 00016000 08:01 5096903
/lib64/libpthread-2.5.so

3e8b016000-3e8b017000 r--p 00016000 08:01 5096903
/lib64/libpthread-2.5.so

3e8b017000-3e8b018000 rw-p 00017000 08:01 5096903
/lib64/libpthread-2.5.so

3e8b018000-3e8b01c000 rw-p 3e8b018000 00:00 0

3e8b200000-3e8b305000 r-xp 00000000 08:01 661720
/usr/lib64/libX11.so.6.2.0

3e8b305000-3e8b505000 ---p 00105000 08:01 661720
/usr/lib64/libX11.so.6.2.0

3e8b505000-3e8b50c000 rw-p 00105000 08:01 661720
/usr/lib64/libX11.so.6.2.0

3e8b600000-3e8b60d000 r-xp 00000000 08:01 661728
/usr/lib64/libgomp.so.1.0.0

3e8b60d000-3e8b80d000 ---p 0000d000 08:01 661728
/usr/lib64/libgomp.so.1.0.0

3e8b80d000-3e8b80e000 rw-p 0000d000 08:01 661728
/usr/lib64/libgomp.so.1.0.0

3e8ba00000-3e8ba05000 r-xp 00000000 08:01 661604
/usr/lib64/libXdmcp.so.6.0.0

3e8ba05000-3e8bc04000 ---p 00005000 08:01 661604
/usr/lib64/libXdmcp.so.6.0.0

3e8bc04000-3e8bc05000 rw-p 00004000 08:01 661604
/usr/lib64/libXdmcp.so.6.0.0

3e8be00000-3e8be10000 r-xp 00000000 08:01 663683
/usr/lib64/libXext.so.6.4.0

3e8be10000-3e8c010000 ---p 00010000 08:01 663683
/usr/lib64/libXext.so.6.4.0

3e8c010000-3e8c011000 rw-p 00010000 08:01 663683
/usr/lib64/libXext.so.6.4.0

3e8c200000-3e8c27f000 r-xp 00000000 08:01 658528
/usr/lib64/libfreetype.so.6.3.10

3e8c27f000-3e8c47f000 ---p 0007f000 08:01 658528
/usr/lib64/libfreetype.so.6.3.10

3e8c47f000-3e8c484000 rw-p 0007f000 08:01 658528
/usr/lib64/libfreetype.so.6.3.10

3e8c600000-3e8c621000 r-xp 00000000 08:01 5096843
/lib64/libexpat.so.0.5.0

3e8c621000-3e8c820000 ---p 00021000 08:01 5096843
/lib64/libexpat.so.0.5.0

3e8c820000-3e8c823000 rw-p 00020000 08:01 5096843
/lib64/libexpat.so.0.5.0

3e8ca00000-3e8ca07000 r-xp 00000000 08:01 5096905
/lib64/librt-2.5.so

3e8ca07000-3e8cc07000 ---p 00007000 08:01 5096905
/lib64/librt-2.5.so

3e8cc07000-3e8cc08000 r--p 00007000 08:01 5096905
/lib64/librt-2.5.so

3e8cc08000-3e8cc09000 rw-p 00008000 08:01 5096905
/lib64/librt-2.5.so

3e8d200000-3e8d229000 r-xp 00000000 08:01 659871
/usr/lib64/libfontconfig.so.1.1.0

3e8d229000-3e8d429000 ---p 00029000 08:01 659871
/usr/lib64/libfontconfig.so.1.1.0

3e8d429000-3e8d433000 rw-p 00029000 08:01 659871
/usr/lib64/libfontconfig.so.1.1.0

3e8d433000-3e8d434000 rw-p 3e8d433000 00:00 0

3e8d600000-3e8d609000 r-xp 00000000 08:01 661844
/usr/lib64/libXrender.so.1.3.0

3e8d609000-3e8d808000 ---p 00009000 08:01 661844
/usr/lib64/libXrender.so.1.3.0

3e8d808000-3e8d809000 rw-p 00008000 08:01 661844
/usr/lib64/libXrender.so.1.3.0

3e8fe00000-3e8fe0d000 r-xp 00000000 08:01 5096853
/lib64/libgcc_s-4.1.2-20080825.so.1

3e8fe0d000-3e9000d000 ---p 0000d000 08:01 5096853
/lib64/libgcc_s-4.1.2-20080825.so.1

3e9000d000-3e9000e000 rw-p 0000d000 08:01 5096853
/lib64/libgcc_s-4.1.2-20080825.so.1

3e90600000-3e906e6000 r-xp 00000000 08:01 664282
/usr/lib64/libstdc++.so.6.0.8

3e906e6000-3e908e5000 ---p 000e6000 08:01 664282
/usr/lib64/libstdc++.so.6.0.8

3e908e5000-3e908eb000 r--p 000e5000 08:01 664282
/usr/lib64/libstdc++.so.6.0.8

3e908eb000-3e908ee000 rw-p 000eb000 08:01 664282
/usr/lib64/libstdc++.so.6.0.8

3e908ee000-3e90900000 rw-p 3e908ee000 00:00 0

3e90e00000-3e90e15000 r-xp 00000000 08:01 5096863
/lib64/libselinux.so.1

3e90e15000-3e91015000 ---p 00015000 08:01 5096863
/lib64/libselinux.so.1

3e91015000-3e91017000 rw-p 00015000 08:01 5096863
/lib64/libselinux.so.1

3e91017000-3e91018000 rw-p 3e91017000 00:00 0

3e91200000-3e9123b000 r-xp 00000000 08:01 5096861
/lib64/libsepol.so.1

3e9123b000-3e9143b000 ---p 0003b000 08:01 5096861
/lib64/libsepol.so.1

3e9143b000-3e9143c000 rw-p 0003b000 08:01 5096861
/lib64/libsepol.so.1

3e9143c000-3e91446000 rw-p 3e9143c000 00:00 0

3e93c00000-3e93c15000 r-xp 00000000 08:01 5097142
/lib64/libnsl-2.5.so

3e93c15000-3e93e14000 ---p 00015000 08:01 5097142
/lib64/libnsl-2.5.so

3e93e14000-3e93e15000 r--p 00014000 08:01 5097142
/lib64/libnsl-2.5.so

3e93e15000-3e93e16000 rw-p 0001Abort
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150630/4ca33d41/attachment.html 


More information about the ncl-talk mailing list