segfault at 10 ip 00007fbb33028d4e sp 00007ffd8d3bf380 error 4 in libdbus-1.so.3.19.13[7fbb33027000+2e000]

Srinadh Penugonda srinadh0 at yahoo.com
Wed Sep 29 18:55:27 UTC 2021


Added few syslog messages in proxy.h        ::DBus::MessageIter ri = ret.reader();        syslog(LOG_CRIT, "DONE getting reader");
        ::DBus::Struct< int32_t, std::string > argout;        syslog(LOG_CRIT, "read output");        ri >> argout;        syslog(LOG_CRIT, "DONE read output");


I see that it crashes at this line:        ri >> argout;

How do I dump the MessageIterator?

My host module (dbus server) is in python and returns  
class KeyHandler(host_service.HostModule):    @host_service.method(host_service.bus_name(MOD_NAME), in_signature='as', out_signature='is')    def key_ctl(self, options):
        :
        :                        return err, output

The interface is 
 <interface name="org.SONiC.HostService.keyhandler">      <method name="key_ctl">          <arg direction="in"  type="as" name="data"/>                <!-- Must be a list of strings -->          <arg direction="out" type="(is)" name="(success, output)"/> <!-- output -->      </method>  </interface>

And the proxy header is as below.  
    ::DBus::Struct< int32_t, std::string > key_ctl(const std::vector< std::string >& data)

It expects a struct of int32_t and a string.

Is there something I am missing what the server in python is sending and what client in c++ is expecting to receive?

Is tehre a way to dump the iterator? 
~~  Thanks, Srinadh



 

    On Tuesday, September 28, 2021, 09:12:56 PM PDT, Lawrence D'Oliveiro <ldo at geek-central.gen.nz> wrote:  
 
 On Wed, 29 Sep 2021 03:14:32 +0000 (UTC), Srinadh Penugonda wrote:

> Thats what I suspect too but I could not understand what is the issue.

Stick some debugs in it and find out!
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20210929/b0f18e2b/attachment-0001.htm>


More information about the dbus mailing list