[Thread Prev][Thread Next][Index]

Re: [ferret_users] Segmentation fault with long global attrubute



Title: Segmentation fault with long global attrubute
Thanks for the report Mike! 
I can see this  happening and it is a bug. There are a lot of fixed-length Fortran strings inside Ferret.  We'll get this fixed.

Ferret hanging when trying to write is also a bug!  That one is odd because by default Ferret only writes two global attributes - history and Conventions. I'll see what that's about but a workaround is to redefine the value of the attribute:

   yes? use "http://dods.mbari.org/opendap/data/ssdsdata/deployments/m0/200406/m0_ctd0001_20040727_original.nc"

   yes? set att ..ssds_provenance = "my short string"
    *** NOTE: Changing the value of attribute ..ssds_provenance
   yes? save/L=1:15/clobber/file=shortatt.nc temperature, conductivity, salinity
    LISTing to file shortatt.nc


And thanks for the note about the typo - always good to fix such things.

-Ansley

On 9/23/2010 12:46 PM, McCann, Mike wrote:
Hello,

While experimenting with adding some very long global attributes to my in situ netCDF files I encountered what I think might be a bug in Ferret:

> ferret
        NOAA/PMEL TMAP
        FERRET v6.62  
        Linux rh5 (gfortran) 2.6.18-164.11.1.el5 - 06/11/10
        23-Sep-10 12:28     

yes? use "http://dods.mbari.org/opendap/data/ssdsdata/deployments/m0/200406/m0_ctd0001_20040727_original.nc"
yes? show data/attributes
     currently SET data sets:
    1> http://dods.mbari.org/opendap/data/ssdsdata/deployments/m0/200406/m0_ctd0001_20040727_original.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               Unlimited_DimensCHAR        4    F       time
                                 naming_authorityCHAR        33   F       org.mbari.ssds.DataContainer.Name
                                 SIAM_metadata   CHAR        175  F       http://new-ssds.mbari.org:8080/servlet/GetOriginalDataServlet?deviceID=1338&startTimestampSeconds=1090952259&endTimestampSeconds=1097085600&recordTypeID=0&noHTMLHeader=1&isi=1
                                 standard_name_voCHAR  ry    6    F       CF-1.0
                                 keywords        CHAR        16   F       ocean; Moorings;
                                 cdm_data_type   CHAR        7    F       Station
                                 geospatial_vertiCHAR  sitive4    F       down
                                 summary         CHAR        144  F       Observational oceanographic data obtained from a moored platform.  Sensors placed on the mooring record environmental parameters as time passes.
                                 keywords_vocabulCHAR        4    F       GCMD
                                 title           CHAR        80   F       Mooring M0 CTD data from MBARI instrument id 1338 at original sampling intervals
                                 Conventions     CHAR        6    F       CF-1.0
                                 creator_name    CHAR        26   F       DStoNetCDF.pl version 1.52
                                 time_coverage_stCHAR        20   F       2004-07-27T18:17:45Z
                                 time_coverage_enCHAR        20   F       2004-10-06T17:56:12Z
                                 date_created    CHAR        24   F       Thu Sep 23 09:27:19 2010
                                 id              CHAR        31   F       m0_ctd0001_20040727_original.nc
At line 239 of file tm_fmt.f
Fortran runtime error: Nonnegative width required in format
(1PG**.+8)
    ^
Segmentation fault


The full attributes are shown by our Hyrax server: http://dods.mbari.org/opendap/data/ssdsdata/deployments/m0/200406/m0_ctd0001_20040727_original.nc.info

It’s the ssds_provenance attribute at 3307 characters that apparently causes the problem.

Another dataset ( http://dods.mbari.org/opendap/data/ssdsdata/deployments/m0/200406/m0_ctd0001_20040604_original.nc.info) with 2187 characters properly reports an error message:

> ferret
        NOAA/PMEL TMAP
        FERRET v6.62  
        Linux rh5 (gfortran) 2.6.18-164.11.1.el5 - 06/11/10
        23-Sep-10 12:34     

yes? use "http://dods.mbari.org/opendap/data/ssdsdata/deployments/m0/200406/m0_ctd0001_20040604_original.nc"
yes? show data/attributes
     currently SET data sets:
    1> http://dods.mbari.org/opendap/data/ssdsdata/deployments/m0/200406/m0_ctd0001_20040604_original.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               Unlimited_DimensCHAR        4    F       time
                                 naming_authorityCHAR        33   F       org.mbari.ssds.DataContainer.Name
                                 SIAM_metadata   CHAR        175  F       http://new-ssds.mbari.org:8080/servlet/GetOriginalDataServlet?deviceID=1314&startTimestampSeconds=1086307200&endTimestampSeconds=1090951200&recordTypeID=0&noHTMLHeader=1&isi=1
                                 standard_name_voCHAR  ry    6    F       CF-1.0
                                 keywords        CHAR        16   F       ocean; Moorings;
                                 cdm_data_type   CHAR        7    F       Station
                                 geospatial_vertiCHAR  sitive4    F       down
                                 summary         CHAR        144  F       Observational oceanographic data obtained from a moored platform.  Sensors placed on the mooring record environmental parameters as time passes.
                                 keywords_vocabulCHAR        4    F       GCMD
                                 title           CHAR        80   F       Mooring M0 CTD data from MBARI instrument id 1314 at original sampling intervals
                                 Conventions     CHAR        6    F       CF-1.0
                                 creator_name    CHAR        26   F       DStoNetCDF.pl version 1.52
                                 time_coverage_stCHAR        20   F       2004-06-04T00:05:18Z
                                 time_coverage_enCHAR        20   F       2004-07-27T15:18:10Z
                                 date_created    CHAR        24   F       Thu Sep 23 09:22:08 2010
                                 id              CHAR        31   F       m0_ctd0001_20040604_original.nc
 *** NOTE: DC.name=m0_ctd0001_20040604_original.nc<br>DC.dataContainerType=File<br>DC.original=false<br>DC.uriString=http://dods.mbari.org/opendap/data/ssdsdata/deployments/m0/200406/m0_ctd0001_20040604_original.nc<br>DC.dodsAccessible=false<br>DC.dodsUrlString=http://dods.mbari.org/opendap/data/ssdsdata/deployments/m0/200406/m0_ctd0001_20040604_original.nc<br>DC.noNetCDF=true<br>+DP.name=DStoNetCDF.pl - ctd.pl run on 2010-09-23T16:22:01Z<br>+DP.description=DStoNetCDF.pl script executed with arguments: -mooring M0 -deployment M0 - June 2004 -ssdsServer new-ssds.mbari.org -ssdsDataServer new-ssds.mbari.org -outputDir /mbari/ssdsdata/deployments -procClosed -verbose<br>+DP.dataProducerType=ProcessRun<br>+DP.startDate=2010-09-23T16:22:01Z<br>+DP.endDate=2010-09-23T16:22:09Z<br>+DP.hostName=elvis<br>+Software.name=ctd.pl<br>+Software.description=Salinity is calculated from C, T, and P using conductivity ratio divisor of 4.29140.<br>+Software.uriString=http://moonjelly.shore.mbari.org/cgi-bin/cvsweb.cgi/DPforSSDS/cimt/ctd.pl?rev=1.52<br>+Software.softwareVersion=1.52<br>.+DC.name=1314_1_1_1299<br>.+DC.dataContainerType=File<br>.+DC.original=false<br>.+DC.uriString=http://new-ssds.mbari.org:8080/servlet/GetOriginalDataServlet?deviceID=1314&startParentID=1299&startPacketSubType=1&startDataDescriptionID=1&lastNumberOfPackets=10&isi=1<br>.+DC.dodsAccessible=false<br>.+DC.noNetCDF=true<br>..+DP.name=ID 1314 deployed on id 1299<br>..+DP.dataProducerType=Deployment<br>..+DP.startDate=2004-06-04T00:00:00Z<br>..+DP.endDate=2004-07-27T18:00:00Z<br>..+DP.role=instrument<br>..+DP.nominalDepth=1.0<br>...+Device.uuid=f671f7db-d50f-11d9-8c1e-00306e389969<br>...+Device.name=Serial CTD<br>...+Device.mfgName=Seabird<br>...+Device.mfgModel=SBE 37-SM V2.5<br>...+Device.mfgSerialNumber=3531<br>...+DP.dataProducerType=Deployment<br>...+DP.endDate=2007-01-26T19:56:21Z<br>...+DP.role=sensor<br>...+Device.uuid=76E60D98-77C4-45F5-AE00-3AF33F4FCA87<br>...+Device.name=Pressure Sensor<br>...+Device.mfgName=Seabird<br>...+Device.mfgModel=unknown<br>...+Devi:
 *** NOTE: Maximum characters: 2048
                                 ssds_provenance CHAR        2074 F       Maximum characters: 2048
                                 ....

Is there some way I can tell ferret to not use this attribute?  When I try and save variables from the former data set ferret just hangs.

BTW, there is a minor typo (missing a ‘T’) at http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/VARIABLES:

Chapter 3, Section 1.8.1
SHOW ATTRIBUTE commands

SHOW DATA/ATRIBUTE Expands the SHOW DATA output, listing dataset attributes and variable attributes
SHOW ATTRIBUTE varname.attname Lists the value(s) of an attribute. It gives the same information as LIST varname.attname
SHOW ATRIBUTE/ALL varname Lists all of the attributes for the variable


Thanks in advance,
Mike

--
Mike McCann
Software Engineer
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, CA 95039-9644
Voice: 831.775.1769  Fax: 831.775.1736 http://www.mbari.org



[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement