You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Alan Conway (JIRA)" <ji...@apache.org> on 2012/10/15 22:19:03 UTC

[jira] [Commented] (QPID-3922) Python tests fail/hang with ulimit -n 65536

    [ https://issues.apache.org/jira/browse/QPID-3922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476391#comment-13476391 ] 

Alan Conway commented on QPID-3922:
-----------------------------------

The problematic code seems to be this in tests/messaging/endpoints.py:

  def use_fds(self):
    fds = []
    try:
      while True:
        fds.append(os.open(getattr(os, "devnull", "/dev/null"), os.O_RDONLY))
    except OSError, e:
      if e.errno != errno.EMFILE:
        raise e
      else:
        return fds

I'm not sure what the intent is here, but if ulimit is set high then select will choke on the resulting set.

Would a simple fixed-size set do the job for this test? Is there a way to find out the max set size for selecct at run time?


                
> Python tests fail/hang with ulimit -n 65536
> -------------------------------------------
>
>                 Key: QPID-3922
>                 URL: https://issues.apache.org/jira/browse/QPID-3922
>             Project: Qpid
>          Issue Type: Bug
>          Components: Python Client
>    Affects Versions: 0.17
>            Reporter: Alan Conway
>            Assignee: Rafael H. Schloming
>            Priority: Minor
>
> Some of the python tests fail and hang if run with ulimit -n 65536. To reproduce in a c++ build go to the src/tests directory and:
> su root -c 'ulimit -n 65536; make check TESTS="start_broker python_tests stop_broker" PYTHON_TESTS=*endpoints.SetupTests*'
> Several tests fail and then testOpenReconnectURLs hangs as follows:
> qpid.tests.messaging.endpoints.SetupTests.testOpenCloseResourceLeaks ................ start
>   Exception in thread Thread-1:
>   Traceback (most recent call last):
>     File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner
>       self.run()
>     File "/usr/lib64/python2.6/threading.py", line 484, in run
>       self.__target(*self.__args, **self.__kwargs)
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/selector.py", line 119, in run
>       rd, wr, ex = select(self.reading, self.writing, (), timeout)
>   ValueError: filedescriptor out of range in select()
>   
> qpid.tests.messaging.endpoints.SetupTests.testOpenCloseResourceLeaks ................ fail
> Error during test:  Traceback (most recent call last):
>     File "/home/aconway/qpidha/opt/src/tests/python/commands/qpid-python-test", line 340, in run
>       phase()
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/tests/messaging/endpoints.py", line 86, in testOpenCloseResourceLeaks
>       conn = Connection.establish(self.broker, **self.connection_options())
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/messaging/endpoints.py", line 68, in establish
>       conn.open()
>     File "<string>", line 6, in open
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/messaging/endpoints.py", line 256, in open
>       self.attach()
>     File "<string>", line 6, in attach
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/messaging/endpoints.py", line 274, in attach
>       self._ewait(lambda: self._transport_connected and not self._unlinked())
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/messaging/endpoints.py", line 208, in _ewait
>       result = self._wait(lambda: self.error or predicate(), timeout)
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/messaging/endpoints.py", line 193, in _wait
>       return self._waiter.wait(predicate, timeout=timeout)
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/concurrency.py", line 57, in wait
>       self.condition.wait(3)
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/concurrency.py", line 96, in wait
>       sw.wait(timeout)
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/compat.py", line 53, in wait
>       ready, _, _ = select([self], [], [], timeout)
>   ValueError: filedescriptor out of range in select()
> qpid.tests.messaging.endpoints.SetupTests.testOpenFailResourceLeaks ................. fail
> Error during test:  Traceback (most recent call last):
>     File "/home/aconway/qpidha/opt/src/tests/python/commands/qpid-python-test", line 340, in run
>       phase()
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/tests/messaging/endpoints.py", line 102, in testOpenFailResourceLeaks
>       conn._wait(lambda: False, timeout=0.001)
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/messaging/endpoints.py", line 193, in _wait
>       return self._waiter.wait(predicate, timeout=timeout)
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/concurrency.py", line 59, in wait
>       self.condition.wait(timeout - passed)
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/concurrency.py", line 96, in wait
>       sw.wait(timeout)
>     File "/home/aconway/qpidha/opt/src/tests/python/qpid/compat.py", line 53, in wait
>       ready, _, _ = select([self], [], [], timeout)
>   ValueError: filedescriptor out of range in select()
> qpid.tests.messaging.endpoints.SetupTests.testOpenReconnectURLs ....

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org