nasser / zajal

Experimental creative coding framework
MIT License
161 stars 10 forks source link

Unknown FFI type crash #73

Open nasser opened 12 years ago

nasser commented 12 years ago

Sporadically, Zajal will crash with the following report

[BUG: Unknown FFI type in JIT FFI inliner]
2   ruby  0x000000010407eee3 rubinius::bug(char const*) + 67
3   ruby  0x00000001042771ed rubinius::Inliner::inline_ffi(rubinius::Class*, rubinius::NativeFunction*) + 4609
4   ruby  0x00000001042797b1 rubinius::Inliner::inline_for_class(rubinius::Class*) + 2129
5   ruby  0x000000010427a020 rubinius::Inliner::consider_mono() + 64
6   ruby  0x0000000104297906 rubinius::JITVisit::visit_send_stack(unsigned long, unsigned long) + 300
7   ruby  0x000000010429d26d rubinius::VisitInstructions<rubinius::JITVisit>::dispatch(int) + 1913
8   ruby  0x000000010429dbb1 rubinius::jit::Walker::call(rubinius::OpcodeIterator&) + 29
9   ruby  0x000000010429dd7f void rubinius::jit::ControlFlowWalker::run<rubinius::jit::Walker>(rubinius::jit::Walker&) + 343
10  ruby  0x000000010428527d rubinius::jit::Builder::generate_body() + 393
11  ruby  0x000000010429ecef rubinius::jit::Compiler::compile_method(rubinius::LLVMState*, rubinius::BackgroundCompileRequest*) + 513
12  ruby  0x00000001042aed44 rubinius::BackgroundCompilerThread::perform() + 682
13  ruby  0x000000010406fa45 rubinius::utilities::thread::Thread::trampoline(void*) + 21
14  libsystem_c.dylib  0x00007fff96e418bf _pthread_start + 335
15  libsystem_c.dylib  0x00007fff96e44b75 thread_start + 13

---------------------------------------------
CRASH: A fatal error has occurred.

Backtrace:
0   ruby                                0x000000010407ad70 _ZN8rubiniusL12segv_handlerEi + 544
1   libsystem_c.dylib                   0x00007fff96e95cfa _sigtramp + 26
2   ???                                 0x0000000000000006 0x0 + 6
3   ruby                                0x000000010407eee8 _ZN8rubinius3bugEPKc + 72
4   ruby                                0x00000001042771ed _ZN8rubinius7Inliner10inline_ffiEPNS_5ClassEPNS_14NativeFunctionE + 4609
5   ruby                                0x00000001042797b1 _ZN8rubinius7Inliner16inline_for_classEPNS_5ClassE + 2129
6   ruby                                0x000000010427a020 _ZN8rubinius7Inliner13consider_monoEv + 64
7   ruby                                0x0000000104297906 _ZN8rubinius8JITVisit16visit_send_stackEmm + 300
8   ruby                                0x000000010429d26d _ZN8rubinius17VisitInstructionsINS_8JITVisitEE8dispatchEi + 1913
9   ruby                                0x000000010429dbb1 _ZN8rubinius3jit6Walker4callERNS_14OpcodeIteratorE + 29
10  ruby                                0x000000010429dd7f _ZN8rubinius3jit17ControlFlowWalker3runINS0_6WalkerEEEvRT_ + 343
11  ruby                                0x000000010428527d _ZN8rubinius3jit7Builder13generate_bodyEv + 393
12  ruby                                0x000000010429ecef _ZN8rubinius3jit8Compiler14compile_methodEPNS_9LLVMStateEPNS_24BackgroundCompileRequestE + 513
13  ruby                                0x00000001042aed44 _ZN8rubinius24BackgroundCompilerThread7performEv + 682
14  ruby                                0x000000010406fa45 _ZN8rubinius9utilities6thread6Thread10trampolineEPv + 21
15  libsystem_c.dylib                   0x00007fff96e418bf _pthread_start + 335
16  libsystem_c.dylib                   0x00007fff96e44b75 thread_start + 13

Wrote full error report to: /Users/nasser/.rubinius_last_error
Run 'rbx report' to submit this crash report!
objc[12463]: Object 0x7ff1b99bcf40 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
objc[12463]: Object 0x7ff1b48f67a0 of class NSConcreteValue autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
objc[12463]: Object 0x7ff1b48e2960 of class NSConcreteValue autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
objc[12463]: Object 0x7ff1b856e340 of class __NSCFDictionary autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
nasser commented 12 years ago

This may be as simple as disabling JIT for now

nasser commented 12 years ago

This reproduces it

34000.times { end_shape }

It seems that certain methods, called enough times, will trigger the bug