Subject: Re: fetchmail hang, dud read error?
To: Jaromir Dolecek <jdolecek@netbsd.org>
From: Andrew Cagney <cagney@mac.com>
List: current-users
Date: 08/15/2002 11:45:49
> This seems as if kdump would thing the binary is running under linux
> emulation, while it isn't. Can you spot any EMUL records for fetchmail
> pid 8983?
> 

   8983 ktrace   EMUL  "netbsd"
   8983 ktrace   CALL  execve(0xffffe7ef,0xffffe740,0xffffe750)
   8983 ktrace   NAMI  "./work.powerpc/fetchmail-5.9.13/fetchmail"
   8983 ktrace   NAMI  "/usr/libexec/ld.elf_so"
   8983 fetchmail EMUL  "netbsd"

I think the hang occures:

>   8983 fetchmail CALL  write(0x1,0x1893000,0x13)
>   8983 fetchmail GIO   fd 1 wrote 19 bytes
>        "fetchmail: IMAP< )
>        "
>   8983 fetchmail RET   write 19/0x13
>   8983 fetchmail CALL  setitimer(0,0xffff99e8,0)
>   8983 fetchmail RET   setitimer 0
>   8983 fetchmail CALL  read(0x3,0x18af000,0x5)
>   8983 fetchmail GIO   fd 3 read 5 bytes
>        "\^W\^C\^A\0\^X"
>   8983 fetchmail RET   read 5
>   8983 fetchmail CALL  read(0x3,0x18af005,0x18)
>   8983 fetchmail GIO   fd 3 read 24 bytes
> 
> "\M^Qk\M^Fg\M-5\M^@\M-\o9\M-X0A\M-T\M^@\M-I\M-`\M-S\^PW\M-`\M-\\M-<\^[
>        "
>   8983 fetchmail RET   read 24/0x18
>   8983 fetchmail CALL  read(0x3,0x18af000,0x5)

HERE

I think the errno -3 is due to the cntrl-c.


>   8983 fetchmail RET   read -1 errno -3 Unknown error: 4294967293
>   8983 fetchmail PSIG  SIGINT caught handler=0x18107c0 mask=() code=0x0
>   8983 fetchmail CALL  write(0x1,0x1893000,0x24)
>   8983 fetchmail GIO   fd 1 wrote 36 bytes

The above data is jibberish as SSL is also involved (....).  Is it 
possible to separate out SSL (using openssl and a fetchmail plugin -- I 
know the plug-in bit just not the openssl bit).

Right now my theory is that the buffer contains the correct response 
(0006 OK Completed) but also some leading jibberish :-(