Red Hat Bugzilla – Bug 505314
qpid-tool crashes down after input wrong command list query
Last modified: 2013-09-12 18:10:52 EDT
Description of problem: qpid-tool crashes down after input wrong command list query Version-Release number of selected component (if applicable): python-qpid-0.5.752581-2.el5 and python-qpid-0.5.752581-2.el5 How reproducible: 100% Steps to Reproduce: 1) run qpid-tool 2) list 3) list org.apache.qpid.broker:queue 4) list 103.mgmt-dell-pe650-01.rhts.bos.redhat.com.24462 - expect queue id Actual results: qpid: list 103.mgmt-dell-pe650-01.rhts.bos.redhat.com.24462 Traceback (most recent call last): File "/usr/bin/qpid-tool", line 192, in ? cli.cmdloop () File "/usr/lib/python2.4/cmd.py", line 142, in cmdloop stop = self.onecmd(line) File "/usr/lib/python2.4/cmd.py", line 219, in onecmd return func(arg) File "/usr/bin/qpid-tool", line 117, in do_list self.dataObject.do_list (data) File "/usr/lib/python2.4/site-packages/qpid/managementdata.py", line 719, in do_list self.listObjects (tokens) File "/usr/lib/python2.4/site-packages/qpid/managementdata.py", line 454, in listObjects classKey = self.getClassKey (tokens[0]) File "/usr/lib/python2.4/site-packages/qpid/managementdata.py", line 290, in getClassKey schemaRev = int(className[delim + 1:]) ValueError: invalid literal for int(): mgmt-dell-pe650-01.rhts.bos.redhat.com.24462 Expected results: Nothing happens likewise "show 103.mgmt-dell-pe650-01.rhts.bos.redhat.com.24462"
Two things: 1) Exception handling has been added to the qpid-tool command handlers so an exception will not crash the program. This was added upstream at revision 946178. 2) "list" and "show" do not expect object indexes in that form. "list" expects a class/package name and "show" expects a numeric ID (i.e. 103).
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: The qpid-tool crashed after executing a wrong 'list' query command. With this update, the 'list' query command works as expected.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1 @@ -The qpid-tool crashed after executing a wrong 'list' query command. With this update, the 'list' query command works as expected.+The qpid-tool utility crashed after executing the "list" query command due to a typing error and missing exception-handling. With this update, exceptions are handled and the type error fixed so that the "list" command is no longer able to crash qpid-tool.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2010-0773.html