#8 glibc detected for ncatted

closed
None
5
2007-09-25
2007-09-25
No

I am taking in a large WRF netcdf file, subsetting the file with three variables, adding a variable and either modifying or the :standard_name attribute to the four variables.

Each time I run ncatted, I see the message "*** glibc detected *** double free or corruption (fasttop): 0x087d8558 ***"

After my script finishes, the variable attributes are edited as desired. Is there a need to fix this? Does this program need to be recompiled? Do I not have the correct C library in my path for this to work with no errors?

$result = qx(`/share/apps/netcdf/bin/ncgen -b -o $tempncname $tempcdlname`);

# append our time netcdf file to our WRF netcdf file
$result = qx(`/usr/bin/ncks -A $tempncname $filename `);

# add standard_name variable attributes
qx(`/usr/bin/ncatted -O -h -a standard_name,U10,o,c,eastward_wind $filename`);
qx(`/usr/bin/ncatted -O -h -a standard_name,V10,o,c,northward_wind $filename`);
qx(`/usr/bin/ncatted -O -h -a standard_name,PSFC,o,c,air_pressure $filename`);
#
qx(`/usr/bin/ncatted -O -a model,global,c,c,wrf $filename`);

$ ncatted -r
NCO netCDF Operators version "3.0.1" last modified 2005/05/25 built Aug 23 2005 on guru.build.karan.org by mockbuild
Copyright (C) 1995--2005 Charlie Zender
ncatted version 3.0.1
NCO is free software and comes with ABSOLUTELY NO WARRANTY
NCO is distributed under the terms of the GNU General Public License
Linked to netCDF library version VERSION, compiled Aug 11 2005 15:18:08
Homepage URL: http://nco.sf.net
User's Guide: http://nco.sf.net/nco.html
Configuration Option: Active? Meaning or Reference:
Debugging: Custom No Pedantic, bounds checking (slowest execution)
Debugging: Symbols No Produce symbols for debuggers (e.g., dbx, gdb)
DODS/OPeNDAP clients Yes http://nco.sf.net/nco.html#DODS
Internationalization No http://nco.sf.net/nco.html#i18n (pre-alpha)
Large File Support No http://nco.sf.net/nco.html#lfs
OpenMP threading No http://nco.sf.net/nco.html#omp (beta testing)
Optimization: run-time No Fastest execution possible (slowest compilation)
Shared libraries built Yes Small, dynamically linked executables
Static libraries built Yes Large executables with private namespaces
UDUnits conversions Yes http://nco.sf.net/nco.html#UDUnits
Wildcarding (regex) Yes http://nco.sf.net/nco.html#rx
$
ncdump BEFORE using ncatted:
$ ncdump -h WWRFv221-TAM_20070818T0600_20070818T0600_20070822T0600_00.nc.gz | more
netcdf WWRFv221-TAM_20070818T0600_20070818T0600_20070822T0600_00.nc {
dimensions:
Time = UNLIMITED ; // (98 currently)
west_east = 559 ;
south_north = 419 ;
variables:
float PSFC(Time, south_north, west_east) ;
PSFC:FieldType = 104 ;
PSFC:MemoryOrder = "XY " ;
PSFC:description = "SFC PRESSURE" ;
PSFC:units = "Pa" ;
PSFC:stagger = "" ;
PSFC:coordinates = "XLONG XLAT" ;
float U10(Time, south_north, west_east) ;
U10:FieldType = 104 ;
U10:MemoryOrder = "XY " ;
U10:description = "U at 10 M" ;
U10:units = "m s-1" ;
U10:stagger = "" ;
U10:coordinates = "XLONG XLAT" ;
float V10(Time, south_north, west_east) ;
V10:FieldType = 104 ;
V10:MemoryOrder = "XY " ;
V10:description = "V at 10 M" ;
V10:units = "m s-1" ;
V10:stagger = "" ;
V10:coordinates = "XLONG XLAT" ;

// global attributes:
:TITLE = " OUTPUT FROM WRF V2.2 MODEL" ;
.......

$ /usr/bin/ncatted -O -h -a standard_name,U10,o,c,eastward_wind WWRFv221-TAM_20070818T0600_20070818T0600_20070822T0600_00.nc.gz
*** glibc detected *** double free or corruption (fasttop): 0x09871578 ***
Aborted
$
ncdump AFTER using ncatted:
$ ncdump -h WWRFv221-TAM_20070818T0600_20070818T0600_20070822T0600_00.nc.gz | more
netcdf WWRFv221-TAM_20070818T0600_20070818T0600_20070822T0600_00.nc {
dimensions:
Time = UNLIMITED ; // (98 currently)
west_east = 559 ;
south_north = 419 ;
variables:
float PSFC(Time, south_north, west_east) ;
PSFC:FieldType = 104 ;
PSFC:MemoryOrder = "XY " ;
PSFC:description = "SFC PRESSURE" ;
PSFC:units = "Pa" ;
PSFC:stagger = "" ;
PSFC:coordinates = "XLONG XLAT" ;
float U10(Time, south_north, west_east) ;
U10:FieldType = 104 ;
U10:MemoryOrder = "XY " ;
U10:description = "U at 10 M" ;
U10:units = "m s-1" ;
U10:stagger = "" ;
U10:coordinates = "XLONG XLAT" ;
U10:standard_name = "eastward_wind" ;
float V10(Time, south_north, west_east) ;
V10:FieldType = 104 ;
V10:MemoryOrder = "XY " ;
V10:description = "V at 10 M" ;
V10:units = "m s-1" ;
V10:stagger = "" ;
V10:coordinates = "XLONG XLAT" ;

// global attributes:
:TITLE = " OUTPUT FROM WRF V2.2 MODEL" ;
.......

Discussion

  • Perl script text

     
    Attachments
  • Charlie Zender
    Charlie Zender
    2007-09-25

    • assigned_to: nobody --> zender
    • status: open --> closed
     
  • Charlie Zender
    Charlie Zender
    2007-09-25

    Logged In: YES
    user_id=6408
    Originator: NO

    These warnings are caused by a memory-free() problem in NCO that has (I think) been fixed.
    When you run NCO with a C-library (e.g., redhat) that has been been compiled to flag such problems,
    that warning showed up. Otherwise it didn't. We now regularly build on such armored C-libraries.
    We identified and eliminated the known memory problem about two years ago.
    In any case, the command works as advertised and your output files are fine
    (it was a memory problem in the clean up, long after the output has been written).
    To get rid of the warning, update to a newer NCO, e.g., by installing a newer RPM.

    http://nco.sf.net#rpm