[sugar] Speeding up activity launches.
Tomeu Vizoso
tomeu at tomeuvizoso.net
Wed Mar 12 12:14:42 EDT 2008
2008/3/5 Tomeu Vizoso <tomeu at tomeuvizoso.net>:
> 1 Fix async D-Bus methods. I'm quite lost on this. Calls made or
> processed asynchronously won't return to the client. The call is
> received correctly by the service, and the server-side callback is
> called. But the client never gets a reply. This is the only message in
> the logs:
>
> org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible
> causes include: the remote application did not send a reply, the
> message bus security policy blocked the reply, the reply timeout
> expired, or the network connection was broken.
>
> Sync calls work fine, tested using the same dbus connection. I'm
> cc'ing Robert in the hope that he will find someone who can help debug
> this one.
Robert and J5 jumped to help in #sugar ;) :
<cjb> tomeu: hihi. Any news on the faster branch activity launching
stuff? I guess you haven't heard back on the async dbus problem?
<tomeu> cjb: hi, no, my post got no answers at all, I get the
collabora people are two busy with the mesh stuff?
<tomeu> if only smcv was around like in the old times...
<cjb> tomeu: hm, I'll ask daf to find out if there's someone who can look at it
<tomeu> cjb: ok, thanks
<tomeu> J5: I wonder if you could give me a pointer about the dbus
issue described in
http://lists.laptop.org/pipermail/sugar/2008-March/004456.html
<J5> tomeu: can you point me to the code on the client and server
<tomeu> sure
<tomeu> J5: server:
http://dev.laptop.org/git?p=projects/datastore;a=blob;f=src/olpc/datastore/datastore.py;h=67ddca960ea1a325654b98b84e5fa4236c89a528;hb=HEAD#l461
J5: client: http://dev.laptop.org/git?p=sugar-toolkit;a=blob;f=sugar/datastore/dbus_helpers.py;h=a5ce9c8b41fd2e453885e6f17d8931c5ec5b1d5c;hb=HEAD#l56
happens with async signals and other methods as well
<J5> tomeu: have you tried not using async callbacks in the service to
see if there is an interaction between async on the client and async
on the server?
<tomeu> J5: hmm, that not. but I checked that the reply callback was
called in the server
<J5> I've never tried the server side async stuff
<tomeu> J5: I will give that a try later
<Robot101> tomeu: if you watch dbus-monitor, do you see both the call
and reply method?
<Robot101> er, message
<J5> also are you using dbus-monitor to see if the reply is being sent?
<Robot101> :)
<tomeu> oh, that's a good one
<Robot101> hi J5 :)
<tomeu> also take note of this one
<tomeu> will try to get some time soon to look again at preforking
<Robot101> tomeu: does this weirdness only happen when you make some preforking?
<tomeu> Robot101: yup
<Robot101> tomeu: if you're sharing the d-bus socket between a parent
and a child, or you end up with two children having the same d-bus FD,
you will experience Total Reality Failure
tomeu: does the parent initialise d-bus etc, and if so, does it close
it in any forked children before proceeding?
<J5> oh ya, I bet one of the processes starves the other's data
<tomeu> Robot101: the parent never uses the session bus, how this affect things?
aha
this makes some sense
<Robot101> does one of the libraries it's calling initialise a bus
connection in any way though?
<tomeu> Robot101: the parent is rainbow, and only uses the system bus
and the child is an activity that, for now, just uses the session bus
<Robot101> I'd be very suspicious that the problem is you're ending up
sharing the fd
that'll simply never work, the whole of space/time will come crashing
down on your head :)
<tomeu> yeah, I understand that
Robot101: do you know how I could close things after forking?
<Robot101> I think libdbus is designed to make that really fucking hard... :P
J5? :)
it might be that the parent process should make a private bus
connection, so it can close it
<tomeu> ooh, that looks nice
<J5> ya the parent process should do that I am thinking
also you can call dbus_shutdown and then reinit but I'm not sure if
the bindings allow that
<tomeu> ok, I'm going to add your comments to that thread, if you don't mind
<J5> go ahead
<tomeu> and later when I have time and nobody beats me to it, will
devote some time to this
* Robot101 mumbles obscenities about shared connections
<Robot101> worst optimisation ever
Thanks,
Tomeu
More information about the Sugar
mailing list