ECO NUMBER: VMS722_PTHREAD-V0100 PRODUCT: OpenVMS Alpha OPERATING SYSTEM V7.2-2 UPDATE PRODUCT: OpenVMS Alpha OPERATING SYSTEM V7.2-2 COVER LETTER 1 KIT NAME: VMS722_PTHREAD-V0100 2 KITS SUPERSEDED BY THIS KIT: None. 3 KIT DEPENDENCIES: 3.1 The following remedial kit(s), or later, must be installed BEFORE installation of this, or any required kit: VMS722_UPDATE-V0100 3.2 In order to receive all the corrections listed in this kit, the following remedial kits, or later, should also be installed: None. 4 KIT DESCRIPTION: 4.1 Version(s) of OpenVMS to which this kit may be applied: OpenVMS Alpha V7.2-2 4.2 Files patched or replaced: o [SYSLIB]PTHREAD$DBGSHR.EXE (new image) o [SYSLIB]PTHREAD$RTL.EXE (new image) 5 PROBLEMS ADDRESSED IN VMS722_PTHREAD-V0100 KIT o The threads library has an abstraction called a Virtual Processor (VP) for each CPU being used. A given VP can be executing code at normal or at interrupt level. A flag keeps track of which, so that certain nested interrupt operations can be properly handled. This flag can be improperly cleared, which can cause a context switch to occur in what should have been an atomic update. -- COVER LETTER -- Page 2 29 August 2002 The problem is seen as a process hang at AST level, while one of the internal null threads is hibernating. This could only happen on a multi-processor system, in an application with use of upcalls and multiple kernel threads enabled, under rare timing conditions. Images Affected: - [SYSLIB]PTHREAD$RTL.EXE - [SYSLIB]PTHREAD$DBGSHR.EXE o The EXEC and the threads library implement a protocol which uses shared memory to control when the EXEC can interrupt the library with an upcall. Certain upcalls may be interrupted by other upcalls. An accumulator is used to keep track of nesting. This accumulator only allows 32 levels of nesting. Normally this is plenty. However, under certain conditions, activity in a null thread can go deeper than this. When this happens, the threads library state gets confused and the process can be terminated. The usual termination is a DECthreads bugcheck which reports "selected a non-ready thread" with a negative ID number in the blocked state. This can only happen when use of upcalls and multiple kernel threads are enabled on a multi-processor system. Images Affected: - [SYSLIB]PTHREAD$RTL.EXE - [SYSLIB]PTHREAD$DBGSHR.EXE o On multi-processor systems, the EXEC uses the Inner-Mode Semaphore (IMS) to serialize execution of many system services. Upcalls are used to allow the threads library to execute one thread while another is blocked waiting for the IMS. The services which the threads library uses to switch threads are themselves users of the IMS. Under certain conditions, the result is recursion of IMS-free upcalls. If the recursion persists long enough, a stack overflow can occur in a null thread which terminates the process. This can only happen on a multi-processor system when use of upcalls and multiple kernel threads are enabled. Images Affected: - [SYSLIB]PTHREAD$RTL.EXE - [SYSLIB]PTHREAD$DBGSHR.EXE -- COVER LETTER -- Page 3 29 August 2002 6 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: INSTALL_3 : To be installed by customers experiencing the problems corrected. 7 INSTALLATION INSTRUCTIONS: Install this kit with the POLYCENTER Software installation utility by logging into the SYSTEM account, and typing the following at the DCL prompt: PRODUCT INSTALL VMS722_PTHREAD /SOURCE=[location of Kit] The kit location may be a tape drive, CD, or a disk directory that contains the kit. Additional help on installing PCSI kits can be found by typing HELP PRODUCT INSTALL at the system prompt No reboot is necessary after successful installation of the kit. 7.1 Special Installation Instructions: 7.1.1 Scripting of Answers to Installation Questions During installation, this kit will ask and require user response to several questions. If you wish to automate the installation of this kit and avoid having to provide responses to these questions, you must create a DCL command procedure that includes the following definitions and commands: - $ DEFINE/SYS NO_ASK$BACKUP TRUE - Add the following qualifiers to the PRODUCT INSTALL command and add that command to the DCL procedure. /PROD=DEC/BASE=AXPVMS/VER=V1.0 - De-assign the logicals assigned For example, a sample command file to install the VMS722_PTHREAD-V0100 kit would be: -- COVER LETTER -- Page 4 29 August 2002 $ $ DEFINE/SYS NO_ASK$BACKUP TRUE $! $ PROD INSTALL VMS722_PTHREAD/PROD=DEC/BASE=AXPVMS/VER=V1.0 $! $ DEASSIGN/SYS NO_ASK$BACKUP $! $ exit Copyright (c) Compaq Computer Company, 2002 All Rights Reserved. Unpublished rights reserved under the copyright laws of the United States. COMPAQ, the COMPAQ logo, VAX, Alpha, VMS, and OpenVMS are registered in the U.S. Patent and Trademark Office. All other product names mentioned herein may be trademarks of their respective companies. Confidential computer software. Valid license from COMPAQ are required for possession, use, or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. COMPAQ shall not be liable for technical or editorial errors or omissions contained herein. The information in this document is provided as is without warranty of any kind and is subject to change without notice. The warranties for COMPAQ products are set forth in the express limited warranty statements accompanying such products. Nothing herein should be construed as constituting an additional warranty. 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 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.