Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Crash when running refinerycms specs in 1.9 mode only #2030

Closed
parndt opened this Issue · 10 comments

3 participants

@parndt

Steps to reproduce:

  • git clone git://github.com/refinery/refinerycms.git
  • cd refinerycms
  • bundle
  • RBXOPT=-X19 bundle exec rake refinery:testing:dummy_app
  • RBXOPT=-X19 bundle exec rspec authentication/spec

Output:

[master|2.0.0rc1] /code/parndt/refinerycms$ RBXOPT=-X19 bundle exec rspec authentication/spec
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}
.............................................
---------------------------------------------
CRASH: A fatal error has occurred.

Backtrace:
0   rbx                                 0x0000000103bd80d0 _ZN8rubiniusL12segv_handlerEi + 544
1   libsystem_c.dylib                   0x00007fff885568ea _sigtramp + 26
2   ???                                 0x00007fff5bfff1c8 0x0 + 140734736888264
3   rbx                                 0x0000000103cf2e32 _ZN8rubinius12CompiledCode4Info4markEPNS_6ObjectERNS_10ObjectMarkE + 318
4   rbx                                 0x0000000103d8982e _ZN8rubinius16GarbageCollector11scan_objectEPNS_6ObjectE + 456
5   rbx                                 0x0000000103d8724b _ZN8rubinius7BakerGC7collectERNS_6GCDataEPNS_17YoungCollectStatsE + 107
6   rbx                                 0x0000000103cadee9 _ZN8rubinius12ObjectMemory13collect_youngERNS_6GCDataEPNS_17YoungCollectStatsE + 67
7   rbx                                 0x0000000103cae1ea _ZN8rubinius12ObjectMemory13collect_maybeEPNS_5StateERNS_11GCTokenImplEPNS_9CallFrameE + 420
8   rbx                                 0x0000000103ce5afc _ZN8rubinius2VM13collect_maybeERNS_11GCTokenImplEPNS_9CallFrameE + 52
9   rbx                                 0x0000000103be755d _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 17869
10  rbx                                 0x0000000103c51284 _ZN8rubinius11MachineCode19execute_specializedINS_11OneArgumentEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 1044
11  rbx                                 0x0000000103be553c _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 9644
12  rbx                                 0x0000000103c51284 _ZN8rubinius11MachineCode19execute_specializedINS_11OneArgumentEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 1044
13  rbx                                 0x0000000103be807a _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 20714
14  rbx                                 0x0000000103c51284 _ZN8rubinius11MachineCode19execute_specializedINS_11OneArgumentEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 1044
15  rbx                                 0x0000000103be53f6 _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 9318
16  rbx                                 0x0000000103cedc3e _ZN8rubinius16BlockEnvironment19execute_interpreterEPNS_5StateEPNS_9CallFrameEPS0_RNS_9ArgumentsERNS_15BlockInvocationE + 1150
17  rbx                                 0x0000000103ceddb0 _ZN8rubinius16BlockEnvironment6invokeEPNS_5StateEPNS_9CallFrameEPS0_RNS_9ArgumentsERNS_15BlockInvocationE + 260
18  rbx                                 0x0000000103cee0d0 _ZN8rubinius16BlockEnvironment4callEPNS_5StateEPNS_9CallFrameERNS_9ArgumentsEi + 68
19  rbx                                 0x0000000103be64e7 _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 13655
20  rbx                                 0x0000000103cedc3e _ZN8rubinius16BlockEnvironment19execute_interpreterEPNS_5StateEPNS_9CallFrameEPS0_RNS_9ArgumentsERNS_15BlockInvocationE + 1150
21  rbx                                 0x0000000103ceddb0 _ZN8rubinius16BlockEnvironment6invokeEPNS_5StateEPNS_9CallFrameEPS0_RNS_9ArgumentsERNS_15BlockInvocationE + 260
22  rbx                                 0x0000000103cee0d0 _ZN8rubinius16BlockEnvironment4callEPNS_5StateEPNS_9CallFrameERNS_9ArgumentsEi + 68
23  rbx                                 0x0000000103dcafe6 rbx_yield_stack + 134
24  ???                                 0x000000010612854b 0x0 + 4396844363
25  rbx                                 0x0000000103be553c _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 9644
26  rbx                                 0x0000000103c504f7 _ZN8rubinius11MachineCode19execute_specializedINS_16GenericArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 1063
27  rbx                                 0x0000000103be553c _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 9644
28  rbx                                 0x0000000103c50984 _ZN8rubinius11MachineCode19execute_specializedINS_11NoArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 1044
29  rbx                                 0x0000000103be53f6 _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 9318
30  rbx                                 0x0000000103c50984 _ZN8rubinius11MachineCode19execute_specializedINS_11NoArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 1044
31  rbx                                 0x0000000103be53f6 _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 9318
32  rbx                                 0x0000000103c504f7 _ZN8rubinius11MachineCode19execute_specializedINS_16GenericArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 1063
33  rbx                                 0x0000000103be53f6 _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 9318
34  rbx                                 0x0000000103c51bc4 _ZN8rubinius11MachineCode19execute_specializedINS_14ThreeArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 1060
35  rbx                                 0x0000000103be53f6 _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 9318
36  rbx                                 0x0000000103c51bc4 _ZN8rubinius11MachineCode19execute_specializedINS_14ThreeArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 1060
37  rbx                                 0x0000000103be53f6 _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 9318
38  rbx                                 0x0000000103cedc3e _ZN8rubinius16BlockEnvironment19execute_interpreterEPNS_5StateEPNS_9CallFrameEPS0_RNS_9ArgumentsERNS_15BlockInvocationE + 1150
39  rbx                                 0x0000000103ceddb0 _ZN8rubinius16BlockEnvironment6invokeEPNS_5StateEPNS_9CallFrameEPS0_RNS_9ArgumentsERNS_15BlockInvocationE + 260
40  rbx                                 0x0000000103cee0d0 _ZN8rubinius16BlockEnvironment4callEPNS_5StateEPNS_9CallFrameERNS_9ArgumentsEi + 68
41  rbx                                 0x0000000103dcafe6 rbx_yield_stack + 134
42  ???                                 0x000000010612854b 0x0 + 4396844363
43  rbx                                 0x0000000103be553c _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 9644
44  rbx                                 0x0000000103c51284 _ZN8rubinius11MachineCode19execute_specializedINS_11OneArgumentEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 1044
45  rbx                                 0x0000000103d1aa79 _ZN8rubinius6Object9send_primEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsEPNS_6SymbolE + 287
46  rbx                                 0x0000000103d1aabc _ZN8rubinius6Object17private_send_primEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 28
47  rbx                                 0x0000000103c888ce _ZN8rubinius10Primitives11object_sendEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 130
48  rbx                                 0x0000000103be553c _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 9644
49  rbx                                 0x0000000103c50984 _ZN8rubinius11MachineCode19execute_specializedINS_11NoArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 1044
50  rbx                                 0x0000000103be1858 _ZN8rubinius11InlineCache17empty_cache_vcallEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE + 554
51  rbx                                 0x0000000103be52d2 _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 9026
52  rbx                                 0x0000000103c50984 _ZN8rubinius11MachineCode19execute_specializedINS_11NoArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 1044
53  rbx                                 0x0000000103d1aa79 _ZN8rubinius6Object9send_primEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsEPNS_6SymbolE + 287
54  rbx                                 0x0000000103d1aabc _ZN8rubinius6Object17private_send_primEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 28
55  rbx                                 0x0000000103c888ce _ZN8rubinius10Primitives11object_sendEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 130
56  rbx                                 0x0000000103be553c _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 9644
57  rbx                                 0x0000000103c51bc4 _ZN8rubinius11MachineCode19execute_specializedINS_14ThreeArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 1060
58  rbx                                 0x0000000103be553c _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 9644
59  rbx                                 0x0000000103c504f7 _ZN8rubinius11MachineCode19execute_specializedINS_16GenericArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 1063
60  rbx                                 0x0000000103d1aa79 _ZN8rubinius6Object9send_primEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsEPNS_6SymbolE + 287
61  rbx                                 0x0000000103d1aabc _ZN8rubinius6Object17private_send_primEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 28
62  rbx                                 0x0000000103c888ce _ZN8rubinius10Primitives11object_sendEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE + 130
63  rbx                                 0x0000000103be575a _ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE + 10186


Wrote full error report to: /Users/parndt/.rubinius_last_error
Run 'rbx report' to submit this crash report!

Installed via latest HEAD rvm using rvm install rbx:

$ RBXOPT=-X19 rbx --version
rubinius 2.0.0rc1 (1.9.3 release 2012-11-02 JI) [x86_64-apple-darwin12.2.1]

Issue requested by @brixen -- thanks!

@frodsan

@parndt I think you need to run rake refinery:testing:dummy_app before running the specs.

@parndt

@frodsan oops; updated the repro instructions -- thanks

@dbussink
Owner

I have a whole bunch of failures here locally, but no crash. All of them like this:

  1) Refinery::Admin::UsersController#new renders the new template
     Failure/Error: Unable to find matching line from backtrace
     NoMethodError:
       undefined method `slug' on an instance of Refinery::User.
     # kernel/delta/kernel.rb:81:in `method_missing'
     # kernel/common/kernel.rb:241:in `tap'
     # ./testing/lib/refinery/testing/controller_macros/authentication.rb:46:in `factory_user'
     # kernel/common/eval19.rb:45:in `instance_eval'
     # kernel/common/hash19.rb:257:in `fetch'
     # ./testing/lib/refinery/testing/controller_macros/authentication.rb:49:in `factory_user'
     # kernel/common/eval19.rb:45:in `instance_eval'
     # kernel/bootstrap/array.rb:68:in `each'
     # kernel/bootstrap/array19.rb:18:in `map'
     # kernel/bootstrap/array19.rb:18:in `map'
     # kernel/bootstrap/array19.rb:18:in `map'
     # kernel/loader.rb:696:in `run_at_exits'
     # kernel/loader.rb:716:in `epilogue'
     # kernel/loader.rb:849:in `main'

Anything I'm missing from the instruction to reproduce it?

@dbussink
Owner

FYI, getting those failures too when running with MRI 1.9.3

@dbussink
Owner

Looks like I had an old refinerycms clone and just doing a pull didn't work. Created a new clone and it works now.

@dbussink dbussink closed this issue from a commit
@dbussink dbussink Fix invalid memory writing in String
We were writing outside the string space in rare cases. The problem is
that when the original string had a capacity of 0 and the appended
string also has size 0. This results in a new minimal capacity of 0.

This means the string didn't need to be resized, but we still write a \0
byte at the end. This means we overwrite memory of the next object in
memory, causing corruption.

This change makes sure we always increase the capacity when needed.

Fixes #2030
dbe4529
@dbussink dbussink closed this in dbe4529
@warrenseen warrenseen referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@Gibheer Gibheer referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@dbussink
Owner

Huh? The travis log there shows a completely different problem, not a crash but an encoding error. Did you refer to the wrong build?

@parndt
@dbussink
Owner

Ok, could you open a new issue for it then? Since it's a completely different issue than this one :).

@parndt
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.