Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Segmentation fault ruby 1.9.3p362 (2012-12-25 revision 38607) [i686-linux] #827

Closed
PlugIN73 opened this Issue · 25 comments

7 participants

@PlugIN73

Link to build:
https://travis-ci.org/kaize/castle/builds/3853789
My project work in ruby 1.9.3-p327, how can i change it at travis?

@roidrage
Owner

Indeed odd, but wouldn't be the first time an MRI patch release broke something.

Here's another test suite that failed with a segfault: https://travis-ci.org/jordansissel/ruby-ftw/jobs/3863031/#L78

@bai

I keep getting 362 segfaulting hard as well.

@roidrage
Owner

Do you have a link to a build? This seems worth collecting evidence for and report as an MRI issue.

@bai

That's on staging env here, not on Travis. Just to let you know it's not likely to be Travis' problem.

@PlugIN73

I install 1.9.3p362 on my local machine and i have this problem. My question was - how can i change ruby build at travis?

@roidrage
Owner

Unfortunately this is the only 1.9.3 version we have available. You can try adding a previous one (e.g. 1.9.3p327) by adding a specific rvm version and seeing if that's available as a binary package from the rvm repository.

@PlugIN73

So, i have red bage on my develop branch...=(

@roidrage
Owner

Sorry about that. We're not very happy about patch level updates for an MRI version breaking things like that either.

Have you tried specifying something like 1.9.3-p327 as the rvm version?

@PlugIN73

Of course, i tryied at 327 and 194...
So, i will wait for next ruby release=)

@roidrage
Owner

@bai do you have any output from the segfaults in your staging environment? might be useful to have when reporting this as a bug.

@roidrage
Owner

There's already an open issue on the Ruby bug tracker: https://bugs.ruby-lang.org/issues/7629

@jamesotron

I'm getting segfaults on p362, but related to EM/thin, not AR. https://travis-ci.org/jamesotron/Heap/builds/3884041

@pixeltrix

I've simplified this down to the following Active Record based code:

require 'active_record'

ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")

ActiveRecord::Schema.define(:version => 1) do
  create_table :posts do |t|
    t.string :title
    t.timestamps
  end
end

class Post < ActiveRecord::Base
  default_scope { where(:published => true) }
  scope :page, Proc.new { |num| limit(10).offset(10 * (num - 1)) } do
    def current_page
      return 1 if limit_value.nil?
      (offset_value / limit_value) + 1
    end
  end
end

30.times do |i|
  Post.create! do |p|
    p.title = "Post #{i}"
  end
end

# Segfaults
Post.page(1)

The Active Record scope related code is somewhat complicated with respect to blocks and procs and I think we're relying on an implicit conversion of a block to a proc that has been removed with this change:

* vm.c (rb_vm_make_proc): No need to make Proc object here.

Now attempting to reproduce the segfault with straight ruby.

@lsegal

Given the out of box problems with this release, would it be possible to roll back Ruby 1.9.3 to the previous patch level release until the problem is addressed? This is definitely a real (and sweeping) bug.

@roidrage
Owner

/cc @joshk

@joshk
Owner
@lsegal

Any update on this, @joshk?

@joshk
Owner
@joshk
Owner
@roidrage roidrage closed this
@jamesotron

Thanks for the hard work @joshk. It is appreciated.

@joshk
Owner
@lsegal

Ditto @joshk! :+1:!

@joshk
Owner
@PlugIN73

Thanks!!! Good work!

@ronalchn ronalchn referenced this issue in activerecord-hackery/squeel
Closed

Bug in MRI 1.9.3-p362 with sifters #209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.