Bugzilla – Bug 322632
[amd64-only] xsp-1.1.18 on mono-1.2 throws random exceptions when serving web services requests
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by jan.oravec@6com.sk 2006-11-14 14:36:10 MST ---- 80% of cases when I try to access web service method hosted on XSP 1.1.18 on Mono 1.2 on amd64 architecture I get this exception: System.Exception: Error reading headers. Server stack trace: at Mono.WebServer.XSPWorkerRequest.GetRequestHeaders () [0x00000] at Mono.WebServer.XSPWorkerRequest..ctor (Int32 requestId, Mono.WebServer.XSPRequestBroker requestBroker, IApplicationHost appHost, System.Net.EndPoint localEP, System.Net.EndPoint remoteEP, System.String verb, System.String path, System.String queryString, System.String protocol, System.Byte[] inputBuffer, IntPtr socket, Boolean secure) [0x00000] at Mono.WebServer.XSPApplicationHost.ProcessRequest (Int32 reqId, Int64 localEPAddr, Int32 localEPPort, Int64 remoteEPAdds, Int32 remoteEPPort, System.String verb, System.String path, System.String queryString, System.String protocol, System.Byte[] inputBuffer, System.String redirect, IntPtr socket, Mono.WebServer.SslInformations ssl) [0x00000] at <0x00000> <unknown method> at (wrapper managed-to-native) System.Runtime.Remoting.RemotingServices:InternalExecute (System.Reflection.MethodBase,object,object[],object[]&) at System.Runtime.Remoting.RemotingServices.InternalExecuteMessage (System.MarshalByRefObject target, IMethodCallMessage reqMsg) [0x00000] Exception rethrown at [0]: ---> System.Runtime.Remoting.RemotingException: Method 'Read' not found in type 'Mono.WebServer.BaseRequestBroker' Server stack trace: at System.Runtime.Remoting.Messaging.CADMethodCallMessage.GetMethod () [0x00000] at System.Runtime.Remoting.Messaging.MethodCall..ctor (System.Runtime.Remoting.Messaging.CADMethodCallMessage msg) [0x00000] at System.AppDomain.ProcessMessageInDomain (System.Byte[] arrRequest, System.Runtime.Remoting.Messaging.CADMethodCallMessage cadMsg, System.Byte[]& arrResponse, System.Runtime.Remoting.Messaging.CADMethodReturnMessage& cadMrm) [0x00000] at (wrapper remoting-invoke-with-check) System.AppDomain:ProcessMessageInDomain (byte[],System.Runtime.Remoting.Messaging.CADMethodCallMessage,byte[]&,System.Runtime.Remoting.Messaging.CADMethodReturnMessage&) at System.Runtime.Remoting.Channels.CrossAppDomainSink.ProcessMessageInDomain (System.Byte[] arrRequest, System.Runtime.Remoting.Messaging.CADMethodCallMessage cadMsg) [0x00000] Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x00000] --- End of inner exception stack trace --- at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x00000] The next 10% cases give correct output and the rest 10% just fails other way (I am not able to see how, yet). I can access 127.0.0.1:8080 with web browser without any problems (unfortunatelly, there is no web method without 'out' parameter, so I can not use test form easily, but I think this will work). The problem is when I access web methods using application written in PHP, so I believe there is a race condition somewhere. Please let me know if you need any further input which I could collect. There was some combination of XSP/Mono which worked relatively fine (some SVN around 1.1.17). Also, sometimes I get this segfault with first web method call (this bug was present in all previous versions): Listening on port: 8080 (non-secure) Listening on address: 0.0.0.0 Root directory: /tmp/test/ Hit Return to stop the server. ================================================================= Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. ================================================================= Stacktrace: at (wrapper managed-to-native) System.Reflection.Assembly.FillName (System.Reflection.Assembly,System.Reflection.AssemblyName) <0x0000b> at (wrapper managed-to-native) System.Reflection.Assembly.FillName (System.Reflection.Assembly,System.Reflection.AssemblyName) <0xffffffff> at System.Reflection.Assembly.UnprotectedGetName () <0x00046> at System.Reflection.Assembly.GetName (bool) <0x0003a> at System.Reflection.Assembly.GetName () <0x0001a> at System.Web.UI.SimpleWebHandlerParser.AddAssembly (System.Reflection.Assembly,bool) <0x00062> at System.Web.UI.SimpleWebHandlerParser.AddAssembliesInBin () <0x000fd> at System.Web.UI.SimpleWebHandlerParser..ctor (System.Web.HttpContext,string,string) <0x00369> at System.Web.UI.WebServiceParser..ctor (System.Web.HttpContext,string,string) <0x0002e> at System.Web.UI.WebServiceParser.GetCompiledType (string,System.Web.HttpContext) <0x00048> at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler (System.Web.HttpContext,string,string,string) <0x00080> Native stacktrace: /usr/bin/mono [0x5106a2] /usr/bin/mono [0x4dc9ad] /lib/libpthread.so.0 [0x2b902dc5dd00] /usr/bin/mono [0x49b366] [0x410fb326] Aborted ---- Additional Comments From jan.oravec@6com.sk 2006-11-21 19:22:17 MST ---- I have been able to test our application on x86 where it appears to work correctly (same versions of Mono and XSP). Furthermore, I tested a lot of random WebService code using MySQL.Data.dll (both 1.0.7 and 1.0.8) hosted under XSP on amd64. Almost every code resulted in random exceptions, segfaults, other errors (e.g. DNS resolver not able (exception) to resolve hostname of mysql server, when tcpdump on port 53 clearly shown that it resolved) so I believe it is related to amd64 code. When same code is runned directly and not through XSP, it works. I suspect it to be memory corruption with more application domains (which XSP creates AFAIK). ---- Additional Comments From robertj@gmx.net 2006-12-19 17:16:06 MST ---- This is most likely a configuration/installation problem. How do you invoke xsp? Using the script that gets installed to $prefix/bin/xsp? Another issue: check whether the path to your mono installation contains a symlink and try to remove it. See https://bugzilla.novell.com/show_bug.cgi?id=MONO79211. ---- Additional Comments From jan.oravec@6com.sk 2006-12-20 09:57:19 MST ---- Thanks for pointing out to the source of the problem, /usr/bin/xsp2 script: -- #!/bin/sh exec /usr/bin/mono $MONO_OPTIONS "/usr/lib/mono/2.0/xsp2.exe" "$@" -- Uses a symlink lib -> lib64 on amd64 architecture. Marking as duplicate of #79211. *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO79211 *** Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Gentoo, amd64</cf_op_sys_details> This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"