DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 54MFjS9d237715
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 54MFjS9d237715
Authentication-Results: delorie.com;
	dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=Pe5lffc9
X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 604E03857B9E
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1747928726;
	bh=gfu93+uHXPCrC3A3At47vyk5h/GM4pd3IjOVlqZPZ1c=;
	h=Subject:In-Reply-To:Date:Cc:References:To:List-Id:
	 List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
	 From:Reply-To:From;
	b=Pe5lffc9prxOary4ztul/mwGhgsjeAqZaM3xFuKVQ5pdTZACl4v5WFd1h4tUr3jsu
	 g3mc+Er1bAeZAUMr4puTT1HJ4pfbshZmrwlt8DxarwqE+cW52NxNLp2LtU5ftWSkPK
	 +WP036p7VKpAdQNhARFjkOyGNR5jS9Uz7tRT5b1s=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CB96B3857C6E
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CB96B3857C6E
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1747928695; cv=none;
 b=owN8beF8VSMwWuUlWrQrNXFZ8rxqntNdtNicZEqLnDrkHcZHlaTMhRufgYxn3++SNMF/ZGzlLy/1NLnM8tmBZ+T5SCPsJQac4LC5kVwA6BcOTfBfNiYhn01/7Mh8euZtQ0iHitPwT1Ke7pWsxiPIaFb5oc9f/uSIy1kMwHjAc0o=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1747928695; c=relaxed/simple;
 bh=PufDuZ+igyeye/Aouj/vS7G7GZb/mscOVRpu+Mn6Cio=;
 h=DKIM-Signature:Mime-Version:Subject:From:Date:Message-Id:To;
 b=K6cMB7GEoHfIbYQB7Xrx9Fvi5KsovhFCcB5jBRDIDTFzuHM1DcFe5bHa6sSn3uZM4cIprCVTYHV3z2Hiph0WnNGfhdEWdJhV5jTvv9fPmnMHVAQAT5PGajxb3gSWk9d0YN1hjxDJWc3zqGS276x88k9MSe0sHOv9ve0ZfUBY3gk=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB96B3857C6E
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.2\))
Subject: Re: bash::SIGSEGV in timegm () from D:\cygwin64\bin\cygwin1.dll
In-Reply-To: <a78cee42-8e4b-42bb-a1a7-6041a52bcb9f@dronecode.org.uk>
Date: Thu, 22 May 2025 16:44:42 +0100
Cc: cygwin@cygwin.com
Message-Id: <A18794A3-C9E0-41F5-A771-19759E2072ED@me.com>
References: <BFCB9648-7807-40C3-BC82-713A9648F06D@me.com>
 <a78cee42-8e4b-42bb-a1a7-6041a52bcb9f@dronecode.org.uk>
To: Jon Turney <jon.turney@dronecode.org.uk>
X-Mailer: Apple Mail (2.3776.700.51.11.2)
X-Proofpoint-ORIG-GUID: 1O3NpjE3dpSdj4MJWjWd9lN6SnWF-j01
X-Proofpoint-GUID: 1O3NpjE3dpSdj4MJWjWd9lN6SnWF-j01
X-Proofpoint-Virus-Version: vendor=baseguard
 engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
 definitions=2025-05-22_07,2025-05-22_01,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0
 phishscore=0 bulkscore=0 clxscore=1011 spamscore=0
 mlxlogscore=999
 suspectscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx
 scancount=1 engine=8.22.0-2503310001 definitions=main-2505220160
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Gary Liddle via Cygwin <cygwin@cygwin.com>
Reply-To: Gary Liddle <gary.liddle@me.com>
Content-Type: text/plain; charset="utf-8"
Errors-To: cygwin-bounces~archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 54MFjS9d237715



> On 22 May 2025, at 14:30, Jon Turney <jon.turney@dronecode.org.uk> wrote:
> 
> On 22/05/2025 14:15, Gary Liddle via Cygwin wrote:
>> 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
> [...]
> 
> Thanks for reporting this.
> 
> 
>> 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.
> 
> The information in [1] may be helpful in investigating further with gdb.
> 
> [1] https://cygwin.com/faq.html#faq.programming.debugging-cygwin
> 



Thanks for the link, but all the .dbg programmes segfault in:- 
	ie bash.exe.dbg
	mainCRTStartup () at /usr/src/debug/cygwin-3.4.10-1/winsup/cygwin/crt0.c:16
for all versions (which might be a clue?).

, but the "set cygwin-exceptions on” produces a bit more.

	gdb bash
	Reading symbols from /usr/lib/debug//usr/bin/bash.exe.dbg...
	(gdb) set cygwin-exceptions on
	(gdb) run
	Starting program: /usr/bin/bash
	bash-5.2$ a=`ls`

	Thread 1 "bash" received signal SIGSEGV, Segmentation fault.
	sigdelayed () at sigfe.s:124
	124             movl    %ebx,0x24(%rsp)
	(gdb)
	(gdb) where
	#0  sigdelayed () at sigfe.s:124
	#1  0x000000010042db0b in wait_for (pid=<optimized out>,
	    flags=<error reading variable: Cannot access memory at address 0xfffffffdffffbf08>)
		    at /usr/src/debug/bash-5.2.21-1/jobs.c:3208
	Backtrace stopped: Cannot access memory at address 0xfffffffdffffbef8
…

Which looks very not helpful.

Regards

Gary

-- 
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

