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