Bug #60686 open method in mysql connector 6.3.4 cause windows crash
Submitted: 29 Mar 2011 10:15 Modified: 12 May 2011 4:21
Reporter: NICKY SUWANDI Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:6.3.4 OS:Windows (w2k3,w2k8,win7)
Assigned to: Bogdan Degtyariov CPU Architecture:Any
Tags: open method in mysql connector 6.3.4 cause windows crash

[29 Mar 2011 10:15] NICKY SUWANDI
Description:
I haved develop program using vb.net (vs 2008) using mysql connector 6.3.4.

I haved problem with OPEN method in mysqlconnector. This only happen when i open in 4 or 5 time, i had close each time i open it but error still happen.

When i open my connection, this open method cause fault in module: mswsock.dll and program will stop responding (program not responding in os w2k8, but in os w2k3 the OS will error and must restart it before we can use it again ).

I had try mysql connector from version 5 to 6 (excep 6.3.6, because error appear when i want to install this connector).

How to fix this problem?

Thanks

Nicky

How to repeat:
just using open method in serveral time and quickly (1 second may open  2-3 connection).
[30 Mar 2011 10:09] Bogdan Degtyariov
Hi Nicky,

This is a very bizarre problem: under no circumstances the Connector/NET driver was able to break the OS stability before. I would call it rather OS or Framework setup problem because Connector/NET is not operating on the OS kernel level. In addition, MySQL Connector/NET does not contain native CPU instructions, only managed code, which is executed by Framework libraries in a similar fashion as Java pseudo-code is executed by a Java Machine.

We have done lots of tests including stress testing when many connections are open in a short period of time. Would you mind sending us a short test case, so we could try to repeat the problem?

Also, Connector/NET 6.3.6 installs without problems on Win2k3, Win2k8 and Win7. Please note: before installing 6.3.6 you have to remove all previous installs of older Connector/NET versions and make sure they were removed correctly (not by just removing the directory on the disk or something similar).
[31 Mar 2011 4:10] NICKY SUWANDI
This how my program work until error appear when using method OPEN.

1. when program running, i start vb.net thread, and a timer (100 ms it will trigger).
2. when timer is trigger there are chek user validation,rights,duplicate record, and others (each check proses using independen procedure or function in vb and must read mysql data/ there are open and close connection).
3. this program work fine about 3-4 hour, after that there problem appear (make windows crash).
4. i had trace this problem, and i got the problem appear when calling method open. I have using catch method to catch the error, but it useles, didn't catch any error, program crash.

I hope you can help to solve this problem

And i had try to install mysql connector 6.3.6 in vs 2008, each time i install,installer will rollback. i had reinstall new vs2008 and remove old connector.

Thanks

Nicky
[31 Mar 2011 5:09] Bogdan Degtyariov
Nicky,

Thanks for the feedback.
Unfortunately, your explanation does not help to understand the nature of the problem. Many other programs do similar things and they do not crash.

Also, saying that NET program crashed OS is basically the same as to say that this message can crash OS when you read it in your email client. If such thing happens it is not right to blame the text I sent. My text does not contain any processor instructions as well as Connector/NET driver, which is portable to other platforms that are not compatible with x86.

Though, the NET application might have memory and system resource leaks that could indirectly cause side effects that affect OS. Please check if the memory consumption is growing with time.

In addition, I would suggest you to check the hardware (especially RAM and HDD) for errors and make sure that CPU is not overheating after hours of intensive work. Windows 7 has startup repair options for checking memory and hard disks.

Scanning computer for viruses is a good thing to do in such situations.
[31 Mar 2011 6:31] NICKY SUWANDI
Thanks for you suggestion.

Before i send bugs report, i had check several this in 2 month:
1. check my hardware (i had test this problem to 5 cpu, from prosessor core 2 duo to xeon, and RAM in 4 G), i think no problem in hardware.
2. chek my server resouce, i had monitoring, this program just using max 20% of server resource, so i think no problem with this program.
3. check my source code,redesign my code, this problem still happen.

This first time 1 got this problem (i had develop using mysql connector in 3 years) and sorry if my example don't help you to trace this problem.
I just request if you can do it, any error in connector there are always have a exceptions catch, so my program and windows didn't crash.

Thanks

Nicky
[11 May 2011 13:04] Bogdan Degtyariov
Hi Nicky,

Can you send me a VB or C# test case, which repeats the problem?
It would be better to have it as a small module rather than a big project.
Otherwise I have no other choice but to set the "Can't repeat" status.
Thanks.
[12 May 2011 2:38] NICKY SUWANDI
Thanks for you concern Bogdan Degtyariov

I had success migrate to Mysql Connector 6.3.6 and the problem is solved.

Thanks
[12 May 2011 4:21] Bogdan Degtyariov
Nicky,

Thank you for the update.
Closing the report.