Skip to content

Process.spawn with redirect causes ConcurrencyError #3038

@djberg96

Description

@djberg96

jruby 9.0.0.0.rc1 (2.2.2) 2015-06-10 a0bf3b3 Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64]
Yosemite
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

It seems JRuby does not like redirecting output on Process.spawn:

# Where test.rb is a very simple puts "hello" kind of script
Process.spawn("test.rb", :out => ['test.log', 'a'])

# Result
ConcurrencyError: Detected invalid array contents due to unsynchronized modifications with concurrent users
  spawn at org/jruby/RubyProcess.java:1295

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions