Bug #34442 0 Writing to the stream failed.
Submitted: 9 Feb 2008 3:03 Modified: 15 Jul 2008 2:56
Reporter: Jared S (Silver Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:5.0.8 OS:Windows (XP)
Assigned to: CPU Architecture:Any
Tags: failed, stream, the, to, Writing

[9 Feb 2008 3:03] Jared S
Description:
My software is reporting MySQL\NET error every 6000 NonQuery or 1 error per month.  I know it is something to do with repeatative calls to an update SP.  Any help would be appreciated.  Will ultimatley look at installing NET 5.1 by year 2010 or setting up test environment for further analsys.

How to repeat:
CALL UpdateTracker(498195, 366, 189, 366, 11.0000, null, null)

RESULT 0 Writing to the stream failed.
[11 Feb 2008 1:16] Jared S
Have setup 2 test environments:

    a. local machine (10K NonQuery hits)
    b. accross LAN   (20K NonQuery hits)

I am reasonably satisfied that the core fault is a stick of memory.
[11 Feb 2008 3:57] Jared S
[NamePipeStream.CS] Line 163\174

result = NativeMethods.WriteFile((IntPtr)pipeHandle, buffer, (uint)count, out bytesWritten, IntPtr.Zero);

Are you able to ask Reggie what would cause NativeMethods.WriteFile not to return a result?
[11 Feb 2008 4:00] Jared S
I know my clients heavily implement anti-virus, but I thought a Kernerl32 like WriteFile call would suspend code until action is executed.
[11 Feb 2008 22:00] Jared S
Overnight tests come up with nothing so "NativeMethods.WriteFile" has to be subject to some type of faulty hardware. HD, NIC, RAM.
[12 Feb 2008 5:55] Tonci Grgin
Hi Jared and thanks for your report. I am sure you know I can't set up environment for this based on your description of problem but I think you're right about HW... Probably some write gets blocked by AV SW or stuffed cache controller causing the error. This will need much more investigation from your side.
[12 Feb 2008 6:58] Jared S
Bug closed since kernell32 API failure.  Will post the cause of the problem here in next few months.
[12 Feb 2008 7:52] Tonci Grgin
Thanks Jared.
[6 Mar 2008 8:21] Jared S
The hardware causing this problem is DLINK DSL-504T.  I have change the server IP to an actual machine name..although I think the status of their ISP is interferring with general network activity.
[6 Mar 2008 8:29] Tonci Grgin
Jared, now that you mentioned it, I too have problems with DLink network HW... Didn't pay much attention to it though but now I will. Thanks for following up.
[15 May 2008 6:31] Jared S
Problem still evident since upgrading to 5.1.5 connector, now upgrading to 5.2.2 connector and have HW on backorder.

Seems to happen after long period of no activity, i.e. If my software is idle for half hour or so.
[15 Jul 2008 2:56] Jared S
C# test case >> http://bugs.mysql.com/bug.php?id=38119