Skip to content

Log "Thread failed unexpectedly" errors as warnings #94

@kenny-evitt

Description

@kenny-evitt

I just upgraded to version 1.17. I'm still having issues with my winsw service restarting after restarts triggered by (automatic) Windows Updates – see #52.

There seems to be new info being logged in the wrapper.log file. Here's the contents pertaining to the recent failed shutdown (and subsequent failure to restart automatically):

2015-04-18 03:08:31 - Stopping recp-notes
2015-04-18 03:08:31 - ProcessKill 2812
2015-04-18 03:08:32 - Thread failed unexpectedly
Message:The interface is unknown
Stacktrace:   at System.Diagnostics.EventLog.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] rawData, String currentMachineName)
   at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
   at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type)
   at winsw.WrapperService.LogEvent(String message, EventLogEntryType type)
   at winsw.WrapperService.<>c__DisplayClass4.<StartProcess>b__3()
   at winsw.WrapperService.<>c__DisplayClass1.<StartThread>b__0()
2015-04-18 03:08:32 - Shutdown exception
Message:A system shutdown is in progress. (Exception from HRESULT: 0x8007045B)
Stacktrace:   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at System.Management.ManagementScope.InitializeGuts(Object o)
   at System.Management.ManagementScope.Initialize()
   at System.Management.ManagementObjectSearcher.Initialize()
   at System.Management.ManagementObjectSearcher.Get()
   at winsw.WrapperService.StopProcessAndChildren(Int32 pid)
   at winsw.WrapperService.StopIt()
   at winsw.WrapperService.OnShutdown()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions