gpsd-dev
[Top][All Lists]
Advanced

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

gpsmon segmentation fault


From: SZIGETVÁRI János
Subject: gpsmon segmentation fault
Date: Mon, 6 Apr 2020 13:22:12 +0200

Hello Everyone,

I am using gpsd and gpsmon version 3.20 (compiled from source) on my Raspberry PI 2, that's running Slackware-ARM current (Sarpi2).
Previously I was using gpsd version 3.17 on a Raspberry PI 1, on Slackware ARM 14.2, and there everything worked fine.
Now I moved my config and GPS device over to the RPi2 and for some reason gpsmon crashes soon after being started.
I tried to go back to gpsd-3.17, and other versions in between, but all of them seem to produce the crash.
GPSd itself seems to work fine. It detects my U-Blox GPS received, that's hooked to the serial port of the RPi2:

gpsd:INFO: device /dev/ttyAMA0 activated
gpsd:INFO: running with effective group ID 16
gpsd:INFO: running with effective user ID 99
gpsd:INFO: startup at 2020-04-06T10:55:59.000Z (1586170559)
gpsd:IO: UBX: len 60
gpsd:PROG: switching to match packet type 11: b5620106340050387f07e2790200340803dd67cc8b18e84d31087f29c21bb503000009000000feffffffedffffff5b0000009f00020922670100c02f
gpsd:PROG: switch_driver(u-blox) called...
gpsd:PROG: selecting u-blox driver...
gpsd:INFO: /dev/ttyAMA0 identified as type u-blox, 1 sec @ 9600bps
gpsd:PROG: => GPS: UBX class: 0a, id: 04, len: 0, crc: 0e34
gpsd:IO: SER: => GPS: b5620a0400000e34
gpsd:PROG: => GPS: UBX class: 06, id: 00, len: 20, crc: a0a9
gpsd:IO: SER: => GPS: b5620600140001000000d0080000802500000700010000000000a0a9
gpsd:PROG: => GPS: UBX class: 0a, id: 04, len: 0, crc: 0e34
gpsd:IO: SER: => GPS: b5620a0400000e34
gpsd:PROG: => GPS: UBX class: 06, id: 01, len: 3, crc: 104b
gpsd:IO: SER: => GPS: b56206010300010401104b
gpsd:PROG: => GPS: UBX class: 06, id: 01, len: 3, crc: 124f
gpsd:IO: SER: => GPS: b56206010300010601124f
gpsd:PROG: => GPS: UBX class: 06, id: 01, len: 3, crc: 1351
gpsd:IO: SER: => GPS: b562060103000107011351
gpsd:PROG: => GPS: UBX class: 06, id: 01, len: 3, crc: 2c83
gpsd:IO: SER: => GPS: b562060103000120012c83
gpsd:PROG: => GPS: UBX class: 06, id: 01, len: 3, crc: 45ac
gpsd:IO: SER: => GPS: b5620601030001300a45ac
gpsd:PROG: => GPS: UBX class: 06, id: 01, len: 3, crc: 4ab6
gpsd:IO: SER: => GPS: b5620601030001350a4ab6
gpsd:PROG: => GPS: UBX class: 06, id: 01, len: 3, crc: 47b0
gpsd:IO: SER: => GPS: b5620601030001320a47b0
gpsd:PROG: => GPS: UBX class: 06, id: 01, len: 3, crc: 0d45
gpsd:IO: SER: => GPS: b562060103000101010d45
gpsd:PROG: => GPS: UBX class: 06, id: 01, len: 3, crc: 1d65
gpsd:IO: SER: => GPS: b562060103000111011d65
gpsd:PROG: => GPS: UBX class: 06, id: 01, len: 3, crc: 308d
gpsd:IO: SER: => GPS: b562060103000126ff308d
gpsd:PROG: UBX-NAV-SOL
gpsd:PROG: NTP: ntpshm_put(/dev/ttyAMA0,-20)  1586170560.000162274 @  1586170560.540968703


So as far as I could determine, everything works fine gpsd-wise, but when I start gpsmon, it always crashes, and this is all the output it produces:


tc://localhost:2947           JSON slave driver>
(82) {"class":"VERSION","release":"3.20","rev":"3.20","proto_major":3,"proto_minor":14}
(256) {"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/ttyAMA0","driver":"u-blox","subtype":"SW 7.03 (45969),HW 00040007","activated":"2020-04-06T11:13:29.190Z","flags":1,"native":1,"bps":9600,"parity":"N","stopbits":1,"cycle
":1.00,"mincycle":0.25}]}
(122) {"class":"WATCH","enable":true,"json":false,"nmea":false,"raw":2,"scaled":false,"timing":false,"split24":false,"pps":true}
Segmentation fault

If I do a strace on gpsmon, I get this:


(Part of the startup related output omitted.)
socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(2947), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
setsockopt(3, SOL_IP, IP_TOS, [16], 4)  = 0
setsockopt(3, SOL_IPV6, IPV6_TCLASS, [16], 4) = -1 ENOPROTOOPT (Protocol not available)
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
write(3, "?WATCH={\"raw\":2,\"pps\":true}\r\n", 29) = 29
rt_sigaction(SIGABRT, {sa_handler=0x14888, sa_mask=[ABRT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=0x14888, sa_mask=[QUIT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGINT, {sa_handler=0x14888, sa_mask=[INT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTERM, {sa_handler=0x14888, sa_mask=[TERM], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
...
read(4, "", 28672)                      = 0
close(4)                                = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=56, ws_col=237, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=56, ws_col=237, ws_xpixel=0, ws_ypixel=0}) = 0
brk(0x127a000)                          = 0x127a000
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig -icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig -icanon -echo ...}) = 0
rt_sigaction(SIGTSTP, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTSTP, {sa_handler=0x76dd2378, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, NULL, 8) = 0
rt_sigaction(SIGINT, NULL, {sa_handler=0x14888, sa_mask=[INT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, 8) = 0
rt_sigaction(SIGTERM, NULL, {sa_handler=0x14888, sa_mask=[TERM], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, 8) = 0
rt_sigaction(SIGWINCH, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGWINCH, {sa_handler=0x76dd2264, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x76c2de90}, NULL, 8) = 0
ioctl(1, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
ioctl(1, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig -icanon -echo ...}) = 0
ioctl(1, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig -icanon -echo ...}) = 0
write(1, "\33[?1049h\33[22;0;0t\33[1;56r\33(B\33[m\33[4l\33[?7h\33[?1h\33=", 46) = 46
pselect6(4, [0 3], NULL, NULL, NULL, {NULL, 8}) = 1 (in [3])
read(3, "{\"class\":\"VERSION\",\"release\":\"3.20\",\"rev\":\"3.20\",\"proto_major\":3,\"proto_minor\":14}\r\n{\"class\":\"DEVICES\",\"devices\":[{\"class\":\"DEVICE\",\"path\":\"/dev/ttyAMA0\",\"driver\":\"u-blox\",\"subtype\":\"SW 7.03 (45969),HW 00040007\",\"activated\":\"2020-04-06T11:16:33.245Z\",\"flag"..., 18433) = 466
brk(0x129b000)                          = 0x129b000
rt_sigaction(SIGTSTP, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, {sa_handler=0x76dd2378, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, 8) = 0
write(1, "\33[H\33[2J", 7)              = 7
write(1, "\33(B\33[0;1mtc\33(B\33[m\0\33(B\33[0;1m://localhost:2947\33[1;31H", 51) = 51
write(1, "\33(B\33[mJSON slave driver>\r\n", 26) = 26
write(1, "(82) {\"class\":\"VERSION\",\"release\":\"3.20\",\"rev\":\"3.20\",\"proto_major\":3,\"proto_minor\":14}\r\n", 89) = 89
rt_sigaction(SIGTSTP, {sa_handler=0x76dd2378, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, NULL, 8) = 0
read(3, 0x9f26c, 18049)                 = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGTSTP, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, {sa_handler=0x76dd2378, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, 8) = 0
poll([{fd=0, events=POLLIN}], 1, 0)     = 0 (Timeout)
poll([{fd=0, events=POLLIN}], 1, 0)     = 0 (Timeout)
write(1, "(256) {\"class\":\"DEVICES\",\"devices\":[{\"class\":\"DEVICE\",\"path\":\"/dev/ttyAMA0\",\"driver\":\"u-blox\",\"subtype\":\"SW 7.03 (45969),HW 00040007\",\"activated\":\"2020-04-06T11:16:33.245Z\",\"flags\":1,\"native\":1,\"bps\":9600,\"parity\":\"N\",\"stopbits\":1,\"cycle\33[4;1H", 243) = 243
write(1, "\":1.00,\"mincycle\":0.25}]}\r\n", 27) = 27
rt_sigaction(SIGTSTP, {sa_handler=0x76dd2378, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, NULL, 8) = 0
read(3, 0x9f16a, 18307)                 = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGTSTP, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, {sa_handler=0x76dd2378, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, 8) = 0
poll([{fd=0, events=POLLIN}], 1, 0)     = 0 (Timeout)
poll([{fd=0, events=POLLIN}], 1, 0)     = 0 (Timeout)
write(1, "(122) {\"class\":\"WATCH\",\"enable\":true,\"json\":false,\"nmea\":false,\"raw\":2,\"scaled\":false,\"timing\":false,\"split24\":false,\"pps\":true}\r\n", 130) = 130
rt_sigaction(SIGTSTP, {sa_handler=0x76dd2378, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x76c2de90}, NULL, 8) = 0
read(3, 0x9f0ee, 18431)                 = -1 EAGAIN (Resource temporarily unavailable)
pselect6(4, [0 3], NULL, NULL, NULL, {NULL, 8}) = 1 (in [3])
read(3, "{\"class\":\"TOFF\",\"device\":\"/dev/ttyAMA0\",\"real_sec\":1586171793, \"real_nsec\":999549916,\"clock_sec\":1586171794,\"clock_nsec\":135412671}\r\n\265b\1\0064\0\240\f\222\7\334!\371\3774\10\3\335\226\312\213\30\365N1\10\263*\302\33\306\3\0\0\0\0\0\0\0\0\0\0\4\0\0\0C\0\0\0\236\0\2\t\"g\1\0\r\302", 18433) = 193
read(3, 0x9f12a, 18371)                 = -1 EAGAIN (Resource temporarily unavailable)
write(3, "\265b\n\4\0\0\0164", 8)       = 8
ioctl(3, TCSBRK, 1)                     = -1 EFAULT (Bad address)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x4} ---
+++ killed by SIGSEGV +++


Could someone help me in determining what may be wrong?

Thanks in advance!

János

--
Janos SZIGETVARI
RHCE, License no. 150-053-692

LinkedIn: linkedin.com/in/janosszigetvari

__@__˚V˚
Make the switch to open (source) applications, protocols, formats now:
- windows -> Linux, iexplore -> Firefox, msoffice -> LibreOffice
- msn -> jabber protocol (Pidgin, Google Talk)
- mp3 -> ogg, wmv -> ogg, jpg -> png, doc/xls/ppt -> odt/ods/odp

reply via email to

[Prev in Thread] Current Thread [Next in Thread]