-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Rony,

it is not possible to answer your question from the stack trane you
posted. First, install the debug symbols for libc and libdbus, so you
can see in what function the problem occurred. If you're using Debian or
some derivate, install libc6-dev and libdbus-1-dev, I think those should
contain the debug symbols. Then allow core dumps to be written, that
allows to examine the memory that cause the problem. Do this with

ulimit -c 1000000

This will set the maximum core size file to one megabyte. Depending on
how complex your program is, it may be required to increase the value.
The ulimit setting only has effect for program started from the same
parent process, i.e. the same shell.

As you seem to be running rexx from the system and not a development
build, you can examine the core using gdb:

gdb core

Using the gdb's command backtrace (bt), you can inspect the call stack
and using print you can loot at the variables - if they're not optimized
away.

Another question - are you running Rexx inside a Rexx thread or an
externally created thread? It seems like a multi-threading issue cause
two frees of one memory area. Did you check you're following the locking
prerequisites of libdbus?

I how I did not repeat things you already know - but from your
information it's really hard to guess what the problem is!

Kind regards,
Moritz

On 08/08/2011 10:56 PM, Rony G. Flatscher wrote:
> Hi there,
> 
> While stress-testing a part of the dbus language binding in an area
> (private DBUS server) there is a chance that I hit problems in
> libdbus.so itself in that area (as some comments indicate that
> multi-threading in the server may need more testing).
> 
> Now from time to time I would get segmentation faults, but rarely
> traces. Now I got a backtrace, but am not really able to read/determine
> whether the culprit is likely to be libdbus.so (the dbus reference
> library implementation), my language binding or ooRexx or glibc.
> 
>     *** glibc detected *** /usr/bin/rexx: double free or corruption 
> (fasttop): 0x0000000000da8980 ***
>     ======= Backtrace: =========
>     /lib/x86_64-linux-gnu/libc.so.6(+0x78a8f)[0x7f92a0eefa8f]
>     /lib/x86_64-linux-gnu/libc.so.6(+0x7b1bb)[0x7f92a0ef21bb]
>     /lib/x86_64-linux-gnu/libc.so.6(realloc+0xf9)[0x7f92a0ef3b19]
>     /lib/x86_64-linux-gnu/libdbus-1.so.3(+0x28321)[0x7f929e7f1321]
>     /lib/x86_64-linux-gnu/libdbus-1.so.3(+0x28a98)[0x7f929e7f1a98]
>     /lib/x86_64-linux-gnu/libdbus-1.so.3(+0x14217)[0x7f929e7dd217]
>     /lib/x86_64-linux-gnu/libdbus-1.so.3(+0x14c18)[0x7f929e7ddc18]
>     /lib/x86_64-linux-gnu/libdbus-1.so.3(+0x14f46)[0x7f929e7ddf46]
>     /lib/x86_64-linux-gnu/libdbus-1.so.3(+0x1295f)[0x7f929e7db95f]
>     /lib/x86_64-linux-gnu/libdbus-1.so.3(+0x12e35)[0x7f929e7dbe35]
>     
> /lib/x86_64-linux-gnu/libdbus-1.so.3(dbus_message_new_method_call+0xfc)[0x7f929e7e0a4c]
>     /usr/lib/libdbusoorexx.so(DbusBusCallMessage_impl+0x5d0)[0x7f929ea1ed49]
>     /usr/lib/libdbusoorexx.so(DbusBusCallMessage+0x93)[0x7f929ea1e75f]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN20RexxNativeActivation3runEP10RexxMethodP16RexxNativeMethodP10RexxObjectP10RexxStringPS5_mR15ProtectedObject+0xce)[0x7f92a20d91ae]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxMethod3runEP12RexxActivityP10RexxObjectP10RexxStringPS3_mR15ProtectedObject+0x71)[0x7f92a2098361]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxObject22processProtectedMethodEP10RexxStringP10RexxMethodPPS_mR15ProtectedObject+0x7d)[0x7f92a20a3f4d]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN21RexxExpressionMessage8evaluateEP14RexxActivationP19RexxExpressionStack+0x256)[0x7f92a20fed36]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN21RexxInstructionReturn7executeEP14RexxActivationP19RexxExpressionStack+0x44)[0x7f92a210cd44]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN14RexxActivation3runEP10RexxObjectP10RexxStringPS1_mP15RexxInstructionR15ProtectedObject+0x11c)[0x7f92a20d1c9c]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN8RexxCode3runEP12RexxActivityP10RexxMethodP10RexxObjectP10RexxStringPS5_mR15ProtectedObject+0x73)[0x7f92a20d5363]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxMethod3runEP12RexxActivityP10RexxObjectP10RexxStringPS3_mR15ProtectedObject+0x71)[0x7f92a2098361]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxObject11messageSendEP10RexxStringPPS_mR15ProtectedObject+0xd3)[0x7f92a20a47d3]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN21RexxExpressionMessage8evaluateEP14RexxActivationP19RexxExpressionStack+0x256)[0x7f92a20fed36]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN25RexxInstructionAssignment7executeEP14RexxActivationP19RexxExpressionStack+0xf8)[0x7f92a2102298]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN14RexxActivation3runEP10RexxObjectP10RexxStringPS1_mP15RexxInstructionR15ProtectedObject+0x11c)[0x7f92a20d1c9c]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN8RexxCode3runEP12RexxActivityP10RexxMethodP10RexxObjectP10RexxStringPS5_mR15ProtectedObject+0x73)[0x7f92a20d5363]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxMethod3runEP12RexxActivityP10RexxObjectP10RexxStringPS3_mR15ProtectedObject+0x71)[0x7f92a2098361]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxObject11messageSendEP10RexxStringPPS_mR15ProtectedObject+0xd3)[0x7f92a20a47d3]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxObject11sendMessageEP10RexxStringPPS_m+0x38)[0x7f92a20a5088]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxObjectnwEmP9RexxClassPPS_m+0x6f)[0x7f92a20a513f]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxObject7newRexxEPPS_m+0x17)[0x7f92a20a51b7]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN7CPPCode3runEP12RexxActivityP10RexxMethodP10RexxObjectP10RexxStringPS5_mR15ProtectedObject+0x184)[0x7f92a20cc614]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxMethod3runEP12RexxActivityP10RexxObjectP10RexxStringPS3_mR15ProtectedObject+0x71)[0x7f92a2098361]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxObject11messageSendEP10RexxStringPPS_mR15ProtectedObject+0xd3)[0x7f92a20a47d3]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN21RexxExpressionMessage8evaluateEP14RexxActivationP19RexxExpressionStack+0x256)[0x7f92a20fed36]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN21RexxInstructionReturn7executeEP14RexxActivationP19RexxExpressionStack+0x44)[0x7f92a210cd44]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN14RexxActivation3runEP10RexxObjectP10RexxStringPS1_mP15RexxInstructionR15ProtectedObject+0x11c)[0x7f92a20d1c9c]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN8RexxCode3runEP12RexxActivityP10RexxMethodP10RexxObjectP10RexxStringPS5_mR15ProtectedObject+0x73)[0x7f92a20d5363]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxMethod3runEP12RexxActivityP10RexxObjectP10RexxStringPS3_mR15ProtectedObject+0x71)[0x7f92a2098361]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxObject11messageSendEP10RexxStringPPS_mR15ProtectedObject+0xd3)[0x7f92a20a47d3]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN21RexxExpressionMessage8evaluateEP14RexxActivationP19RexxExpressionStack+0x256)[0x7f92a20fed36]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN25RexxInstructionAssignment7executeEP14RexxActivationP19RexxExpressionStack+0xf8)[0x7f92a2102298]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN14RexxActivation3runEP10RexxObjectP10RexxStringPS1_mP15RexxInstructionR15ProtectedObject+0x11c)[0x7f92a20d1c9c]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN8RexxCode3runEP12RexxActivityP10RexxMethodP10RexxObjectP10RexxStringPS5_mR15ProtectedObject+0x73)[0x7f92a20d5363]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxMethod3runEP12RexxActivityP10RexxObjectP10RexxStringPS3_mR15ProtectedObject+0x71)[0x7f92a2098361]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxObject22processProtectedMethodEP10RexxStringP10RexxMethodPPS_mR15ProtectedObject+0x7d)[0x7f92a20a3f4d]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN22RexxInstructionMessage7executeEP14RexxActivationP19RexxExpressionStack+0x2fd)[0x7f92a21091fd]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN14RexxActivation3runEP10RexxObjectP10RexxStringPS1_mP15RexxInstructionR15ProtectedObject+0x11c)[0x7f92a20d1c9c]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN8RexxCode3runEP12RexxActivityP10RexxMethodP10RexxObjectP10RexxStringPS5_mR15ProtectedObject+0x73)[0x7f92a20d5363]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxMethod3runEP12RexxActivityP10RexxObjectP10RexxStringPS3_mR15ProtectedObject+0x71)[0x7f92a2098361]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN10RexxObject11messageSendEP10RexxStringPPS_mR15ProtectedObject+0xd3)[0x7f92a20a47d3]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN21RexxExpressionMessage8evaluateEP14RexxActivationP19RexxExpressionStack+0x256)[0x7f92a20fed36]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN25RexxInstructionAssignment7executeEP14RexxActivationP19RexxExpressionStack+0xf8)[0x7f92a2102298]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN14RexxActivation3runEP10RexxObjectP10RexxStringPS1_mP15RexxInstructionR15ProtectedObject+0x11c)[0x7f92a20d1c9c]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN14RexxActivation8dispatchEv+0x5b)[0x7f92a20d2a4b]
>     
> /usr/lib/ooRexx/librexx.so.4(_ZN12RexxActivity9runThreadEv+0x13e)[0x7f92a20f589e]
>     /usr/lib/ooRexx/librexx.so.4(_Z9threadFncPv+0x9)[0x7f92a2123999]
>     /lib/x86_64-linux-gnu/libpthread.so.0(+0x6d8c)[0x7f92a19b2d8c]
>     /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f92a0f5d04d]
>     ======= Memory map: ========
>     00400000-00401000 r-xp 00000000 08:01 8398528                            
> /usr/bin/rexx
>     00601000-00602000 rw-p 00001000 08:01 8398528                            
> /usr/bin/rexx
>     00d8e000-00daf000 rw-p 00000000 00:00 0                                  
> [heap]
>     7f9298000000-7f9298021000 rw-p 00000000 00:00 0 
>     7f9298021000-7f929c000000 ---p 00000000 00:00 0 
>     7f929e540000-7f929e541000 ---p 00000000 00:00 0 
>     7f929e541000-7f929e5c1000 rw-p 00000000 00:00 0 
>     7f929e5c1000-7f929e5c8000 r-xp 00000000 08:01 14421729                   
> /lib/x86_64-linux-gnu/librt-2.13.soAborted
>     
> rony@rony-linux:/mnt/root_e/rony/dev/dbus20110602/tutorials-dbus/c-api/work/dbusoorexx/tests$
>  
>       
> 
> Any opintions, hints, tips highly appreciated !
> 
> Regards,
> 
> ---rony
> 
> P.S.: Doing the same stress test with the standard system and session
> buses (using the same test programs) has not yielded such an error so far.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAk5A1eAACgkQ264ap80Va8fIOQD9FMCDlWeooPP35kBWoMcz9K5Q
mCceDGqFl/0YFr1hmkQBAK9WszYBuIuTgB1bIqZJD2WQyemkHZ/xz0Cn4qqzw7zl
=xnsy
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to