1*abb0f93cSkardelProblem with recent ANSI compilers 2*abb0f93cSkardel 3*abb0f93cSkardelOn some systems, including AIX, the compiler quits on the ntp_refclock.c 4*abb0f93cSkardelfile when processing the refclock_report() routine. The problem, which 5*abb0f93cSkardelis eithre a feature or a bug, has to do with an unwanted promotion of 6*abb0f93cSkardelthe u_char argument to an int and a failure of the compiler to recognize 7*abb0f93cSkardelthe preceding prototype. A workaround is to use ANSI syntax to delare 8*abb0f93cSkardelthe arguments. Since ANSI compilers are not universally available, this 9*abb0f93cSkardelsyntax can't be used in the stock distribution. 10*abb0f93cSkardel 11*abb0f93cSkardel(Message # 60: 2884 bytes, New) 12*abb0f93cSkardelDate: Sat, 19 Aug 1995 13:20:50 -0400 13*abb0f93cSkardelFrom: "R. Bernstein" <rocky@panix.com> 14*abb0f93cSkardelNewsgroups: comp.protocols.time.ntp 15*abb0f93cSkardelto: mills@udel.edu 16*abb0f93cSkardelreturn-receipt-to: rocky@panix.com 17*abb0f93cSkardelSubject: time and AIX 3.2.5 raw tty bug 18*abb0f93cSkardel 19*abb0f93cSkardelThis posting isn't strictly about NTP, any program that may stop the 20*abb0f93cSkardelclock or set the clock backwards is subject to the AIX 3.2.5 bug. 21*abb0f93cSkardel 22*abb0f93cSkardelOn AIX 3.2.5, there is a bug in the tty driver for a raw device which 23*abb0f93cSkardelmay crash the box under certain conditions: basically a read() on a 24*abb0f93cSkardelraw tty in effect, a character was read but not as many as specified 25*abb0f93cSkardelby VMIN when a read timeout occurred. VTIME specifies the timeout. See 26*abb0f93cSkardelthe AIX manual page on termios.h or that include file. for Information 27*abb0f93cSkardelon VMIN (or MIN) VTIME (or TIME). 28*abb0f93cSkardel 29*abb0f93cSkardelA remedy other than to not use raw tty's is to apply patch U435110. 30*abb0f93cSkardel 31*abb0f93cSkardelDetails of the problem report follow. 32*abb0f93cSkardel 33*abb0f93cSkardel> ABSTRACT: 34*abb0f93cSkardel> IX43779: TRAP IN PSX_TIMEO 35*abb0f93cSkardel> 36*abb0f93cSkardel> ORIGINATING DETAILS: 37*abb0f93cSkardel> Stacktrace shows: 38*abb0f93cSkardel> IAR: 01460214 posixdd:psx_timeo + 8bf4: ti 4,r12,0x0 39*abb0f93cSkardel> *LR: 014601a0 posixdd:psx_timeo + 8b80 40*abb0f93cSkardel> 00212c60: 014604f4 posixdd:psx_timer + 8ed4 41*abb0f93cSkardel> 00212cc0: 0144b74c ttydd:tty_do_offlevel + 4284 42*abb0f93cSkardel> 00212d20: 000216fc .i_offlevel + 8c 43*abb0f93cSkardel> 00212d70: 00021d78 .i_softint + c8 44*abb0f93cSkardel> 00001004: 00008714 .finish_interrupt + 80 45*abb0f93cSkardel> 46*abb0f93cSkardel> RESPONDER SUMMARY: 47*abb0f93cSkardel> AIX asserted in psx_timeo(). Reason for the assert was that 48*abb0f93cSkardel> the current time was behind psx_ctime. Since this state 49*abb0f93cSkardel> can occur when the current time is changed after a character 50*abb0f93cSkardel> is received but before the VTIME interbyte timer pops, we 51*abb0f93cSkardel> should not assert on this. 52*abb0f93cSkardel> 53*abb0f93cSkardel> RESPONDER CONCLUSION: 54*abb0f93cSkardel> Removed the requirement that current time > psx_ctime by 55*abb0f93cSkardel> adding a new L_ntimersub macro that is used instead of the 56*abb0f93cSkardel> ntimersub macro in time.h. Also added a test for (current 57*abb0f93cSkardel> time - psx_ctime) being negative, in that case we do not 58*abb0f93cSkardel> adjust the new timeout. 59*abb0f93cSkardel> 60*abb0f93cSkardel> Reported to Correct a PTF in Error: NO 61*abb0f93cSkardel> Reported as a Highly pervasive problem: NO 62*abb0f93cSkardel> 63*abb0f93cSkardel> PE Apar?: NoPE 64*abb0f93cSkardel> Hiper Apar?: NoHiper 65*abb0f93cSkardel> Status: CLOSED PER 66*abb0f93cSkardel> Component Name: AIX V3 FOR RS/6 67*abb0f93cSkardel> Version: 320 68*abb0f93cSkardel> Component ID: 575603001 69*abb0f93cSkardel> Submitted: 94/05/03 70*abb0f93cSkardel> Closed: 94/05/05 71*abb0f93cSkardel> ChangeTeam: TX2527 72*abb0f93cSkardel> 73*abb0f93cSkardel> APAR FIXED BY: U431696 U432151 U432844 U432870 U432979 74*abb0f93cSkardel> U433049 U433081 U433459 U433876 U433906 U434598 U434453 75*abb0f93cSkardel> U434672 U434737 U435110 76*abb0f93cSkardel 77