Siddhesh Poyarekar created QPID-4147:
----------------------------------------

             Summary: 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


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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to