Bug 32905 - System.IO.IOException : Write fault on path ... during ProcessTest.DisposeWithDisposedStreams
Summary: System.IO.IOException : Write fault on path ... during ProcessTest.DisposeWit...
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: master
Hardware: All All
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2015-08-10 07:58 UTC by Alexander Köplinger
Modified: 2015-08-19 08:14 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Alexander Köplinger 2015-08-10 07:58:08 UTC
Run the following in mono/mcs/class/System:

> while [ $? -eq 0 ]; do make check TESTNAME=System.Diagnostics.ProcessTest.DisposeWithDisposedStreams; done

After a few iterations, it'll fail with:

> Test Case Failures:
> 1) MonoTests.System.Diagnostics.ProcessTest.DisposeWithDisposedStreams : System.IO.IOException : Write fault on path /home/alexander/dev/mono/mcs/class/System/[Unknown]
> at System.IO.FileStream.WriteInternal (System.Byte[] src, Int32 offset, Int32 count) [0x00097] in /home/alexander/dev/mono/mcs/class/corlib/System.IO/FileStream.cs:652
> at System.IO.FileStream.Write (System.Byte[] array, Int32 offset, Int32 count) [0x000a5] in /home/alexander/dev/mono/mcs/class/corlib/System.IO/FileStream.cs:628
> at System.IO.StreamWriter.Flush (Boolean flushStream, Boolean flushEncoder) [0x00055] in /home/alexander/dev/mono/external/referencesource/mscorlib/system/io/streamwriter.cs:323
> at System.IO.StreamWriter.set_AutoFlush (Boolean value) [0x00013] in /home/alexander/dev/mono/external/referencesource/mscorlib/system/io/streamwriter.cs:347
> at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00406] in /home/alexander/dev/mono/mcs/class/System/System.Diagnostics/Process.cs:1139
> at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x0008b] in /home/alexander/dev/mono/mcs/class/System/System.Diagnostics/Process.cs:1190
> at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x0001e] in /home/alexander/dev/mono/mcs/class/System/System.Diagnostics/Process.cs:1210
> at MonoTests.System.Diagnostics.ProcessTest.DisposeWithDisposedStreams () [0x0001c] in /home/alexander/dev/mono/mcs/class/System/Test/System.Diagnostics/ProcessTest.cs:937
> at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
> at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /home/alexander/dev/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:295

I don't think it's a problem with the test itself, as it basically just does Process.Start at that point, so I think it's a bug somewhere in FileStream. Maybe related to the recent move to SafeFileHandle?

Note: I can't seem to reproduce this outside of the testsuite (i.e. by copying the code into a console app).

CCing Marek as he added the test, maybe he has some insights?
Comment 1 Marek Safar 2015-08-19 08:14:04 UTC
Fixed in master