New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: can't modify frozen object #1584

Open
tlunter opened this Issue Apr 19, 2016 · 1 comment

Comments

Projects
None yet
4 participants
@tlunter

tlunter commented Apr 19, 2016

My current problem is: rubygems serialized specs are freezing variables that are later #untaintd which throws an error in jruby 9.0.4.0.

This issue is related to:

  • Network problems
  • Installing a library
  • Publishing a library
  • The command line gem
  • Other

Here are my current environment details:

$ gem env version
2.6.3

I will abide by the code of conduct.

This is conflicting with this.

The serialized spec looks like:

Gem::Specification.new do |s|
  s.name = "foreman".freeze
  s.version = "0.63.0"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["David Dollar".freeze]
  s.date = "2016-04-19"
  s.description = "Process manager for applications with multiple components".freeze
  s.email = "ddollar@gmail.com".freeze
  s.executables = ["foreman".freeze]
  s.files = ["README.md".freeze, ... (lots of frozen things)]
  s.homepage = "http://github.com/ddollar/foreman".freeze
  s.licenses = ["MIT".freeze]
  ...

We're currently using a fork of foreman from here: https://github.com/adamjt/foreman/blob/master/foreman.gemspec, and when using bundler to pull from the github repo, running verbosely, it prints:

Using foreman 0.63.0 from git://github.com/adamjt/foreman.git (at master@dfdaa4a)

RuntimeError: can't modify frozen object
org/jruby/RubyKernel.java:1918:in `untaint'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/stdlib/rubygems/installer.rb:463:in `block in generate_bin'
org/jruby/RubyArray.java:1560:in `each'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/stdlib/rubygems/installer.rb:462:in `generate_bin'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/source/path/installer.rb:27:in `generate_bin'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/source/path.rb:192:in `block in generate_bin'
org/jruby/RubyDir.java:326:in `chdir'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/shared_helpers.rb:53:in `block in chdir'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/stdlib/monitor.rb:211:in `mon_synchronize'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/shared_helpers.rb:52:in `chdir'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/source/path.rb:187:in `generate_bin'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/source/git.rb:171:in `install'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/installer/gem_installer.rb:56:in `install'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/installer/gem_installer.rb:14:in `install_from_spec'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/installer/parallel_installer.rb:88:in `block in worker_pool'
org/jruby/RubyProc.java:318:in `call'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/worker.rb:55:in `apply_func'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/worker.rb:50:in `block in process_queue'
org/jruby/RubyKernel.java:1291:in `loop'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/worker.rb:47:in `process_queue'
/opt/swipely/rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/gems/bundler-1.11.2/lib/bundler/worker.rb:22:in `block in initialize'

@headius is this a bug with jruby's untaint code, or should there be a #dup here?

@segiddins

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Apr 19, 2016

Member

Probably should be a filename = filename.dup.untaint? But I'm curious why none of the existing specs are failing over this

Member

segiddins commented Apr 19, 2016

Probably should be a filename = filename.dup.untaint? But I'm curious why none of the existing specs are failing over this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment