cvs commit: src/sys/kern uipc_usrreq.c

Robert Watson rwatson at FreeBSD.org
Fri Aug 13 20:43:49 PDT 2004


rwatson     2004-08-14 03:43:49 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             uipc_usrreq.c 
  Log:
  After completing a name lookup for a target UNIX domain socket to
  connect to, re-check that the local UNIX domain socket hasn't been
  closed while we slept, and if so, return EINVAL.  This affects the
  system running both with and without Giant over the network stack,
  and recent ULE changes appear to cause it to trigger more
  frequently than previously under load.  While here, improve catching
  of possibly closed UNIX domain sockets in one or two additional
  circumstances.  I have a much larger set of related changes in
  Perforce, but they require more testing before they can be merged.
  
  One debugging printf is left in place to indicate when such a race
  takes place: this is typically triggered by a buggy application
  that simultaenously connect()'s and close()'s a UNIX domain socket
  file descriptor.  I'll remove this at some point in the future, but
  am interested in seeing how frequently this is reported.  In the
  case of Martin's reported problem, it appears to be a result of a
  non-thread safe syslog() implementation in the C library, which
  does not synchronize access to its logging file descriptor.
  
  Reported by:    mbr
  
  Revision  Changes    Path
  1.136     +18 -5     src/sys/kern/uipc_usrreq.c


More information about the cvs-all mailing list