Topshelf/Topshelf — Issue #79: race condition error
Author: drusellers
Created: 2011-12-08 22:24:47+00:00
State: open

The sample I sent earlier I see often when deleting a service sub-directory and several minutes later adding a service sub-directory with the same name.

This group of errors here I'll see when replacing binaries in an existing service sub-directory. Hope i'm not spamming your inbox!

INFO 2011-11-02 09:45:24 - [Topshelf] Starting
INFO 2011-11-02 09:45:24 - [Topshelf] Before starting services complete
INFO 2011-11-02 09:45:27 - [TopshelfDashboard] Create complete
INFO 2011-11-02 09:45:27 - [Topshelf.Host] Create complete
INFO 2011-11-02 09:45:27 - (TopshelfDashboard) Created
INFO 2011-11-02 09:45:27 - (Topshelf.Host) Created
INFO 2011-11-02 09:45:27 - [Topshelf.Host] Start complete
INFO 2011-11-02 09:45:27 - (Topshelf.Host) Starting
INFO 2011-11-02 09:45:27 - (TopshelfDashboard) Starting
INFO 2011-11-02 09:45:27 - [Topshelf] Create Shelf Service: TopShelf.DirectoryMonitor (DirectoryMonitorBootstrapper)
INFO 2011-11-02 09:45:27 - Loading dashboard at Uri: http://localhost:8483/Topshelf/Topshelf.Host
INFO 2011-11-02 09:45:29 - (Topshelf.Host) Running
INFO 2011-11-02 09:45:30 - [TopshelfDashboard] Start complete
INFO 2011-11-02 09:45:30 - (TopshelfDashboard) Running
INFO 2011-11-02 09:45:31 - [Topshelf] After starting services complete
INFO 2011-11-02 09:45:45 - [TopShelf.DirectoryMonitor] Created Host Channel: net.pipe://localhost/topshelf_2056/controller/TopShelf.DirectoryMonitor(2056/TopShelf.DirectoryMonitor)
INFO 2011-11-02 09:45:48 - (TopShelf.DirectoryMonitor) ShelfCreated
INFO 2011-11-02 09:45:51 - (TopShelf.DirectoryMonitor) Created
INFO 2011-11-02 09:45:51 - (TopShelf.DirectoryMonitor) Running
INFO 2011-11-02 09:46:10 - (README.txt) FolderRemoved
INFO 2011-11-02 09:46:10 - [Topshelf] Folder Removed: README.txt
INFO 2011-11-02 09:46:10 - (SystemJobs) FolderChanged
INFO 2011-11-02 09:46:10 - [Topshelf] Folder Changed: SystemJobs
INFO 2011-11-02 09:46:10 - [Topshelf] Create Shelf Service: SystemJobs
INFO 2011-11-02 09:46:12 - [SystemJobs] Created Host Channel: net.pipe://localhost/topshelf_2056/controller/SystemJobs(2056/SystemJobs)
INFO 2011-11-02 09:46:13 - (SystemJobs) ShelfCreated
INFO 2011-11-02 09:46:17 - (SystemJobs) Created
INFO 2011-11-02 09:46:17 - (SystemJobs) Running
INFO 2011-11-02 10:40:39 - (SystemJobs) FolderChanged
INFO 2011-11-02 10:40:39 - [Topshelf] Folder Changed: SystemJobs
INFO 2011-11-02 10:40:39 - (SystemJobs) Stopped
INFO 2011-11-02 10:40:39 - (SystemJobs) Unloading
INFO 2011-11-02 10:40:39 - (SystemJobs) Unloaded
INFO 2011-11-02 10:40:39 - (SystemJobs) Unloaded
INFO 2011-11-02 10:40:39 - [SystemJobs] Created Host Channel: net.pipe://localhost/topshelf_2056/controller/SystemJobs(2056/SystemJobs)
INFO 2011-11-02 10:40:40 - (SystemJobs) ShelfCreated
INFO 2011-11-02 10:40:43 - (SystemJobs) Created
INFO 2011-11-02 10:40:43 - (SystemJobs) Running
INFO 2011-11-02 10:44:48 - (SystemJobs) FolderChanged
INFO 2011-11-02 10:44:48 - [Topshelf] Folder Changed: SystemJobs
INFO 2011-11-02 10:44:48 - (SystemJobs) Stopped
INFO 2011-11-02 10:44:48 - (SystemJobs) Unloading
INFO 2011-11-02 10:44:48 - (SystemJobs) Unloaded
INFO 2011-11-02 10:44:48 - (SystemJobs) Unloaded
INFO 2011-11-02 10:44:48 - [SystemJobs] Created Host Channel: net.pipe://localhost/topshelf_2056/controller/SystemJobs(2056/SystemJobs)
INFO 2011-11-02 10:44:49 - (SystemJobs) ShelfCreated
INFO 2011-11-02 10:44:52 - (SystemJobs) Created
INFO 2011-11-02 10:44:52 - (SystemJobs) Running
INFO 2011-11-02 10:46:11 - (SystemJobs) FolderChanged
INFO 2011-11-02 10:46:11 - [Topshelf] Folder Changed: SystemJobs
INFO 2011-11-02 10:46:11 - (SystemJobs) Stopped
INFO 2011-11-02 10:46:11 - (SystemJobs) Unloading
INFO 2011-11-02 10:46:11 - (SystemJobs) Unloaded
INFO 2011-11-02 10:46:11 - (SystemJobs) Unloaded
INFO 2011-11-02 10:46:11 - [SystemJobs] Created Host Channel: net.pipe://localhost/topshelf_2056/controller/SystemJobs(2056/SystemJobs)
INFO 2011-11-02 10:46:12 - (SystemJobs) ShelfCreated
INFO 2011-11-02 10:46:15 - (SystemJobs) Created
INFO 2011-11-02 10:46:15 - (SystemJobs) Running
INFO 2011-11-02 10:46:49 - (SystemJobs) FolderChanged
INFO 2011-11-02 10:46:49 - [Topshelf] Folder Changed: SystemJobs
INFO 2011-11-02 10:46:49 - (SystemJobs) Stopped
INFO 2011-11-02 10:46:49 - (SystemJobs) Unloading
INFO 2011-11-02 10:46:49 - (SystemJobs) Unloaded
INFO 2011-11-02 10:46:49 - (SystemJobs) Unloaded
INFO 2011-11-02 10:46:49 - [SystemJobs] Created Host Channel: net.pipe://localhost/topshelf_2056/controller/SystemJobs(2056/SystemJobs)
INFO 2011-11-02 10:46:50 - (SystemJobs) ShelfCreated
INFO 2011-11-02 10:46:53 - (SystemJobs) Created
INFO 2011-11-02 10:46:53 - (SystemJobs) Running
INFO 2011-11-02 10:48:40 - (Topshelf.Host.exe) Fault
ERROR 2011-11-02 10:48:40 - Fault on Topshelf.Host.exe: Topshelf.Exceptions.TopshelfException
An unhandled exception occurred within the service: Topshelf.Host.exe
Attempted to access an unloaded AppDomain.

HelpLink:

FATAL 2011-11-02 10:48:40 - An unhandled exception occurred within the service: Topshelf.Host.exe
System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
INFO 2011-11-02 10:48:40 - [Topshelf.Host] Stop complete
INFO 2011-11-02 10:48:40 - (TopshelfDashboard) Stopping
INFO 2011-11-02 10:48:40 - (Topshelf.Host) Stopping
INFO 2011-11-02 10:48:40 - (Topshelf.Host) Stopped
INFO 2011-11-02 10:48:40 - [Topshelf.Host] Unload complete
INFO 2011-11-02 10:48:40 - (Topshelf.Host) Unloading
INFO 2011-11-02 10:48:40 - (Topshelf.Host) Unloaded
INFO 2011-11-02 10:48:40 - [Topshelf.Host] Create complete
INFO 2011-11-02 10:48:40 - (Topshelf.Host) Created
INFO 2011-11-02 10:48:40 - [Topshelf.Host] Start complete
INFO 2011-11-02 10:48:40 - (Topshelf.Host) Starting
INFO 2011-11-02 10:48:40 - [Topshelf] Create Shelf Service: TopShelf.DirectoryMonitor (DirectoryMonitorBootstrapper)
INFO 2011-11-02 10:48:40 - [TopshelfDashboard] Stop complete
INFO 2011-11-02 10:48:40 - [TopshelfDashboard] Unload complete
INFO 2011-11-02 10:48:40 - [TopshelfDashboard] Create complete
INFO 2011-11-02 10:48:40 - Loading dashboard at Uri: http://localhost:8483/Topshelf/Topshelf.Host
INFO 2011-11-02 10:48:40 - [TopshelfDashboard] Start complete
FATAL 2011-11-02 10:48:40 - An unhandled exception occurred within the service: Topshelf.Host.exe
System.InvalidOperationException: Duplicate value added for key: TopShelf.DirectoryMonitor
at Magnum.Collections.Cache`2.DefaultDuplicateValueAddedCallback(TKey key, TValue value) in d:\Home\Magnum\src\Magnum\Collections\Cache.cs:line 237
at Magnum.Collections.Cache`2.<>c__DisplayClass6.b__5(TKey update, TValue current) in d:\Home\Magnum\src\Magnum\Collections\Cache.cs:line 130
at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory) in :line 0
at Magnum.Collections.Cache`2.Add(TKey key, TValue value) in d:\Home\Magnum\src\Magnum\Collections\Cache.cs:line 133
at Topshelf.Model.ServiceCoordinator.<>c__DisplayClass14.b__13(Inbox inbox) in d:\BuildAgent-01\work\799c08e77fef999d\src\Topshelf\Model\ServiceCoordinator.cs:line 242
at Topshelf.Model.ServiceControllerFactory.<>c__DisplayClass2`1.b__1(Inbox inbox) in d:\BuildAgent-01\work\799c08e77fef999d\src\Topshelf\Model\ServiceControllerFactory.cs:line 48
at Stact.Configuration.Internal.ActorFactoryConfiguratorImpl`1.<>c__DisplayClass4.b__3(Fiber f, Scheduler s, Inbox i) in d:\Home\Stact\src\Stact\Actors\Configuration\Internal\ActorFactoryConfiguratorImpl.cs:line 44
at Stact.Internal.ActorFactoryImpl`1.CreateActorInstance(Fiber fiber, Scheduler scheduler, Inbox inbox) in d:\Home\Stact\src\Stact\Actors\Internal\ActorFactoryImpl.cs:line 79
at Stact.Internal.ActorFactoryImpl`1.GetActor(Action`1 initializer) in d:\Home\Stact\src\Stact\Actors\Internal\ActorFactoryImpl.cs:line 59
at Stact.Internal.ActorFactoryImpl`1.GetActor() in d:\Home\Stact\src\Stact\Actors\Internal\ActorFactoryImpl.cs:line 49
at Topshelf.Model.ServiceCoordinator.OnCreateShelfService(CreateShelfService message) in d:\BuildAgent-01\work\799c08e77fef999d\src\Topshelf\Model\ServiceCoordinator.cs:line 245
at Stact.ConsumerChannel`1.<>c__DisplayClass1.b__0() in d:\Home\Stact\src\Stact\Channels\ConsumerChannel.cs:line 39
at Stact.Internal.BasicOperationExecutor.Execute(IList`1 operations) in d:\Home\Stact\src\Stact\Fibers\Internal\BasicOperationExecutor.cs:line 39
at Stact.PoolFiber.Execute() in d:\Home\Stact\src\Stact\Fibers\PoolFiber.cs:line 115
at Stact.PoolFiber.b__0(Object x) in d:\Home\Stact\src\Stact\Fibers\PoolFiber.cs:line 105
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
INFO 2011-11-02 10:48:41 - [SystemJobs] Created Host Channel: net.pipe://localhost/topshelf_2056/controller/SystemJobs(2056/SystemJobs)
INFO 2011-11-02 10:48:41 - [TopShelf.DirectoryMonitor] Created Host Channel: net.pipe://localhost/topshelf_2056/controller/TopShelf.DirectoryMonitor(2056/TopShelf.DirectoryMonitor)
FATAL 2011-11-02 10:52:49 - An unhandled exception occurred within the service: Topshelf.Host.exe
System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
FATAL 2011-11-02 10:54:11 - An unhandled exception occurred within the service: Topshelf.Host.exe
System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
FATAL 2011-11-02 10:54:49 - An unhandled exception occurred within the service: Topshelf.Host.exe
System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
FATAL 2011-11-02 10:56:41 - An unhandled exception occurred within the service: Topshelf.Host.exe
System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
FATAL 2011-11-02 10:56:42 - An unhandled exception occurred within the service: Topshelf.Host.exe
System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.