Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 912464 Details for
Bug 1113675
Forking python qpid.messaging client crashes with qpid.messaging.exceptions.InternalError in driver.py:889 (KeyError: 'pop(): dictionary is empty')
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
Forking client
file_1113675.txt (text/plain), 3.99 KB, created by
Frantisek Reznicek
on 2014-06-26 15:29:24 UTC
(
hide
)
Description:
Forking client
Filename:
MIME Type:
Creator:
Frantisek Reznicek
Created:
2014-06-26 15:29:24 UTC
Size:
3.99 KB
patch
obsolete
># BZ1098606 qpid.messaging forking issue > >import os >import sys >import inspect > ># constants ----------------------------------------------------------------- ># --------------------------------------------------------------------------- >SHARED=True; >if ('shared' in sys.argv or 's' in sys.argv): > SHARED=True; >elif ('non-shared' in sys.argv or 'ns' in sys.argv): > SHARED=False; > >method_pref='pre_fork_ns' >method_postfm='post_fork_main_ns' >method_postfc='post_fork_child_ns' >if (SHARED): > method_pref='pre_fork_s' > method_postfm='post_fork_main_s' > method_postfc='post_fork_child_s' > ># shared code --------------------------------------------------------------- ># --------------------------------------------------------------------------- >def action(in_adr, in_msg_cont): > print " Entered %s()" % inspect.stack()[0][3]; > import qpid.messaging > c = qpid.messaging.Connection('localhost') > c.open() > print " connected(%s)" % in_msg_cont > s = c.session() > S = s.sender(in_adr); > S.send(qpid.messaging.Message(in_msg_cont)); > R = s.receiver(in_adr); > m = R.fetch() > print m > S.close(); > R.close(); > s.close(); > c.close(); > >def pre_fork_s(): > a = "BZ1098606_%s;{create: sender, delete: receiver}" % inspect.stack()[0][3] > print "Entered %s()" % inspect.stack()[0][3]; > action(a, inspect.stack()[0][3]); > >def post_fork_main_s(): > a = "BZ1098606_%s;{create: sender, delete: receiver}" % inspect.stack()[0][3] > print "Entered %s()" % inspect.stack()[0][3]; > #import qpid.messaging > action(a, inspect.stack()[0][3]); > >def post_fork_child_s(): > a = "BZ1098606_%s;{create: sender, delete: receiver}" % inspect.stack()[0][3] > print "Entered %s()" % inspect.stack()[0][3]; > #import qpid.messaging > action(a, inspect.stack()[0][3]); > print "Exiting child"; > os._exit(0); > > ># non-shared code ----------------------------------------------------------- ># --------------------------------------------------------------------------- > > >def pre_fork_ns(): > a = "BZ1098606_%s;{create: sender, delete: receiver}" % inspect.stack()[0][3] > print "Entered %s()" % inspect.stack()[0][3]; > import qpid.messaging > c = qpid.messaging.Connection('localhost') > c.open() > print " connected(%s)" % inspect.stack()[0][3] > s = c.session() > S = s.sender(a); > S.send(qpid.messaging.Message(inspect.stack()[0][3])); > R = s.receiver(a); > m = R.fetch() > print m > S.close(); > R.close(); > s.close(); > c.close(); > >def post_fork_main_ns(): > a = "BZ1098606_%s;{create: sender, delete: receiver}" % inspect.stack()[0][3] > print "Entered %s()" % inspect.stack()[0][3]; > import qpid.messaging > c = qpid.messaging.Connection('localhost') > c.open() > print " connected(%s)" % inspect.stack()[0][3] > s = c.session() > S = s.sender(a); > S.send(qpid.messaging.Message(inspect.stack()[0][3])); > R = s.receiver(a); > m = R.fetch() > print m > S.close(); > R.close(); > s.close(); > c.close(); > >def post_fork_child_ns(): > a = "BZ1098606_%s;{create: sender, delete: receiver}" % inspect.stack()[0][3] > print "Entered %s()" % inspect.stack()[0][3]; > import qpid.messaging > c = qpid.messaging.Connection('localhost') > c.open() > print " connected(%s)" % inspect.stack()[0][3] > s = c.session() > S = s.sender(a); > S.send(qpid.messaging.Message(inspect.stack()[0][3])); > R = s.receiver(a); > m = R.fetch() > print m > S.close(); > R.close(); > s.close(); > c.close(); > print "Exiting child"; > sys.exit(0); > > > ># main method --------------------------------------------------------------- ># --------------------------------------------------------------------------- >def main(): > globals()[method_pref](); > > print "Fork" > newpid = os.fork(); > if newpid == 0: > # child > globals()[method_postfc](); > else: > # parent > pids = (os.getpid(), newpid) > print "parent: %d, child: %d" % pids > globals()[method_postfm](); > os.waitpid(newpid, 0); > print "Exit." > >if (__name__ == "__main__"): > main(); > ># eof
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1113675
: 912464