Re: Help debugging HP-UX 11.11 lftp hang
Rippy <lftp <at> tarpit.ca>
2009-02-09 18:46:57 GMT
Hello,
It appears to be spinning in xstring::vappendf, with "len" at 1GB seeming
a bit large:
Program received signal SIGINT, Interrupt
si_code: 0 - .
0x7aff2210 in _doprnt+0x48 () from /usr/lib/libc.2
(gdb) bt
#0 0x7aff2210 in _doprnt+0x48 () from /usr/lib/libc.2
#1 0x7b004c4c in vsnprintf+0x54 () from /usr/lib/libc.2
#2 0x705d8 in xstring::vappendf (this=<incomplete type>, format=0xe7d5c
"`%s' at %lld %s%s%s%s", ap=0x7f7f0e3c)
at xstring.cc:260
#3 0x70fd0 in xstring::format (fmt=0xe7d5c "`%s' at %lld %s%s%s%s") at
xstring.h:164
#4 0x49f80 in CopyJob::Status (this=<incomplete type>, s=0x7b00c10f,
base=193) at CopyJob.cc:87
#5 0x49fb8 in CopyJob::Fg (this=<incomplete type>) at CopyJob.cc:95
#6 0x34298 in Job::ShowRunStatus (this=<incomplete type>, sl= <at> 0xe7d5c) at
Job.cc:457
#7 0x34298 in Job::ShowRunStatus (this=<incomplete type>, sl= <at> 0xe7d5c) at
Job.cc:457
#8 0x36058 in CmdFeeder::~CmdFeeder (this=<incomplete type>) at
CmdExec.cc:701
#9 0x380b0 in CmdExec::Do (this=<incomplete type>) at CmdExec.cc:571
(gdb) b xstring.cc:260
Breakpoint 1 at 0x705b8: file xstring.cc, line 260 from
/home/georgg/bin/lftp.
(gdb) c
Continuing.
Breakpoint 1, xstring::vappendf (this=<incomplete type>, format=0xe7d5c
"`%s' at %lld %s%s%s%s", ap=0x7f7f0e3c)
at xstring.cc:260
260 size_t res=vsnprintf(buf+len, size-len, format, tmp);
(gdb) clear
Deleted breakpoint 1
(gdb) n
259 VA_COPY(tmp,ap);
(gdb) n
260 size_t res=vsnprintf(buf+len, size-len, format, tmp);
(gdb) n
262 if(res>=0 && res<size-len)
(gdb) n
260 size_t res=vsnprintf(buf+len, size-len, format, tmp);
(gdb) n
267 get_space(res>size-len ? len+res+1 : len+(size-len)*2);
(gdb) n
262 if(res>=0 && res<size-len)
(gdb) n
267 get_space(res>size-len ? len+res+1 : len+(size-len)*2);
(gdb) n
255 get_space(len+strlen(format)+32);
(gdb) n
260 size_t res=vsnprintf(buf+len, size-len, format, tmp);
(gdb) n
259 VA_COPY(tmp,ap);
(gdb) n
260 size_t res=vsnprintf(buf+len, size-len, format, tmp);
(gdb) n
262 if(res>=0 && res<size-len)
(gdb) n
260 size_t res=vsnprintf(buf+len, size-len, format, tmp);
(gdb) n
267 get_space(res>size-len ? len+res+1 : len+(size-len)*2);
(gdb) n
262 if(res>=0 && res<size-len)
(gdb) n
267 get_space(res>size-len ? len+res+1 : len+(size-len)*2);
(gdb) n
255 get_space(len+strlen(format)+32);
(gdb) n
260 size_t res=vsnprintf(buf+len, size-len, format, tmp);
(gdb) p res
$1 = 64
(gdb) p len
$2 = 1073782568
(gdb) p buf
Internal error: `this' is not an aggregate
(gdb) p size
Internal error: `this' is not an aggregate
(gdb) p format
$3 = 0xe7d5c "`%s' at %lld %s%s%s%s"
(gdb) p tmp
$4 = 0x7f7f0e3c
(gdb) p {char}buf
Internal error: `this' is not an aggregate
(gdb)
G.
> I'm compiling lftp 3.7.8 for HP-UX 11.11, and having some trouble: lftp
> hangs at 100% CPU, during the file transfer (if it's a large one and ssl
> is enabled) or at the end if it's small or not ssl.
>
> How should I persue this? Here's one test session, talking to proftpd on
> HPUX:
> /home/user1/test $cat cnha.lftp
> set ftp:ssl-allow off
> set ftp:passive-mode off
> #set ftp:fix-pasv-address on
> set ftp:ignore-pasv-address yes
> debug 5
> open cnha.gov.ab.ca -u user2,dumbpassword
> ls gpg149-hpux.tar
> get gpg149-hpux.tar
> bye
> /home/user1/test $lftp -f cnha.lftp
> ---- Resolving host address...
> ---- 1 address found: 199.214.232.217
> ---- Connecting to cnha.gov.ab.ca (199.214.232.217) port 21
> <--- 220 ProFTPD 1.3.1 Server (CNHA FTPES Server) [199.214.232.217]
> ---> FEAT
> <--- 211-Features:
> MDTM
> AUTH TLS
> PBSZ
> PROT
> REST STREAM
> SIZE
> <--- 211 End
> ---> USER user2
> <--- 331 Password required for user2
> ---> PASS dumbpassword
> <--- 230 User user2 logged in
> ---> PWD
> <--- 257 "/home/user2" is the current directory
> ---> PORT 199,214,232,217,211,17
> <--- 200 PORT command successful
> ---> LIST gpg149-hpux.tar
> ---- Accepted data connection from (199.214.232.217) port 20
> <--- 150 Opening ASCII mode data connection for file list
> -rw-rw-r-- 1 user2 oss 61409280 Dec 15 20:56 gpg149-hpux.tar
> <--- 226 Transfer complete
> ---> TYPE I
> <--- 200 Type set to I
> ---> SIZE gpg149-hpux.tar
> <--- 213 61409280
> ---> MDTM gpg149-hpux.tar
> <--- 213 20081215205655
> ---> PORT 199,214,232,217,211,18
> <--- 200 PORT command successful
> ---> RETR gpg149-hpux.tar
> ---- Accepted data connection from (199.214.232.217) port 20
> <--- 150 Opening BINARY mode data connection for gpg149-hpux.tar (61409280
> bytes)
> <--- 226 Transfer complete
>
> ... at this point the process hangs at 100% CPU.
>
> From config.log:
> Target: hppa2.0w-hp-hpux11.11
> Configured with: ../gcc/configure
> Thread model: posix
> gcc version 4.1.2
>
> My developer skills are quite limited on this platform. Where should I
> look next?
> Rippy
>
>
>
>