mperham/girl_friday — Issue #40: rails app crashes running under jruby and thin
Author: navjeetc
Created: 2011-10-26 14:53:34+00:00
State: open

My web app running under jruby 1.6.3 and thin seems to crash and java thread dump file has some reference to girl_friday as shown below:

Stack: [0xb4832000,0xb48b3000], sp=0xb48b1b74, free space=510k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x6eef1] markOopDesc::must_be_preserved_with_bias(oopDesc) const
+0x21
V [libjvm.so+0x32a313] klassKlass::oop_follow_contents(oopDesc)+0x2a3
V [libjvm.so+0x6e5aa] arrayKlassKlass::oop_follow_contents(oopDesc)+0x16a
V [libjvm.so+0x37c55b] objArrayKlassKlass::oop_follow_contents(oopDesc)+0xdb
V [libjvm.so+0x34212d] MarkSweep::follow_stack()+0x3d
V [libjvm.so+0x342bc8] void MarkSweep::follow_root(oopDesc*)+0x68
V [libjvm.so+0x444a2c] Universe::oops_do(OopClosure, bool)+0x1c
V [libjvm.so+0x3ccc62] SharedHeap::process_strong_roots(bool, bool, SharedHeap
::ScanningOption, OopClosure, CodeBlobClosure, OopsInGenClosure)+0x2f2
V [libjvm.so+0x209cb8] GenCollectedHeap::gen_process_strong_roots(int, bool, b
ool, bool, SharedHeap::ScanningOption, OopsInGenClosure, bool, OopsInGenClosure
)+0x68
V [libjvm.so+0x20bec6] GenMarkSweep::invoke_at_safepoint(int, ReferenceProcess
or, bool)+0x196
V [libjvm.so+0x215408] OneContigSpaceCardGeneration::collect(bool, bool, unsig
ned, bool)+0x68
V [libjvm.so+0x20953e] GenCollectedHeap::do_collection(bool, bool, unsigned, b
ool, int)+0x45e
V [libjvm.so+0x20a8f9] GenCollectedHeap::do_full_collection(bool, int)+0x49
V [libjvm.so+0x46a40b] VM_GenCollectForPermanentAllocation::doit()+0x17b
V [libjvm.so+0x478d86] VM_Operation::evaluate()+0x46
V [libjvm.so+0x478233] VMThread::evaluate_operation(VM_Operation)+0x83
V [libjvm.so+0x4784a0] VMThread::loop()+0x190
V [libjvm.so+0x477f90] VMThread::run()+0x80
V [libjvm.so+0x38e97e] java_start(Thread)+0x14e
C [libpthread.so.0+0x6940] signed char+0x6940

VM_Operation (0xb6ead280): GenCollectForPermanentAllocation, mode: safepoint, re
quested by thread 0xb6b05400

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0xb316c400 JavaThread "Cext reference reaper" daemon [_thread_blocked, id=2382
3, stack(0xb2cfe000,0xb2eff000)]
0xb315ec00 JavaThread "RubyThread-1: /home/ec2-user/.rvm/gems/jruby-1.6.3@dm_a
pp/gems/girl_friday-0.9.1/lib/girl_friday/actor.rb:65" daemon [_thread_blocked,
id=23620, stack(0xb2eff000,0xb3100000)]
0xb37a5000 JavaThread "ReferenceReaper" daemon [_thread_blocked, id=23619, sta
ck(0xb34f8000,0xb36f9000)]
0xb6b3c000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=23617,
stack(0xb39c5000,0xb3bc6000)]
0xb6b3a000 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=23616,
stack(0xb3bc6000,0xb3c47000)]
0xb6b38800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=23615, s
tack(0xb3c47000,0xb3e48000)]
0xb6b34800 JavaThread "Finalizer" daemon [_thread_blocked, id=23614, stack(0xb
--More--(20%)

Things seem to be better when I use webrick rather than thin.
I am running Java HotSpot(TM) Client VM (build 20.2-b06, mixed mode, sharing)

Any ideas what could be going on?