Problems stracing sendmail (FreeBSD 4.7)

Kyle Jamieson kasj78 at yahoo.com
Thu May 29 11:36:07 UTC 2003


When stracing sendmail on FreeBSD 4.7 with -f, -p
[pid], the child forked by sendmail (when sending
mail) gets three SIGCHLDs, and strace seems to give up
on the child, missing lots of the trace.  ktrace/kdump
don't give up, and I get to see everything the child
does.  

Questions -- why does the child get three SIGCHLDs? 
Why doesn't strace complete the trace of the child?

Here are the relevant portions of the traces (strace
and ktrace were run simultaenously on the same
sendmail, but the traces are unchanged when
individually s(k)tracing sendmail):

strace:
.
.
.
sigprocmask(SIG_BLOCK, [ALRM], [])      = 0
pipe([7, 8])                            = 7
sigprocmask(SIG_BLOCK, [CHLD], [ALRM])  = 0
fork()                                  = 27248
[pid   555] sigprocmask(SIG_UNBLOCK, [CHLD], [ALRM
CHLD]) = 0
[pid   555] close(7)                    = 0
[pid   555] close(6)                    = 0
[pid   555] close(8)                    = 0
[pid 27248] close(7 <unfinished ...>
.
.
.
[pid 27248] open("/etc/hosts", O_RDONLY) = 5
[pid 27248] fstat(5, {st_mode=S_IFREG|0644,
st_size=115, ...}) = 0
[pid 27248] read(5,
"127.0.0.1\t\tlocalhost.lcs.mit.edu"..., 16384) = 115
[pid 27248] close(5)                    = 0
[pid 27248] getegid(0xbfbfe701)         = 25
[pid 27248] setgroups(1, [25] <unfinished ...>
--- SIGCHLD (Child exited) ---
--- SIGCHLD (Child exited) ---
--- SIGCHLD (Child exited) ---
<... select resumed> )                  = -1 EINTR
(Interrupted system call)
.
.
.

and, ktrace:
.
.
.
 27248 sendmail CALL  close(0x5)
 27248 sendmail RET   close 0
 27248 sendmail CALL  getegid
 27248 sendmail RET   getegid 25/0x19
 27248 sendmail CALL  setgroups(0x1,0xbfbfe578)
 27248 sendmail RET   setgroups 0
 27248 sendmail CALL  ioctl(0x6,TIOCGETA,0xbfbfe370)
 27248 sendmail RET   ioctl -1 errno 45 Operation not
supported
 27248 sendmail CALL 
getpeername(0x6,0x80eaf00,0xbfbfe3e4)
 27248 sendmail RET   getpeername 0
 27248 sendmail CALL  socket(0x2,0x2,0)
 27248 sendmail RET   socket 5
 27248 sendmail CALL  close(0x5)
 27248 sendmail RET   close 0
 27248 sendmail CALL  open(0x28263636,0,0x1b6)
 27248 sendmail NAMI  "/etc/hosts"
 27248 sendmail RET   open 5
 27248 sendmail CALL  fstat(0x5,0xbfbfdb8c)
 27248 sendmail RET   fstat 0
 27248 sendmail CALL  read(0x5,0x812a000,0x4000)
 27248 sendmail GIO   fd 5 read 115 bytes
       "127.0.0.1               localhost.lcs.mit.edu
localhost
        18.26.4.140             mullen.lcs.mit.edu
mullen
        18.26.4.140             mullen.lcs.mit.edu.
       "
 27248 sendmail RET   read 115/0x73
 27248 sendmail CALL  read(0x5,0x812a000,0x4000)
 27248 sendmail GIO   fd 5 read 0 bytes
       ""
 27248 sendmail RET   read 0
.
.
.


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com




More information about the Strace-devel mailing list