[Mono-bugs] [Bug 75016][Nor] New - Lock violation writing to file on SMB share on Mac OS X

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat May 21 02:14:19 EDT 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by brion at pobox.com.

http://bugzilla.ximian.com/show_bug.cgi?id=75016

--- shadow/75016	2005-05-21 02:14:19.000000000 -0400
+++ shadow/75016.tmp.21908	2005-05-21 02:14:19.000000000 -0400
@@ -0,0 +1,70 @@
+Bug#: 75016
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: Mac OS X 10.4.1
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: io-layer
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: brion at pobox.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Lock violation writing to file on SMB share on Mac OS X
+
+Description of Problem:
+Writing to a file on a mounted SMB share fails with a lock violation 
+exception on Mac OS X.
+
+Steps to reproduce the problem:
+1. Mount a writable SMB share from a Windows or Samba server
+2. Open a file for writing on the share (File.CreateText, File.OpenWrite 
+etc)
+3. Write to the file
+4. Flush or close the file.
+
+Actual Results:
+The file is created ok, but when trying to flush actual written data an 
+exception is thrown and the file stays empty:
+
+Unhandled Exception: System.IO.IOException: Lock violation on path 
+testfile.txt
+in <0x0013c> System.IO.FileStream:FlushBuffer ()
+in (wrapper remoting-invoke-with-check) System.IO.FileStream:FlushBuffer ()
+in <0x0002c> System.IO.FileStream:Flush ()
+in <0x00060> System.IO.StreamWriter:Flush ()
+in <0x00050> System.IO.StreamWriter:Dispose (Boolean disposing)
+in <0x00034> System.IO.StreamWriter:Close ()
+in <0x0005c> LockBug:Main (System.String[] args)
+
+
+Expected Results:
+Should write the file normally.
+
+How often does this happen? 
+Every time.
+
+Additional Information:
+I've tested shares exported both from Samba on Linux and from Windows XP 
+with the same results. What is probably the same bug prevents mcs from 
+compiling on a SMB share; the output .exe file is created with 0 byte size 
+and the it aborts:
+
+$ mcs LockBug.cs 
+
+** ERROR **: WriteFile returned 33
+
+aborting...
+Abort trap
+
+
+Comparing ktrace/kdump output from opening on a local filesystem and on a 
+SMB share, I notice that it's trying to open /proc when writing to the SMB 
+share. Mac OS X does not have a /proc filesystem, so this fails.
+
+Mono 1.1.7 and 1.0.5 both seem to fail the same way. I've only tested this 
+under Mac OS X 10.4.1 (Tiger), not on older releases.


More information about the mono-bugs mailing list