linaro-media-create crashes, can't find system_bus_socket

Reported by Al Grant on 2012-03-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Undecided
Unassigned

Bug Description

I'm creating a Pandaboard Ubuntu image for 12.02. linaro-media-create fails with traceback shown below.

linaro-media-create --mmc /dev/sdb --dev panda --hwpack hwpack_linaro-lt-panda-x11-base_20120221-1_armel_supported.tar.gz --binary linaro-o-ubuntu-desktop-tar-20120223-1.tar.gz

Traceback (most recent call last):
  File "/usr/bin/linaro-media-create", line 146, in <module>
    args.nocheck_mmc):
  File "/usr/lib/pymodules/python2.7/linaro_image_tools/media_create/check_device.py", line 125, in confirm_device_selection_and_ensure_it_is_ready
    if _does_device_exist(device):
  File "/usr/lib/pymodules/python2.7/linaro_image_tools/media_create/check_device.py", line 58, in _does_device_exist
    bus, udisks = _get_system_bus_and_udisks_iface()
  File "/usr/lib/pymodules/python2.7/linaro_image_tools/media_create/check_device.py", line 32, in _get_system_bus_and_udisks_iface
    bus = dbus.SystemBus()
  File "/usr/lib/pymodules/python2.7/dbus/_dbus.py", line 202, in __new__
    private=private)
  File "/usr/lib/pymodules/python2.7/dbus/_dbus.py", line 108, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib/pymodules/python2.7/dbus/bus.py", line 125, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

root@sdperf-board1:/hd/update# ls /var/run/dbus
ls: cannot access /var/run/dbus: No such file or directory
root@sdperf-board1:/hd/update# uname -a
Linux sdperf-board1 3.0.0-1404-linaro-lt-omap #9~ppa-Ubuntu SMP PREEMPT Sat Oct 15 23:51:59 UTC 2011 armv7l armv7l armv7l GNU/Linux
root@sdperf-board1:/hd/update# apt-get install dbus
Reading package lists... Done
Building dependency tree
Reading state information... Done
dbus is already the newest version.
dbus set to manually installed.
The following packages were automatically installed and are no longer required:
  libxcb-xfixes0 libxcb-dri2-0
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 36 not upgraded.

James Tunnicliffe (dooferlad) wrote :

Hi,

This certainly looks like an issue with dbus on your machine rather than a linaro-media-create one. Does "sudo service dbus status" show a running service? I can see that dbus directory on my machine:

ll /var/run/dbus/
total 4
drwxr-xr-x 2 messagebus messagebus 80 Mar 16 08:34 ./
drwxr-xr-x 24 root root 860 Mar 16 09:34 ../
-rw-r--r-- 1 root root 5 Mar 16 08:34 pid
srwxrwxrwx 1 root root 0 Mar 16 08:34 system_bus_socket=

It sounds a lot like:
http://ubuntuforums.org/showthread.php?t=1859432
https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/858122
...but this should have been fixed. Do you have a /run/dbus directory?

Download full text (4.3 KiB)

Right, dbus wasn't running. "start dbus" has made it get a bit further.
So the problem looks to be that linaro-media-create assumes dbus is running,
when this may not be the case. I hadn't heard of dbus until today and
there's no mention of it in the download instructions.

Al

> -----Original Message-----
> From: <email address hidden> [mailto:<email address hidden>] On Behalf Of
> James Tunnicliffe
> Sent: 16 March 2012 17:15
> To: Al Grant
> Subject: [Bug 957149] Re: linaro-media-create crashes, can't find
> system_bus_socket
>
> Hi,
>
> This certainly looks like an issue with dbus on your machine rather
> than
> a linaro-media-create one. Does "sudo service dbus status" show a
> running service? I can see that dbus directory on my machine:
>
> ll /var/run/dbus/
> total 4
> drwxr-xr-x 2 messagebus messagebus 80 Mar 16 08:34 ./
> drwxr-xr-x 24 root root 860 Mar 16 09:34 ../
> -rw-r--r-- 1 root root 5 Mar 16 08:34 pid
> srwxrwxrwx 1 root root 0 Mar 16 08:34 system_bus_socket=
>
> It sounds a lot like:
> http://ubuntuforums.org/showthread.php?t=1859432
> https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/858122
> ...but this should have been fixed. Do you have a /run/dbus directory?
>
> --
> You received this bug notification because you are subscribed to the
> bug
> report.
> https://bugs.launchpad.net/bugs/957149
>
> Title:
> linaro-media-create crashes, can't find system_bus_socket
>
> Status in Linaro Image Tools:
> New
>
> Bug description:
> I'm creating a Pandaboard Ubuntu image for 12.02. linaro-media-
> create
> fails with traceback shown below.
>
> linaro-media-create --mmc /dev/sdb --dev panda --hwpack
> hwpack_linaro-
> lt-panda-x11-base_20120221-1_armel_supported.tar.gz --binary linaro-o
> -ubuntu-desktop-tar-20120223-1.tar.gz
>
> Traceback (most recent call last):
> File "/usr/bin/linaro-media-create", line 146, in <module>
> args.nocheck_mmc):
> File
> "/usr/lib/pymodules/python2.7/linaro_image_tools/media_create/check_dev
> ice.py", line 125, in confirm_device_selection_and_ensure_it_is_ready
> if _does_device_exist(device):
> File
> "/usr/lib/pymodules/python2.7/linaro_image_tools/media_create/check_dev
> ice.py", line 58, in _does_device_exist
> bus, udisks = _get_system_bus_and_udisks_iface()
> File
> "/usr/lib/pymodules/python2.7/linaro_image_tools/media_create/check_dev
> ice.py", line 32, in _get_system_bus_and_udisks_iface
> bus = dbus.SystemBus()
> File "/usr/lib/pymodules/python2.7/dbus/_dbus.py", line 202, in
> __new__
> private=private)
> File "/usr/lib/pymodules/python2.7/dbus/_dbus.py", line 108, in
> __new__
> bus = BusConnection.__new__(subclass, bus_type,
> mainloop=mainloop)
> File "/usr/lib/pymodules/python2.7/dbus/bus.py", line 125, in
> __new__
> bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
> dbus.exceptions.DBusException:
> org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket
> /var/run/dbus/system_bus_socket: No such file or directory
>
> root@sdperf-bo...

Read more...

James Tunnicliffe (dooferlad) wrote :

Dbus is a service that should be running on Ubuntu by default. It not running is quite a surprise!

Changed in linaro-image-tools:
status: New → Invalid
Loïc Minier (lool) wrote :

He might not be using Ubuntu :-)

The README requires python-dbus but doesn't mention dbus; while Ubuntu systems without dbus are indeed rare, it might make sense to do a better job at supporting dbus-less operations for chroots typically used on buildds.

I suspect this is related to udisks support. udisks is useful to prevent automounting of devices as we repartition/reformat them and to check whether the target SD card is already mounted for instance.

Since we support creating images without udisks and udisks is accessed over dbus, could we just also support the case where dbus is missing? it shouldn't change much on our side

I've also filed bug #957376 to propose simplifying linaro-image-tools as to make it more reliable and avoid the dbus / udisks usage in even more cases.

Al Grant (al-grant) wrote :

> He might not be using Ubuntu :-)

I'm using Linaro Ubuntu (11.10?) on a Pandaboard, to build a 12.02 image for
the same board.

Having booted up 12.02 now, I find it does start dbus. I guess I could
investigate why 11.10 wasn't (assuming it was supposed to).

Al

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

On Fri, Mar 16, 2012, Al Grant wrote:
> I'm using Linaro Ubuntu (11.10?) on a Pandaboard, to build a 12.02 image for
> the same board.

 Ah sorry, misunderstood you then

> Having booted up 12.02 now, I find it does start dbus. I guess I could
> investigate why 11.10 wasn't (assuming it was supposed to).

 I don't know whether it's still started in minimal images like nano; it
 should definitely start in any standard images, even with a minimal
 package set.

--
Loïc Minier

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers