Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-23 Thread Tomalak Geret'kal
On 23/08/2012 12:32, Tomalak Geret'kal wrote: On 23/08/2012 12:20, Tomalak Geret'kal wrote: Having fixed that, I can now see that the *actual* error from shmget() (as implied by the SYS_307 line, I guess) is errno 22 EINVAL (Invalid argument), and *not* 2 (No file or directory). Tom I've f

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-23 Thread Miroslav Lichvar
On Thu, Aug 23, 2012 at 11:04:05AM +0100, Tomalak Geret'kal wrote: > It seems odd that chrony fails to open /var/run/chrony.pid and fails > to adjtimex(), presumably both through permissions errors (though > this is only made clear-ish for the latter). There is *only* a root > user on the device, a

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-23 Thread Tomalak Geret'kal
On 23/08/2012 12:20, Tomalak Geret'kal wrote: Having fixed that, I can now see that the *actual* error from shmget() (as implied by the SYS_307 line, I guess) is errno 22 EINVAL (Invalid argument), and *not* 2 (No file or directory). Tom I've found a discrepancy in the size of the shmTime

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-23 Thread Tomalak Geret'kal
On 23/08/2012 11:54, Tomalak Geret'kal wrote: When I remove this bit, the adjtimex() issue progresses to the shmget() issue (which seems impervious to setuidness). When I add it back, the adjtimex() issue returns. There is a red herring in my strace output - my output of "errno" in shm_initia

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-23 Thread Tomalak Geret'kal
On 23/08/2012 11:54, Tomalak Geret'kal wrote: So that's (sort of) one mystery solved. I'll have to investigate as to where that setuid bit is getting set. Found it - chmod 4755 was erroneously applied in some cases on installation due to a permissions & sudo confusion. It'll be given 0755 from

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-23 Thread Tomalak Geret'kal
On 23/08/2012 11:47, Miroslav Lichvar wrote: On Thu, Aug 23, 2012 at 11:04:05AM +0100, Tomalak Geret'kal wrote: It seems odd that chrony fails to open /var/run/chrony.pid and fails to adjtimex(), presumably both through permissions errors (though this is only made clear-ish for the latter). Ther

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-23 Thread Tomalak Geret'kal
On 21/08/2012 20:33, Miroslav Lichvar wrote: On Tue, Aug 21, 2012 at 06:05:46PM +0100, Tomalak Geret'kal wrote: It's really just the adjtimex()/shmget() oddity I'm confused about now. It really does seem to occur largely randomly and then vanish when I replace the binary with a new build which

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-21 Thread Tomalak Geret'kal
On 21/08/2012 20:33, Miroslav Lichvar wrote: On Tue, Aug 21, 2012 at 06:05:46PM +0100, Tomalak Geret'kal wrote: I don't experience this issue at all when "noselect" is used on the NMEA/"GPS" source. That is, when I can launch chronyd past my adjtimex()/shmget() issues, the PPS has so far lasted

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-21 Thread Tomalak Geret'kal
On 21/08/2012 22:58, Bill Unruh wrote: I'm afraid I may not have made clear the context of the above `chronyc sources` output, which was only to demonstrate what happens after a while when I don't have "noselect" on the GPS source and the GPS source has been selected by chrony after a "no majo

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-21 Thread Tomalak Geret'kal
On 21/08/2012 19:35, Bill Unruh wrote: On Tue, 21 Aug 2012, Tomalak Geret'kal wrote: On 21/08/2012 16:31, Bill Unruh wrote: > > The SHM is fed by a known-good process that works with ntpd and also > here Is it a secret which program you use? No, it's not a secret, but it's in-house so yo

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-21 Thread Miroslav Lichvar
On Tue, Aug 21, 2012 at 06:05:46PM +0100, Tomalak Geret'kal wrote: > I don't experience this issue at all when "noselect" is used on the > NMEA/"GPS" source. That is, when I can launch chronyd past my > adjtimex()/shmget() issues, the PPS has so far lasted up to 16 hours > (longer tests pending) -

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-21 Thread Tomalak Geret'kal
On 21/08/2012 16:31, Bill Unruh wrote: On Mon, 20 Aug 2012, Tomalak Geret'kal wrote: On 20/08/2012 22:44, Bill Unruh wrote: Hmm. How are you feeding the shm? The PPS source cannot give you the seconds. It is only accurate to the nsec, but completely oblivious to seconds, so you have to

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-21 Thread Bill Unruh
On Tue, 21 Aug 2012, Tomalak Geret'kal wrote: On 21/08/2012 19:35, Bill Unruh wrote: On Tue, 21 Aug 2012, Tomalak Geret'kal wrote: > On 21/08/2012 16:31, Bill Unruh wrote: > > > > The SHM is fed by a known-good process that works > > with ntpd and also > here > > > > Is it a secret w

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-21 Thread Miroslav Lichvar
On Tue, Aug 21, 2012 at 10:53:31AM +0100, Tomalak Geret'kal wrote: > On 21/08/2012 10:24, Miroslav Lichvar wrote: > >There are some other areas which needs update, for instance the > >section with server name resolving on start is no longer valid, as > >chrony will try it later after start. > That'

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-21 Thread Bill Unruh
On Tue, 21 Aug 2012, Tomalak Geret'kal wrote: On 21/08/2012 16:31, Bill Unruh wrote: On Mon, 20 Aug 2012, Tomalak Geret'kal wrote: > On 20/08/2012 22:44, Bill Unruh wrote: > > Hmm. How are you feeding the shm? The PPS source cannot give you the > > seconds. > > It is only accurate to th

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-21 Thread Miroslav Lichvar
On Mon, Aug 20, 2012 at 10:49:21PM +0100, Tomalak Geret'kal wrote: > On 20/08/2012 22:44, Bill Unruh wrote: > >On Mon, 20 Aug 2012, Tomalak Geret'kal wrote: > >>[sw200319 /root]# chronyc sources > >>210 Number of sources = 2 > >>MS Name/IP atddress Stratum Poll LastRx Last sample > >>

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-21 Thread Tomalak Geret'kal
On 21/08/2012 10:24, Miroslav Lichvar wrote: There are some other areas which needs update, for instance the section with server name resolving on start is no longer valid, as chrony will try it later after start. That's interesting actually as when I put NTP servers "ntp1" "ntp2" "ntp3" (whic

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-21 Thread Bill Unruh
On Mon, 20 Aug 2012, Tomalak Geret'kal wrote: On 20/08/2012 22:44, Bill Unruh wrote: On Mon, 20 Aug 2012, Tomalak Geret'kal wrote: > And when it *does* start up successfully, I find that after some time > (this varies, but on last observation was around ten minutes after > startup) my GP

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-20 Thread Tomalak Geret'kal
On 20/08/2012 22:44, Bill Unruh wrote: On Mon, 20 Aug 2012, Tomalak Geret'kal wrote: And when it *does* start up successfully, I find that after some time (this varies, but on last observation was around ten minutes after startup) my GPS source is being selected over my PPS source (after a "n

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-20 Thread Tomalak Geret'kal
On 20/08/2012 22:29, Tomalak Geret'kal wrote: And when it *does* start up successfully, I find that after some time (this varies, but on last observation was around ten minutes after startup) my GPS source is being selected over my PPS source (after a "no majority" event), and the PPS source i

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-20 Thread Tomalak Geret'kal
On 20/08/2012 21:58, Bill Unruh wrote: Sorry cannot say, but there is a manual adjtimex program under linux ( man 8 adjtimex) which you could try running and see if you get some error messages. Also the system call adjtimex sets errno, and you should be able to get more info out of it. I can

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-20 Thread Tomalak Geret'kal
On 20/08/2012 18:49, Tomalak Geret'kal wrote: Hi I'm replacing ntpd with chronyd on a busybox-driven Linux 2.6.21 ARM device that takes time from a local GPS receiver with PPS and/or remote NTP servers. We've never been able to get ntpd working with the ATOM PPS driver and we have some fiddl

[chrony-users] Fatal error : adjtimex() failed

2012-08-20 Thread Tomalak Geret'kal
Hi I'm replacing ntpd with chronyd on a busybox-driven Linux 2.6.21 ARM device that takes time from a local GPS receiver with PPS and/or remote NTP servers. We've never been able to get ntpd working with the ATOM PPS driver and we have some fiddly time-step requirements that led us to decide

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-20 Thread Bill Unruh
On Mon, 20 Aug 2012, Tomalak Geret'kal wrote: On 20/08/2012 21:58, Bill Unruh wrote: Sorry cannot say, but there is a manual adjtimex program under linux ( man 8 adjtimex) which you could try running and see if you get some error messages. Also the system call adjtimex sets errno, and you

Re: [chrony-users] Fatal error : adjtimex() failed

2012-08-20 Thread Bill Unruh
Sorry cannot say, but there is a manual adjtimex program under linux ( man 8 adjtimex) which you could try running and see if you get some error messages. Also the system call adjtimex sets errno, and you should be able to get more info out of it. I cannot remember if chrony actually reports the