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

Srinadh Penugonda <srinadh0-/[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <[email protected]>
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-kC51rjc0cqs1dNLGKZg6taU/[email protected]> 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!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.