1181834SrobertoProblem with recent ANSI compilers
2181834Sroberto
3181834SrobertoOn some systems, including AIX, the compiler quits on the ntp_refclock.c
4181834Srobertofile when processing the refclock_report() routine. The problem, which
5181834Srobertois eithre a feature or a bug, has to do with an unwanted promotion of
6181834Srobertothe u_char argument to an int and a failure of the compiler to recognize
7181834Srobertothe preceding prototype. A workaround is to use ANSI syntax to delare
8181834Srobertothe arguments. Since ANSI compilers are not universally available, this
9181834Srobertosyntax can't be used in the stock distribution.
10181834Sroberto
11181834Sroberto(Message # 60: 2884 bytes, New)
12181834SrobertoDate: Sat, 19 Aug 1995 13:20:50 -0400
13181834SrobertoFrom: "R. Bernstein" <rocky@panix.com>
14181834SrobertoNewsgroups: comp.protocols.time.ntp
15181834Srobertoto: mills@udel.edu
16181834Srobertoreturn-receipt-to: rocky@panix.com
17181834SrobertoSubject: time and AIX 3.2.5 raw tty bug
18181834Sroberto 
19181834SrobertoThis posting isn't strictly about NTP, any program that may stop the
20181834Srobertoclock or set the clock backwards is subject to the AIX 3.2.5 bug.
21181834Sroberto 
22181834SrobertoOn AIX 3.2.5, there is a bug in the tty driver for a raw device which
23181834Srobertomay crash the box under certain conditions: basically a read() on a
24181834Srobertoraw tty in effect, a character was read but not as many as specified
25181834Srobertoby VMIN when a read timeout occurred. VTIME specifies the timeout. See
26181834Srobertothe AIX manual page on termios.h or that include file. for Information
27181834Srobertoon VMIN (or MIN) VTIME (or TIME).
28181834Sroberto 
29181834SrobertoA remedy other than to not use raw tty's is to apply patch U435110.
30181834Sroberto 
31181834SrobertoDetails of the problem report follow.
32181834Sroberto 
33181834Sroberto> ABSTRACT:
34181834Sroberto> IX43779: TRAP IN PSX_TIMEO
35181834Sroberto>
36181834Sroberto> ORIGINATING DETAILS:
37181834Sroberto> Stacktrace shows:
38181834Sroberto> IAR:      01460214   posixdd:psx_timeo  + 8bf4: ti 4,r12,0x0
39181834Sroberto> *LR:      014601a0   posixdd:psx_timeo  + 8b80
40181834Sroberto> 00212c60: 014604f4   posixdd:psx_timer  + 8ed4
41181834Sroberto> 00212cc0: 0144b74c   ttydd:tty_do_offlevel  + 4284
42181834Sroberto> 00212d20: 000216fc  .i_offlevel + 8c
43181834Sroberto> 00212d70: 00021d78  .i_softint + c8
44181834Sroberto> 00001004: 00008714  .finish_interrupt + 80
45181834Sroberto>
46181834Sroberto> RESPONDER SUMMARY:
47181834Sroberto> AIX asserted in psx_timeo(). Reason for the assert was that
48181834Sroberto> the current time was behind psx_ctime. Since this state
49181834Sroberto> can occur when the current time is changed after a character
50181834Sroberto> is received but before the VTIME interbyte timer pops, we
51181834Sroberto> should not assert on this.
52181834Sroberto>
53181834Sroberto> RESPONDER CONCLUSION:
54181834Sroberto> Removed the requirement that current time > psx_ctime by
55181834Sroberto> adding a new L_ntimersub macro that is used instead of the
56181834Sroberto> ntimersub macro in time.h. Also added a test for (current
57181834Sroberto> time - psx_ctime) being negative, in that case we do not
58181834Sroberto> adjust the new timeout.
59181834Sroberto>
60181834Sroberto> Reported to Correct a PTF in Error:     NO
61181834Sroberto> Reported as a Highly pervasive problem: NO
62181834Sroberto>
63181834Sroberto> PE Apar?:       NoPE
64181834Sroberto> Hiper Apar?:    NoHiper
65181834Sroberto> Status:         CLOSED  PER
66181834Sroberto> Component Name: AIX V3 FOR RS/6
67181834Sroberto> Version:        320
68181834Sroberto> Component ID:   575603001
69181834Sroberto> Submitted:      94/05/03
70181834Sroberto> Closed:         94/05/05
71181834Sroberto> ChangeTeam:     TX2527
72181834Sroberto>
73181834Sroberto> APAR FIXED BY:  U431696  U432151  U432844  U432870  U432979
74181834Sroberto> U433049  U433081  U433459  U433876  U433906  U434598  U434453
75181834Sroberto> U434672  U434737  U435110
76181834Sroberto
77