Race condition on mongodb driver

123 views
Skip to first unread message

Tiago Albineli Motta

unread,
Mar 17, 2014, 12:55:02 PM3/17/14
to mongodb-ca...@googlegroups.com
Anybody knowa how to solve this problem?

"cluster-1-thread-2" - Thread t@66
   java.lang.Thread.State: BLOCKED
at com.mongodb.DefaultServer$DefaultServerStateListener.stateChanged(DefaultServer.java:112)
- waiting to lock <772e7c67> (a com.mongodb.DefaultServer$DefaultServerStateListener) owned by "cluster-1-thread-1" t@65
at com.mongodb.DefaultServer.invalidate(DefaultServer.java:87)
at com.mongodb.MultiServerCluster.invalidateOldPrimaries(MultiServerCluster.java:215)
at com.mongodb.MultiServerCluster.handleReplicaSetMemberChanged(MultiServerCluster.java:176)
at com.mongodb.MultiServerCluster.onChange(MultiServerCluster.java:130)
- locked <ce98b52> (a com.mongodb.MultiServerCluster)
at com.mongodb.MultiServerCluster.access$100(MultiServerCluster.java:39)
at com.mongodb.MultiServerCluster$DefaultServerStateListener.stateChanged(MultiServerCluster.java:104)
at com.mongodb.DefaultServer$DefaultServerStateListener.stateChanged(DefaultServer.java:114)
- locked <38b9bb1d> (a com.mongodb.DefaultServer$DefaultServerStateListener)
at com.mongodb.ServerStateNotifier.run(ServerStateNotifier.java:106)
- locked <5238b42d> (a com.mongodb.ServerStateNotifier)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

   Locked ownable synchronizers:
- locked <8bd2087> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)

"cluster-1-thread-1" - Thread t@65
   java.lang.Thread.State: BLOCKED
at com.mongodb.MultiServerCluster.onChange(MultiServerCluster.java:114)
- waiting to lock <ce98b52> (a com.mongodb.MultiServerCluster) owned by "cluster-1-thread-2" t@66
at com.mongodb.MultiServerCluster.access$100(MultiServerCluster.java:39)
at com.mongodb.MultiServerCluster$DefaultServerStateListener.stateChanged(MultiServerCluster.java:104)
at com.mongodb.DefaultServer$DefaultServerStateListener.stateChanged(DefaultServer.java:114)
- locked <772e7c67> (a com.mongodb.DefaultServer$DefaultServerStateListener)
at com.mongodb.ServerStateNotifier.run(ServerStateNotifier.java:106)
- locked <38a2838c> (a com.mongodb.ServerStateNotifier)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

   Locked ownable synchronizers:
- locked <356a7960> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)

Ross Lawley

unread,
Mar 25, 2014, 12:45:01 PM3/25/14
to mongodb-ca...@googlegroups.com
Sorry for the delay in replying, I've not seen that before. 

Can you provide more information, what version of Casbah and mongodb?  Also, how are you running your Casbah code? Is that error easy to replicate?

Thanks,

Ross


--
You received this message because you are subscribed to the Google Groups "mongodb-casbah-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-casbah-u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

name     : "Ross  Lawley",

  title    : "Scala and Python Engineer",

  location : "London, UK",

  twitter  : ["@RossC0", "@MongoDB""@MongoDBInc"],

  facebook : ["MongoDB", "MongoDB, Inc."] }

Tiago Albineli Motta

unread,
Mar 25, 2014, 8:38:51 PM3/25/14
to mongodb-ca...@googlegroups.com
The problem is on mongodb java driver. I created an issue: 


Seems that they fixed, but now im not using it anymore.

Thanks

Tiago Albineli Motta
Desenvolvedor de Software - Globo.com
ICQ: 32107100
http://programandosemcafeina.blogspot.com


--
You received this message because you are subscribed to a topic in the Google Groups "mongodb-casbah-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-casbah-users/9EzhDj7E4Q8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongodb-casbah-u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages