Bug 40375 - Dozens of threads stuck trying to update the 'recent files' file
Summary: Dozens of threads stuck trying to update the 'recent files' file
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Shell ()
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: (C8)
Assignee: Marius Ungureanu
URL:
Depends on:
Blocks:
 
Reported: 2016-04-14 02:19 UTC by Alan McGovern
Modified: 2016-07-13 13:40 UTC (History)
4 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 Developer Community or GitHub 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:
VERIFIED FIXED

Description Alan McGovern 2016-04-14 02:19:44 UTC
Code: https://github.com/mono/monodevelop/blame/master/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/RecentFileStorage.cs#L268-L289

Image of lots of threads: http://screencast.com/t/Qa5KhhJruhG

If i git clean my repository, XS then spins up a thread for every single file which all contend on the 'recent files' file and loop until they can write a new one out. There's gotta be a better way than spinning up 100 threads :p

Stacktrace of the issue:

System.IO.FileStream..ctor(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, bool anonymous, System.IO.FileOptions options) in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/FileStream.cs:257
System.IO.FileStream..ctor(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/FileStream.cs:97
System.IO.File.Open(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/File.cs:336
MonoDevelop.Ide.Desktop.RecentFileStorage.AcquireFileExclusive(string filePath) in /Users/alan/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/RecentFileStorage.cs:278
MonoDevelop.Ide.Desktop.RecentFileStorage.ModifyStore(System.Func<System.Collections.Generic.List<MonoDevelop.Ide.Desktop.RecentItem>,bool> modify) in /Users/alan/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/RecentFileStorage.cs:214
MonoDevelop.Ide.Desktop.RecentFileStorage.RemoveItem(string uri) in /Users/alan/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/RecentFileStorage.cs:111
MonoDevelop.Ide.Desktop.FdoRecentFiles.NotifyFileRemoved.AnonymousMethod__0(object _) in /Users/alan/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/RecentOpen.cs:136
Comment 2 iain 2016-04-24 20:12:02 UTC
Could this be related to https://bugzilla.xamarin.com/show_bug.cgi?id=39816 ?
Comment 3 xamarin-release-manager 2016-05-10 10:23:49 UTC
Fixed in version 6.1.0.792 (master)

Author: therzok
Commit: d3ded856c30d90550a8493ce341b7bf7b66a1c58 (mono/monodevelop)
Comment 6 Alan McGovern 2016-07-13 13:40:03 UTC
There's no easy way to repro this outside of a development environment in a way that verifies the issue has been fixed