You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/12/16 16:30:13 UTC

[jira] [Commented] (DISPATCH-87) Double load of libqpid-dispatch.so

    [ https://issues.apache.org/jira/browse/DISPATCH-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14248369#comment-14248369 ] 

ASF subversion and git services commented on DISPATCH-87:
---------------------------------------------------------

Commit 1645976 from [~aconway] in branch 'dispatch/trunk'
[ https://svn.apache.org/r1645976 ]

DISPATCH-87: Double load of libqpid-dispatch.so

We use ctypes to call from python into the qpid-dispatch.so library.
In some situations (running a build exe where there was an installed dispatch),
the exe could open the build library but ctypes could open the installed library
causing mayhem and core dumps.

Fixed the code to use dlopen(RTLD_NOLOAD) in C to get a handle to the library loaded by C,
and then use the handle rather than the library name to open the library in ctypes
which ensures the same library.

NOTE: When running qdrouterd from a build you still need to use the right
environment (config.sh) to pick up the correct python libraries (correct
PYTHONPATH and internal libraries) or things will still go wrong.

> Double load of libqpid-dispatch.so
> ----------------------------------
>
>                 Key: DISPATCH-87
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-87
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Management Agent, Router Node
>    Affects Versions: 0.2
>            Reporter: Alan Conway
>            Assignee: Alan Conway
>             Fix For: 0.3
>
>
> qdrouterd can load the libqpid-dispatch.so twice - once by the executable, again via ctypes. ctypes is supposed to be using the same copy of the library that is loaded by the exe but for some reason is not.
> This has been observed to cause crashes, but even when it doesn't it can be observed as follows:
> {noformat}$ LD_DEBUG=files router/qdrouterd  |& grep libqpid-dispatch
>      18591:	file=libqpid-dispatch.so.0 [0];  needed by router/qdrouterd [0]
>      18591:	file=libqpid-dispatch.so.0 [0];  generating link map
>      18591:	calling init: /home/aconway/dispatch/debug/src/libqpid-dispatch.so.0
>      18591:	file=/usr/local/lib64/libqpid-dispatch.so.0 [0];  dynamically loaded by /usr/lib64/python2.7/lib-dynload/_ctypes.so [0]
>      18591:	file=/usr/local/lib64/libqpid-dispatch.so.0 [0];  generating link map
>      18591:	calling init: /usr/local/lib64/libqpid-dispatch.so.0
>      18591:	opening file=/usr/local/lib64/libqpid-dispatch.so.0 [0]; direct_opencount=1
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org