Skip to content

Instantly share code, notes, and snippets.

@ijokarumawak
Last active May 3, 2016 08:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ijokarumawak/8e9a49aaf8a0bcb7a7bc to your computer and use it in GitHub Desktop.
Save ijokarumawak/8e9a49aaf8a0bcb7a7bc to your computer and use it in GitHub Desktop.
couchbase lite local hangs with _replicate request
Running local couchbase lite instance
username: d4b724ee-131b-468e-b3ab-953d6fef2686
password: fcd11474-53db-44f8-b865-91d3fefe1779
http://d4b724ee-131b-468e-b3ab-953d6fef2686:fcd11474-53db-44f8-b865-91d3fefe1779@localhost:5984
Press Ctrl-C to shutdown
[Fri Apr 24 06:10:23 JST 2015] TJWS httpd 0.0.0.0 - SimpleAcceptor ServerSocket[addr=0.0.0.0/0.0.0.0,localport=5984] is listening.
2015-04-24 06:14:41
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode):
"CBLManagerWorkExecutor" #19 daemon prio=5 os_prio=31 tid=0x00007fe09912f800 nid=0x390f waiting on condition [0x000000012b7fb000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x000000076c548820> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1081)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
"Acme.Utils.ThreadPool(0)-PooledThread: Acme.Serve.Serve$ServeConnection@4e980dde" #17 daemon prio=5 os_prio=31 tid=0x00007fe0992fb800 nid=0x3707 waiting on condition [0x0000000128ab2000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x000000076e5544c8> (a java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
at com.couchbase.lite.router.Router.do_POST_replicate(Router.java:649)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.couchbase.lite.router.Router.start(Router.java:466)
at com.couchbase.lite.listener.LiteServlet.service(LiteServlet.java:128)
- locked <0x000000076c52a7b8> (a com.couchbase.lite.Manager)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2251)
at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2176)
at Acme.Serve.Serve$ServeConnection.run(Serve.java:1988)
at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1223)
- locked <0x000000076c931038> (a Acme.Utils$ThreadPool$PooledThread)
at java.lang.Thread.run(Thread.java:745)
"KeepAlive cleaner" #16 daemon prio=5 os_prio=31 tid=0x00007fe094772800 nid=0x5803 waiting on condition [0x000000012ca2a000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at Acme.Serve.Serve$KeepAliveCleaner.run(Serve.java:1610)
"Session cleaner" #15 daemon prio=1 os_prio=31 tid=0x00007fe096077000 nid=0x5603 waiting on condition [0x000000012b923000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at Acme.Serve.Serve$2.run(Serve.java:753)
at java.lang.Thread.run(Thread.java:745)
"Ruby-0-Thread-3: file:/Users/koji/dev/Couchbase/projects/couchbase_mobile/couchbase-lite-local.jar!/couchbase-lite-local/lib/couchbase_lite_local.rb:83" #14 daemon prio=5 os_prio=31 tid=0x00007fe09980d800 nid=0x5403 runnable [0x000000012c926000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:404)
at java.net.ServerSocket.implAccept(ServerSocket.java:545)
at java.net.ServerSocket.accept(ServerSocket.java:513)
at Acme.Serve.SimpleAcceptor.accept(SimpleAcceptor.java:40)
at Acme.Serve.Serve.serve(Serve.java:809)
at com.couchbase.lite.listener.LiteServer.serve(LiteServer.java:59)
at com.couchbase.lite.listener.LiteListener.run(LiteListener.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:440)
at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:304)
at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:52)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
at org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:206)
at org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:194)
at org.jruby.runtime.Interpreted19Block.call(Interpreted19Block.java:125)
at org.jruby.runtime.Block.call(Block.java:101)
at org.jruby.RubyProc.call(RubyProc.java:290)
at org.jruby.RubyProc.call(RubyProc.java:228)
at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:99)
at java.lang.Thread.run(Thread.java:745)
"Ruby-0-JIT-1" #12 daemon prio=1 os_prio=31 tid=0x00007fe095652000 nid=0x5203 waiting on condition [0x000000012bb04000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006c03b3d68> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
"Service Thread" #9 daemon prio=9 os_prio=31 tid=0x00007fe093852000 nid=0x4e03 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C1 CompilerThread3" #8 daemon prio=9 os_prio=31 tid=0x00007fe09485c800 nid=0x4c03 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread2" #7 daemon prio=9 os_prio=31 tid=0x00007fe093837000 nid=0x4a03 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread1" #6 daemon prio=9 os_prio=31 tid=0x00007fe09402b000 nid=0x4803 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" #5 daemon prio=9 os_prio=31 tid=0x00007fe09400d000 nid=0x4603 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" #4 daemon prio=9 os_prio=31 tid=0x00007fe09400f000 nid=0x3a0f waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" #3 daemon prio=8 os_prio=31 tid=0x00007fe095011800 nid=0x3503 in Object.wait() [0x0000000128977000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000006c0020ef8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:142)
- locked <0x00000006c0020ef8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:158)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)
"Reference Handler" #2 daemon prio=10 os_prio=31 tid=0x00007fe094856800 nid=0x3303 in Object.wait() [0x0000000128874000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000006c0010da8> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:157)
- locked <0x00000006c0010da8> (a java.lang.ref.Reference$Lock)
"main" #1 prio=5 os_prio=31 tid=0x00007fe095000000 nid=0x1303 runnable [0x000000010ce18000]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:246)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
- locked <0x00000006c007edd0> (a java.io.BufferedInputStream)
at java.nio.channels.Channels$ReadableByteChannelImpl.read(Channels.java:385)
- locked <0x00000006c03b2f88> (a java.lang.Object)
at org.jruby.util.io.ChannelStream.refillBuffer(ChannelStream.java:204)
at org.jruby.util.io.ChannelStream.getline(ChannelStream.java:323)
- locked <0x00000006c03b1e90> (a org.jruby.util.io.ChannelStream)
at org.jruby.RubyIO.getlineFast(RubyIO.java:810)
at org.jruby.RubyIO.getlineInner(RubyIO.java:622)
at org.jruby.RubyIO.getline(RubyIO.java:577)
at org.jruby.RubyIO.getline(RubyIO.java:565)
at org.jruby.RubyIO.gets19(RubyIO.java:2237)
at org.jruby.RubyIO$INVOKER$i$gets19.call(RubyIO$INVOKER$i$gets19.gen)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
at org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:206)
at org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:157)
at org.jruby.runtime.Interpreted19Block.yieldSpecific(Interpreted19Block.java:130)
at org.jruby.runtime.Block.yieldSpecific(Block.java:111)
at org.jruby.RubyKernel.loop(RubyKernel.java:1501)
at org.jruby.RubyKernel$INVOKER$s$0$0$loop.call(RubyKernel$INVOKER$s$0$0$loop.gen)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:316)
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:145)
at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
at org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:32)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121)
at org.jruby.Ruby.runInterpreter(Ruby.java:881)
at org.jruby.Ruby.loadFile(Ruby.java:2833)
at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
at org.jruby.runtime.load.LoadService.load(LoadService.java:359)
at org.jruby.RubyKernel.loadCommon(RubyKernel.java:1089)
at org.jruby.RubyKernel.load19(RubyKernel.java:1081)
at org.jruby.RubyKernel$INVOKER$s$0$1$load19.call(RubyKernel$INVOKER$s$0$1$load19.gen)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121)
at org.jruby.Ruby.runInterpreter(Ruby.java:881)
at org.jruby.Ruby.loadFile(Ruby.java:2833)
at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:959)
at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:573)
at org.jruby.runtime.load.LoadService.requireCommon(LoadService.java:457)
at org.jruby.runtime.load.LoadService.require(LoadService.java:421)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1071)
at org.jruby.RubyKernel.require19(RubyKernel.java:1065)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(RubyKernel$INVOKER$s$1$0$require19.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.ReturnNode.interpret(ReturnNode.java:92)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.IfNode.interpret(IfNode.java:116)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
at org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:198)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121)
at org.jruby.Ruby.runInterpreter(Ruby.java:881)
at org.jruby.Ruby.runInterpreter(Ruby.java:889)
at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:121)
at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:1264)
at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.java:1257)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at JarMain.invokeMethod(JarMain.java:248)
at JarMain.invokeMethod(JarMain.java:241)
at JarMain.launchJRuby(JarMain.java:142)
at JarMain.start(JarMain.java:159)
at JarMain.doStart(JarMain.java:221)
at JarMain.main(JarMain.java:216)
"VM Thread" os_prio=31 tid=0x00007fe094851800 nid=0x3103 runnable
"GC task thread#0 (ParallelGC)" os_prio=31 tid=0x00007fe09500d000 nid=0x2103 runnable
"GC task thread#1 (ParallelGC)" os_prio=31 tid=0x00007fe094002000 nid=0x2303 runnable
"GC task thread#2 (ParallelGC)" os_prio=31 tid=0x00007fe09500e000 nid=0x2503 runnable
"GC task thread#3 (ParallelGC)" os_prio=31 tid=0x00007fe09500e800 nid=0x2703 runnable
"GC task thread#4 (ParallelGC)" os_prio=31 tid=0x00007fe09500f000 nid=0x2903 runnable
"GC task thread#5 (ParallelGC)" os_prio=31 tid=0x00007fe09500f800 nid=0x2b03 runnable
"GC task thread#6 (ParallelGC)" os_prio=31 tid=0x00007fe095010800 nid=0x2d03 runnable
"GC task thread#7 (ParallelGC)" os_prio=31 tid=0x00007fe095011000 nid=0x2f03 runnable
"VM Periodic Task Thread" os_prio=31 tid=0x00007fe09380e800 nid=0x5003 waiting on condition
JNI global references: 520
Heap
PSYoungGen total 76288K, used 72690K [0x000000076ab00000, 0x0000000771500000, 0x00000007c0000000)
eden space 65536K, 94% used [0x000000076ab00000,0x000000076e7967f8,0x000000076eb00000)
from space 10752K, 99% used [0x000000076eb00000,0x000000076f566340,0x000000076f580000)
to space 10752K, 0% used [0x0000000770a80000,0x0000000770a80000,0x0000000771500000)
ParOldGen total 119296K, used 10488K [0x00000006c0000000, 0x00000006c7480000, 0x000000076ab00000)
object space 119296K, 8% used [0x00000006c0000000,0x00000006c0a3e000,0x00000006c7480000)
Metaspace used 30218K, capacity 30502K, committed 30592K, reserved 1075200K
class space used 5143K, capacity 5236K, committed 5248K, reserved 1048576K
# Start Couchbase Lite Local.
java -jar couchbase-lite-local.jar
# Look at the standard out of couchbase-lite-local.jar,
# and setup Couchbase Lite URL with authentication.
export CBL_U=d4b724ee-131b-468e-b3ab-953d6fef2686
export CBL_P=fcd11474-53db-44f8-b865-91d3fefe1779
export CBL_URL=http://$CBL_U:$CBL_P@localhost:5984
# create db
curl -XPUT $CBL_URL/my-local
# Other endpoints work fine.
curl $CBL_URL/my-local/_all_docs
# But _replicate hangs when it's called.
curl -XPOST -i -v -H "Content-Type: application/json" $CBL_URL/_replicate \
-d "{
\"source\" : \"http://localhost:4984/kitchen-sync/\",
\"target\" : \"my-local\"
}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment