First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 132288
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Steve Arnold <nerdboy@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Maciej Pawlik <yaq@world.pl>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 132288 depends on: Show dependency tree
Bug 132288 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-05-04 14:15 0000
Whole thing happens after connecting a gps receiver. The project developers say
that this is caused by distro-specific things.

From /var/log/messages:
May  4 22:55:00 laptok usb 2-1: new full speed USB device using uhci_hcd and
address 5
May  4 22:55:00 laptok usb 2-1: configuration #1 chosen from 1 choice
May  4 22:55:00 laptok pl2303 2-1:1.0: pl2303 converter detected
May  4 22:55:00 laptok usb 2-1: pl2303 converter now attached to ttyUSB0
May  4 22:55:00 laptok gpsd: waiting for /dev/ttyUSB0
May  4 22:58:00 laptok gpsd: /dev/ttyUSB0 has gone active
May  4 22:58:00 laptok gpsd: gpsd_control(action=add, arg=/dev/ttyUSB0)
May  4 22:58:00 laptok gpsd: socket /var/run/gpsd.sock creation failure: (111,
'Connection refused')
May  4 22:58:00 laptok gpsd: launching gpsd -F /var/run/gpsd.sock
May  4 22:58:00 laptok gpsd: gpsd: exception exceptions.IOError yields [Errno
2] No such file or directory:
'/var/run/usb/%sys%devices%pci0000:00%0000:00:1d.0%usb2%2-1%2-1:1.0'

After that gpsd is running but idles and sends no data, starting it manually
(gpsd -F /var/run/gpsd.sock /dev/ttyUSB0) works ok.

file details:
srwxr-xr-x 1 root   root      0 May  4 22:58 gpsd.sock

The cause is most likely located in /etc/hotplug/usb/gpsd (script for starting
gpsd, ps aux shows that it is owned by root while running), it tries to make a
"gpsd_control_connect()", and we get some privilege errors somwhere near this
place:
  8 CONTROL_SOCKET = "/var/run/gpsd.sock"
(...)
 16     try:
 17         sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM, 0)
 18         sock.connect(CONTROL_SOCKET)
 19     except socket.error, msg:
 20         syslog.syslog("socket %s creation failure: %s" % (CONTROL_SOCKET,
msg))

System is a ~x86 up to date.

------- Comment #1 From Steve Arnold 2006-05-07 22:32:25 0000 -------
It looks like it waits so long for the device that it's already dropped privs
by then; re-emerge and see if it works for you.

------- Comment #2 From Steve Arnold 2006-05-07 22:33:20 0000 -------
After a --sync, of course...

------- Comment #3 From Maciej Pawlik 2006-05-08 13:48:30 0000 -------
after sync:

May  8 22:39:54 laptok usb 2-1: new full speed USB device using uhci_hcd and
address 4
May  8 22:39:54 laptok usb 2-1: configuration #1 chosen from 1 choice
May  8 22:39:54 laptok pl2303 2-1:1.0: pl2303 converter detected
May  8 22:39:54 laptok usb 2-1: pl2303 converter now attached to ttyUSB0
May  8 22:39:55 laptok gpsd: waiting for /dev/ttyUSB0
May  8 22:42:55 laptok gpsd: /dev/ttyUSB0 has gone active
May  8 22:42:55 laptok gpsd: gpsd_control(action=add, arg=/dev/ttyUSB0)
May  8 22:42:55 laptok gpsd: socket /var/run/gpsd/gpsd.sock creation failure:
(111, 'Connection refused')
May  8 22:42:55 laptok gpsd: launching gpsd -F /var/run/gpsd/gpsd.sock
May  8 22:42:55 laptok gpsd: gpsd: exception exceptions.IOError yields [Errno
2] No such file or directory:
'/var/run/usb/%sys%devices%pci0000:00%0000:00:1d.0%usb2%2-1%2-1:1.0'

after killall gpsd, and reconnecting the gps reveiver:
May  8 22:44:31 laptok gpsd: waiting for /dev/ttyUSB0
May  8 22:47:31 laptok gpsd: /dev/ttyUSB0 has gone active
May  8 22:47:31 laptok gpsd: gpsd_control(action=add, arg=/dev/ttyUSB0)
May  8 22:47:31 laptok gpsd: socket /var/run/gpsd/gpsd.sock doesn't exist
May  8 22:47:31 laptok gpsd: launching gpsd -F /var/run/gpsd/gpsd.sock
May  8 22:47:31 laptok gpsd: gpsd: exception exceptions.IOError yields [Errno
2] No such file or directory:
'/var/run/usb/%sys%devices%pci0000:00%0000:00:1d.0%usb2%2-1%2-1:1.0'

still in both cases gpsd idles and does not send any data

------- Comment #4 From Steve Arnold 2006-05-09 00:10:54 0000 -------
I hate to say "it works for me" but...

May  7 20:42:41 lorentz usb 4-2: configuration #1 chosen from 1 choice
May  7 20:42:41 lorentz pl2303 4-2:1.0: pl2303 converter detected
May  7 20:42:41 lorentz usb 4-2: pl2303 converter now attached to ttyUSB0
May  7 20:42:41 lorentz gpsd: waiting for /dev/ttyUSB0
May  7 20:45:41 lorentz gpsd: /dev/ttyUSB0 has gone active
May  7 20:45:41 lorentz gpsd: gpsd_control(action=add, arg=/dev/ttyUSB0)
May  7 20:45:41 lorentz gpsd: socket /var/run/gpsd/gpsd.sock doesn't exist
May  7 20:45:41 lorentz gpsd: launching gpsd -F /var/run/gpsd/gpsd.sock
May  7 20:56:32 lorentz usb 4-2: USB disconnect, address 9
May  7 20:56:34 lorentz pl2303 4-2:1.0: device disconnected
May  7 20:56:34 lorentz pl2303 ttyUSB0: pl2303 converter now disconnected from
ttyUSB0

We'll keep working on it; the above is a new (mostly ~) amd64 box just built a
couple of weeks ago.

------- Comment #5 From Steve Arnold 2006-05-13 18:51:39 0000 -------
Hmm, the new version (2.32) still gives this error:

gpsd: socket /var/run/gpsd.sock creation failure: (111, 'Connection refused')

but it works fine with both xgps and gpsdrive (I'll probably commit this
tonight).  This is on a mixed amd64 with ~packages box:

Portage 2.1_pre10-r5 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.4-r2,
2.6.16.11 x86_64)
=================================================================
System uname: 2.6.16.11 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.0_pre19
ccache version 2.3 [enabled]
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/fax /usr/lib64/mozilla/defaults/pref /usr/share/X11/xkb
/usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control
/var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache cvs distlocks metadata-transfer
multilib-strict sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://local/gentoo/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://local/gentoo-portage"
USE="amd64 X a52 aac aalib accessibility acl acpi alsa ansi artworkextra avi
bitmap-fonts bonobo browserplugin bzip2 cairo cdparanoia cdr clamav cli crypt
cups dbus dga directfb divx4linux dri dv dvd dvdr dvdread dynagraph eds emacs
emboss encode esd evo f77 fam fame fbcon ffmpeg firefox fits flac foomaticdb
fortran freetype freetype2 gb gcj gd gdbm geos gif gimp gmp gnome gphoto2 gpm
gps graphviz grass gs gstreamer gtk gtk2 gtkhtml guile hal howl icq ieee1394
imagemagick imap imlib ipv6 isdnlog jabber jasper java jbig jikes jpeg jpg
junit lame lapack lcms lesstif lirc lm_sensors logrotate lzw lzw-tiff motif
mozilla mp3 mpeg mysql nas nautilus ncurses netcdf nfs nls nolvmstatic nptl
nptlonly nsplugin numeric ogdi ogg oggvorbis opengl oss pam pcre pda pdf pdflib
perl plotutils png postgres pppd python qt quicktime readline reflection rtc
samba sasl sdl session slp spamassassin spell spl ssl subtitles svg tcltk tcpd
tetex tiff truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vorbis wifi
xanim xext xine xml xml2 xmms xorg xpm xv xvid xvmc zeo zlib zvbi elibc_glibc
input_devices_keyboard input_devices_mouse kernel_linux userland_GNU
video_cards_via video_cards_radeon video_cards_vesa"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL,
LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #6 From mb666 2006-07-30 12:46:53 0000 -------
I get similar problem :

Jul 30 22:28:05 desktop gpsd: ACTION=add
Jul 30 22:28:05 desktop gpsd: waiting for /dev/ttyUSB0
Jul 30 22:28:05 desktop gpsd: /dev/ttyUSB0 has gone active
Jul 30 22:28:05 desktop gpsd: gpsd_control(action=add, arg=/dev/ttyUSB0)
Jul 30 22:28:05 desktop gpsd: socket /var/run/gpsd.sock creation failure: (111,
'Connection refused')
Jul 30 22:28:05 desktop gpsd: launching gpsd -F /var/run/gpsd.sock
Jul 30 22:28:05 desktop gpsd: gpsd_control ends
Jul 30 22:28:05 desktop gpsd:
REMOVER=/var/run/usb/%sys%devices%pci0000:00%0000:00:10.2%usb4%4-1%4-1:1.0
Jul 30 22:28:05 desktop gpsd: gpsd: exception exceptions.IOError yields [Errno
2] No such file or directory:
'/var/run/usb/%sys%devices%pci0000:00%0000:00:10.2%usb4%4-1%4-1:1.0'


it is written by /etc/hotplug/usb/gpsd.
on line 82 there is :
remover = os.getenv("REMOVER")

then it tries to save '/etc/hotplug/usb/gpsd remove /dev/ttyUSB0' ( where
/dev/ttyUSB0 is my gps receiver ) to the filename under the variable remover,
which points to something stupid like :
/var/run/usb/%sys%devices%pci0000:00%0000:00:10.2%usb4%4-1%4-1:1.0

any idea?

------- Comment #7 From mb666 2006-07-30 12:50:10 0000 -------
obviously environment variable remover is set to something incorrect...

(In reply to comment #6)
> I get similar problem :
> 
> Jul 30 22:28:05 desktop gpsd: ACTION=add
> Jul 30 22:28:05 desktop gpsd: waiting for /dev/ttyUSB0
> Jul 30 22:28:05 desktop gpsd: /dev/ttyUSB0 has gone active
> Jul 30 22:28:05 desktop gpsd: gpsd_control(action=add, arg=/dev/ttyUSB0)
> Jul 30 22:28:05 desktop gpsd: socket /var/run/gpsd.sock creation failure: (111,
> 'Connection refused')
> Jul 30 22:28:05 desktop gpsd: launching gpsd -F /var/run/gpsd.sock
> Jul 30 22:28:05 desktop gpsd: gpsd_control ends
> Jul 30 22:28:05 desktop gpsd:
> REMOVER=/var/run/usb/%sys%devices%pci0000:00%0000:00:10.2%usb4%4-1%4-1:1.0
> Jul 30 22:28:05 desktop gpsd: gpsd: exception exceptions.IOError yields [Errno
> 2] No such file or directory:
> '/var/run/usb/%sys%devices%pci0000:00%0000:00:10.2%usb4%4-1%4-1:1.0'
> 
> 
> it is written by /etc/hotplug/usb/gpsd.
> on line 82 there is :
> remover = os.getenv("REMOVER")
> 
> then it tries to save '/etc/hotplug/usb/gpsd remove /dev/ttyUSB0' ( where
> /dev/ttyUSB0 is my gps receiver ) to the filename under the variable remover,
> which points to something stupid like :
> /var/run/usb/%sys%devices%pci0000:00%0000:00:10.2%usb4%4-1%4-1:1.0
> 
> any idea?
> 

------- Comment #8 From Richard Hyde 2006-08-10 03:05:16 0000 -------
(In reply to comment #7)
> obviously environment variable remover is set to something incorrect...
> 
> (In reply to comment #6)
> > I get similar problem :
> > 
> > Jul 30 22:28:05 desktop gpsd: ACTION=add
> > Jul 30 22:28:05 desktop gpsd: waiting for /dev/ttyUSB0
> > Jul 30 22:28:05 desktop gpsd: /dev/ttyUSB0 has gone active
> > Jul 30 22:28:05 desktop gpsd: gpsd_control(action=add, arg=/dev/ttyUSB0)
> > Jul 30 22:28:05 desktop gpsd: socket /var/run/gpsd.sock creation failure: (111,
> > 'Connection refused')
> > Jul 30 22:28:05 desktop gpsd: launching gpsd -F /var/run/gpsd.sock
> > Jul 30 22:28:05 desktop gpsd: gpsd_control ends
> > Jul 30 22:28:05 desktop gpsd:
> > REMOVER=/var/run/usb/%sys%devices%pci0000:00%0000:00:10.2%usb4%4-1%4-1:1.0
> > Jul 30 22:28:05 desktop gpsd: gpsd: exception exceptions.IOError yields [Errno
> > 2] No such file or directory:
> > '/var/run/usb/%sys%devices%pci0000:00%0000:00:10.2%usb4%4-1%4-1:1.0'
> > 
> > 
> > it is written by /etc/hotplug/usb/gpsd.
> > on line 82 there is :
> > remover = os.getenv("REMOVER")
> > 
> > then it tries to save '/etc/hotplug/usb/gpsd remove /dev/ttyUSB0' ( where
> > /dev/ttyUSB0 is my gps receiver ) to the filename under the variable remover,
> > which points to something stupid like :
> > /var/run/usb/%sys%devices%pci0000:00%0000:00:10.2%usb4%4-1%4-1:1.0
> > 
> > any idea?
> > 
> 

Try creating the /var/run/usb directory

------- Comment #9 From Robin Johnson 2006-08-13 23:41:19 0000 -------
fixed in cvs now.

First Last Prev Next    No search results available      Search page      Enter new bug