Kit Name: ALPPTHR02_071 Kits superseded by this kit: ALPPTHR01_071 Kit Dependencies: The following remedial kit(s) must be installed BEFORE installation of this, or any required kit: None. In order to receive all the corrections listed in this kit, the following remedial kits should also be installed: None. Kit Description: Version(s) of OpenVMS to which this kit may be applied: OpenVMS Alpha V7.1, V7.1-1H1, V7.1-1H2 Files patched or replaced: o [SYSLIB]PTHREAD$RTL.EXE (new image) o [SYSLIB]PTHREAD$RTL.EXE (new image) o [SYSLIB]CMA$OPEN_RTL.EXE (new image) o [SYSLIB]CMA$RTL.EXE (new image) Problems addressed in ALPPTHR02_071 kit o Three fixes to the DECthreads library were made: 1. When upcalls are not enabled, the stack sizes used by the NULL and Manager threads were increased to at least as large as in the pre-V7.0 OpenVMS releases. The larger stacks allow ASTs within legacy applications, on OpenVMS V7.1, to execute in the same relative amount of stack space as pre-V7.0 releases. Page 2 2. Set the state of the default thread to THD_STATE_TERMINATED before unblocking the exit-handling thread. Also, enable the rescheduling of the terminated default thread to handle any user ASTs received during exit-handling. 3. Flattening of scheduling policies to: - SCHED_LRR_NP is the same as SCHED_RR - SCHED_BG_NP is the same as SCHED_FG_NP - SCHED_LFI_NP is the same as SCHED_FIFO Problems addressed in ALPPTHR01_071 kit o Three DECthreads fixes were done: 1. A deadlock can occur if: - while the initial thread is blocking as a result of a system service call or other kernel blocking activity (such as a page fault), an AST becomes pending and can be delivered to the process - during that AST's execution the thread makes a blocking system service call or incurs some other kernel block - the two blocking events are resolved in the order in which they originally occurred For this deadlock, no further unblocks or AST delivery will occur and all or part of the application will hang. The SDA command, "pthread show -u", will show one or more threads blocked in upcalls, including thread #1. The "pthread mutex -faql" will also show thread #-1 waiting for a mutex, which is related to upcall blocking. 2. The $SETAST upcall could possibly be interrupted by an AST request upcall, which results in the delivery of an application AST. ASTs would be disabled "twice" if: - application AST were to disable ASTs and leave them disabled upon returning - the main-line call to $SETAST were also disabling ASTs - the AST request upcall were to arrive in the proper window in the code The DECthreads count of threads would be left with ASTs disabled artificially high. The result would be ASTs being Page 3 permanently disabled, as the count could never be reduced to zero (except possibly by another lucky race like the one that raised it). The SDA command, "pthread show -u" will indicate that ASTs are disabled and will display a non-zero disable count, while "pthread thread -fa" will show that all threads have ASTs enabled. 3. A memory leak fix is included, which has been corrected on VAX but hasn't been observed yet on Alpha. Kit Installation Rating: The following kit installation rating, based upon current CLD information, is provided to serve as a guide to which customers should apply this remedial kit. (Reference attached Disclaimer of Warranty and Limitation of Liability Statement) INSTALLATION RATING: 3 : To be installed by customers experiencing the problems corrected. Installation Instructions: Install this kit with the VMSINSTAL utility by logging into the SYSTEM account, and typing the following at the DCL prompt: @SYS$UPDATE:VMSINSTAL ALPPTHR02_071 [location of the saveset] The saveset location may be a tape drive, or a disk directory that contains the kit saveset. No reboot is necessary after successful installation of the kit. Copyright (c) Compaq Computer Corporation, 1998 All Rights Reserved. Unpublished rights reserved under the copyright laws of the United States. The software contained on this media is proprietary to and embodies the confidential technology of Compaq Computer Corporation. Possession, use, or dissemination of the software and media is authorized only pursuant to a valid written license from Compaq Computer Corporation. DISCLAIMER OF WARRANTY AND LIMITATION OF LIABILITY THIS PATCH IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR Page 4 PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED TO THE EXTENT PERMITTED BY APPLICABLE LAW. IN NO EVENT WILL COMPAQ BE LIABLE FOR ANY LOST REVENUE OR PROFIT, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, WITH RESPECT TO ANY PATCH MADE AVAILABLE HERE OR TO THE USE OF SUCH PATCH.