Bug 1229231 - starting owfs hangs accessing USB - un-killable
Summary: starting owfs hangs accessing USB - un-killable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: owfs
Version: 22
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Tomasz Torcz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-08 10:13 UTC by Richard Keech
Modified: 2016-03-21 01:52 UTC (History)
2 users (show)

Fixed In Version: owfs-3.1p0-4.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-21 01:52:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
strace of ofws (42.91 KB, text/plain)
2015-06-08 10:13 UTC, Richard Keech
no flags Details

Description Richard Keech 2015-06-08 10:13:01 UTC
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):

owfs-server-3.0p0-2.fc22.x86_64


How reproducible:

every time.

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

or with:

   /usr/bin/owfs -u /run/owfs


Actual results:

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.


Expected results:

Expect owfs to lead to one-wire file system being accessible under /run/owfs.


Additional info:

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
total 0
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:[27672]
lr-x------ 1 root root 64 Jun  8 17:12 4 -> pipe:[27673]
l-wx------ 1 root root 64 Jun  8 17:12 5 -> pipe:[27673]
lr-x------ 1 root root 64 Jun  8 17:12 6 -> pipe:[27674]
l-wx------ 1 root root 64 Jun  8 17:12 7 -> pipe:[27674]
lr-x------ 1 root root 64 Jun  8 17:12 8 -> pipe:[27675]
l-wx------ 1 root root 64 Jun  8 17:12 9 -> pipe:[27675]


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:

# lsusb
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

Comment 1 Tomasz Torcz 2015-06-20 10:00:07 UTC
Hi,

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.
Thanks.

Comment 2 Richard Keech 2015-12-29 05:28:22 UTC
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.

Comment 3 Tomasz Torcz 2016-01-14 11:56:21 UTC
Hi,

I've forwarded this report to upstream: http://sourceforge.net/p/owfs/mailman/message/34765642/

Comment 4 Fedora Update System 2016-01-18 08:23:47 UTC
owfs-3.1p0-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9da22de418

Comment 5 Fedora Update System 2016-01-20 03:55:26 UTC
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

Comment 6 Fedora Update System 2016-03-21 01:52:34 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.