Cucumber crashes on Windows 11 with JRuby 10 when loading `sys-uname` through `jruby-win32ole`
Les mainteneurs répondent en général sous 2 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 62/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- ruby
- Domaine
- testing-qa
Piste de recherche
Lisez lib/cucumber/runtime.rb et le point d’entrée Cucumber::Runtime::MetaMessageBuilder#os, puis suivez le moment où sys/uname est chargé au démarrage. Vérifiez le démarrage de Cucumber sur JRuby 10+ sous Windows et confirmez qu’il évite le crash natif tout en continuant à produire les métadonnées de l’OS, avec une version de secours lorsque sys-uname est indisponible, et que le comportement existant est préservé ailleurs.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
👓 What did you see?
We would like to use Cucumber on Windows 11 with JRuby 10.0 or later.
The Cucumber documentation currently lists JRuby 10.0+ as a supported platform, subject to some limitations.
Our project uses the following Gemfile:
source 'https://rubygems.org'
gem 'jruby-win32ole', '>= 0.8.5'
gem 'cucumber', '>= 11.1.1'
jruby-win32ole is required in our JRuby-based Windows environment.
When we start the Cucumber runner, the JVM crashes with the following native error:
# JRE version: OpenJDK Runtime Environment OpenLogic-OpenJDK
# (21.0.9+10)
#
# Java VM: OpenJDK 64-Bit Server VM OpenLogic-OpenJDK
# (21.0.9+10, mixed mode, sharing, tiered, compressed oops,
# compressed class ptrs, g1 gc, windows-amd64)
#
# Problematic frame:
# C [racob-x64.dll+0x1aa4]
#
# No core dump will be written.
# Minidumps are not enabled by default on client versions of Windows.
#
# An error report file with more information is saved as:
# C:\Users\xxx\Documents\ADOWorkspace\JRubyWorkspace\
# try-jruby-cucumber\hs_err_pid7724.log
Investigation
I investigated why jruby-win32ole is loaded when starting Cucumber.
The dependency is introduced through the sys-uname gem. In the current Cucumber code, the operating-system version exposed by sys-uname is used by Cucumber::Runtime::MetaMessageBuilder#os:
def os
Cucumber::Messages::Product.new(
name: RbConfig::CONFIG['target_os'],
version: Sys::Uname.version
)
end
As far as I can determine, this operating-system metadata is the only Cucumber functionality that requires Sys::Uname.
In addition, lib/cucumber/runtime.rb requires sys/uname, although that file does not use Sys::Uname directly. Requiring it there causes the native Windows integration to be loaded during Cucumber startup.
On JRuby running on Windows, this ultimately loads racob-x64.dll, after which the JVM terminates with a native crash. Because this is a native JVM crash, it cannot be handled by rescuing a Ruby exception.
Proposed approach
Would you consider making the sys-uname integration optional on JRuby for Windows?
The unconditional require could be removed from:
lib/cucumber/runtime.rb
The dependency could then be loaded only where the operating-system metadata is built:
begin
require 'sys/uname' unless RUBY_ENGINE == 'jruby' && Gem.win_platform?
rescue LoadError
# sys-uname is optional. OS-version metadata will fall back
# to a platform-independent value when it is unavailable.
end
The operating-system version could use a fallback when Sys::Uname is unavailable:
def os
Cucumber::Messages::Product.new(
name: RbConfig::CONFIG['target_os'],
version: os_version
)
end
def os_version
return Sys::Uname.version if defined?(Sys::Uname)
'unknown'
end
This preserves the existing sys-uname behavior on supported runtime and platform combinations, while avoiding the native jruby-win32ole code path on JRuby for Windows.
✅ What did you expect to see?
Cucumber should start successfully on Windows 11 with:
- JRuby 10.0 or later
- Java 21
- Cucumber 11.1.1 or later
If sys-uname cannot safely be loaded, Cucumber should still run and report a fallback operating-system version in its metadata.
Actual behavior
The JVM terminates while loading racob-x64.dll, before any Cucumber scenarios are executed.
📦 Which tool/library version are you using?
- jruby version = jruby 10.0.6.0 (3.4.5) 2026-06-11 716ad51f54 OpenJDK 64-Bit Server VM 21.0.9+10-adhoc.Administrator.jdk21u on 21.0.9+10-adhoc.Administrator.jdk21u +indy +jit [x86_64-mswin32]
- cucumber 11.1.1
🔬 How could we reproduce it?
No response
📚 Any additional context?
- Langage dominant
- Ruby
- Étoiles
- 5.2k
- Forks
- 1.1k
- Merge moyen
- 2 j 14 h
- PR mergées (30 j)
- 5
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de cucumber/cucumber-ruby
-
:bank: debt
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
cucumber/cucumber-ruby#1884 ·
Les mainteneurs répondent en général sous 2 jours
-
:bank: debt
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
cucumber/cucumber-ruby#1871 ·
Les mainteneurs répondent en général sous 2 jours
-
:bug: bug
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
cucumber/cucumber-ruby#1869 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
:bank: debt
Difficulté 4/5 3-5 jours Accessibilité débutants 30/100
cucumber/cucumber-ruby#1840 ·
Les mainteneurs répondent en général sous 2 jours
-
CCK upgrade pathsOuverte:bank: debt
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
cucumber/cucumber-ruby#1822 · 9 commentaires ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de cucumber/cucumber-ruby
Issues similaires
-
Remove sidekiq trace filteringOuverteinstrumentation-sidekiq
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
open-telemetry/opentelemetry-ruby-contrib#2735 ·
Les mainteneurs répondent en général sous 2 jours
-
SecureRandom.alphanumeric can silently return an empty or wrong-length secret instead of raisingOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
ruby/securerandom#92 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
we-promise/sure#5902 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
avo-hq/avo#5065 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour