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

Closed
PlugIN73 opened this Issue Dec 28, 2012 · 25 comments

Projects

None yet

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
Member

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
bai commented Dec 29, 2012

I keep getting 362 segfaulting hard as well.

@roidrage
Member

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

@bai
bai commented Dec 29, 2012

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
Member

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
Member

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
Member

@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
Member

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
lsegal commented Jan 3, 2013

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
Member
roidrage commented Jan 3, 2013

/cc @joshk

@joshk
Member
joshk commented Jan 3, 2013

I will build new images and provision them across Org VMs ASAP.

On 3/01/2013, at 10:53 PM, Mathias Meyer notifications@github.com wrote:

/cc @joshk


Reply to this email directly or view it on GitHub.

@lsegal
lsegal commented Jan 4, 2013

Any update on this, @joshk?

@joshk
Member
joshk commented Jan 4, 2013

Working on it today sorry :(

Sent from my Commodore 64

On 5/01/2013, at 12:12 PM, Loren Segal notifications@github.com wrote:

Any update on this, @joshk?


Reply to this email directly or view it on GitHub.

@joshk
Member
joshk commented Jan 5, 2013

New VMs have been created, I will put them live tomorrow, sorry for the delays. :)

On 5/01/2013, at 12:12 PM, Loren Segal notifications@github.com wrote:

Any update on this, @joshk?


Reply to this email directly or view it on GitHub.

@roidrage roidrage closed this Jan 6, 2013
@jamesotron

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

@joshk
Member
joshk commented Jan 8, 2013

My pleasure James :)

On 9/01/2013, at 11:47 AM, James Harton notifications@github.com wrote:

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


Reply to this email directly or view it on GitHub.

@lsegal
lsegal commented Jan 8, 2013

Ditto @joshk! 👍!

@joshk
Member
joshk commented Jan 8, 2013

Thanks Loren, it's my pleasure :)

On 9/01/2013, at 11:52 AM, Loren Segal notifications@github.com wrote:

Ditto @joshk! !


Reply to this email directly or view it on GitHub.

@PlugIN73

Thanks!!! Good work!

@ronalchn ronalchn referenced this issue in activerecord-hackery/squeel Jan 17, 2013
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