Palm Zire 31 segfaults gpilotd on sync



System is a fully updated Fedora Core 4

[root hughsie ~]# rpm -qa |grep kernel
kernel-2.6.11-1.1369_FC4
[root hughsie ~]# rpm -qa |grep pilot
gnome-pilot-2.0.13-2
pilot-link-0.12.0-0.pre3.0.fc4.1
gnome-pilot-conduits-2.0.13-1

When I connect me Palm Zire 31, and try to sync, I get a segfault in
gpilotd.

I tried running gpilotd with strace to see what was going on:

GNOME_DISABLE_CRASH_DIALOG=1 strace /usr/libexec/gpilotd

<snip>
open("/dev/null", O_RDWR)               = 18
open("/dev/pilot", O_RDWR|O_NONBLOCK)   = 19
ioctl(19, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon
-echo ...}) = 0
ioctl(19, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon
-echo ...}) = 0
ioctl(19, SNDCTL_TMR_START or TCSETS, {B9600 -opost -isig -icanon
-echo ...}) = 0
ioctl(19, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon
-echo ...}) = 0
fcntl64(19, F_GETFL)                    = 0x802 (flags O_RDWR|
O_NONBLOCK)
fcntl64(19, F_SETFL, O_RDWR)            = 0
dup2(19, 18)                            = 18
close(19)                               = 0
ioctl(18, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon
-echo ...}) = 0
ioctl(18, SNDCTL_TMR_STOP or TCSETSW, {B9600 -opost -isig -icanon
-echo ...}) = 0
select(19, [18], NULL, NULL, {10, 0}

Ant it waits for me to sync.
When I sync, the ttyUSB0 and ttyUSB1 ports get greated in /dev thanks to
udev.
The udev rule also symlinks /dev/pilot to /dev/ttyUSB1.

#cat /etc/udev/rules.d/50-udev.rules |grep pilot
KERNEL=="ttyUSB*", GROUP="uucp", MODE="0666", SYMLINK="pilot"

The /dev/ttyUSB1 has permissions a+rw so all users can sync.

when I click sync on the pilot I get:

<snip>
gettimeofday({1119714113, 174830}, NULL) = 0
open("/proc/bus/usb/devices", O_RDONLY) = 18
fstat64(18, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7d74000
read(18, "\nT:  Bus=02 Lev=00 Prnt=00 Port="..., 4096) = 954
read(18, "", 4096)                      = 0
close(18)                               = 0
munmap(0xb7d74000, 4096)                = 0
ioctl(3, FIONREAD, [0])                 = 0
gettimeofday({1119714113, 191783}, NULL) = 0
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=8,
events=POLLIN|POLLPRI}, {fd=10, events=POLLIN}, {fd=13, events=POLLIN|
POLLPRI}, {fd=14, events=POLLIN|POLLPRI}, {fd=15, events=POLLIN|
POLLPRI}, {fd=17, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|
POLLPRI}, {fd=12, events=POLLIN|POLLPRI}], 10, 1984) = 0
gettimeofday({1119714115, 180502}, NULL) = 0
open("/proc/bus/usb/devices", O_RDONLY) = 18
fstat64(18, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7d74000
read(18, "\nT:  Bus=02 Lev=00 Prnt=00 Port="..., 4096) = 1492
close(18)                               = 0
munmap(0xb7d74000, 4096)                = 0
write(2, "gpilotd-Message: setting PILOTRA"..., 42gpilotd-Message:
setting PILOTRATE=115200
) = 42
open("/dev/null", O_RDWR)               = 18
open("/dev/pilot", O_RDWR|O_NONBLOCK)   = -1 ENOENT (No such file or
directory)
lstat64("/dev", {st_mode=S_IFDIR|0755, st_size=5120, ...}) = 0
lstat64("/dev/pilot", 0xbf9932dc)       = -1 ENOENT (No such file or
directory)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Now I've tried using /dev/pilot, /dev/ttyUSB0 and /dev/ttyUSB1 but they
all do the same.

If you then try #cat /dev/pilot it fails. Wait 2 seconds, and it works. 

This smells like a race to me, where /proc/bus/usb/devices gets updated
before udev creates the new /dev entries - but I don't know enough about
the code to tell.

Anyone had similar problems? Help appreciated.

Side note:

When trying to compile the CVS, I get:

<snip>
checking for crypt... no
checking for crypt in -lufc... no
checking for crypt in -lcrypt... yes
configure: creating ./config.status
config.status: creating Makefile
sed: file ./confstatvR8696/subs-3.sed line 35: unterminated `s' command
config.status: creating gnome-pilot.spec
sed: file ./confstatvR8696/subs-3.sed line 35: unterminated `s' command
config.status: creating gpilotd/Makefile
sed: file ./confstatvR8696/subs-3.sed line 35: unterminated `s' command
config.status: creating applet/Makefile
sed: file ./confstatvR8696/subs-3.sed line 35: unterminated `s' command
config.status: creating conduits/Makefile
sed: file ./confstatvR8696/subs-3.sed line 35: unterminated `s' command
config.status: creating conduits/backup/Makefile
sed: file ./confstatvR8696/subs-3.sed line 35: unterminated `s' command
config.status: creating conduits/file/Makefile
sed: file ./confstatvR8696/subs-3.sed line 35: unterminated `s' command
config.status: creating conduits/test/Makefile
sed: file ./confstatvR8696/subs-3.sed line 35: unterminated `s' command
config.status: creating capplet/Makefile
sed: file ./confstatvR8696/subs-3.sed line 35: unterminated `s' command
config.status: creating utils/Makefile
sed: file ./confstatvR8696/subs-3.sed line 35: unterminated `s' command
config.status: creating idl/Makefile
sed: file ./confstatvR8696/subs-3.sed line 35: unterminated `s' command
config.status: creating libgpilotdCM/Makefile
sed: file ./confstatvR8696/subs-3.sed line 35: unterminated `s' command
config.status: creating po/Makefile.in
<snip>

Thanks, 

Richard Hughes

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]