[sugar] python activities startup

Tomeu Vizoso tomeu at tomeuvizoso.net
Fri Feb 8 09:04:30 EST 2008


On Fri, 2008-02-08 at 14:44 +0100, Tomeu Vizoso wrote:
> On Fri, 2008-02-08 at 13:41 +0100, Tomeu Vizoso wrote:
> > On Thu, 2008-02-07 at 16:46 +0000, Simon McVittie wrote:
> > > A better solution would be for Rainbow to avoid SessionBus()
> entirely,
> > > and instead use an instance of the superclass,
> dbus.bus.BusConnection. This
> > > does not have the weird caching behaviour at all (one call to the
> > > constructor = one instance = one D-Bus connection). The code that
> gets run
> > > after forking is still free to use the shared SessionBus.
> > 
> > Rainbow is not using the session bus at all, just the system one.
> > 
> > But when the child tries to instantiate a SessionBus object, I get
> this stack trace:
> > 
...
> > 
> > <class 'dbus.exceptions.DBusException'>: org.freedesktop.DBus.Error.NoServer: Failed to connect to socket /tmp/dbus-7dk02BRXOZ: Connection refused
> > 
> > 
> > This is the value of the DBUS_SESSION_BUS_ADDRESS env var:
> > unix:path=/tmp/olpc-session-bus,guid=fdf37ebd35a585d12382a50047ac3034
> > 
> > unix:path=/tmp/olpc-session-bus is specified
> > in /etc/dbus-1/session-olpc.conf:
> > 
> > <busconfig>
> >   <!-- Our well-known bus type, don't change this -->
> >   <type>session</type>
> > 
> >   <listen>unix:path=/tmp/olpc-session-bus</listen>
> > 
> >   <standard_session_servicedirs />
> > ...
> 
> When running inside rainbow, strace shows this:
> 
> [pid  2370] connect(0, {sa_family=AF_FILE, path=@/tmp/dbus-XQcfxlvcoY}, 23) = -1 ECONNREFUSED (Connection refused)
> 
> But on the console (works fine):
> 
> connect(3, {sa_family=AF_FILE, path="/tmp/olpc-session-bus"}, 23) = 0

I'm sorry about the noise.

When Rainbow was started, the env var DBUS_SESSION_BUS_ADDRESS wasn't
set until the clone() happened. By looking at dbus code, the bus
addresses are initialized at startup, so it kept using the bad address.

Setting DBUS_SESSION_BUS_ADDRESS before running Rainbow fixed this
issue.

So, no known D-Bus problems right now.

Tomeu



More information about the Sugar mailing list