[CSHARP-617] Latest JRE6 update causing server connection issues with driver versions 1.6.0.4624 and 1.6.0.4678 Created: 29/Oct/12  Updated: 14/May/14  Resolved: 16/May/13

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

Type: Bug Priority: Major - P3
Reporter: Jason Wedepohl Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: connections, java
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Win 7 x64 (replicated on three different machines, using MongoDB server versions 2.0.2, 2.0.6, and 2.0.6 2008+)


Attachments: PNG File Capture.PNG    
Backwards Compatibility: Minor Change

 Description   

After installing the latest mini-update to Java 6 this morning (around 10am GMT, 29th Oct), successive mongo queries through the C# driver use an auto-incremented port number, similar to when opening the mongo shell multiple times through the command line. This caused queries to time out on a machine running an Intel Core 2 Duo T7700 @ 2.40 GHz with 4GB RAM. Two other more powerful machines were able to run our system without timeouts, despite replicating the port increment issue.

This issue was replicated with drivers 1.6.0.4624 and later 1.6.4678, but only after installing the mentioned Java update. Up until last week we had been using driver version 1.3.1.4349, to which we have been forced to roll back, pending a resolution to this issue. Because we have been forced to roll our driver back, some of our code which used Query.In had to be reverted.

The attached screenshot was created by running a service with a timer event which queries our database once every ten seconds.



 Comments   
Comment by Jason Wedepohl [ 30/Oct/12 ]

Sorry, I'm kind of snowed under at the moment so 1), 2) and 4) will have to wait a bit, perhaps a couple of days.

As for 3): Using 1.3.* and 1.6., I see incrementing port numbers when a process connects to mongod for the first time. Both driver versions worked fine before updating jre6u37. Using 1.6. after updating jre6u37, the mongod connections for the process are terminated and recreated again with an incremented port number each time the process makes a query.

Comment by Craig Wilson [ 30/Oct/12 ]

Thanks. It's obvious something is going on. I still need to try and determine if it is intentional or not. Do you have some sample code you used to check this? If you could post it here, it'd make replication much easier.

So, couple more questions/action items.
1) Do you have some sample code you could post in here we can use to replicate with?
2) You mentioned you are seeing timeouts. Could you post the stack trace of one of these?
3) Do you see incrementing port numbers in 1.3., or just in 1.6.?
4) It'd be great if you could repeat your test without jre6u37 installed. I'm still very unclear as to what Java has to do with this issue.

Comment by Jason Wedepohl [ 30/Oct/12 ]

Tested two scenarios:

Box A with latest C# driver (1.6.0.4678), Box B with mongod and latest jre6u37. Replicated the issue, producing output similar to my first posted screenshot.

Rolled back C# driver to 1.3.1.4349 and ran the same test. Was not able to replicate the issue; mongod output was healthy.

I hope this is enough for now; I have to carry on with other stuff. If you want me to perform corollary tests let me know.

Comment by Craig Wilson [ 29/Oct/12 ]

Technically, neither mongod nor the .NET driver should be affected by Java. However, Java could be doing something to the system causing some oddness to creep in. We need to isolate the problem to either the server boxes or the client boxes as that will start allowing us to narrow down the issue. It would be tremendous if you could try and do this tomorrow.

Comment by Jason Wedepohl [ 29/Oct/12 ]

The whole timeline occurs on our dev boxes, so running mongod and the driver on the same box (we use Visual Studio 2010). I haven't tried replicating the issue using mongod on a remote machine since we decided to roll back the driver rather than risk having it affect our live builds. If you want me to try this, I can do so tomorrow.

Comment by Craig Wilson [ 29/Oct/12 ]

I'm a little confused. I'd like to get this timeline down:

1) Working with .NET driver version 1.3.*
2) Upgraded to .NET driver version 1.6.*
3) Updated to Java 6
4) Not working with .NET driver version 1.6.*
5) Working with .NET driver version 1.3.*

Is it the boxes running mongod that you updated Java 6 to, or the boxes running the .NET driver?

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