[Genivi-ipc] [capi-dbus-runtime-3.1.5]crash in capi-dbus-runtime while calling async call continiously- valgrind errors

Indukumar, Sowrabha Sowrabha.Indukumar at harman.com
Tue Jun 21 05:28:52 EDT 2016


Hi,

    When we were trying to further investigate on the below issue.
1. We ran the sample commonapi-dbus-3.1.5 application with valgrind and found below two logs from valgrind. (attaching complete logs)

==4554== Thread 3:
==4554== Invalid read of size 4
==4554==    at 0x756A317: _dbus_atomic_dec (dbus-sysdeps-unix.c:2526)
==4554==    by 0x755D66D: dbus_pending_call_unref (dbus-pending-call.c:603)
==4554==    by 0x723D268: CommonAPI::DBus::DBusConnection::enforceAsynchronousTimeouts() const (DBusConnection.cpp:635)


==4554== Thread 4:
==4554== Invalid read of size 4
==4554==    at 0x756A317: _dbus_atomic_dec (dbus-sysdeps-unix.c:2526)
==4554==    by 0x755D66D: dbus_pending_call_unref (dbus-pending-call.c:603)
==4554==    by 0x754EDE0: dbus_connection_dispatch (dbus-connection.c:4780)
==4554==    by 0x723E0AC: CommonAPI::DBus::DBusConnection::singleDispatch() (DBusConnection.cpp:810)


2. But when built the same application with commonapi-3.1.2 found no errors from valgrind.

3. By going through the code I understand the major change with respect to the below error from commonapi-dbus-3.1.2 to 3.1.5 is implementation of mainloop internally and also the patch to libdbus-1 (dbus_connection_send_with_reply_set_notify api implementation)

Any pointers or acknowledgment would be really helpful.

Thank You.

Regards,
Sowrabha Indukumar
Sr Software Engineer I
Harman India R&D Center
________________________________
From: genivi-ipc-bounces at lists.genivi.org [genivi-ipc-bounces at lists.genivi.org] on behalf of Indukumar, Sowrabha [Sowrabha.Indukumar at harman.com]
Sent: Saturday, May 28, 2016 5:07 PM
To: genivi-ipc at lists.genivi.org
Subject: [Genivi-ipc] [capi-dbus-runtime-3.1.5] crash in capi-dbus-runtime while calling async call continiously

Hi,
               We see a crash in commonapi-dbus-runtime-3.1.5 (sometimes) in the below scenario

1.      Back to back Asycn method call (~100 calls) from proxy with default timeout.

2.      Stub reply to the method after some time delay(more than timeout).

3.      Proxy process crashes.

Below is the gdb callstack

#0  CommonAPI::DBus::DBusMainLoop::dispatch (this=this at entry=0x763044c8) at /home/sowrabha/development/ commonapi/common-api-dbus-runtime/src/CommonAPI/DBus/DBusMainLoop.cpp:523

#1  0x7629bbd8 in CommonAPI::DBus::DBusMainLoop::doSingleIteration (this=this at entry=0x763044c8, timeout=@0x7629ac34: -1904019866741624816)

    at /home/sowrabha/development/ commonapi/common-api-dbus-runtime/src/CommonAPI/DBus/DBusMainLoop.cpp:341

#2  0x7629bd00 in CommonAPI::DBus::DBusMainLoop::run (this=0x763044c8, timeoutInterval=@0x762cc280: 9223372036854775807)

    at /home/sowrabha/development/ commonapi/common-api-dbus-runtime/src/CommonAPI/DBus/DBusMainLoop.cpp:210

#3  0x76e8c33c in std::(anonymous namespace)::execute_native_thread_routine (__p=<optimized out>)

    at /data/tmp/work-shared/gcc-4.9.1-r0/gcc-4.9.1/libstdc++-v3/src/c++11/thread.cc:84


Some more information:

1.      We are running on arm

2.      With some analysis and debugging we could find out below points

a.      In DBusConnection::sendDBusMessageWithReplyAsync api the insertion to timeout_ map fails as libdbusPendingCall is not unique

b.      The same code works fine in commonapi-3.1.2 without crash


Any help or pointers would be appreciated.
Thank you.

Regards,
Sowrabha Indukumar
Sr Software Engineer I
Harman India R&D Center

Email: sowrabha.indukumar at harman.com<mailto:sowrabha.indukumar at harman.com>
Web: www.harman.com<http://www.harman.com/>


[:signature FINALS:Informal_without_buscrd_email_sig.jpg]




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genivi.org/pipermail/genivi-ipc_lists.genivi.org/attachments/20160621/114b2489/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 8774 bytes
Desc: image001.jpg
URL: <http://lists.genivi.org/pipermail/genivi-ipc_lists.genivi.org/attachments/20160621/114b2489/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: valgrind-3.1.5
Type: application/octet-stream
Size: 6892 bytes
Desc: valgrind-3.1.5
URL: <http://lists.genivi.org/pipermail/genivi-ipc_lists.genivi.org/attachments/20160621/114b2489/attachment.5>


More information about the genivi-ipc mailing list