[openstack-dev] Stable/icehouse: oslo.messaging RPCClient segmentation fault core dumped

ZIBA Romain Romain.ZIBA at eurogiciel.fr
Wed Mar 18 12:07:07 UTC 2015


Hello everyone,
I am having an issue using the RPCClient of the oslo.messaging package delivered through the stable/icehouse release of devstack (v 1.4.1).

With this simple script:

########################################################
import sys

from oslo.config import cfg
from oslo import messaging

from project.openstack.common import log

LOG = log.getLogger(__name__)

log_levels = (cfg.CONF.default_log_levels +
            ['stevedore=INFO', 'keystoneclient=INFO'])
cfg.set_defaults(log.log_opts, default_log_levels=log_levels)

argv = sys.argv
cfg.CONF(argv[1:], project='test_rpc_server')

log.setup('test_rpc_server')

transport_url = 'rabbit://guest:guest@localhost:5672/'
transport = messaging.get_transport(cfg.CONF, transport_url)
target = messaging.Target(topic='test_rpc', server='server1')
client = messaging.RPCClient(transport, target)
ctxt = {'some':'context'}
try:
    res = client.call(ctxt, 'call_method_1')
except Exception as e:
    LOG.debug(e)
print res
########################################################

svcdev at svcdev-openstack: python rpc_client.py
2015-03-18 11:44:01.018 15967 INFO oslo.messaging._drivers.impl_rabbit [-] Connecting to AMQP server on localhost:5672
2015-03-18 11:44:01.125 15967 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on localhost:5672
2015-03-18 11:44:01.134 15967 INFO oslo.messaging._drivers.impl_rabbit [-] Connecting to AMQP server on localhost:5672
2015-03-18 11:44:01.169 15967 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on localhost:5672
Segmentation fault (core dumped)

The last Python method called is the following one (in librabbitmq package, v 1.0.3):

    def basic_publish(self, body, exchange='', routing_key='',
            mandatory=False, immediate=False, **properties):
        if isinstance(body, tuple):
            body, properties = body
        elif isinstance(body, self.Message):
            body, properties = body.body, body.properties
        return self.connection._basic_publish(self.channel_id,
                body, exchange, routing_key, properties,
                mandatory or False, immediate or False)

The script crashes after trying to call _basic_publish.

For information, I've got the trusty's rabbitmq-server version (v 3.2.4-1).
Plus, replacing the call method by a cast method makes that a message is queued.

Could you please tell me if I'm doing something wrong? Is there a bug in the c-library used by librabbitmq?

Thanks beforehand,
Romain Ziba.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150318/1fede295/attachment.html>


More information about the OpenStack-dev mailing list