[DebianGIS-dev] Bug#611338: ncdump seems to support OpenDAP URI's only up to 55 characters long

2011-01-28 Thread Ivan Shmakov
One more observation: while trying to investigate the problem
further, I've tried to turn the logging feature of the ‘oc’
library (which is part of NetCDF) on via setting the ‘OCLOGFILE’
environment variable to point to a file.  Instantly, the issue
was no more.  Consider, e. g.:

$ OCLOGFILE=/dev/null \
  ncdump -h 
http://nomads.ncep.noaa.gov:9090/dods/gfs_hd/gfs_hd20110128/gfs_hd_00z\?tmpsfc 
netcdf gfs_hd_00z {
dimensions:
lat = 361 ;
lon = 720 ;
time = 65 ;
variables:
float tmpsfc(time, lat, lon) ;
tmpsfc:_FillValue = 9.999e+20f ;
tmpsfc:missing_value = 9.999e+20f ;
tmpsfc:long_name = "** surface temperature [k] " ;

// global attributes:
:title = "GFS half degree (0.5x0.5) fcst starting from 
00Z28jan2011, downloaded Jan 28 04:33 UTC" ;
:Conventions = "COARDS\n",
"GrADS" ;
:dataType = "Grid" ;
:history = "Fri Jan 28 04:37:22 UTC 2011 : imported by GrADS 
Data Server 2.0" ;
}
$ 

… A Heisenbug?

-- 
FSF associate member #7257


pgpRZ1bPclnE6.pgp
Description: PGP signature
___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel

[DebianGIS-dev] Bug#611338: ncdump seems to support OpenDAP URI's only up to 55 characters long

2011-01-28 Thread Ivan Shmakov
> Ivan Shmakov  writes:

[BTW, I've found that the issue exists down at the nc_open ()
call level, so this report should probably be reassigned to
libnetcdf6 and retitled appropriately.]

[…]

 > On the other hand, the URI's of 55 characters and less are handled
 > differently, and the requests are being made:

[…]

While checking strace(1) and ltrace(1) output, I've found that
the correct behavior coincides with a single DNS request, while
the buggy one coincides with three.

Thus, I've breakpointed GDB at recvfrom () and got the
backtraces MIME'd.  As far as I can see, the URL is correctly
passed down to the ocfetchurl () NetCDF internal function.

Unfortunately, even though libcurl3-dbg is installed, the
arguments to the Curl_* functions aren't shown.

Any hints?

$ dpkg -l \*-dbg | grep -E ^i 
ii  libcurl3-dbg  7.21.0-1   libcurl compiled with debug symbols
ii  netcdf-dbg1:4.1.1-5  debugging symbols for NetCDF
$ 

-- 
FSF associate member #7257
(gdb) r
Starting program: /usr/bin/ncdump -k 
http://nomads.ncep.noaa.gov:9090/dods/gfs_hd/gfs_hd2011 # 128/gfs_hd_00z
[Thread debugging using libthread_db enabled]

Breakpoint 5, 0x76934e20 in recvfrom () from /lib/libc.so.6
(gdb) bt
#0  0x76934e20 in recvfrom () from /lib/libc.so.6
#1  0x75459b09 in ?? () from /lib/libresolv.so.2
#2  0x75457a75 in __libc_res_nquery () from /lib/libresolv.so.2
#3  0x75458031 in ?? () from /lib/libresolv.so.2
#4  0x7545843d in __libc_res_nsearch () from /lib/libresolv.so.2
#5  0x73d15c37 in _nss_dns_gethostbyname4_r ()
   from /lib/libnss_dns.so.2
#6  0x7691048c in ?? () from /lib/libc.so.6
#7  0x76912782 in getaddrinfo () from /lib/libc.so.6
#8  0x77bc8af2 in Curl_getaddrinfo_ex ()
   from /usr/lib/libcurl-gnutls.so.4
#9  0x77bc2818 in Curl_getaddrinfo () from /usr/lib/libcurl-gnutls.so.4
#10 0x77b9976c in Curl_resolv () from /usr/lib/libcurl-gnutls.so.4
#11 0x77b99897 in Curl_resolv_timeout ()
   from /usr/lib/libcurl-gnutls.so.4
#12 0x77babcb6 in ?? () from /usr/lib/libcurl-gnutls.so.4
#13 0x77babd83 in Curl_connect () from /usr/lib/libcurl-gnutls.so.4
#14 0x77bb646f in ?? () from /usr/lib/libcurl-gnutls.so.4
#15 0x77650c61 in ocfetchurl (curl=0x665270,
url=0x66e050 "http://nomads.ncep.noaa.gov:9090/dods/gfs_hd/gfs_hd2011.dds";, 
buf=0x64f1b0, filetime=0x7fffe038) at http.c:110
#16 0x77658a75 in readpacket (curl=0x665270,
url=, packet=0x64f1b0, dxd=,
lastmodified=0x7fffb8c0) at read.c:76
#17 0x77658bf9 in readDDS (state=0x66df50, tree=)
at read.c:31
#18 0x7764fdeb in ocfetch (state=0x66df50, constraint=0x0, kind=0,
rootp=0x7fffe0d8) at ocinternal.c:255
#19 0x7764ba3a in oc_fetch (conn=7, constraint=0x7fffc5c0 "\001",
dxdkind=0, rootp=0x7fffe158) at oc.c:593
#20 0x77655c65 in dap_oc_fetch (drno=0x648000, conn=6741840, ce=0x0,
dxd=0, rootp=0x7fffe158) at daputil.c:958
#21 0x7764d51b in fetchtemplatemetadata3 (drno=0x648000)
at ncdap3.c:1323
#22 0x7764e89f in nc3d_open (path=,
mode=, ncidp=0x647f50) at ncdap3.c:199
#23 0x77612b19 in l4nc_open_file (
path=0x613040 "http://nomads.ncep.noaa.gov:9090/dods/gfs_hd/gfs_hd2011";,
mode=0, basepe=0, chunksizehintp=0x0, use_parallel=,
comm=, info=0, ncidp=0x7fffe3ec) at nc4file.c:2338
#24 0x7765f008 in nc4d_open_file (
path=0x613040 "http://nomads.ncep.noaa.gov:9090/dods/gfs_hd/gfs_hd2011";,
mode=0, basepe=,
chunksizehintp=, use_parallel=0, comm=0, info=0,
ncidp=0x7fffe48c) at ncdap4.c:122
#25 0x776103bf in nc_open (path=0x7 ,
mode=-14912, ncidp=) at nc4file.c:2400
#26 0x00405d39 in main (argc=, argv=0x613160)
at ncdump.c:2127
(gdb) 
(gdb) r 
Starting program: /usr/bin/ncdump -k 
http://nomads.ncep.noaa.gov:9090/dods/gfs_hd/gfs_hd2011128/gfs_hd_00z
[Thread debugging using libthread_db enabled]

Breakpoint 5, 0x76934e20 in recvfrom () from /lib/libc.so.6
(gdb) bt
#0  0x76934e20 in recvfrom () from /lib/libc.so.6
#1  0x75459b09 in ?? () from /lib/libresolv.so.2
#2  0x75457a75 in __libc_res_nquery () from /lib/libresolv.so.2
#3  0x75458031 in ?? () from /lib/libresolv.so.2
#4  0x7545843d in __libc_res_nsearch () from /lib/libresolv.so.2
#5  0x73d15c37 in _nss_dns_gethostbyname4_r ()
   from /lib/libnss_dns.so.2
#6  0x7691048c in ?? () from /lib/libc.so.6
#7  0x76912782 in getaddrinfo () from /lib/libc.so.6
#8  0x77bc8af2 in Curl_getaddrinfo_ex ()
   from /usr/lib/libcurl-gnutls.so.4
#9  0x77bc2818 in Curl_getaddrinfo () from /usr/lib/libcurl-gnutls.so.4
#10 0x77b9976c in Curl_resolv () from /usr/lib/libc

[DebianGIS-dev] Bug#611338: ncdump seems to support OpenDAP URI's only up to 55 characters long

2011-01-28 Thread Ivan Shmakov
Package: netcdf-bin
Version: 1:4.1.1-5

Apparently, ncdump doesn't support OpenDAP URI's of 56
characters or more in length.  Consider, e. g.:

$ ncdump -k 
http://nomads.ncep.noaa.gov:9090/dods/gfs_hd/gfs_hd20110128/gfs_hd_00z 
ncdump: http://nomads.ncep.noaa.gov:9090/dods/gfs_hd/gfs_hd20110128/gfs_hd_00z: 
NetCDF: I/O failure
$ 

I've checked the proxy logs, and no HTTP request is recorded
upon the command above.  The behavior is the same should the URI
be truncated to 56 characters:

$ ncdump -k http://nomads.ncep.noaa.gov:9090/dods/gfs_hd/gfs_hd20110 
ncdump: http://nomads.ncep.noaa.gov:9090/dods/gfs_hd/gfs_hd20110: NetCDF: I/O 
failure
$ 

On the other hand, the URI's of 55 characters and less are
handled differently, and the requests are being made:

$ ncdump -k http://nomads.ncep.noaa.gov:9090/dods/gfs_hd/gfs_hd2011 
ncdump: http://nomads.ncep.noaa.gov:9090/dods/gfs_hd/gfs_hd2011: NetCDF: DAP 
server error
$ ncdump -k http://test.opendap.org:8080/dods/dts/test.01 
64-bit offset
$ 

-- 
FSF associate member #7257


pgpaWCER8XmLM.pgp
Description: PGP signature
___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel