Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 160287 - sci-geosciences/gpsd - hotplug freezes boot w/ pl2303 usb-serial chips
Summary: sci-geosciences/gpsd - hotplug freezes boot w/ pl2303 usb-serial chips
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Steve Arnold
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-05 09:25 UTC by gsagers
Modified: 2007-01-14 23:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gsagers 2007-01-05 09:25:40 UTC
I have a gateway e285 notebook with a port replicator.  The replicator contains a pl2303 usb-serial converter, which provides a serial port on the replicator.  Said serial port works fine (I can connect to a serial device over /dev/ttyUSB0) if the replicator is plugged in AFTER the system boots.  

If I boot with the port replicator plugged in, the system hangs, apparently trying to start gpsd, due the following lines in /etc/hotplug/usb/gpsd.usermap
# The Prolific Technology 2303 (commonly in tandem with SiRF chips)
gpsd 0x0003 0x067b 0x2303 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000

The system hangs at this point, and boot never continues, unless I do an "Alt-SysRq-E" to kill the current task, then boot continues.  I get the following lines in /var/log/messages

******
Jan  5 09:32:25 gsagers gpsd: waiting for /dev/ttyUSB0
Jan  5 09:32:25 gsagers gpsd: /dev/ttyUSB0 has gone active
Jan  5 09:32:25 gsagers gpsd: gpsd_control(action=add, arg=/dev/ttyUSB0)
Jan  5 09:32:25 gsagers gpsd: socket /var/run/gpsd.sock creation failure: (111, 'Connection refused')
Jan  5 09:32:25 gsagers gpsd: launching gpsd -F /var/run/gpsd.sock
*****

and a little later

******
Jan  5 09:32:45 gsagers gpsd: waiting for /dev/ttyUSB0
Jan  5 09:32:45 gsagers gpsd: /dev/ttyUSB0 has gone active
Jan  5 09:32:45 gsagers gpsd: gpsd_control(action=add, arg=/dev/ttyUSB0)
Jan  5 09:32:45 gsagers gpsd: reached a running gpsd
******

At this point, the system hung, and I did the Alt-SysRq sequence.

If I comment out the line in /etc/hotplug/usb/gpsd.usermap starting with "gpsd 0x0003", the system boots normally, the pl2303 modules is still loaded, and I can use the serial port.

Since pl2303 chips are used in many devices (including port replicators and many cell-phone cables), gpsd probably shouldn't be called every time one is plugged in.

I've double-checked to make sure gpsd isn't in any runlevels, I do use it, but start it manually, as I only use it occasionally.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-01-05 10:40:21 UTC
If you are using >=udev-096 you should unmerge hotplug; causes more harm than good (see Bug 147006). This ebuild shouldn't depend on hotplug.
Comment 2 gsagers 2007-01-06 15:47:14 UTC
(In reply to comment #1)

Unmerging hotplug & removing it (& coldplug script) from runlevels fixes the problem, and allows booting, with all devices detected.  However, "emerge world" wants to put hotplug back, and equery shows that gpsd is one of the culprits.  The ebuild (2.32 below, 2.33-r1 is similar) seems to say that if the usb USE flag is enabled, it pulls in hotplug.  I do use a USB GPS (delorme, with cypress m8 usb-serial converter), as well as a serial GPS plugged into the port replicator, both work without hotplug, perhaps it's time to remove that dependency?


RDEPEND="X? ( || (
                ( x11-libs/libXmu
                x11-libs/libXext
                x11-libs/libXp
                x11-libs/libX11
                x11-libs/libXt
                x11-libs/libSM
                x11-libs/libICE
                x11-libs/libXpm
                x11-libs/libXaw )
                || (
                    x11-libs/openmotif
                    x11-libs/lesstif
                )
                ( virtual/motif
                        virtual/x11 )
                )
        )
        usb? ( sys-apps/hotplug )
        dbus? ( >=sys-apps/dbus-0.6 )
        dev-lang/python
        app-text/xmlto
        virtual/libc
        sys-devel/gcc"
Comment 3 Steve Arnold archtester gentoo-dev 2007-01-14 23:08:50 UTC
Okay, the new gpsd now depends on virtual/dev-manager instead of hotplug.  If you want to leave your gps device plugged in all the time, including a usb device, then emerge without the usb USE flag and try the init script for gpsd.  You'll have to set the device in conf.d/gpsd but it should work for you.