Opened 11 years ago

Last modified 11 years ago

#252 defect closed fixed (fixed)

'Resource temporarily unavailable' errors in server applications on HP-UX

Reported by: rptownsend Owned by:
Priority: high Milestone:
Component: Keywords:
Cc: itamarst, rptownsend Branch:
Author: Launchpad Bug:

Description


Change History (3)

comment:1 Changed 11 years ago by rptownsend

Since installing Python 2.3 on HP-UX11i, I keep 
getting 'Resource temporarily unavailable' errors in server 
applications.

E.g. using ../doc/examples/simpleserv.py 
& ../doc/examples/simpleclient.py:

"richardt" capulet:doc/examples > python simpleserv.py 
Traceback (most recent call last):
  File "/opt/python/lib/python2.3/site-
packages/twisted/python/log.py", line
65, in callWithLogger
    callWithContext({"system": lp}, func, *args, **kw)
  File "/opt/python/lib/python2.3/site-
packages/twisted/python/log.py", line
52, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, 
**kw)
  File "/opt/python/lib/python2.3/site-
packages/twisted/python/context.py",
line 32, in callWithContext
    return func(*args,**kw)
  File
"/opt/python/lib/python2.3/site-
packages/twisted/internet/default.py", line
510, in _doReadOrWrite
    why = getattr(selectable, method)()
--- <exception caught here> ---
  File "/opt/python/lib/python2.3/site-
packages/twisted/internet/tcp.py",
line 595, in doRead
    skt, addr = self.socket.accept()
  File "/opt/python/lib/python2.3/socket.py", line 167, in 
accept
    sock, addr = self._sock.accept()
socket.error: (11, 'Resource temporarily unavailable')


"richardt" capulet:doc/examples > python simpleclient.py
Server said: hello, world!
connection lost
Connection lost - goodbye!


The transaction appears to work, but the log file is 
filling up with these
errors. This happens with Twisted 1.0.6 and 1.0.7.

It doesn't happen when using Python 2.2

comment:2 Changed 11 years ago by itamarst

Fixed in CVS.

*** tcp.py.~1.137.~	Wed Dec 31 19:00:01 1969
--- tcp.py	Mon Sep 15 17:55:46 2003
***************
*** 67,72 ****
--- 67,73 ----
      from errno import EISCONN
      from errno import ENOTCONN
      from errno import EINTR
+ from errno import EAGAIN
  
  # Twisted Imports
  from twisted.internet import protocol, defer, base
***************
*** 602,608 ****
                  try:
                      skt, addr = self.socket.accept()
                  except socket.error, e:
!                     if e.args[0] == EWOULDBLOCK:
                          self.numberAccepts = i
                          break
                      elif e.args[0] == EPERM:
--- 603,609 ----
                  try:
                      skt, addr = self.socket.accept()
                  except socket.error, e:
!                     if e.args[0] in (EWOULDBLOCK, EAGAIN):
                          self.numberAccepts = i
                          break
                      elif e.args[0] == EPERM:

comment:3 Changed 4 years ago by <automation>

  • Owner itamarst deleted
Note: See TracTickets for help on using tickets.