This widget could not be displayed.
Operating System - HP-UX
1845515 Members
2218 Online
110244 Solutions
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
New Discussion
This widget could not be displayed.
This widget could not be displayed.

pthread_rwlock_unlock change the signal mask!

 
Changho
Visitor

pthread_rwlock_unlock change the signal mask!

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

6 REPLIES 6
Changho
Visitor

Re: pthread_rwlock_unlock change the signal mask!

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

 

Dennis Handly
Acclaimed Contributor

Re: pthread_rwlock_unlock change the signal mask!

Have you tried using tusc to see if it changes the signal mask?

Changho
Visitor

Re: pthread_rwlock_unlock change the signal mask!

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?

blade_runner
Occasional Visitor

Re: pthread_rwlock_unlock change the signal mask!

$ cc pthread_rwlock.c -o pthread_rwlock -lpthread

$ ./pthread_rwlock

sigmask error - -2 (line:57)

Changho
Visitor

Re: pthread_rwlock_unlock change the signal mask!

Yes, it's just what I'm asking.
It seems like pthread library bug.
Dennis Handly
Acclaimed Contributor

Re: pthread_rwlock_unlock change the signal mask!

>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.