Created attachment 1036279 [details]
strace of ofws
Description of problem:
On starting ofws daemon I find that the process blocks accessing the USB subsystem. The process is left in uninterruptable sleep. Once in this state there are other side effects which include:
* lsusb fails (blocks, un-killable)
* long delays experienced on login or running su.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
0. reboot, making sure owfs service is disabled. Two DS9490R USB-to-1wire adapters plugged in.
1. start owfs from root shell with:
/usr/bin/owfs -uall /run/owfs
/usr/bin/owfs -u /run/owfs
owfs blocks. /run/owfs file system does not get mounted. strace reveals that owfs is blocked awaiting return of USB ioctl call.
Secondary effects are that now lsusb command fails and logins/su experience delay of about 25 seconds.
Same behaviour is shown if I only have a single one-wire adapter connected.
I have no other way to access the one-wire bus.
Expect owfs to lead to one-wire file system being accessible under /run/owfs.
Running x86_64 on Intel NUC hardware. SELinux is disabled.
This is on a system upgraded from Fedora 20 on which owfs worked as expected. Only change was upgrade to Fedora 22.
Strace output attached. Open file descriptors at time of strace as below:
# cd /proc/2040/fd
# ls -l
lrwx------ 1 root root 64 Jun 8 17:12 0 -> /dev/pts/0
lrwx------ 1 root root 64 Jun 8 17:12 1 -> /dev/pts/0
lrwx------ 1 root root 64 Jun 8 17:12 10 -> anon_inode:[timerfd]
lrwx------ 1 root root 64 Jun 8 17:12 11 -> /dev/bus/usb/001/003
lrwx------ 1 root root 64 Jun 8 17:12 2 -> /dev/pts/0
lrwx------ 1 root root 64 Jun 8 17:12 3 -> socket:
lr-x------ 1 root root 64 Jun 8 17:12 4 -> pipe:
l-wx------ 1 root root 64 Jun 8 17:12 5 -> pipe:
lr-x------ 1 root root 64 Jun 8 17:12 6 -> pipe:
l-wx------ 1 root root 64 Jun 8 17:12 7 -> pipe:
lr-x------ 1 root root 64 Jun 8 17:12 8 -> pipe:
l-wx------ 1 root root 64 Jun 8 17:12 9 -> pipe:
Output of ps at time of strace as below:
# ps auxw
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 2040 0.0 0.1 48896 4000 pts/0 D+ 17:12 0:00 /usr/bin/owfs -u /run/owfs
Output of lsusb prior to running strace,owfs as below:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 8087:07dc Intel Corp.
Bus 001 Device 005: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 003: ID 04fa:2490 Dallas Semiconductor DS1490F 2-in-1 Fob, 1-Wire adapter
Bus 001 Device 006: ID 0403:8a28 Future Technology Devices International, Ltd Rainforest Automation ZigBee Controller
Bus 001 Device 004: ID 2001:1a02 D-Link Corp. DUB-E100 Fast Ethernet Adapter(rev.C1) [ASIX AX88772]
Bus 001 Device 002: ID 2109:2811 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I'm unable to reproduce this with my setup, although I have no DS1490 device.
Also, freeze of whole USB subsystem sounds really like kernel problem (owfs is userspace only).
Could you please test owfs-3.1p0? It is built in rawhide. If problem still persists with 3.1p0, I'll forward the bugreport upstream.
Problem persists with owfs-fs-3.1p0-2.fc23.x86_64 with F23 and kernel 4.2.8-300.fc23.x86_64.
Workaround is to explicitly ensure that wire and ds2490 modules are not loaded (using blacklist in modprobe). Owfs works without the wire module by accessing the device via usblib (ie use -u instead of -w1 option to owfs or owserver).
My guess is that there's a contention that arises between the wire module and the USB sub system when the one-wire device is accessed.
There is a second problem with the owfs package that I'll put in a separate bug report.
I've forwarded this report to upstream: http://sourceforge.net/p/owfs/mailman/message/34765642/
owfs-3.1p0-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9da22de418
owfs-3.1p0-4.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9da22de418
owfs-3.1p0-4.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.