Re: signal mask of thread context callbacks handling thread

From: Hongjia Cao (hjcao_at_nudt_dot_edu.cn)
Date: Tue Jul 15 2008 - 16:52:03 PDT

  • Next message: Ladislav Subr: "Problem restarting process with large file"
    In your mail:
    >From: "Paul H. Hargrove" <PHHargrove_at_lbl_dot_gov>
    >Reply-To: checkpoint <checkpoint_at_lbl_dot_gov>
    >To: Hongjia Cao <hjcao_at_nudt_dot_edu.cn>
    >Subject: Re: signal mask of thread context callbacks handling thread
    >Date:Mon, 14 Jul 2008 12:17:35 -0700
    >
    >Hongjia Cao wrote:
    > > Since LinuxThreads will not be supported any more, should we block all 
    > > signals
    > > for the callback handling thread?
    > > If signals are not blocked, unexpected signal behavior may occur if 
    > > sigwait if used to wait for signals.
    > >
    > 
    > Hongjia Cao,
    >   Thanks for the suggestion.  If I understand what you are asking, then 
    > the answer is probably YES.  However, I first want to be certain that I 
    > do understand correctly by asking a few questions:
    > 
    > 1) Am I correct in thinking you are taking about the following lines in 
    > libcr/cr_async.c?
    >        // Reduce false wake-ups by blocking all signals.
    >    #if 0 // DISABLED - when blocking signals LinuxThreads are slow to 
    > terminate
    >        sigset_t mask;
    >        sigfillset(&mask);
    >        pthread_sigmask(SIG_SETMASK, &mask, NULL);
    >    #endif
    > 
    > 2) Am I correct in thinking you are concerned that sigwait() from one 
    > thread may fail to receive the expected signal if BLCR's internal thread 
    > receives it instead?
    
    Yes, you got my points exactly. 
    
    > 3) Are there any problems in the current signal behavior, other than 
    > sigwait(), that you are aware of?
    > 
    
    I did not run into other problems. I think that blocking signals for the thread is
    reasonable since the thread is created implicitly.
    
    > Thanks,
    > -Paul
    > 
    > -- 
    > Paul H. Hargrove                          PHHargrove_at_lbl_dot_gov
    > Future Technologies Group
    > HPC Research Department                   Tel: +1-510-495-2352
    > Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900
    > 
    >
    

  • Next message: Ladislav Subr: "Problem restarting process with large file"