Bug 728 - Crashes During Tracing
Summary: Crashes During Tracing
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: WCF assemblies (show other bugs)
Version: 2.10.x
Hardware: PC Linux
: Normal major
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-09-10 16:26 UTC by John Hargrove
Modified: 2013-07-13 11:18 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description John Hargrove 2011-09-10 16:26:44 UTC
I am getting this exception repeatedly in 2.10.5. This code was stable in 2.10.2. I believe it is related to the new WCF tracing support added in 2.10.3. 

A nice workaround would be to turn off tracing, but I cannot for the life of me figure out how to do this. MONO_WCF_TRACE is not set, yet I still get this exception. If I use MONO_WCF_TRACE=stdout, then I get the XML trace on the console, but eventually this exception will occur and crash my application.

I do not have a repro case for this yet, but it happens -a lot-, so I'm putting these out there hoping it's something obvious. 

My version:

linux-bpyl:/etc/init.d # mono --version
Mono JIT compiler version 2.10.5 (tarball Fri Sep  9 17:01:12 EDT 2011)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          debugger softdebug
        LLVM:          yes(2.9svn-mono)
        GC:            Included Boehm (with typed GC and Parallel Mark)

My system: OpenSUSE 11.4, mono built from source using modified 2.10.2 SRPM.

The exception:

Unhandled Exception: System.InvalidOperationException: This XmlWriter does not accept StartTag at this state Error.
  at System.Xml.XmlTextWriter.WriteStartElement (System.String prefix, System.String localName, System.String namespaceUri) [0x0032e] in /usr/src/packages/BUILD/mono-2.10.5/mcs/class/System.XML/System.Xml/XmlTextWriter2.cs:692
  at System.Xml.DefaultXmlWriter.WriteStartElement (System.String prefix, System.String localName, System.String ns) [0x00000] in /usr/src/packages/BUILD/mono-2.10.5/mcs/class/System.XML/System.Xml/DefaultXmlWriter.cs:214
  at System.Xml.XmlWriter.WriteStartElement (System.String localName, System.String ns) [0x00000] in /usr/src/packages/BUILD/mono-2.10.5/mcs/class/System.XML/System.Xml/XmlWriter.cs:610
  at System.ServiceModel.Logger.TraceCore (TraceEventType eventType, Int32 id, Boolean hasRelatedActivity, Guid relatedActivity, System.Object[] data) [0x00010] in /usr/src/packages/BUILD/mono-2.10.5/mcs/class/System.ServiceModel/System.ServiceModel/Logger.cs:218
  at System.ServiceModel.Logger.LogMessage (System.ServiceModel.Diagnostics.MessageLogTraceRecord log) [0x0009f] in /usr/src/packages/BUILD/mono-2.10.5/mcs/class/System.ServiceModel/System.ServiceModel/Logger.cs:197
  at System.ServiceModel.Logger.LogMessage (MessageLogSourceKind sourceKind, System.ServiceModel.Channels.Message& msg, Int64 maxMessageSize) [0x00029] in /usr/src/packages/BUILD/mono-2.10.5/mcs/class/System.ServiceModel/System.ServiceModel/Logger.cs:168
  at System.ServiceModel.Channels.NetTcp.TcpDuplexSessionChannel.TryReceive (TimeSpan timeout, System.ServiceModel.Channels.Message& message) [0x00063] in /usr/src/packages/BUILD/mono-2.10.5/mcs/class/System.ServiceModel/System.ServiceModel.Channels.NetTcp/TcpDuplexSessionChannel.cs:178
Comment 1 Kevin.Kline 2013-07-13 11:18:29 UTC
Maybe you can use 'gdb' to points where the BUG function is and then,
you also can use it to prints the args value and the source code where
it is currently executes position.

It'll helps you that to find in the code where you had been failure.

Tips;
at frist time, you can use MonoDevelop to prints a position that what is the BUG function name, and then ,you can just the command of 'b' to make a breakpoint in gdb. when the breakpoint is hitting, then you can juse the command 'info args' and 'info locals' to show that whats inner status in currently mono runtime.

Note You need to log in before you can comment on or make changes to this bug.