VirtualBox

Ticket #6850 (closed defect: invalid)

Opened 4 years ago

Last modified 3 years ago

Upgrade from 3.1 to 3.2 caused USB to stop working -> system configuration problem

Reported by: md5i Owned by:
Priority: major Component: USB
Version: VirtualBox 3.2.0 Keywords:
Cc: Guest type: Windows
Host type: Linux

Description

After upgrading to VB3.2 from VB3.1, no USB devices are found. Downgraded back to 3.1, USB devices worked again, but memory kept on growing until death, so I have switched back to 3.2. I am including a log file from both the 3.2 without working usb, and the 3.1 with working usb (but poor memory management).

Attachments

VBox.log Download (51.3 KB) - added by md5i 4 years ago.
VB3.2 log file (non-working USB)
VBox.log.1 Download (74.2 KB) - added by md5i 4 years ago.
VB3.1 log file (working USB, memory blows up)
config.gz Download (17.2 KB) - added by md5i 4 years ago.
Linux kernel config for maru (2.6.32)

Change History

Changed 4 years ago by md5i

VB3.2 log file (non-working USB)

Changed 4 years ago by md5i

VB3.1 log file (working USB, memory blows up)

comment:1 Changed 4 years ago by michael

Would you be able to provide the output of "VBoxManage list usbhost" with the 3.2 install?

comment:2 Changed 4 years ago by md5i

md5i@maru:~$ VBoxManage list usbhost
Oracle VM VirtualBox Command Line Management Interface Version 3.2.0
(C) 2005-2010 Oracle Corporation
All rights reserved.

Host USB Devices:

<none>

comment:3 Changed 4 years ago by michael

What about "ls -l /sys/bus/usb/devices" and "ls -lR /dev/bus/usb"? Be warned, more questions of this sort may follow.

comment:4 Changed 4 years ago by md5i

I have no problem answering any such questions. Ask what you need to.

md5i@maru:~$ ls -l /sys/bus/usb/devices 
-r--r--r-- 1 root root 0 May 31 14:57 /sys/bus/usb/devices
md5i@maru:~$ ls -lR /dev/bus/usb
/dev/bus/usb:
total 0
drwxr-xr-x 2 root root 120 May 31 14:57 001
drwxr-xr-x 2 root root  60 May 22 14:03 002
drwxr-xr-x 2 root root  80 May 22 14:03 003
drwxr-xr-x 2 root root  60 May 22 14:03 004
drwxr-xr-x 2 root root  60 May 22 14:03 005

/dev/bus/usb/001:
total 0
crw-rw-r-- 1 root vboxusers 189, 0 May 22 14:03 001
crw-rw-r-- 1 root vboxusers 189, 1 May 22 14:03 002
crw-rw-r-- 1 root vboxusers 189, 3 May 22 14:03 004
crw-rw-r-- 1 root vboxusers 189, 4 May 22 14:03 005

/dev/bus/usb/002:
total 0
crw-rw-r-- 1 root vboxusers 189, 128 May 22 14:03 001

/dev/bus/usb/003:
total 0
crw-rw-r-- 1 root vboxusers 189, 256 May 22 14:03 001
crw-rw-r-- 1 root vboxusers 189, 257 May 22 14:03 002

/dev/bus/usb/004:
total 0
crw-rw-r-- 1 root vboxusers 189, 384 May 22 14:03 001

/dev/bus/usb/005:
total 0
crw-rw-r-- 1 root vboxusers 189, 512 May 22 14:03 001

comment:5 Changed 4 years ago by md5i

Oh, and for completeness' sake:

md5i@maru:~$ id
uid=1000(md5i) gid=1000(md5i) groups=1000(md5i),7(lp),8(mail),20(dialout),24(cdrom),25(floppy),29(audio),33(www-data),
40(src),44(video),50(staff),60(games),100(users),104(plugdev),109(camera),111(lpadmin),131(pulse-access),132(pulse-rt),
1001(vboxusers)

comment:6 Changed 4 years ago by scheissdiewandan

Same problem for me:

sysop@sauron:~> VBoxManage list usbhost

Oracle VM VirtualBox Command Line Management Interface Version 3.2.0
(C) 2005-2010 Oracle Corporation
All rights reserved.

Host USB Devices:

UUID:               57bf79fa-7058-4b3e-9d6b-f33530e2f8d9
VendorId:           0x04a9 (04A9)
ProductId:          0x10c4 (10C4)
Revision:           1.3 (0103)
Manufacturer:       Canon
Product:            iP4500 series
SerialNumber:       223557
Address:            sysfs:/sys/devices/pci0000:00/0000:00:02.2/usb1/1-3//device:/dev/bus/usb/001/002
Current State:      Unavailable

UUID:               1e975432-8423-46b0-a80a-79b06c913291
VendorId:           0x055f (055F)
ProductId:          0x0408 (0408)
Revision:           1.0 (0100)
Manufacturer:       Hewlett-Packard.
Product:            USB2.0 Scanner
Address:            sysfs:/sys/devices/pci0000:00/0000:00:02.2/usb1/1-4//device:/dev/bus/usb/001/004
Current State:      Unavailable

sysop@sauron:~> id

uid=1000(sysop) gid=100(users) Gruppen=6(disk),8(www),9(kmem),14(uucp),16(dialout),17(audio),19(floppy),33(video),100(users),1000(vboxusers)

sysop@sauron:~> l -R /dev/bus/usb

/dev/bus/usb:
insgesamt 0
drwxr-xr-x 5 root root 100  3. Jun 01:59 ./
drwxr-xr-x 3 root root  60  3. Jun 01:59 ../
drwxr-xr-x 2 root root 100  3. Jun 12:51 001/
drwxr-xr-x 2 root root  60  3. Jun 01:59 002/
drwxr-xr-x 2 root root  60  3. Jun 01:59 003/

/dev/bus/usb/001:
insgesamt 0
drwxr-xr-x 2 root root         100  3. Jun 12:51 ./
drwxr-xr-x 5 root root         100  3. Jun 01:59 ../
crw-r--r-- 1 root vboxusers 189, 0  3. Jun 01:59 001
crw-r--r-- 1 root vboxusers 189, 1  3. Jun 01:59 002
crw-r--r-- 1 root vboxusers 189, 3  3. Jun 12:51 004

/dev/bus/usb/002:
insgesamt 0
drwxr-xr-x 2 root root            60  3. Jun 01:59 ./
drwxr-xr-x 5 root root           100  3. Jun 01:59 ../
crw-r--r-- 1 root vboxusers 189, 128  3. Jun 01:59 001

/dev/bus/usb/003:
insgesamt 0
drwxr-xr-x 2 root root            60  3. Jun 01:59 ./
drwxr-xr-x 5 root root           100  3. Jun 01:59 ../
crw-r--r-- 1 root vboxusers 189, 256  3. Jun 01:59 001

BUT if I become root the Current State line changes

sauron:/home/sysop # VBoxManage list usbhost

Oracle VM VirtualBox Command Line Management Interface Version 3.2.0
(C) 2005-2010 Oracle Corporation
All rights reserved.

Host USB Devices:

UUID:               19b55b98-85a0-4422-88ec-41d9e6497f3e
VendorId:           0x04a9 (04A9)
ProductId:          0x10c4 (10C4)
Revision:           1.3 (0103)
Manufacturer:       Canon
Product:            iP4500 series
SerialNumber:       223557
Address:            sysfs:/sys/devices/pci0000:00/0000:00:02.2/usb1/1-3//device:/dev/bus/usb/001/002
Current State:      Busy

UUID:               c9a227d3-383f-43c6-a802-0fa1a2d011e0
VendorId:           0x055f (055F)
ProductId:          0x0408 (0408)
Revision:           1.0 (0100)
Manufacturer:       Hewlett-Packard.
Product:            USB2.0 Scanner
Address:            sysfs:/sys/devices/pci0000:00/0000:00:02.2/usb1/1-4//device:/dev/bus/usb/001/004
Current State:      Available

comment:7 Changed 4 years ago by scheissdiewandan

the same output for Virtual Box Version 3.2.2

comment:8 Changed 4 years ago by md5i

I have verified that my problem still exists in 3.2.2 as well.

comment:9 follow-up: ↓ 11 Changed 4 years ago by michael

These look like two different issues (although we can keep them on one ticket for now). md5i, I expected /sys/bus/usb/devices to be a directory containing entries for all USB devices and interfaces on the system. Can you check to see if you have anything mounted over it, or whether you have a similar directory somewhere else under /sys ? For your information, my development system currently gives me:

$ ls -l /sys/bus/usb/devices/
total 0
lrwxrwxrwx 1 root root 0 2010-06-04 10:21 1-0:1.0 -> ../../../devices/pci0000:00/0000:00:1a.7/usb1/1-0:1.0
lrwxrwxrwx 1 root root 0 2010-06-04 10:21 2-0:1.0 -> ../../../devices/pci0000:00/0000:00:1d.7/usb2/2-0:1.0
lrwxrwxrwx 1 root root 0 2010-06-04 10:21 3-0:1.0 -> ../../../devices/pci0000:00/0000:00:1a.0/usb3/3-0:1.0
lrwxrwxrwx 1 root root 0 2010-06-04 08:37 3-1 -> ../../../devices/pci0000:00/0000:00:1a.0/usb3/3-1
lrwxrwxrwx 1 root root 0 2010-06-04 08:37 3-1:1.0 -> ../../../devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.0
lrwxrwxrwx 1 root root 0 2010-06-04 08:37 3-1:1.1 -> ../../../devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.1
lrwxrwxrwx 1 root root 0 2010-06-04 08:37 3-1:1.2 -> ../../../devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.2
lrwxrwxrwx 1 root root 0 2010-06-04 08:37 3-1:1.3 -> ../../../devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.3
lrwxrwxrwx 1 root root 0 2010-06-04 08:37 3-2 -> ../../../devices/pci0000:00/0000:00:1a.0/usb3/3-2
[snip]
lrwxrwxrwx 1 root root 0 2010-06-04 10:21 usb1 -> ../../../devices/pci0000:00/0000:00:1a.7/usb1
lrwxrwxrwx 1 root root 0 2010-06-04 10:21 usb2 -> ../../../devices/pci0000:00/0000:00:1d.7/usb2
[snip]

scheissdiewandan: you seem to be affected by an illusive problem which two or three other people have reported on the forums, but which I have so far failed to get a grip on. Could you please provide me with the output of

test -r /dev/bus/usb/xxx/yyy -a -w /dev/bus/usb/xxx/yyy && echo ok

with xxx and yyy replaced to match the path for one of the devices listed by "VBoxManage list usbhost"? I would expect that to print "ok" on the terminal for a normal working system, and to print nothing on a non-working one, although I have a nasty suspicion that you will also see "ok".

comment:10 Changed 4 years ago by michael

scheissdiewandan: by the way, what host system are you running?

And if you are willing to undertake a rather more elaborate test to help try to track this down, you could try the following:

  • create a virtual machine with USB and the USB tablet emulation active (this is the default for all new Linux machines) and install the same system in it that you are using on your host.
  • install VirtualBox on it
  • run VBoxManage list usbhost inside the virtual machine and check whether the devices are also unavailable there (note that VirtualBox will work to some extent inside a virtual machine, but that you may not be able to start any machines inside the virtual machine)
  • if the devices are not unavailable, work out what you have done on your host that you haven't in the guest!

Thanks...

comment:11 in reply to: ↑ 9 Changed 4 years ago by md5i

There does not appear to be a /sys/bus/usb/devices on my system. I could not say why. The closest analogue to that that I could find for usb in sysfs would be the following:

md5i@maru:~$ ls -l /sys/class/usb_device
total 0
lrwxrwxrwx 1 root root 0 Jun  4 07:36 usbdev1.1 -> ../../devices/pci0000:00/0000:00:1d.7/usb1/usb_device/usbdev1.1
lrwxrwxrwx 1 root root 0 Jun  4 07:36 usbdev1.17 -> ../../devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3.4/usb_device/usbdev1.17
lrwxrwxrwx 1 root root 0 Jun  4 07:42 usbdev1.18 -> ../../devices/pci0000:00/0000:00:1d.7/usb1/1-7/usb_device/usbdev1.18
lrwxrwxrwx 1 root root 0 Jun  4 07:36 usbdev1.2 -> ../../devices/pci0000:00/0000:00:1d.7/usb1/1-3/usb_device/usbdev1.2
lrwxrwxrwx 1 root root 0 Jun  4 07:36 usbdev1.4 -> ../../devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3.1/usb_device/usbdev1.4
lrwxrwxrwx 1 root root 0 Jun  4 07:36 usbdev1.5 -> ../../devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3.3/usb_device/usbdev1.5
lrwxrwxrwx 1 root root 0 Jun  4 07:36 usbdev2.1 -> ../../devices/pci0000:00/0000:00:1d.0/usb2/usb_device/usbdev2.1
lrwxrwxrwx 1 root root 0 Jun  4 07:36 usbdev3.1 -> ../../devices/pci0000:00/0000:00:1d.1/usb3/usb_device/usbdev3.1
lrwxrwxrwx 1 root root 0 Jun  4 07:36 usbdev3.2 -> ../../devices/pci0000:00/0000:00:1d.1/usb3/3-2/usb_device/usbdev3.2
lrwxrwxrwx 1 root root 0 Jun  4 07:36 usbdev4.1 -> ../../devices/pci0000:00/0000:00:1d.2/usb4/usb_device/usbdev4.1
lrwxrwxrwx 1 root root 0 Jun  4 07:36 usbdev5.1 -> ../../devices/pci0000:00/0000:00:1d.3/usb5/usb_device/usbdev5.1

This appears to contain the same information as /sys/bus/usb/devices would have, if you strip off the final two path elements.

comment:12 Changed 4 years ago by michael

And what does "ls -l '/sys/devices/pci0000:00/0000:00:1d.7/usb1" say? Looks like my hopes for some sort of stablish sysfs API/ABI may have been unrealistic...

comment:13 follow-up: ↓ 14 Changed 4 years ago by michael

And what kernel is that? The release log says 2.6.32 on Debian 5, but my Debian 5 VM has 2.6.26, and my Ubuntu host system with kernel 2.6.32 has /sys/bus/usb/devices. Is that a self-built kernel, or one from Debian testing?

Update: I assume that you are using Debian testing with the Debian 5 VirtualBox package.

comment:14 in reply to: ↑ 13 Changed 4 years ago by md5i

I'm using a self-built kernel, 2.6.32 as mentioned, and am running Debian unstable. I'll attach my config if you think it would help. I am using the Lenny package from downlooad.virtualbox.org, and will understand but be very sad if I will be unable to run this on my sid-based system.

md5i@maru:~$ ls -l /sys/devices/pci0000\:00/0000\:00\:1d.7/usb1 
total 0
drwxr-xr-x 4 root root     0 Jun  4 15:38 1-0:1.0
drwxr-xr-x 9 root root     0 Jun  4 15:38 1-3
-rw-r--r-- 1 root root  4096 Jun  4 15:38 authorized
-rw-r--r-- 1 root root  4096 Jun  4 15:38 authorized_default
-rw-r--r-- 1 root root  4096 Jun  4 15:38 bConfigurationValue
-r--r--r-- 1 root root  4096 Jun  4 15:38 bDeviceClass
-r--r--r-- 1 root root  4096 Jun  4 15:38 bDeviceProtocol
-r--r--r-- 1 root root  4096 Jun  4 15:38 bDeviceSubClass
-r--r--r-- 1 root root  4096 Jun  4 15:38 bMaxPacketSize0
-r--r--r-- 1 root root  4096 Jun  4 15:38 bMaxPower
-r--r--r-- 1 root root  4096 Jun  4 15:38 bNumConfigurations
-r--r--r-- 1 root root  4096 Jun  4 15:38 bNumInterfaces
-r--r--r-- 1 root root  4096 Jun  4 15:38 bcdDevice
-r--r--r-- 1 root root  4096 Jun  4 15:38 bmAttributes
-r--r--r-- 1 root root  4096 Jun  4 15:38 busnum
-r--r--r-- 1 root root  4096 Jun  4 15:38 configuration
-r--r--r-- 1 root root 65553 Jun  4 15:38 descriptors
-r--r--r-- 1 root root  4096 Jun  4 15:38 dev
-r--r--r-- 1 root root  4096 Jun  4 15:38 devnum
lrwxrwxrwx 1 root root     0 Jun  4 15:38 driver -> ../../../../bus/usb/drivers/usb
drwxr-xr-x 3 root root     0 Jun  4 15:38 ep_00
-r--r--r-- 1 root root  4096 Jun  4 15:38 idProduct
-r--r--r-- 1 root root  4096 Jun  4 15:38 idVendor
-r--r--r-- 1 root root  4096 Jun  4 15:38 manufacturer
-r--r--r-- 1 root root  4096 Jun  4 15:38 maxchild
drwxr-xr-x 2 root root     0 Jun  4 15:38 power
-r--r--r-- 1 root root  4096 Jun  4 15:38 product
-r--r--r-- 1 root root  4096 Jun  4 15:38 quirks
-r--r--r-- 1 root root  4096 Jun  4 15:38 serial
-r--r--r-- 1 root root  4096 Jun  4 15:38 speed
lrwxrwxrwx 1 root root     0 Jun  4 15:38 subsystem -> ../../../../bus/usb
-rw-r--r-- 1 root root  4096 Jun  4 15:38 uevent
-r--r--r-- 1 root root  4096 Jun  4 15:38 urbnum
drwxr-xr-x 3 root root     0 Jun  4 15:38 usb_device
-r--r--r-- 1 root root  4096 Jun  4 15:38 version

comment:15 Changed 4 years ago by michael

I would indeed be interested to see the config. And you can probably tell better than me how well the Debian 5 version works with Sid. I would expect it to work well though unless there is some library version problem - we have put some effort into binary compatibility issues.

Changed 4 years ago by md5i

Linux kernel config for maru (2.6.32)

comment:16 Changed 4 years ago by md5i

Added. I have had no problems using the Lenny binaries with Sid, excepting the one problem covered by this bug report.

comment:17 follow-up: ↓ 18 Changed 4 years ago by michael

Got it. You followed that rather misguided howto that has been floating about on the net advising people to mount usbfs at /sys/bus/usb. Try unmounting it again (you really don't want it there!) and USB should work again. Note that VBox hasn't needed usbfs for a long time now, although it can still use it if it is present (at the correct location under /proc/bus/usb that is).

comment:18 in reply to: ↑ 17 Changed 4 years ago by md5i

Brilliant! I'll have to wait until I get back to the physical machine to do an in-depth test, but VBoxManage list usbhost at least now gives reasonable results.

I do vaguely recall following the aforementioned usbfs mount advice in the distant past. I am somehow not surprised that it has managed to bite me in the ass.

comment:19 Changed 4 years ago by md5i

I confirm that everything now works again.

comment:20 Changed 4 years ago by scheissdiewandan

I did install VBox on openSUSE 11.2(64bit) on a new machine and usb support was enabled.

then I compared the /dev/bus/usb/001/* on both machines -the other machine runs openSUSE 11.1(32bit) - and there was the Problem

a simple

chmod 664 /dev/bus/usb/001/*

but this works just until next reboot.

I looked in /etc/udev/rules.d

grep -i usb_device *|grep -i mode

faulty machine output

sauron:/etc/udev/rules.d # grep -i usb_device *|grep -i mode
10-vboxdrv.rules:SUBSYSTEM=="usb_device", GROUP="vboxusers", MODE="0664"
10-vboxdrv.rules:SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="vboxusers", MODE="0664"
42-gsm-drivers.rules:# ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0664", OWNER="root", GROUP="root"
55-libsane.rules:# ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0664", OWNER="root", GROUP="root"

the other one

deepthroat:/etc/udev/rules.d # grep -i usb_device *|grep -i mode
10-vboxdrv.rules:SUBSYSTEM=="usb_device", GROUP="vboxusers", MODE="0664"
10-vboxdrv.rules:SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="vboxusers", MODE="0664"
55-libsane.rules:# ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0664", OWNER="root", GROUP="root"

it looks like the faulty machine is ignoring the 10-vboxdrv.rules

do you know why ?

comment:21 Changed 4 years ago by michael

scheissdiewandan: try renaming /etc/udev/rules.d/10-vboxdrv.rules to /etc/udev/rules.d/50-vboxdrv.rules on the host to see if that makes a difference. It looks like that 42-gsm-drivers.rules is reverting the effects of the vbox rule. The change shouldn't do any harm based on the output you posted above. If that is correct though, I don't understand why ls showed the device nodes as being owned by the vboxusers group.

comment:22 Changed 4 years ago by scheissdiewandan

Your suggestion to rename 10-vboxdrv.rules to 50-vboxdrv.rules did do the job

sauron:/dev/bus/usb # l -R                          
.:                                                  
insgesamt 0
drwxr-xr-x 5 root root 100  8. Jun 10:46 ./
drwxr-xr-x 3 root root  60  8. Jun 10:46 ../
drwxr-xr-x 2 root root 100  8. Jun 10:56 001/
drwxr-xr-x 2 root root  60  8. Jun 10:46 002/
drwxr-xr-x 2 root root  60  8. Jun 10:46 003/

./001:
insgesamt 0
drwxr-xr-x 2 root root         100  8. Jun 10:56 ./
drwxr-xr-x 5 root root         100  8. Jun 10:46 ../
crw-rw-r-- 1 root vboxusers 189, 0  8. Jun 10:46 001
crw-rw-r-- 1 root vboxusers 189, 1  8. Jun 10:46 002
crw-rw-r-- 1 root vboxusers 189, 2  8. Jun 10:56 003

./002:
insgesamt 0
drwxr-xr-x 2 root root            60  8. Jun 10:46 ./
drwxr-xr-x 5 root root           100  8. Jun 10:46 ../
crw-rw-r-- 1 root vboxusers 189, 128  8. Jun 10:46 001

./003:
insgesamt 0
drwxr-xr-x 2 root root            60  8. Jun 10:46 ./
drwxr-xr-x 5 root root           100  8. Jun 10:46 ../
crw-rw-r-- 1 root vboxusers 189, 256  8. Jun 10:46 001

...Strange indeed

But thanks a lot :-)

comment:23 Changed 4 years ago by j_e_smith8369

I too had this problem... all of my USB devices were grayed out. However, I think that everyone here has missed the obvious (and most eloquent) cause/ solution to this problem.

Based on the permission/ owner outputs listed above, I deduced that there was a problem with the proper user or group being used. So I checked my users & groups and, sure enough, I was not listed as a member of "vboxusers"; I added myself as a member of "vboxusers" and restarted -- and lo & behold, my USB devices are now back.

I would check the actual installation script to make sure that the current user is being added to the "vboxusers" group.

comment:24 Changed 4 years ago by michael

j_e_smith8369: I'm not sure this would be a reasonable thing to do, as installations generally take place as root, not as the "current user", and in any case for security reasons we don't want to add anyone to this group automatically. However the other two people who reported issues on this ticket were both members of the group and had different problems.

comment:25 Changed 3 years ago by michael

  • Status changed from new to closed
  • Resolution set to invalid
  • Summary changed from Upgrade from 3.1 to 3.2 caused USB to stop working to Upgrade from 3.1 to 3.2 caused USB to stop working -> system configuration problem

I will close this ticket as invalid, as the original issue was due to a system configuration problem. Additional issues discussed here are handled in ticket #5345.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use