[CDRIVER-207] Assertion error when multiple clients connect nearly simultaenously Created: 15/Apr/13  Updated: 03/May/17  Resolved: 10/Aug/13

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: R Baumg Assignee: Gary Murakami
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu Linux 12.04



 Description   

In our application we start up around 30 clients using the c driver nearly simultaneously. Quite often several clients stop immediately with the following message:

Mon Apr 15 13:32:49 successfully connected to seed localhost:27017 for replica set rs
Mon Apr 15 13:32:49 changing hosts to { 0: "ndmc2VM:27017" } from rs/
Mon Apr 15 13:32:49 trying to add new host ndmc2VM:27017 to replica set rs
Mon Apr 15 13:32:49 successfully connected to new host ndmc2VM:27017 in replica set rs
Mon Apr 15 13:32:51 Primary for replica set rs changed to ndmc2VM:27017
Mon Apr 15 13:32:51 replica set monitor for replica set rs started, address is rs/ndmc2VM:27017
Mon Apr 15 13:32:51 [ReplicaSetMonitorWatcher] starting
Mon Apr 15 13:32:59 ERROR: MessagingPort::call() wrong id got:15 expect:16
  toSend op: 2004
  response msgid:90089
  response len:  199
  response op:  1
  remote: 127.0.1.1:27017
Mon Apr 15 13:32:59   Assertion failure false src/mongo/util/net/message_port.cpp 241
Mon Apr 15 13:32:59 ERROR: MessagingPort::call() wrong id got:16 expect:15
  toSend op: 2004
  response msgid:90091
  response len:  36
  response op:  1
  remote: 127.0.1.1:27017
Mon Apr 15 13:32:59   Assertion failure false src/mongo/util/net/message_port.cpp 241
TapAdapter warning adding tag costeqexp to 13: assertion src/mongo/util/net/message_port.cpp:241
Mon Apr 15 13:33:00 ERROR: MessagingPort::call() wrong id got:18 expect:1a
  toSend op: 2004
  response msgid:90096
  response len:  199
  response op:  1
  remote: 127.0.1.1:27017
Mon Apr 15 13:33:00   Assertion failure false src/mongo/util/net/message_port.cpp 241

In particular, it seems to happen when many clients are started. It has not been observed, when only one client is started. Each client opens only one connection.



 Comments   
Comment by R Baumg [ 22/Apr/13 ]

Can be closed. This behaviour was caused by some multi-threading issues with two threads accessing one database connection at the same time.

Generated at Wed Feb 07 21:08:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.