Bug 489037 - Python type mapping interop issue with Java and C++
Python type mapping interop issue with Java and C++
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid (Show other bugs)
All Linux
urgent Severity urgent
: 1.1.1
: ---
Assigned To: Rafael H. Schloming
Frantisek Reznicek
Depends On:
  Show dependency treegraph
Reported: 2009-03-06 16:14 EST by Matthew Farrellee
Modified: 2015-11-15 19:07 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-04-21 12:17:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matthew Farrellee 2009-03-06 16:14:43 EST
Description of problem:

The python-qpid client library is not interoperable with Java or C++

Version-Release number of selected component (if applicable):


Actual results:

 Traceback (most recent call last):
   File "/usr/lib64/python2.4/threading.py", line 442, in __bootstrap
   File "/usr/lib64/python2.4/threading.py", line 422, in run
     self.__target(*self.__args, **self.__kwargs)
   File "/usr/sbin/carod", line 321, in handle_get_work
     send_AMQP_msg(broker_connection, msg, msg_props, err_msg)
   File "/usr/sbin/carod", line 264, in send_AMQP_msg
     connection.message_transfer(destination=reply_to['exchange'], message=Message(msg_properties, delivery_props, data))
   File "/usr/lib/python2.4/site-packages/qpid/generator.py", line 25, in <lambda>
     method = lambda self, *args, **kwargs: self.invoke(inst, args, kwargs)
   File "/usr/lib/python2.4/site-packages/qpid/session.py", line 143, in invoke
     return self.do_invoke(type, args, kwargs)
   File "/usr/lib/python2.4/site-packages/qpid/session.py", line 186, in do_invoke
   File "/usr/lib/python2.4/site-packages/qpid/codec010.py", line 244, in write_struct32
     value._type.encode_fields(sc, value)
   File "/usr/lib/python2.4/site-packages/qpid/spec010.py", line 256, in encode_fields
     f.type.encode(codec, values[f.name])
   File "/usr/lib/python2.4/site-packages/qpid/spec010.py", line 147, in encode
     getattr(codec, "write_%s" % self.name)(value)
   File "/usr/lib/python2.4/site-packages/qpid/codec010.py", line 174, in write_map
     type.encode(sc, v)
   File "/usr/lib/python2.4/site-packages/qpid/spec010.py", line 147, in encode
     getattr(codec, "write_%s" % self.name)(value)
   File "/usr/lib/python2.4/site-packages/qpid/codec010.py", line 139, in write_vbin16
   File "/usr/lib/python2.4/site-packages/qpid/codec010.py", line 296, in write
     self.encoded += s
 UnicodeDecodeError: 'ascii' codec can't decode byte 0x90 in position 15: ordinal not in range(128)

Additional info:

This is potentially addressed in python-qpid-0.4.750960-1.el5. However, part of the fix exposes an issue in the qmf python client and it's method of parsing UUIDs...

    return "%08x-%04x-%04x-%04x-%04x%08x" % struct.unpack("!LHHHHL", self.bytes)
TypeError: unpack() argument 2 must be string or read-only buffer, not instance
Comment 1 Gordon Sim 2009-03-09 12:19:46 EDT
Rafi, is this fixed? Can you add the relevant revision and est procedure if so. Thanks.
Comment 2 Rafael H. Schloming 2009-03-09 15:11:12 EDT
This is fixed including the qmf issue as of 751092. The devel rpms have been updated to that revision. I'm marking as modified.
Comment 4 Frantisek Reznicek 2009-03-16 07:19:43 EDT
No test info included. 
Just seen call connection.message_transfer(...) in "/usr/sbin/carod".

Could you possibly shortly describe how to reproduce, please?
Comment 5 Ted Ross 2009-03-17 12:04:32 EDT
Test case:

Run qpid-tool (where PYTHONPATH references the python libraries under test) against a running broker.

$ qpid-tool
Management Tool for QPID

Type "show system".  If it returns with "Class not known: system", wait a few seconds and retry.

If the bug is fixed, the output will look something like the following (actual values will differ, all that matters is that the properties are displayed):

qpid: show system
Object of type org.apache.qpid.broker:system: (last sample time: 15:49:32)
    Type      Element   101
    property  systemId  cb5a250e-fe5c-440c-95dd-9e792876be20
    property  osName    Linux
    property  nodeName  localhost.localdomain
    property  release
    property  version   #1 SMP Mon Feb 23 13:21:22 EST 2009
    property  machine   i686

The failure case results in no output:

qpid: show system
Comment 6 Frantisek Reznicek 2009-03-18 09:57:38 EDT
Testing in progress, no issue found on RHEL 4.7 / 5.2 / 5.3 i386 / x86_64.
Trying F10 for reproducing the issue (seems to be fedora related only).
Comment 7 Frantisek Reznicek 2009-03-19 06:09:54 EDT
The initial issue and also UUID symptom from comment 5 were fixed, validated on RHEL 4.7 / 5.2 / 5.3 , i386 / x86_64 on packages:
python-qpid-0.5.752581-1.el5, qpidd-0.5.752581-1.el5, qpidc-0.5.752581-1.el5

Comment 9 errata-xmlrpc 2009-04-21 12:17:06 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.