06-03-2013 03:51 AM - last edited on 06-03-2013 07:40 PM by Maiko-I
I have a problem with using pthread_rwlock API.
I think it changes the signal mask abnormally.
Test program source file attached. (Just change the extension to c.)
Shortly, It just uses pthread_rwlock_rdlock -> pthread_rwlock_rdlock -> pthread_rwlock_unlock.
The last pthread_rwlock_unlock called, SIGUSR2 signal is blocked unexpectedly.
P.S. This thread has been moevd from HP-UX > General to HP-UX > languages - Hp forum moderator
06-03-2013 04:01 AM
pthread library version is like this.
$ /usr/sbin/swlist -l patch | grep pthread
# PHCO_39298 1.0 pthread library Japanese manpage cumulative patch
# PHCO_41407 1.0 pthread library cumulative patch
06-03-2013 07:21 PM
I don't know the location of signal masking info in memory.
I just can not help to check the result of pthread_sigmask() call.
(Please refer to my source code.)
Could you tell me more specifically?
06-04-2013 12:51 AM
>I don't know the location of signal masking info in memory.
You run tusc to trace the system calls. I only see sigprocmask. In fact if I remove pthread_sigmask and replace by sigprocmask I get the same bad thing. But the only syscall is sigprocmask with SIG_BLOCK and NULL for the set parm.
I have no idea how the mask can change without a syscall? Unless it is stored in user space?
It gets changed to: 0xff7ff843fffffff3
It looks like you need to contact Support and file a bug.
The recommended libpthread patch is PHCO_42326 but I don't see any fixes for this.