Yesterday I updated Cygwin using  setup-x86_64 to the latest non test release, 
and bash —login would no longer start.

It turns out bash won’t start for me when a .profile runs a sub-command.

This is highlighted by:-

        gdb bash
        dll cygwin1.dll
        b timegm
        run
        bash-5.2$ echo foo
        foo
        bash-5.2$ a=`echo foo`

        Program received signal SIGSEGV, Segmentation fault.
        0x00007ffa5cb3ce31 in timegm () from D:\cygwin64\bin\cygwin1.dll
        (gdb)
        ...
        bash-5.2$ a=`xxx`
        bash: xxx: command not found
        
        Program received signal SIGSEGV, Segmentation fault.
        0x00007ffa5cb3ce31 in timegm () from D:\cygwin64\bin\cygwin1.dll
        (gdb)

        uname -a CYGWIN_NT-10.0-26100 garyl 3.7.0-0.98.gb39b510c1ce6.x86_64 
2025-05-18 15:52 UTC x86_64 Cygwin

Any format of a=$(echo bar) or a=`echo bar` causes a segfault, other than that 
bash runs happily and runs commands.

My last working version was quite old
        uname -a
        CYGWIN_NT-10.0-26100 garyl 3.7.0-0.98.gb39b510c1ce6.x86_64 2025-05-18 
15:52 UTC x86_64 Cygwin
I have restored a copy of this and it works fine.

I should day I ran bash under strace , it does the same thing, see [STRACE 
SNIPPET].
I have also tried this with some variants of
        bash
            5.2.221-1
            4.4-12-3
        cygwin
            3.5.5-1
            3.6.1-1
            3.7.0-0.98....
But they all fail in the same way.

I am at a loss as to how to dig further because gdb doesn’t seem to want to go 
near timegm and I can’t see anything in the strace output that seems to point 
to anything useful.

Can anyone help?

Regards

Gary



[STRACE SNIPPET]

  326 12064632 [sig] bash 915 sigpacket::process: returning -1
  419 12065051 [main] bash 915 proc_subproc: finished processing 
terminated/stopped child
  381 12065432 [main] bash 915 proc_subproc: returning 1                        
                                                             282 12065714 
[main] bash 915 wait4: 0 = cygwait (...)
  197 12065911 [main] bash 915 wait4: 920 = wait4(-1, 0x0, 10, 0x0)
  364 12066275 [main] bash 915 set_signal_mask: setmask 80000, newmask 0, 
mask_bits 80000                                                    349 12066624 
[main] bash 915 sig_send: sendsig 0x144, pid 915, signal -71, its_me 1
  375 12066999 [main] bash 915 sig_send: wakeup 0x314                           
                                                             300 12067299 
[main] bash 915 sig_send: Waiting for pack.wakeup 0x314
14426 12081725 [sig] bash 915 sigpacket::process: signal 20 processing
  295 12082020 [sig] bash 915 init_cygheap::find_tls: sig 20
  248 12082268 [sig] bash 915 sigpacket::process: using tls 0x7FFFFCE00         
                                                             665 12082933 [sig] 
bash 915 sigpacket::process: signal 20, signal handler 0x10042CB90
  281 12083214 [sig] bash 915 sigpacket::setup_handler: controlled interrupt. 
stackptr 0x7FFFFE2B0, stack 0x7FFFFE2A8, stackptr[-1] 0x10042DB0B
  380 12083594 [sig] bash 915 proc_subproc: args: 4, 1                          
                                                             282 12083876 [sig] 
bash 915 proc_subproc: clear waiting threads
  280 12084156 [sig] bash 915 proc_subproc: finished clearing
  278 12084434 [sig] bash 915 proc_subproc: returning 1                         
                                                             280 12084714 [sig] 
bash 915 _cygtls::interrupt_setup: armed signal_arrived 0x2D0, signal 20
  283 12084997 [sig] bash 915 sigpacket::setup_handler: signal 20 delivered     
                                                             281 12085278 [sig] 
bash 915 sigpacket::process: returning 1
  383 12085661 [sig] bash 915 wait_sig: signalling pack.wakeup 0x314
  332 12085993 [main] bash 915 sig_send: returning 0x0 from sending signal -71
  282 12086275 [main] bash 915 sigprocmask: 0 = sigprocmask (0, 0x7FFFFC2D0, 
0x0)                                                          --- Process 14168 
(pid: 915), exception c0000005 at 00007ffa2029ce31
--- Process 14168 (pid: 915) thread 3880 exited with status 0xc0000005
--- Process 14168 (pid: 915) thread 6164 exited with status 0xc0000005
--- Process 14168 (pid: 915) thread 23756 exited with status 0xc0000005         
                                                           --- Process 14168 
(pid: 915) thread 3312 exited with status 0xc0000005
--- Process 14168 (pid: 915) thread 5208 exited with status 0xc0000005          
                                                           --- Process 14168 
thread 23072 exited with status 0xc0000005
--- Process 14168 thread 17704 exited with status 0xc0000005                    
                                                           --- Process 14168 
thread 13696 exited with status 0xc0000005
--- Process 14168 exited with status 0xc0000005                                 

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to