For some reason, my C# application is being terminated by svchost.exe and I'm trying to understand why. It was terminating the application silently until I turned on Silent Process Exit logging using Gflags.exe from the Windows Debugging Tools. It happens infrequently on machines that I can't running debugging tools on (customer pcs).
The event doesn't really provide me with much info to go on. The termination code is 805306369=0x30000001, but I can't seem to find anything useful online that would tell me how to interpret that number.
I was hoping that the Silent Process Exit log would shed some light on this, but now I just have more questions.
Any advice would be appreciated. Thanks for your help in advance!
Here is the event in question:
Log Name: Application
Source: Microsoft-Windows-ProcessExitMonitor
Date: 06/05/2013 04:12:17 PM
Event ID: 3001
Task Category: None
Level: Information
Keywords: Classic
User: SYSTEM
Computer: PC
Description:
The process 'C:\Users\Administrator\AppData\Local\MyApp.exe' was terminated by the process 'C:\Windows\System32\svchost.exe' with termination code -805306369. The creation time for the exiting process was 0x01ce61ad4e81c70c.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-ProcessExitMonitor" Guid="{FD771D53-8492-4057-8E35-8C02813AF49B}" EventSourceName="Process Exit Monitor" />
<EventID Qualifiers="16384">3001</EventID>
<Version>0</Version>
<Level>4</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2013-06-05T20:12:17.000000000Z" />
<EventRecordID>2350</EventRecordID>
<Correlation />
<Execution ProcessID="0" ThreadID="0" />
<Channel>Application</Channel>
<Computer>PC</Computer>
<Security UserID="xxxxx" />
</System>
<EventData Name="EVENT_PROCESSTERMINATION_CROSSPROCESS">
<Data Name="param1">C:\Users\Administrator\AppData\Local\MyApp.exe</Data>
<Data Name="param2">C:\Windows\System32\svchost.exe</Data>
<Data Name="param3">-805306369</Data>
<Data Name="param4">01ce61ad4e81c70c</Data>
</EventData>
</Event>
Related
On my developer machine, amongst my 10 websites and their respective application pools, three of them are very frequently getting setted to startMode = Always running.
I have to reset them to OnDemand regularly and I cannot find the root cause of this.
Apps are coded in C# using .Net5 and hosted on IIS 10
Below is an exemple log from the Event Logs showing the change
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-IIS-Configuration" Guid="{dc0b8e51-4863-407a-bc3c-1b479b2978ac}" />
<EventID>29</EventID>
<Version>0</Version>
<Level>5</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x4000000000000000</Keywords>
<TimeCreated SystemTime="2022-06-20T15:25:46.2192842Z" />
<EventRecordID>5</EventRecordID>
<Correlation />
<Execution ProcessID="10120" ThreadID="10800" />
<Channel>Microsoft-IIS-Configuration/Operational</Channel>
<Computer>LAP-PLS</Computer>
<Security UserID="S-1-5-21-2179824267-3666241482-379869353-1001" />
</System>
<EventData>
<Data Name="PhysicalPath">\\?\C:\WINDOWS\system32\inetsrv\config\applicationHost.config</Data>
<Data Name="ConfigPath">MACHINE/WEBROOT/APPHOST</Data>
<Data Name="EffectiveLocationPath" />
<Data Name="Configuration">/system.applicationHost/applicationPools/add[#name="XXXX"]/#startMode</Data>
<Data Name="EditOperationType">3</Data>
<Data Name="OldValue">OnDemand</Data>
<Data Name="NewValue">AlwaysRunning</Data>
</EventData>
</Event>
This is driving me crazy and help would me much appreciated
Thanks,
Im in trouble.
I have made a windowsservice that connect to differenct webservices.
In this process data is collected and saved in our MSSQL database.
Now when my service has been running for about 8-10 hours, then it suddently dumps due to System.OutOfMemoryException Stack.
How am I able/supposed to analyse what goes wrong?
I hope that one or more of you clever guys, can help me - because Im stuck with a unhappy boss :-( .
If you think - or know how - that I can deliver more relevant information, then please let me know.
Dump from eventviewer below:
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2016-06-09T14:52:16.000000000Z" />
<EventRecordID>1941389</EventRecordID>
<Channel>Application</Channel>
<Computer>XYZ1234.intern.xyz.dk</Computer>
<Security />
</System>
- <EventData>
<Data>Program: windowsservice.exe Framework-version: v4.0.30319 Description: This proces was terminated due to an unhandled exception. Exceptioninformation: System.OutOfMemoryException Stak: ved System.Threading.ThreadPool.QueueUserWorkItemHelper(System.Threading.WaitCallback, System.Object, System.Threading.StackCrawlMark ByRef, Boolean) ved System.Threading.ThreadPool.UnsafeQueueUserWorkItem(System.Threading.WaitCallback, System.Object) ved System.Threading.TimerQueue.QueueTimerCompletion(System.Threading.TimerQueueTimer) ved System.Threading.TimerQueue.FireNextTimers() ved System.Threading.TimerQueue.AppDomainTimerCallback()</Data>
</EventData>
</Event>
Thanks in advance.
I am accessing a third party Web based API Travelport. It was working fine on pre-production credentials and URL until we decided to go to production. First i had this charset=ISO-8859-1 issue which is solved by the help of Connecting to a PHP Web service with WCF in C# But now i am getting this exception
Server returned an invalid SOAP Fault. Please see InnerException for more details.
- Start element 'faultcode' from namespace '' expected. Found element 'SOAP-ENV:faultcode' from namespace 'http://schemas.xmlsoap.org/soap/envelope/'. Line 1, position 135.
This is the XML in my web_messages.svclog
<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
<System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
<EventID>0</EventID>
<Type>3</Type>
<SubType Name="Information">0</SubType>
<Level>8</Level>
<TimeCreated SystemTime="2015-07-06T07:43:46.8130015Z" />
<Source Name="System.ServiceModel.MessageLogging" />
<Correlation ActivityID="{992e2e7a-6cd7-475c-8b1f-684b90329a80}" />
<Execution ProcessName="iisexpress" ProcessID="5368" ThreadID="24" />
<Channel />
<Computer>PRODUCTION-2</Computer>
</System>
<ApplicationData>
<TraceData>
<DataItem>
<MessageLogTraceRecord Time="2015-07-06T11:43:46.7920015+04:00" Source="TransportReceive" Type="System.ServiceModel.Channels.StreamedMessage" xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
<HttpResponse>
<StatusCode>InternalServerError</StatusCode>
<StatusDescription>Internal Server Error</StatusDescription>
<WebHeaders>
<Connection>close</Connection>
<Content-Length>554</Content-Length>
<Content-Type>text/xml;charset=ISO-8859-1</Content-Type>
<Date>Mon, 06 Jul 2015 07:46:08 GMT</Date>
<Server>Apache-Coyote/1.1</Server>
</WebHeaders>
</HttpResponse>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header></SOAP-ENV:Header>
<SOAP-ENV:Body>... stream ...</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</MessageLogTraceRecord>
</DataItem>
</TraceData>
</ApplicationData>
I got this guy having the same problem but i am unable to apply this solution, I am new to WCF Please help me solve this issue
Update
After utilizing IClientMessageInspector and implementing it in custom class i am able to get this SOAP details
<SOAP-ENV:Fault xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\">
<SOAP-ENV:faultcode>500</SOAP-ENV:faultcode>
<SOAP-ENV:faultstring>EntGWConnectServlet:29d64cb14e628c682c7b50 - Internal Error: nullnull</SOAP-ENV:faultstring>
<SOAP-ENV:faultactor></SOAP-ENV:faultactor>
<SOAP-ENV:detail>EntGWConnectServlet:29d64cb14e628c682c7b50 - Internal Error: nullnull</SOAP-ENV:detail>
</SOAP-ENV:Fault>
Still not able to get the exact error
As i mentioned above, after applying the solution i am still not getting the proper error so that i can rectify it.
I am having a lot of difficulty getting trace logs in an Azure WorkerRole written to local development storage (with the ultimate goal being Azure storage once deployed). I have googled for days and keep finding plenty of examples like this http://forums.asp.net/t/2041817.aspx?Azure+Getting+Trace+Data+to+Azure+Storage. Unfortunately, even though that discussion is as recent as March of 2015, it still references a solution that is apparently not supported. The code line
DiagnosticMonitorConfiguration diagnosticConfiguration = DiagnosticMonitor.GetDefaultInitialConfiguration();
uses the DiagnosticMonitor class which is apparently now deprecated. I am either not googling the correct things, or there is a startling lack of information on how to configure trace logs in the "newest" supportable fashion. I can find plenty of information on the old "deprecated" way.
Here is what I have so far. The app.config for my worker role has this section defined:
<system.diagnostics>
<trace>
<listeners>
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics">
<filter type="" />
</add>
</listeners>
</trace>
</system.diagnostics>
In fact, that was automatically added by the template that created the WorkerRole. I didn't manually do anything with that section.
The WorkerRole section in ServiceConfiguration.csdef looks like this:
<WorkerRole name="Processor" vmsize="Small">
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" />
</ConfigurationSettings>
</WorkerRole>
And the related Role section in ServiceConfiguration.Local.cscfg looks like this:
<Role name="Processor">
<Instances count="1" />
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
</ConfigurationSettings>
</Role>
Then I have a Trace statement in one of the classes in my WorkerRole project that looks like this:
Trace.TraceInformation("Handling event");
The diagnostics.wadcfgx associated with the WorkerRole in the cloud project looks like this:
<?xml version="1.0" encoding="utf-8"?>
<DiagnosticsConfiguration xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
<PublicConfig xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
<WadCfg>
<DiagnosticMonitorConfiguration overallQuotaInMB="4096">
<DiagnosticInfrastructureLogs scheduledTransferLogLevelFilter="Verbose" />
<Directories scheduledTransferPeriod="PT1M">
<IISLogs containerName="wad-iis-logfiles" />
<FailedRequestLogs containerName="wad-failedrequestlogs" />
</Directories>
<PerformanceCounters scheduledTransferPeriod="PT1M">
<PerformanceCounterConfiguration counterSpecifier="\Memory\Available MBytes" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\ISAPI Extension Requests/sec" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\Bytes Total/Sec" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET Applications(__Total__)\Requests/Sec" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET Applications(__Total__)\Errors Total/Sec" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET\Requests Queued" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET\Requests Rejected" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\Processor(_Total)\% Processor Time" sampleRate="PT3M" />
</PerformanceCounters>
<WindowsEventLog scheduledTransferPeriod="PT1M">
<DataSource name="Application!*" />
</WindowsEventLog>
<CrashDumps dumpType="Full">
<CrashDumpConfiguration processName="WaAppAgent.exe" />
<CrashDumpConfiguration processName="WaIISHost.exe" />
<CrashDumpConfiguration processName="WindowsAzureGuestAgent.exe" />
<CrashDumpConfiguration processName="WaWorkerHost.exe" />
<CrashDumpConfiguration processName="DiagnosticsAgent.exe" />
<CrashDumpConfiguration processName="w3wp.exe" />
</CrashDumps>
<Logs scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Verbose" />
</DiagnosticMonitorConfiguration>
</WadCfg>
<StorageAccount>teststorage</StorageAccount>
</PublicConfig>
<PrivateConfig xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
<StorageAccount name="teststorage" endpoint="https://core.windows.net/" />
</PrivateConfig>
<IsEnabled>true</IsEnabled>
</DiagnosticsConfiguration>
Azure storage and compute emulator are successfully started when I run the application in Visual Studio. With all of that, I would expect to go to Server Explorer in Visual Studio, expand the Azure node all the way down to Storage. Go to the (Development) node and see that there is a table under the Tables node containing my trace logs, but there is nothing there.
Clearly I am doing something wrong and have yet to find documentation clear enough, either blog or Microsoft, that explains how to get this working. So here I am asking what would seem to be something relatively simple.
You're using SDK Version 2.5/2.5.1 and it does not support diagnostics in emulator. Please see this link for breaking changes: https://msdn.microsoft.com/en-us/library/azure/dn873976.aspx#BKMK_breaking. From this link:
Diagnostics logs are not collected in the Azure compute emulator – For
projects that target the Azure SDK version 2.5, the Azure compute
emulator no longer supports the collection of diagnostics logs,
including performance counters, infrastructure logs, IIS logs, and
event logs. In addition, logs are no longer stored in Azure storage or
development storage. You can continue to view application logs in the
Visual Studio Output window or the compute emulator. This only affects
projects that target Azure SDK version 2.5; projects that continue to
target Azure SDK 2.4 are not affected.
So, as of today your options are:
Target your project to use SDK Version 2.4.
Do your testing in cloud only.
Wait for next SDK version hoping that this issue will be fixed there.
I am working on a website project (converted to Web Role) to use In-Role Windows Azure Caching. Everything is working flawlessly, but the moment I enable caching, the application crashes with apparent no useful message in either IIS logs or Event Viewer. All I get is -
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 21/09/2013 23:59:39
Event time (UTC): 21/09/2013 22:59:39
Event ID: 440c14c6c5f848b683cf33b2a553b42c
Event sequence: 3
Event occurrence: 1
Event detail code: 0
Exception information:
Exception type: SocketException
Exception message: No such host is known
at Microsoft.ApplicationServer.Caching.AsyncResultNoResult.EndInvoke()
at Microsoft.ApplicationServer.Caching.AsyncResult`1.EndInvoke()
at Microsoft.ApplicationServer.Caching.SocketConnectionFactory.EndConnect(IAsyncResult asyncResult)
at Microsoft.ApplicationServer.Caching.TcpClientChannelFactory.TcpConnectionCallback(IAsyncResult result)
I already have Windows Azure SDK 2.1 and also Windows Azure Caching 2.1 versions. I tried solution suggested here to no avail -
http://blogs.msdn.com/b/cie/archive/2013/08/08/windows-azure-caching-2-1-0-0-no-such-host-is-known.aspx
I have got 2 instances of web role with following settings in service configuration -
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel" value="4" />
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.NamedCaches" value="{"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}" />
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel" value="4" />
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage" value="30" />
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString" value="UseDevelopmentStorage=true" />
and following entries in web.config of web role
<sessionState mode="Custom" customProvider="defaultProvider" cookieless="UseCookies">
<providers>
<add cacheName="default" name="defaultProvider" dataCacheClientName="default" applicationName="TravelEagle" type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache" />
</providers>
</sessionState>
<dataCacheClients>
<dataCacheClient name="default">
<autoDiscover isEnabled="true" identifier="TravelEagle" />
</dataCacheClient>
</dataCacheClients>
<cacheDiagnostics>
<crashDump dumpLevel="Off" dumpStorageQuotaInMB="100" />
</cacheDiagnostics>
If I try to run the application with Azure Emulator, I get another error:
A process serving application pool '5e45b35f-ccd3-485e-8f12-b70178ffd1a3' terminated unexpectedly. The process id was '11096'. The process exit code was '0xfffffffe'.
and
{0} failed to refresh lookup table, exception: {Microsoft.Fabric.Common.OperationCompletedException: Operation completed with an exception ---> Microsoft.Fabric.Federation.RoutingException: The target node explicitly aborted the operation
--- End of inner exception stack trace ---
at Microsoft.Fabric.Common.OperationContext.End()
at Microsoft.Fabric.Federation.FederationSite.EndRoutedSendReceive(IAsyncResult ar)
at Microsoft.Fabric.Data.ReliableServiceManager.EndRefreshLookupTable(IAsyncResult ar)}
Any help will be greatly appreciated.
I had to supply my storage account connection string instead of usedevelopmentstorage.