- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- pthread_rwlock_unlock change the signal mask!
Categories
Company
Local Language
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2013 03:51 AM - last edited on 06-03-2013 07:40 PM by Maiko-I
06-03-2013 03:51 AM - last edited on 06-03-2013 07:40 PM by Maiko-I
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2013 04:01 AM
06-03-2013 04:01 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2013 10:14 AM
06-03-2013 10:14 AM
Re: pthread_rwlock_unlock change the signal mask!
Have you tried using tusc to see if it changes the signal mask?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2013 07:21 PM
06-03-2013 07:21 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2013 09:08 PM - edited 06-03-2013 09:12 PM
06-03-2013 09:08 PM - edited 06-03-2013 09:12 PM
Re: pthread_rwlock_unlock change the signal mask!
$ cc pthread_rwlock.c -o pthread_rwlock -lpthread
$ ./pthread_rwlock
sigmask error - -2 (line:57)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2013 10:53 PM
06-03-2013 10:53 PM
Re: pthread_rwlock_unlock change the signal mask!
It seems like pthread library bug.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2013 12:51 AM
06-04-2013 12:51 AM
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.