Hi, In http://marc.theaimsgroup.com/?l=djbdns&m=104796742521473&w=2 and http://marc.theaimsgroup.com/?l=djbdns&m=104802936220297&w=2 Tristan Goode describes a weird problem on FreeBSD 4.5: a program (DJB's dnscache) getting a SIGPIPE when attempting to write to an incoming connection's socket. Presumably, the client closed the connection in the meantime, possibly due to a timeout; the funny part is that the ktrace's show the following sequence of events:
line 320845: accept() returns fd 170
line 320875-325758: successive read()'s return data
line 325784: a successful write() returns the full amount of
data written
line 325794-328586: more read()'s
line 328612: another successful write()
(repeat a few more times, exactly the same pattern)
line 334354: the last successful write()
line 334364-335002: more read()'s, all successful
line 335028: another attempted write()
line 335029: PSIG SIGPIPE
The question: if the client closed the socket, shouldn't a write(2)
return -1 with errno == EPIPE before sending a SIGPIPE? Does anyone
know anything about problems with writing to closed sockets in FreeBSD
4.5 or such?
A bzipped version of the tracefile is available at
http://people.FreeBSD.org/~roam/dnscache-ktrace.txt.bz2
G'luck,
Peter
--
Peter Pentchev [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
PGP key: http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553
because I didn't think of a good beginning of it.
pgp00000.pgp
Description: PGP signature
