Project

General

Profile

Bug #11551

`[BUG] cfp consistency error` for unidentified reasons

Added by seantheprogrammer (Sean Griffin) almost 4 years ago. Updated almost 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
[ruby-core:<unknown>]

Description

The code changes https://github.com/sgrif/rails/commit/ddbed0040f5e99a751b130de8213f7cc7e0d155d cause a segfault when running the test case in activemodel/test/cases/validations/acceptance_validations_test. The code to reproduce is on that repo on the branch sg-segfault-example. The output from the crash is here: https://gist.github.com/sgrif/8775e4fa6b915868a893

History

#1

Updated by seantheprogrammer (Sean Griffin) almost 4 years ago

There is a typo in the method_missing definition which is the cause here. Changing attribute_defintion to attribute_definition fixes it, so the bug appears to have something to do with a method_missing invocation when it's defined this way.

#2

Updated by nobu (Nobuyoshi Nakada) almost 4 years ago

  • Subject changed from Segfault for unidentified reasons to `[BUG] cfp consistency error` for unidentified reasons
  • Status changed from Open to Feedback

Can't you make short code to reproduce it?

#3

Updated by seantheprogrammer (Sean Griffin) almost 4 years ago

I've tried to create an isolated script to reproduce the problem, but haven't been able to thus far. I'll keep seeing if I can, but at the moment it appears to be a weird interaction between the code linked and the rest of rails.

#4

Updated by seantheprogrammer (Sean Griffin) almost 4 years ago

Aha, I got it. It has to do with minitest. Reproduction script: https://gist.github.com/sgrif/720b7473c5ce9a51d6e2

#5

Updated by nobu (Nobuyoshi Nakada) almost 4 years ago

  • Status changed from Feedback to Rejected

It occurred a system stack overflow.
Ruby tries to catch it as possible, but it is very hard (or nearly impossible) to handle it flawlessly, as it can occur in a critical section, other external libraries, and so on.

Also available in: Atom PDF