1258945SrobertoProblem with recent ANSI compilers
2258945Sroberto
3258945SrobertoOn some systems, including AIX, the compiler quits on the ntp_refclock.c
4258945Srobertofile when processing the refclock_report() routine. The problem, which
5258945Srobertois eithre a feature or a bug, has to do with an unwanted promotion of
6258945Srobertothe u_char argument to an int and a failure of the compiler to recognize
7258945Srobertothe preceding prototype. A workaround is to use ANSI syntax to delare
8258945Srobertothe arguments. Since ANSI compilers are not universally available, this
9258945Srobertosyntax can't be used in the stock distribution.
10258945Sroberto
11258945Sroberto(Message # 60: 2884 bytes, New)
12258945SrobertoDate: Sat, 19 Aug 1995 13:20:50 -0400
13258945SrobertoFrom: "R. Bernstein" <rocky@panix.com>
14258945SrobertoNewsgroups: comp.protocols.time.ntp
15258945Srobertoto: mills@udel.edu
16258945Srobertoreturn-receipt-to: rocky@panix.com
17258945SrobertoSubject: time and AIX 3.2.5 raw tty bug
18258945Sroberto 
19258945SrobertoThis posting isn't strictly about NTP, any program that may stop the
20258945Srobertoclock or set the clock backwards is subject to the AIX 3.2.5 bug.
21258945Sroberto 
22258945SrobertoOn AIX 3.2.5, there is a bug in the tty driver for a raw device which
23258945Srobertomay crash the box under certain conditions: basically a read() on a
24258945Srobertoraw tty in effect, a character was read but not as many as specified
25258945Srobertoby VMIN when a read timeout occurred. VTIME specifies the timeout. See
26258945Srobertothe AIX manual page on termios.h or that include file. for Information
27258945Srobertoon VMIN (or MIN) VTIME (or TIME).
28258945Sroberto 
29258945SrobertoA remedy other than to not use raw tty's is to apply patch U435110.
30258945Sroberto 
31258945SrobertoDetails of the problem report follow.
32258945Sroberto 
33258945Sroberto> ABSTRACT:
34258945Sroberto> IX43779: TRAP IN PSX_TIMEO
35258945Sroberto>
36258945Sroberto> ORIGINATING DETAILS:
37258945Sroberto> Stacktrace shows:
38258945Sroberto> IAR:      01460214   posixdd:psx_timeo  + 8bf4: ti 4,r12,0x0
39258945Sroberto> *LR:      014601a0   posixdd:psx_timeo  + 8b80
40258945Sroberto> 00212c60: 014604f4   posixdd:psx_timer  + 8ed4
41258945Sroberto> 00212cc0: 0144b74c   ttydd:tty_do_offlevel  + 4284
42258945Sroberto> 00212d20: 000216fc  .i_offlevel + 8c
43258945Sroberto> 00212d70: 00021d78  .i_softint + c8
44258945Sroberto> 00001004: 00008714  .finish_interrupt + 80
45258945Sroberto>
46258945Sroberto> RESPONDER SUMMARY:
47258945Sroberto> AIX asserted in psx_timeo(). Reason for the assert was that
48258945Sroberto> the current time was behind psx_ctime. Since this state
49258945Sroberto> can occur when the current time is changed after a character
50258945Sroberto> is received but before the VTIME interbyte timer pops, we
51258945Sroberto> should not assert on this.
52258945Sroberto>
53258945Sroberto> RESPONDER CONCLUSION:
54258945Sroberto> Removed the requirement that current time > psx_ctime by
55258945Sroberto> adding a new L_ntimersub macro that is used instead of the
56258945Sroberto> ntimersub macro in time.h. Also added a test for (current
57258945Sroberto> time - psx_ctime) being negative, in that case we do not
58258945Sroberto> adjust the new timeout.
59258945Sroberto>
60258945Sroberto> Reported to Correct a PTF in Error:     NO
61258945Sroberto> Reported as a Highly pervasive problem: NO
62258945Sroberto>
63258945Sroberto> PE Apar?:       NoPE
64258945Sroberto> Hiper Apar?:    NoHiper
65258945Sroberto> Status:         CLOSED  PER
66258945Sroberto> Component Name: AIX V3 FOR RS/6
67258945Sroberto> Version:        320
68258945Sroberto> Component ID:   575603001
69258945Sroberto> Submitted:      94/05/03
70258945Sroberto> Closed:         94/05/05
71258945Sroberto> ChangeTeam:     TX2527
72258945Sroberto>
73258945Sroberto> APAR FIXED BY:  U431696  U432151  U432844  U432870  U432979
74258945Sroberto> U433049  U433081  U433459  U433876  U433906  U434598  U434453
75258945Sroberto> U434672  U434737  U435110
76258945Sroberto
77