You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rafael H. Schloming (JIRA)" <ji...@apache.org> on 2012/07/31 01:08:34 UTC
[jira] [Resolved] (QPID-4147) python-qpid client does not handle
interrupts on its selector
[ https://issues.apache.org/jira/browse/QPID-4147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rafael H. Schloming resolved QPID-4147.
---------------------------------------
Resolution: Fixed
Fix Version/s: 0.19
Assignee: Rafael H. Schloming
I submitted a fix based on the supplied patch.
> python-qpid client does not handle interrupts on its selector
> -------------------------------------------------------------
>
> Key: QPID-4147
> URL: https://issues.apache.org/jira/browse/QPID-4147
> Project: Qpid
> Issue Type: Bug
> Components: Python Client
> Reporter: Siddhesh Poyarekar
> Assignee: Rafael H. Schloming
> Fix For: 0.19
>
> Attachments: qpid-selector.patch
>
>
> Description of problem:
> python-qpid does not recover if its select() call within the Selector class has been interrupted. This is a problem when setuid() is called after a connection object has been created (hence a new thread has been created).
> Version-Release number of selected component (if applicable):
> python-qpid-0.14
> python-qpid-0.12
> How reproducible:
> Always.
> Steps to Reproduce:
> 1. Create a queue called justin
> 2. Run the following program:
> #!/usr/bin/python
> import os, sys, time
> from qpid.messaging import Connection
> from qpid.messaging import Message
> addressdefault = 'localhost:5672'
> if len(sys.argv) != 2:
> host = addressdefault
> else:
> host = sys.argv[1]
> def do_message():
> conn = Connection(host)
> conn.open()
> sess = conn.session()
> sender = sess.sender('justin')
> message = Message(content='hello world!')
> sender.send(message)
> do_message()
> try:
> os.setuid(500)
> except:
> print "Exception has happened"
> pass
> do_message()
>
> Actual results:
> Traceback:
> Exception in thread Thread-1:
> Traceback (most recent call last):
> File "/usr/lib64/python2.4/threading.py", line 442, in __bootstrap
> self.run()
> File "/usr/lib64/python2.4/threading.py", line 422, in run
> self.__target(*self.__args, **self.__kwargs)
> File "/usr/lib/python2.4/site-packages/qpid/selector.py", line 119, in run
> rd, wr, ex = select(self.reading, self.writing, (), timeout)
> error: (4, 'Interrupted system call')
> Expected results:
> No traceback.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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