www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/02/21/12:12:10

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 51LHCA1P917921
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 51LHCA1P917921
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=f1vReaXV
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6FE93858C42
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1740157929;
bh=Gc6SHECwNhbcat9p9MTcdEsLgrbxtowKvgky4GfnX7s=;
h=Date:Subject:To:References:Cc:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=f1vReaXVMaQfmx7pa4/4jY5yAgxZIs4PlXF0qbRPrIu94om/rsefHtSjmS1vVEw7X
bkOO0tt8CXSY4hv4mRjyRy/cZNiLIHtn1FbLihFk25mCa+3z6ERpRYyUHdaEO58G9h
FnHnGOyorYNgjWaE1vtwA6RsD695fFqR+w5wecPk=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5DE73858D20
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B5DE73858D20
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740157900; cv=none;
b=b/OHFowo0sncmUpkP4uY9PmnYpcxqskCQW7lITCnBgM+F9ebl6DsZxXOl1sjxq1gVPlFMhru8xr0ejXQOhCMe/n+3IwRtCmfUxKsu3eN7ghbv9+S2bxfY7i9vxf8qKwmRwMO2nRnenLtdta1uqm+71juGc9Vqa4PXzS9Z8B9oMk=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1740157900; c=relaxed/simple;
bh=pbE6A4u+RcQJ7OvmCmKsiLr5xAoEo3tCqSikogPUkW0=;
h=Message-ID:Date:MIME-Version:Subject:To:From;
b=on1STwqPrQoMZx0bSM/ae+zaQDywYxQmoqrKaaOLAxyLUcHZ5y67D+u8BtEADOcCB/Il2PjjptkBDdqYboFjXf/iAcwZ15oZ0/ABJIYcZVNXQXUXy2BmQROR6pL1yae8SoyaPUa+R0Rhvn4pWJpvucVUBE5h9zS1o18e682hNdw=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5DE73858D20
X-SNCR-Rigid: 674901EE0964E2F8
X-Originating-IP: [86.133.181.121]
X-OWM-Source-IP: 86.133.181.121
X-OWM-Env-Sender: jon DOT turney AT dronecode DOT org DOT uk
X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdejtdehlecutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedtudenucenucfjughrpefkffggfgfuvfhfhfevjggtgfesthejredttddvjeenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuggftrfgrthhtvghrnhepfeeijeeitdetheehleethefggeffkeeukeefkeehgfevleehgfefveduffeitdejnecuffhomhgrihhnpegthihgfihinhdrtghomhdpghhithhhuhgsrdgtohhmnecukfhppeekiedrudeffedrudekuddruddvudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddruddtlegnpdhinhgvthepkeeirddufeefrddukedurdduvddupdhmrghilhhfrhhomhepjhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhdprhgvvhfkrfephhhoshhtkeeiqddufeefqddukeduqdduvddurdhrrghnghgvkeeiqddufeefrdgsthgtvghnthhrrghlphhluhhsrdgtohhmpdgruhhthhgpuhhsvghrpehjohhnthhurhhnvgihsegsthhinhhtvghrnhgvthdrtghomhdpghgvohfkrfepifeupdfovfetjfhoshhtpegsthhprhgurhhgohdttdehpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepsghoohhl
vggrnhhlrggsvghlsehgmhgrihhlrdgtohhmpdhrtghpthhtoheptgihghifihhnsegthihgfihinhdrtghomh
X-RazorGate-Vade-Verdict: clean 0
X-RazorGate-Vade-Classification: clean
X-VadeSecure-score: verdict=clean score=0/300, class=clean
Message-ID: <7a8fd4a7-e07c-4d09-9741-72d3b2b27b06@dronecode.org.uk>
Date: Fri, 21 Feb 2025 17:11:38 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: A process spawned inside gem command running on latest ruby
segfaults
To: Daisuke Fujimura <booleanlabel AT gmail DOT com>
References: <CAA3frXTFnLSF2HzB5Z278=5J0bsOGRcRmqyv+7qcr3-QGmKbBw AT mail DOT gmail DOT com>
Cc: cygwin AT cygwin DOT com
In-Reply-To: <CAA3frXTFnLSF2HzB5Z278=5J0bsOGRcRmqyv+7qcr3-QGmKbBw@mail.gmail.com>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Jon Turney via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

On 20/02/2025 15:33, Daisuke Fujimura via Cygwin wrote:
> Reproduction:
> - Use ruby-3.4.2-1 (test)
> - Install gem containing native libraries
> 
> ```
> $ uname -srvmpio
> CYGWIN_NT-10.0-22000 3.5.7-1.x86_64 2025-01-29 19:46 UTC x86_64
> unknown unknown Cygwin
> $ ruby -v
> ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [x86_64-cygwin]
> $ gem -v
> 3.5.11
> $ cd /tmp
> $ git clone https://cygwin.com/git/cygwin-packages/ruby-debug_inspector
> # Any gem that contains native libraries
> $ cd ruby-debug_inspector
> $ cygport ruby-debug_inspector.cygport fetch prep compile # preparation
> $ cygport ruby-debug_inspector.cygport install
> :
> ```
> 
> The process spawned inside `gem install` seems to raise SIGSEGV
> internally and exits.
> 
> ```
> $ gdb /usr/bin/ruby
> :
> (gdb) run /usr/bin/gem install -V --local --ignore-dependencies
> --document=rdoc,ri --build-root
> /tmp/ruby-debug_inspector/ruby-debug_inspector-1.1.0-1.x86_64/inst
> --install-dir /usr/share/gems --bindir /usr/bin
> debug_inspector-1.1.0.gem #
> https://github.com/cygwin/cygport/blob/0.36.9/cygclass/rubygem.cygclass#L134
> :
> :
> Building native extensions. This could take a while...
> current directory:
> /tmp/ruby-debug_inspector/ruby-debug_inspector-1.1.0-1.x86_64/inst/usr/share/gems/gems/debug_inspector-1.1.0/ext/debug_inspector
> ["/usr/bin/ruby.exe", "-I/usr/share/rubygems", "extconf.rb"]
> [New Thread 3600.0x23a0]
> [New Thread 3600.0x1278]
> [New Thread 3600.0x2794]
> creating Makefile
> 
> Thread 11 "ruby" received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 3600.0x1278]
> 0x0000000000000000 in ?? ()
> 
[...]

> 
> SIGSEGV seems to occur inside the cygwin DLL.

You might get more useful backtrace information after the exception with 
the gdb setting 'set cygwin-exceptions on' (See [1]).

[1] https://cygwin.com/faq.html#faq.programming.debugging-cygwin

(It would be a nice project for someone to work on to see if is possible 
improve this gdb (mis)feature so it only ignores exceptions inside the 
cygwin DLL where exception::myfault() is on the SEH stack [which is used 
to implement things like "POSIX defines that this function returns 
EFAULT when you hand it an invalid pointer"], not all of them).

> This problem also occurs with ruby-3.3.2-3 (test).
> 
> We have confirmed that it also occurs in cygwin-3.6.


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019