[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] gpsd crash
From: |
Eric S. Raymond |
Subject: |
Re: [gpsd-dev] gpsd crash |
Date: |
Fri, 9 Jan 2015 06:02:20 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
address@hidden <address@hidden>:
> Hello,
>
> i habe done some investigations on the crah i observed after the awake of my
> netbook from sleep.
>
> 1. gpsd crash when i exit gpsmon.
> 2. gpsd crash in line 2172 of gpsd.c
> 3. Here is the gdb output of
>
> p *device
>
> $3 = {gpsdata = {set = 33554434, online = 0, gps_fd = -1, fix = {
> time = 1415333875, mode = 3, ept = 0.0050000000000000001,
> latitude = 52.364035350068853, epy = 12.773699940785612,
> longitude = 9.6584529921558975, epx = 31.739733263843473,
> altitude = 63.404462945251616, epv = 37.66646278533706,
> track = 84.403599220853238, epd = nan(0x8000000000000),
> speed = 0.53741792350378159, eps = 63.479466527686945,
> climb = -0.19825986859897671, epc = 75.332925570674121},
> separation = 46.367540598185151, status = 1, satellites_used = 6, dop = {
> xdop = 2.1159822175895648, ydop = 0.85157999605237411,
> pdop = 2.8079422680479702, hdop = 1.2, vdop = 1.6376722950146547,
> tdop = 1.7064308073137007, gdop = 3.2857945585260908},
> epe = nan(0x8000000000000), skyview_time = 1415333872.99,
> satellites_visible = 9, skyview = {{ss = 39, used = true, PRN = 12,
>
> Note that gpsfd is -1
>
> Perhaps this helps hunting this bug.
>
> Reinhard
I think it does.
I suspect your crash is in this section of code:
while (0 == signalled) {
fd_set efds;
switch(gpsd_await_data(&rfds, &efds, maxfd, &all_fds, &context.errout))
{
case AWAIT_GOT_INPUT:
break;
case AWAIT_NOT_READY:
for (device = devices; device < devices + MAXDEVICES; device++)
if (allocated_device(device) &&
FD_ISSET(device->gpsdata.gps_fd, &efds)) {
deactivate_device(device);
free_device(device);
}
continue;
case AWAIT_FAILED:
exit(EXIT_FAILURE);
}
Most likely what's happening is that on receipt of wakeup signal it is
going to the AWAIT_NOT_READY case and dying somewhere in the
deactivate() or free_device() code.
I think I fixed a bug here around the end of the year, so it might be your
problem is solved already; please check with head. If not, the first thing
to try is commenting out the deactivate() and free_device() calls to see if
that prevents the crash.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>