Bug 118838

Summary: cannot send signals to threads waiting on (p)select
Product: [Fedora] Fedora Reporter: Edward Pilipczuk <edward.pilipczuk>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: low Docs Contact:
Priority: low    
Version: 1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-25 20:38:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
example of source code for bug#118838 illustration none

Description Edward Pilipczuk 2004-03-21 12:11:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031114

Description of problem:
My multithread application works in the following scenario.
global setting
- set signal handler for SIGCONT 
  (in fact it restores only signal service)
thread#1 
- blocks the SIGCONT signal by calling the  pthread_sigmask function
- listens on pselect on the set of IO channels
  enabling catching the SIGCONT signal
thread#2
- sends SIGCONT (pthread_kill) to the thread #1 informing 
  that set of IO channels change their status

Result is that process disapear !

Does it mean that signal catching can be done only by sigwait call?

Version-Release number of selected component (if applicable):
glibc 2.3.2 build 101.4

How reproducible:
Always

Steps to Reproduce:
As in description
    

Actual Results:  process diesapear

Expected Results:  Info, how to catch signals in thread waiting on
select (pselect)

Additional info:

Comment 1 Jakub Jelinek 2004-03-22 09:54:57 UTC
Please write a short testcase which reproduces your problem.

Comment 2 Edward Pilipczuk 2004-03-25 20:36:45 UTC
Created attachment 98857 [details]
example of source code for bug#118838 illustration

compilation by:
$ g++ pkill.cpp -o pkill -lpthread

Comment 3 Edward Pilipczuk 2004-03-25 20:38:00 UTC
I have shrink the code of my application to isolate the proble.
Funny! This code works properly - see attachment.