Project

General

Profile

Actions

Bug #11551

closed

`[BUG] cfp consistency error` for unidentified reasons

Added by seantheprogrammer (Sean Griffin) over 8 years ago. Updated over 8 years ago.

Status:
Rejected
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

Actions #1

Updated by seantheprogrammer (Sean Griffin) over 8 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.

Actions #2

Updated by nobu (Nobuyoshi Nakada) over 8 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?

Actions #3

Updated by seantheprogrammer (Sean Griffin) over 8 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.

Actions #4

Updated by seantheprogrammer (Sean Griffin) over 8 years ago

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

Actions #5

Updated by nobu (Nobuyoshi Nakada) over 8 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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0