 |
» |
|
|
 |
 |
 |
|
|
 |
|
Patch Name: PHCO_29109
Patch Description: s700_800 11.11 Pthread enhancement and fixes
Creation Date: 03/06/27
Post Date: 03/07/07
Warning: 03/11/04 - This Critical Warning has been issued by HP.
- PHCO_29109 introduced behavior that can cause threaded
applications to hang. With the patch installed, a thread
that calls pthread_suspend(3t) to suspend itself might not
be awakened when an unsynchronized thread resumes it, so the
thread hangs.
- Additional information on this issue may be found in
Service Request 8606334892 (JAGae95970).
- To avoid this behavior, HP recommends removing PHCO_29109
from systems running threaded applications in which a
thread calls pthread_suspend(3t) to suspend itself.
- The previous patch, PHCO_27632, does not exhibit this same
behavior. If you choose to remove PHCO_29109, to ensure as
many known issues as possible are addressed HP recommends
that PHCO_27632 be installed after PHCO_29109 is removed. If
PHCO_27632 was installed prior to PHCO_29109, it will
automatically be restored when PHCO_29109 is removed and it
will not need to be reinstalled.
Hardware Platforms - OS Releases:
s700: 11.11
s800: 11.11
Products: N/A
Filesets:
OS-Core.C-MIN-32ALIB,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP
OS-Core.C-MIN-64ALIB,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP
OS-Core.CORE-64SLIB,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP
OS-Core.CORE-SHLIBS,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP
ProgSupport.PAUX-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP
Automatic Reboot?: No
Status: General Superseded With Warnings
Critical:
Yes
PHCO_29109: HANG
Some customers reported seeing the hang every few
hours of operation.
PHCO_27632: HANG
PHCO_25751: ABORT
PHCO_25226: OTHER
Performance degradation and sudden increase in
CPU utilization due to mutex contention.
Category Tags:
defect_repair enhancement general_release critical
halts_system manual_dependencies
Path Name: /hp-ux_patches/s700_800/11.X/PHCO_29109
Symptoms:
PHCO_29109:
( SR:8606287920 CR:JAGae51853 )
Java processes can hang occasionally.
( SR:8606307157 CR:JAGae70190 )
Thread can get cancelled even though cancellation is
disabled.
( SR:8606307489 CR:JAGae70522 )
The pthread library does not export two functions that are
useful to the Java virtual machine.
PHCO_27632:
( SR:8606259440 CR:JAGae23758 )
Unexpected failure of thread cancellation may cause
application to hang.
( SR:8606269542 CR:JAGae33777 )
Enhancement:This product update is a member of a set
needed to enable a new mutex type which can be
unlocked by a thread other than the owner. The full
list of product updates required for the feature are
PHCO_27632 and PHCO_27633.
These product updates can be installed in any order.
If any of these product updates are not installed,
this product update will have no impact on your
system.
( SR:8606269545 CR:JAGae33780 )
pthread_mutex_destroy() takes longer to destroy a
mutex, when the mutex is operating in handoff
disabled mode.
PHCO_26466:
( SR:8606226668 CR:JAGad95731 )
pthread_mutex_destroy() intermittently returns
EBUSY even when there are no threads accessing the mutex.
( SR:8606231620 CR:JAGae00858 )
Enhancement: This product update is a member of a set
needed to enable "Release mode" functionality for
PTHREAD_PROCESS_SHARED mutexes.
The full list of product updates required for this feature
are: PHKL_26467, PHKL_26468, PHKL_26469 and PHCO_26466.
If any member of this set of product updates is not
installed, this product update will have no impact on
your system.
PHCO_25751:
( SR:8606226436 CR:JAGad95505 )
Pthread internal error is reported and core is dumped
Error message : "__pthread_startup: can't enable gang
scheduling".
( SR:8606232147 CR:JAGae01383 )
Software providers may observe performance deficiencies in
applications which heavily use shared mutexes. Performance
of a PTHREAD_PROCESS_SHARED mutex unlock operation is slower
than that of a PTHREAD_PROCESS_PRIVATE mutex, even in the
non-contended (i.e., no waiters) case.
The full list of product updates required for this feature
are: PHKL_26316, PHKL_26240, and PHCO_25751.
If any member of this set of product updates is not
installed, this product update will have no impact on your
system.
PHCO_25226:
( SR:8606186378 CR:JAGad55582 )
Heavy mutex contention seen when large number of
threads try to acquire a single mutex lock, leading
to performance degradation and sudden jump in CPU
utilization.
PHCO_24584:
( SR:8606200799 CR:JAGad69975 )
This patch is a member of a set of patches needed to enable
the HP-UX Processor Sets product (PROCSETS). When PROCSETS
product is installed, it will install the full set of
required patches for that product, including this patch.
If the HP-UX Processor Sets product is not installed, this
change will have no impact on your system.
PHCO_23846:
( SR:8606184540 CR:JAGad53747 )
This enhancement is to support initialized tls support for
Fortran OpenMP. Changes are made in pthread library.
Defect Description:
PHCO_29109:
( SR:8606287920 CR:JAGae51853 )
During normal operation, the Java Virtual Machine may
suspend a thread. When a thread gets suspended, it
could be holding internal pthread resources. This can
cause a deadlock.
Resolution:
Solution is to ensure target does not get suspended while
holding internal pthread resources
( SR:8606307157 CR:JAGae70190 )
The cancellation operation (pthread_cancel) can race with
cancel enable/disable (pthread_setcancelstate).
Resolution:
While cancelling a thread, detect that the thread has now
disabled cancellation.
( SR:8606307489 CR:JAGae70522 )
The pthread library does not export two functions that are
useful to the Java virtual machine.
Resolution:
libpthread will now export the two symbols
PHCO_27632:
( SR:8606259440 CR:JAGae23758 )
There is a race condition in thread cancellation path in
pthread library. This may cause an application to fail to
cancel a thread.
Resolution:
The race condition in the thread cancellation path is
removed by appropriate protection of the internal
cancellation structure.
( SR:8606269542 CR:JAGae33777 )
This enhancement provides a way to restart mutex
operation when a process owning a mutex terminates
abnormally.
Resolution:
This enhancement provides a new mutex type
PTHREAD_MUTEX_NO_OWNER_NP, which can be unlocked by a
thread other than the owner.
( SR:8606269545 CR:JAGae33780 )
There is a race in mutex destroy and mutex unlock
operation, which may occassionally result in
pthread_mutex_destroy() returning EBUSY on first
try.
Resolution:
The race condition in mutex unlock and mutex destroy
operation is eliminated by better handling of waiter
count updation.
PHCO_26466:
( SR:8606226668 CR:JAGad95731 )
The problem with pthread_mutex_destroy() is attributed
to the fact that, pthread_mutex_unlock() does not keep
track of the number of waiters accurately. The mutex
cannot be destroyed when there are waiters,
and hence EBUSY is returned by pthread_mutex_destroy().
Resolution:
The change introduced in this patch update will
accurately keep track of all the waiters.
( SR:8606231620 CR:JAGae00858 )
This product update enables enable
"Release mode" functionality for PTHREAD_PROCESS_SHARED
mutexes. "Release mode" for PTHREAD_PROCESS_SHARED
mutexes is a feature that can be used to increase the
performance of the mutex in some cases where
there is high contention for the mutex.
Previously all shared mutexes use a "handoff"
mechanism to operate on mutexes whereby a mutex
lock is never really released, but rather handed
over to the highest priority waiter, if any.
This was done to adhere to standards whereby a
low priority thread shall not acquire the mutex
when there is a higher priority POSIX realtime
thread waiting for the same mutex. This made
the protocol less efficient in some cases since
another running thread could acquire and release
the mutex interim, hence making progress. This
enhancement still uses the original "handoff"
mechanism as the default case, but allows the
selection of "Release mode" to turn off the
"handoff" mechanism if it is desired.
Resolution:
This product update employs the kernel
support delivered in PHKL_26467, PHKL_26468 and PHKL_26469
for enabling release mode for PTHREAD_PROCESS_SHARED
mutexes. The changes can be enabled either by using
the API (pthread_mutex_disable_handoff_np() or
pthread_mutexattr_disable_handoff_np()) or by
setting the environment variable
PTHREAD_DISABLE_HANDOFF=ON. Applications will not
adhere to real-time semantics if this functionality
is enabled, however it can avail the performance
benefits provided by this product update.
PHCO_25751:
( SR:8606226436 CR:JAGad95505 )
The gang scheduler is currently supported only in Default
pset,so the request to enable gang scheduling for a process
in non-default pset would fail. The pthread library does not
recognize this scenario, and it fails the startup of new
application.
Resolution:
The pthread_startup() function needs to bypass the gang
scheduling requests for processes in non-default psets.
( SR:8606232147 CR:JAGae01383 )
In the PTHREAD_PROCESS_SHARED mutex case, the unlock
operation always makes a system call to synchronize with
threads in other processes which may be waiting for the
mutex. This makes the code path significantly longer.
Resolution:
Change pthread_mutex_unlock(), in the case of a shared
mutex, to call a new light weight system call rather than
the existing system call. If that new system call is not
available, then use the regular system call instead.
(PHKL_26316, also required for this enhancement,
adapts the existing system call which handles waiters of
shared mutexes to coordinate with the light weight unlock
system call. PHKL_26240, also required for this
enhancement, provides the new light weight system call
for shared mutex unlock.)
PHCO_25226:
( SR:8606186378 CR:JAGad55582 )
When large number of threads contend for a single
mutex, there is lot of contention for the internal
locks used in the library. This results in
unnecessary yielding and sleeping by the waiters
preventing the lock owner to complete the job.
Resolution:
Modified existing implementation to reduce contention
and dependency on the internal lock.
PHCO_24584:
( SR:8606200799 CR:JAGad69975 )
This patch contains minor enhancements in pthreads library
to support the HP-UX Processor Sets product.
Resolution:
Enhancements added to support new pthread_pset_bind_np()
interface in pthreads library when Processor Sets product
is enabled.
PHCO_23846:
( SR:8606184540 CR:JAGad53747 )
This is an enhancement for Initialized Thread local storage
support for Fortran OpenMP.
Resolution:
Libpthread allocates memory for TLS and it is initialized
to zero. With new enhancement the allocated TLS memory will
be initialized with the initialization image for each load
module the pointer to which is passed by libc/linker.
Enhancement:
No (superseded patches contained enhancements)
PHCO_27632:
The new mutex type PTHREAD_MUTEX_NO_OWNER_NP.
Additional enhancements were delivered in a patch
this one has superseded. Please review the Defect
Description text for more information.
SR:
8606184540 8606186378 8606200799 8606226436 8606226668
8606231620 8606232147 8606259440 8606269542 8606269545
8606287920 8606307157 8606307489
Patch Files:
OS-Core.C-MIN-32ALIB,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
/usr/lib/libpthread.a
/usr/lib/libpthread_tr.a
OS-Core.C-MIN-64ALIB,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
/usr/lib/pa20_64/libpthread.a
/usr/lib/pa20_64/libpthread_tr.a
OS-Core.CORE-64SLIB,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
/usr/lib/pa20_64/libpthread.1
/usr/lib/pa20_64/libpthread_tr.1
OS-Core.CORE-SHLIBS,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
/usr/lib/libpthread.1
/usr/lib/libpthread_tr.1
ProgSupport.PAUX-ENG-A-MAN,fr=B.11.11,
fa=HP-UX_B.11.11_32/64,v=HP:
/usr/share/man/man3.Z/pthread_ldom_bind_np.3t
/usr/share/man/man3.Z/pthread_ldom_id_np.3t
/usr/share/man/man3.Z/pthread_num_ldomprocs_np.3t
/usr/share/man/man3.Z/pthread_num_ldoms_np.3t
/usr/share/man/man3.Z/pthread_num_processors_np.3t
/usr/share/man/man3.Z/pthread_processor_bind_np.3t
/usr/share/man/man3.Z/pthread_processor_id_np.3t
/usr/share/man/man3.Z/pthread_pset_bind_np.3t
/usr/share/man/man3.Z/pthread_spu_to_ldom_np.3t
what(1) Output:
OS-Core.C-MIN-32ALIB,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
/usr/lib/libpthread.a:
Pthread Interfaces
$Revision: libpthread.a: @(#) depot-32pa CUP11.11
_BL2003_0627_2 PATCH_11.11 PHCO_29109 Fri Ju
n 27 18:01:32 PDT 2003 $
/usr/lib/libpthread_tr.a:
Pthread Interfaces
$Revision: libpthread_tr.a: @(#) depot-32pa CUP11
.11_BL2003_0627_2 PATCH_11.11 PHCO_29109 Fri
Jun 27 18:02:10 PDT 2003 $
OS-Core.C-MIN-64ALIB,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
/usr/lib/pa20_64/libpthread.a:
Pthread Interfaces
$Revision: libpthread.a: @(#) depot-64pa CUP11.11
_BL2003_0627_2 PATCH_11.11 PHCO_29109 Fri Ju
n 27 18:07:56 PDT 2003 $
/usr/lib/pa20_64/libpthread_tr.a:
Pthread Interfaces
$Revision: libpthread_tr.a: @(#) depot-64pa CUP11
.11_BL2003_0627_2 PATCH_11.11 PHCO_29109 Fri
Jun 27 18:08:42 PDT 2003 $
OS-Core.CORE-64SLIB,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
/usr/lib/pa20_64/libpthread.1:
Pthread Interfaces
$Revision: libpthread.1: @(#) depot-64pa CUP11.11
_BL2003_0627_2 PATCH_11.11 PHCO_29109 Fri Ju
n 27 18:04:37 PDT 2003 $
/usr/lib/pa20_64/libpthread_tr.1:
Pthread Interfaces
$Revision: libpthread_tr.1: @(#) depot-64pa CUP11
.11_BL2003_0627_2 PATCH_11.11 PHCO_29109 Fri
Jun 27 18:05:22 PDT 2003 $
OS-Core.CORE-SHLIBS,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
/usr/lib/libpthread.1:
Pthread Interfaces
$Revision: libpthread.1: @(#) depot-32pa CUP11.11
_BL2003_0627_2 PATCH_11.11 PHCO_29109 Fri Ju
n 27 17:58:17 PDT 2003 $
/usr/lib/libpthread_tr.1:
Pthread Interfaces
$Revision: libpthread_tr.1: @(#) depot-32pa CUP11
.11_BL2003_0627_2 PATCH_11.11 PHCO_29109 Fri
Jun 27 17:58:58 PDT 2003 $
ProgSupport.PAUX-ENG-A-MAN,fr=B.11.11,
fa=HP-UX_B.11.11_32/64,v=HP:
/usr/share/man/man3.Z/pthread_ldom_bind_np.3t:
None
/usr/share/man/man3.Z/pthread_ldom_id_np.3t:
None
/usr/share/man/man3.Z/pthread_num_ldomprocs_np.3t:
None
/usr/share/man/man3.Z/pthread_num_ldoms_np.3t:
None
/usr/share/man/man3.Z/pthread_num_processors_np.3t:
None
/usr/share/man/man3.Z/pthread_processor_bind_np.3t:
None
/usr/share/man/man3.Z/pthread_processor_id_np.3t:
None
/usr/share/man/man3.Z/pthread_pset_bind_np.3t:
None
/usr/share/man/man3.Z/pthread_spu_to_ldom_np.3t:
None
cksum(1) Output:
OS-Core.C-MIN-32ALIB,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
2563175536 229214 /usr/lib/libpthread.a
2443626554 258870 /usr/lib/libpthread_tr.a
OS-Core.C-MIN-64ALIB,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
1325333956 435556 /usr/lib/pa20_64/libpthread.a
3382755246 489430 /usr/lib/pa20_64/libpthread_tr.a
OS-Core.CORE-64SLIB,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
3403220902 178176 /usr/lib/pa20_64/libpthread.1
3817631781 207816 /usr/lib/pa20_64/libpthread_tr.1
OS-Core.CORE-SHLIBS,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP:
3128738369 159744 /usr/lib/libpthread.1
394456443 184320 /usr/lib/libpthread_tr.1
ProgSupport.PAUX-ENG-A-MAN,fr=B.11.11,
fa=HP-UX_B.11.11_32/64,v=HP:
3591096921 8533 /usr/share/man/man3.Z/
pthread_ldom_bind_np.3t
3591096921 8533 /usr/share/man/man3.Z/pthread_ldom_id_np.3t
3591096921 8533 /usr/share/man/man3.Z/
pthread_num_ldomprocs_np.3t
3591096921 8533 /usr/share/man/man3.Z/
pthread_num_ldoms_np.3t
3591096921 8533 /usr/share/man/man3.Z/
pthread_num_processors_np.3t
3591096921 8533 /usr/share/man/man3.Z/
pthread_processor_bind_np.3t
3591096921 8533 /usr/share/man/man3.Z/
pthread_processor_id_np.3t
3591096921 8533 /usr/share/man/man3.Z/
pthread_pset_bind_np.3t
3591096921 8533 /usr/share/man/man3.Z/
pthread_spu_to_ldom_np.3t
Patch Conflicts: None
Patch Dependencies: None
Hardware Dependencies: None
Other Dependencies:
PHCO_27632:
To enable the new mutex type which can be unlocked
by a thread other than the owner, the following
must be installed.
PHCO_27632
PHCO_27633.
These product updates can be installed in any order.
If any of these product updates are not insatlled,
this product update will have no impact on your
system.
PHCO_26466: To enable the process shared mutex performance,
the following must be installed: PHKL_26467, PHKL_26468,
PHKL_26469 and PHCO_26466. These product updates may be
installed in any order. If any of these product updates are
not installed, this product update will have no impact on
your system.
PHCO_25751: To enable the pthread shared
mutex performance enhancement, the following must be
installed: PHKL_26240, PHKL_26316, and PHCO_25751
PHCO_25226: Perf changes enabled by
pthread_mutex_disable_handoff_np() or
pthread_mutexattr_disable_handoff_np() or by setting the
environment variable PTHREAD_DISABLE_HANDOFF=ON. By default
these perf changes are disabled. The first API pthread_
mutex_disable_handoff_np() is for process wide disabling of
handoff mode in all mutexes. So is the env. variable. The
pthread_mutexattr_disable_handoff_np() takes as argument
pointer to pthread_mutexattr_t and can be used to disable
handoff mode for a particular mutex. The pthread_mutex_
disable_handoff_np() has no arguments and has to be called
by the main thread before any new threads are created.
"Handoff mode" is used to strictly adhere to certain
characteristics of POSIX real-time threads. If your
application does not use any real-time threads trying to
take mutex locks, you can call this new API to get the
performance benefits. To enable the TLS feature, the
following patches should also be installed: PHCO_23427 libc
cumulative patch PHSS_23441 linker cumulative patch
PHSS_23794 linker startup patch PHSS_23953 Fortran90 B.11.01
patch
Supersedes:
PHCO_27632 PHCO_26466 PHCO_25751 PHCO_25226 PHCO_24584 PHCO_23846
Equivalent Patches:
PHCO_29108:
s700: 11.00
s800: 11.00
Patch Package Size: 590 KBytes
Installation Instructions:
Please review all instructions and the Hewlett-Packard
SupportLine User Guide or your Hewlett-Packard support terms
and conditions for precautions, scope of license,
restrictions, and, limitation of liability and warranties,
before installing this patch.
------------------------------------------------------------
1. Back up your system before installing a patch.
2. Login as root.
3. Copy the patch to the /tmp directory.
4. Move to the /tmp directory and unshar the patch:
cd /tmp
sh PHCO_29109
5. Run swinstall to install the patch:
swinstall -x autoreboot=true -x patch_match_target=true \
-s /tmp/PHCO_29109.depot
By default swinstall will archive the original software in
/var/adm/sw/save/PHCO_29109. If you do not wish to retain a
copy of the original software, include the patch_save_files
option in the swinstall command above:
-x patch_save_files=false
WARNING: If patch_save_files is false when a patch is installed,
the patch cannot be deinstalled. Please be careful
when using this feature.
For future reference, the contents of the PHCO_29109.text file is
available in the product readme:
swlist -l product -a readme -d @ /tmp/PHCO_29109.depot
To put this patch on a magnetic tape and install from the
tape drive, use the command:
dd if=/tmp/PHCO_29109.depot of=/dev/rmt/0m bs=2k
Special Installation Instructions: None
|