Ticket #25 (closed defect: fixed)

Opened 10 years ago

Last modified 8 years ago

Fails with dbus service activation

Reported by: trac.luon.net@… Owned by: nobody
Priority: normal Milestone:
Component: library Version: 0.2.1
Keywords: dbus service activation Cc:

Description

ruby-dbus seems to fail with dbus service activation.

To reproduce the problem,

  • install the attached script net.example.Test as executable in /tmp
  • install the attached file net.example.Test.service in ~/.local/share/dbus-1/services
  • pkill -HUP dbus-daemon

The following command should behave as follows:

% dbus-daemon --session --print-address | if read addr; then \
    DBUS_SESSION_BUS_ADDRESS="$addr" dbus-send --print-reply --dest=net.example.Test \
    /net/example/Test net.example.Test.foo string:foo string:bar; fi
/usr/lib/ruby/1.8/dbus/bus.rb:520:in `process': undefined method `get_node' for nil:NilClass (NoMethodError)
	from /usr/lib/ruby/1.8/dbus/bus.rb:461:in `send_sync'
	from (eval):24:in `RequestName'
	from /usr/lib/ruby/1.8/dbus/bus.rb:375:in `request_service'
	from /tmp/net.example.Test:7:in `main'
	from /tmp/net.example.Test:27
Error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)

The line dbus/bus.rb:520:

node = @service.get_node(m.path)

Apparently the library is processing the ‘foo’ message before @service has been set.

Attachments

net.example.Test Download (450 bytes) - added by trac.luon.net@… 10 years ago.
net.example.Test.service Download (134 bytes) - added by trac.luon.net@… 10 years ago.

Change History

Changed 10 years ago by trac.luon.net@…

Changed 10 years ago by trac.luon.net@…

Changed 10 years ago by trac.luon.net@…

I added a some debugging statements to send and pop_message. This is what happens before the exception:

Send: #<DBus::Message:0xb7b95cc8
 @body_length=0,
 @destination="org.freedesktop.DBus",
 @error_name=nil,
 @flags=0,
 @interface="org.freedesktop.DBus",
 @member="Hello",
 @message_type=1,
 @params=[],
 @path="/org/freedesktop/DBus",
 @protocol=1,
 @reply_serial=nil,
 @serial=1,
 @signature="">
Recv: #<DBus::Message:0xb7b6a974
 @body_length=9,
 @destination=":1.1",
 @error_name=nil,
 @flags=1,
 @member=nil,
 @message_type=2,
 @params=[":1.1"],
 @path=nil,
 @protocol=1,
 @reply_serial=1,
 @sender="org.freedesktop.DBus",
 @serial=1,
 @signature="s">
Send: #<DBus::Message:0xb7b75400
 @body_length=28,
 @destination="org.freedesktop.DBus",
 @error_name=nil,
 @flags=0,
 @interface="org.freedesktop.DBus",
 @member="RequestName",
 @message_type=1,
 @params=["net.example.Test", 2],
 @path="/org/freedesktop/DBus",
 @protocol=1,
 @reply_serial=nil,
 @serial=5,
 @signature="su">
Recv: #<DBus::Message:0xb7b6ff3c
 @body_length=9,
 @destination=":1.1",
 @error_name=nil,
 @flags=1,
 @interface="org.freedesktop.DBus",
 @member="NameAcquired",
 @message_type=4,
 @params=[":1.1"],
 @path="/org/freedesktop/DBus",
 @protocol=1,
 @reply_serial=nil,
 @sender="org.freedesktop.DBus",
 @serial=2,
 @signature="s">
Recv: #<DBus::Message:0xb7b69fc4
 @body_length=21,
 @destination=":1.1",
 @error_name=nil,
 @flags=1,
 @interface="org.freedesktop.DBus",
 @member="NameAcquired",
 @message_type=4,
 @params=["net.example.Test"],
 @path="/org/freedesktop/DBus",
 @protocol=1,
 @reply_serial=nil,
 @sender="org.freedesktop.DBus",
 @serial=3,
 @signature="s">
Recv: #<DBus::Message:0xb7b64cf4
 @body_length=16,
 @destination="net.example.Test",
 @error_name=nil,
 @flags=0,
 @interface="net.example.Test",
 @member="foo",
 @message_type=1,
 @params=["foo", "bar"],
 @path="/net/example/Test",
 @protocol=1,
 @reply_serial=nil,
 @sender=":1.0",
 @serial=2,
 @signature="ss">

Changed 10 years ago by Alvaro

Windows hasn't increased computer literacy. It's just lowered the standard.

-- From a Slashdot.org post

 vendita viagra  fioricet pills  viagra levitra cialis  tramadol pharmacy

Changed 10 years ago by school finance buy Cialis

Kludge, n.:

An ill-assorted collection of poorly-matching parts, forming a distressing whole.

-- Jackson Granholm, "Datamation"

 viagra originale  generic fioricet  buy pharmacy L1rFF/J  cialis e kamagra  adverse reactions to Cialis  tramadol tabs

Changed 9 years ago by anonymous

@params=:1.1?, @path=nil, @protocol=1, @reply_serial=1, @sender="org.freedesktop.DBus", @serial=1, @signature="s">

Send: #<DBus::Message:0xb7b75400

@body_length=28, @destination="org.freedesktop.DBus", @error_name=nil, @flags=0, @interface="org.freedesktop.DBus", @member="RequestName?", @message_type=1, @params=["net.example.Test", 2], @path="/org/freedesktop/DBus", @protocol=1, @reply_serial=nil, @serial=5, @signature="su"> nike air yeezy shoes

Recv: #<DBus::Message:0xb7b6ff3c

@body_length=9, @destination=":1.1", @error_name=nil, @flags=1, @interface="org.freedesktop.DBus", @member="NameAcquired?", @message_type=4,

Changed 9 years ago by Cialis generic

  • summary changed from Fails with dbus service activation to order Cialis for sleep pnPihoa

Changed 9 years ago by paul

  • summary changed from order Cialis for sleep pnPihoa to Fails with dbus service activation

Restored original bug report title.

Changed 9 years ago by martin.github@…

  • status changed from new to closed
  • resolution set to fixed

Changed 8 years ago by anonymous

Note: See TracTickets for help on using tickets.