Bug 315513 (MONO61644) - Mixed up state using shared resources in Mono
Summary: Mixed up state using shared resources in Mono
Status: RESOLVED FIXED
Alias: MONO61644
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Major
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: regression_test_added
Depends on:
Blocks:
 
Reported: 2004-07-16 00:15 UTC by Brady Anderson
Modified: 2010-02-23 17:11 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Test program to reproduce the problem (5.57 KB, application/octet-stream)
2004-07-16 00:16 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:47:11 UTC


---- Reported by banderso@novell.com 2004-07-15 17:15:23 MST ----

Please fill in this template when reporting a bug, unless you know what you
are doing.
Description of Problem:
The Mono runtime is not properly storing and retrieving state for shared
resources where their state is kept in the scratch files in .wapi.  The
iFolder team is having problems opening reading and closing files with the
FileShare parameter in a File.Open call set to "None".  Multiple processes
continually repeat this pattern and eventually every call to open will
return a Sharing Violation exception even when nobody has the file open. 
We can easily reproduce this problem by having n number of processes repeat
the pattern described above and then start another process that does
nothing more than new up a shared Mutex (new Mutex(false, "shared-name"))
acquire the mutex and then block on a Console.ReadLine forever.


Steps to reproduce the problem:
1. We have included a test program that will reproduce the problem.
2. Run two instances of the test program without any input arguments.
3. Run another instance of the test program and pass in a "M" as the 
only argument.

Actual Results:
Eventually the first two instances will seem like they're deadlocked but in
fact they are just getting sharing exception every time they try and open
the file


Expected Results:
The first two instances should run forever with the desired pattern of
opening, reading and closing on every iteration.


How often does this happen? 
usually within 10 minutes of starting the three instances of the test program.


Additional Information:



---- Additional Comments From banderso@novell.com 2004-07-15 17:16:05 MST ----

Created an attachment (id=166474)
Test program to reproduce the problem




---- Additional Comments From duncan@ximian.com 2004-07-15 17:22:43 MST ----

The attachment above is a zip file of the VS solution.



---- Additional Comments From miguel@ximian.com 2005-06-30 12:53:34 MST ----

Brady, you forgot to attach the program.

You only attached the solution file. 

Setting to NEEDINFO.

Imported an attachment (id=166474)

Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>Novell Linux Desktop Beta 1</cf_op_sys_details>
Unknown operating system unknown. Setting to default OS "Other".

Comment 2 Brady Anderson 2010-02-23 17:11:09 UTC
long ago in a different time and place ....