Thank you for the advice. I updated cygwin and ran again.
``` $ uname -srvmpio CYGWIN_NT-10.0-22000-ARM64 3.6.1-1.x86_64 2025-04-09 11:31 UTC x86_64 unknown unknown Cygwin (snip) $ gdb /usr/bin/ruby (gdb) set cygwin-exceptions on (gdb) run /usr/bin/gem install -V --local --ignore-dependencies --document=rdoc,ri --build-root /tmp/cygport-ruby-debug_inspector/ruby-debug_inspector-1.2.0-1.x86_64/inst --install-dir /usr/share/gems --bindir /usr/bin debug_inspector-1.2.0.gem : Building native extensions. This could take a while... current directory: /tmp/cygport-ruby-debug_inspector/ruby-debug_inspector-1.2.0-1.x86_64/inst/usr/share/gems/gems/debug_inspector-1.2.0/ext/debug_inspector ["/usr/bin/ruby.exe", "-I/usr/share/rubygems", "extconf.rb"] [New Thread 5284.0x2200] [New Thread 5284.0xe10] [New Thread 5284.0x50c] creating Makefile current directory: /tmp/cygport-ruby-debug_inspector/ruby-debug_inspector-1.2.0-1.x86_64/inst/usr/share/gems/gems/debug_inspector-1.2.0/ext/debug_inspector ["make", "DESTDIR=", "sitearchdir=./.gem.20250410-1545-swemh8", "sitelibdir=./.gem.20250410-1545-swemh8", "clean"] Thread 11 "ruby" received signal SIGSEGV, Segmentation fault. [Switching to Thread 5284.0xe10] 0x0000000000000000 in ?? () (gdb) where #0 0x0000000000000000 in ?? () #1 0x00007ffef1609fb4 in pthread_testcancel () at /usr/src/debug/cygwin-3.6.1-1/winsup/cygwin/thread.cc:399 #2 pthread_rwlock_wrlock (rwlock=0xa003a9a00) at /usr/src/debug/cygwin-3.6.1-1/winsup/cygwin/thread.cc:4352 #3 0x00007ffef16eacd4 in _sigfe () at sigfe.s:35 #4 0x00000003ff54e3f9 in cygcrypto-3!CRYPTO_THREAD_write_lock () from /usr/bin/cygcrypto-3.dll #5 0x00000003ff541922 in cygcrypto-3!OPENSSL_atexit () from /usr/bin/cygcrypto-3.dll #6 0x00000003ff541d43 in cygcrypto-3!OPENSSL_thread_stop () from /usr/bin/cygcrypto-3.dll #7 0x00000003ff53fdd3 in ossl_DER_w_end_sequence () from /usr/bin/cygcrypto-3.dll #8 0x00007fff4d63d6ac in ?? () #9 0x00007fff4d6cb590 in ?? () #10 0x00007fff4d6cb590 in ?? () #11 0x0000000000000000 in ?? () (gdb) ``` On Sat, Feb 22, 2025 at 2:11 AM Jon Turney <jon.tur...@dronecode.org.uk> wrote: > > 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