Bug 752923 - gpsd hogs my USB serial ports
Summary: gpsd hogs my USB serial ports
Keywords:
Status: CLOSED DUPLICATE of bug 663124
Alias: None
Product: Fedora
Classification: Fedora
Component: gpsd
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Douglas E. Warner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 752935
TreeView+ depends on / blocked
 
Reported: 2011-11-10 19:16 UTC by David Howells
Modified: 2011-11-11 12:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-11 12:08:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Howells 2011-11-10 19:16:23 UTC
Description of problem:

When the system boots, gpsd opens some of my USB serial ports and doesn't let them go.

I have 6 serial ports that I use for communicating with my test machines:

warthog>lsusb | grep FT232
Bus 002 Device 009: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 002 Device 010: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 002 Device 014: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 002 Device 015: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 002 Device 023: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 002 Device 024: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

However, they match a rule in /etc/udev/rules.d/99-gpsd.rules and so start up gpsd.

Version-Release number of selected component (if applicable):

gpsd-2.95-6.fc15.x86_64

How reproducible:

100%

Steps to Reproduce:
1.Boot the system

or:

1.Kill gpsd.
2.Unplug and plug back in the USB serial port adapters.

[root@warthog linux-2.6-fscache]# ls -l /proc/29736/fd
total 0
lrwx------. 1 root root 64 Nov 10 19:09 0 -> /dev/null
lrwx------. 1 root root 64 Nov 10 19:09 1 -> /dev/null
lrwx------. 1 root root 64 Nov 10 19:09 10 -> /dev/ttyUSB2
lrwx------. 1 root root 64 Nov 10 19:11 11 -> /dev/ttyUSB0
lrwx------. 1 root root 64 Nov 10 19:11 12 -> /dev/ttyUSB1
lrwx------. 1 root root 64 Nov 10 19:09 2 -> /dev/null
lrwx------. 1 root root 64 Nov 10 19:09 3 -> socket:[21880336]
lrwx------. 1 root root 64 Nov 10 19:09 4 -> socket:[21878807]
lrwx------. 1 root root 64 Nov 10 19:09 5 -> socket:[21878808]
lrwx------. 1 root root 64 Nov 10 19:09 6 -> socket:[21878809]
lrwx------. 1 root root 64 Nov 10 19:09 8 -> /dev/ttyUSB3
lrwx------. 1 root root 64 Nov 10 19:09 9 -> socket:[21849722]

Stracing the daemon shows it's sitting there selecting on them:

[root@warthog linux-2.6-fscache]# strace -p 29736
Process 29736 attached - interrupt to quit
select(13, [3 4 5 8 10 11 12], NULL, NULL, {0, 375590}) = 0 (Timeout)
select(13, [3 4 5 8 10 11 12], NULL, NULL, {1, 0}) = 0 (Timeout)
select(13, [3 4 5 8 10 11 12], NULL, NULL, {1, 0}) = 0 (Timeout)
select(13, [3 4 5 8 10 11 12], NULL, NULL, {1, 0}) = 0 (Timeout)
select(13, [3 4 5 8 10 11 12], NULL, NULL, {1, 0}) = 0 (Timeout)
select(13, [3 4 5 8 10 11 12], NULL, NULL, {1, 0}^C <unfinished ...>

Which indicates another possible bug: why isn't it doing an infinitely long select?


Additionally, querying systemd with "systemctl --all | grep gps" shows:

dev-gps0.device           loaded active   plugged       FT232 USB-Serial (UART) IC
dev-gps1.device           loaded active   plugged       FT232 USB-Serial (UART) IC
dev-gps2.device           loaded active   plugged       FT232 USB-Serial (UART) IC
dev-gps3.device           loaded active   plugged       FT232 USB-Serial (UART) IC
dev-gps4.device           loaded active   plugged       FT232 USB-Serial (UART) IC
dev-gps5.device           loaded active   plugged       FT232 USB-Serial (UART) IC

though I've no idea why that thinks they're GPS ports - presumably something to do with udev.

Comment 1 Miroslav Lichvar 2011-11-11 12:08:27 UTC
It's a udev rule which might be too general.

You'll need to set USBAUTO=true in /etc/sysconfig/gpsd to disable starting gpsd from udev.

*** This bug has been marked as a duplicate of bug 663124 ***


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