gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] 100% cpu usage?


From: Greg Troxel
Subject: Re: [gpsd-dev] 100% cpu usage?
Date: Wed, 30 Oct 2013 07:56:21 -0400
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/23.4 (berkeley-unix)

Chris Kuethe <address@hidden> writes:

> This smells like select in the main loop is returning right away.

Agreed; I wondered that.  I posted quickly in the last 30s of my evening
hacking window because I thought this might be happening to others, and
I only noticed because I heard the fan.

> strace/ktrace to see if that's the case, you can also compile with
> profiling to see if some code path is running really hot.

Yes, that was my next thought.  So ktrace shows that thread 2
(that runs ntpshm, I think) tries to open a a chrony socket and then
loops calling gettimeofday (with no nother system calls).

So this is pps code related.  But it happens on a ublox 4 which does not
bring pps to the usb modem control lines.

I then tried to build with ntpshm=no, but:

  gcc -o gpsd.o -c -D_GNU_SOURCE -pthread -Wmissing-prototypes 
-Wmissing-declarations -O2 -I/usr/pkg/include/libusb-1.0 gpsd.c
  gpsd.c: In function 'main':
  gpsd.c:1787:12: error: 'struct gps_context_t' has no member named 'pps_hook'
  scons: *** [gpsd.o] Error 1

so it seems the ifdefing is off.

Also, scons -h did not explain how to disbla ntpd and chrony support
separately (which I only want to do for debugging).

scons man page says to set CCFLAGS, but passing that as -g in the
environment did not work, and neither did passing it on the scons
command line.



reply via email to

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