[3.5.3] Application gets into WAIT MODE with error from sig_send signaling error from cygwin1.dll

Takashi Yano takashi.yano@nifty.ne.jp
Fri Jul 5 14:48:59 GMT 2024


On Fri, 5 Jul 2024 13:15:09 +0000
"Abinash Mohanty \(amohanty\) wrote:
> Hi,
> 
> Problem Statement
> Our application is getting into wait mode after running for some time and Cygwin continues to throw the below  Exception Error:
> 1599350352 [sig] my_app 741 sig_send: error sending signal 11, pid 741, pipe handle 0x130, nb 0, packsize 176, Win32 error 0
> 
> Problem Description
> We have initialized and used SIGUSR1, SIGALARAM and SIGPIPE signals in our code. We are using below Cygwin APIs for initializing or adding the signals
>      sigset_t signal_set;
> 
>      sigemptyset(&signal_set);
>      sigaddset(&signal_set, SIGUSR1);
>      sigaddset(&signal_set, SIGALRM);
>      sigaddset(&signal_set, SIGPIPE);
> 
> 
> Masking the signals using  pthread_sigmask()
> 
> Catch the signals and process them
> void HandleSignals()
> {
>     int sig_number;
> 
>     for(;;) {
> 
>         sig_wait(signal_set,sig_number);
> 
>         switch(sig_number) {
>         case SIGUSR1:
>             {
>             pthread_mutex_lock(&m_mutex);
> 
>             //Handing the SIGUSR1 signals
>             pthread_mutex_unlock(&m_mutex);
>             }
>             break;
>         case SIGALRM:
>             //Handing the SIGALRM signals
>             break;
>         default:
>             break;
>         } /* end switch */
> 
>     }
> }
> 
> However after running my application multiple times which makes use of Cygwin Signaling our application goes into WAIT MODE(probably waiting for signals) and we get the  below error message continuously in our console.
> 1599350352 [sig] my_app 741 sig_send: error sending signal 11, pid 741, pipe handle 0x130, nb 0, packsize 176, Win32 error 0
> 
> Our application is blocked due to this error and we are unable to proceed further.
> Attaching strace logs and adding few error log here as well:-
> 
>   165 46400560 [main] my_app 6964 select_stuff::wait: m 4, us 100000, wmfo_timeout -1
>    81 46400641 [socksel] my_app 6964 SetThreadName: SetThreadDescription() failed. 00000000 10000000
>   100 46400741 [socksel] my_app 6964 thread_socket: stuff_start 0x7FFFFB198, timeout 4294967295
>    58 46400799 [socksel] my_app 6964 peek_socket: read_ready: 0, write_ready: 0, except_ready: 0
> 76569 46477368 [sig] my_app 6964 sigpacket::process: signal 30 processing
>    86 46477454 [sig] my_app 6964 init_cygheap::find_tls: sig 30
> --- Process 5016 (pid: 6964), exception c0000005 at 00007ffb486aaffa
>   162 46477616 [sig] my_app 6964 exception::handle: In cygwin_except_handler exception 0xC0000005 at 0x7FFB486AAFFA sp 0x289C990
>    36 46477652 [sig] my_app 6964 exception::handle: In cygwin_except_handler signal 11 at 0x7FFB486AAFFA
>    53 46477705 [sig] my_app 6964 break_here: break here
> --- Process 5016 (pid: 6964), exception c0000005 at 00007ffb486aaffa
> --- Process 5016 (pid: 6964), exception c0000005 at 00007ffb486aaffa
> --- Process 5016 (pid: 6964), exception c0000005 at 00007ffb486aaffa
> --- Process 5016 (pid: 6964), exception c0000005 at 00007ffb486aaffa
> --- Process 5016 (pid: 6964), exception c0000005 at 00007ffb486aaffa
> --- Process 5016 (pid: 6964), exception c0000005 at 00007ffb486aaffa
> --- Process 5016 (pid: 6964), exception c0000005 at 00007ffb486aaffa
> --- Process 5016 (pid: 6964), exception c0000005 at 00007ffb486aaffa
> --- Process 5016 (pid: 6964), exception c0000005 at 00007ffb486aaffa
> --- Process 5016 (pid: 6964), exception c0000005 at 00007ffb486aaffa
> 
> Also attaching the output of cygcheck -s -v -r > cygcheck.out
> 
> As this is a blocker issue for our application , quick resolution would really help to proceed further.
> Please let us know if you need more information.

Full STC source code please.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>


More information about the Cygwin-developers mailing list