[Mono-dev] Random mono apache errors

Vladimir Dimitrov vlad.dimitrov at gmail.com
Mon Aug 26 10:16:21 UTC 2013


Almost the same thing just happened again. I got this error when calling 
a web service on the apache/mono server:

System.Exception: INTERNAL configuration error: failed to get 
configuration 'system.diagnostics'
   at System.Diagnostics.DiagnosticsConfiguration.get_Settings () 
[0x00000] in <filename unknown>:0
   at System.Diagnostics.TraceImpl.InitOnce () [0x00000] in <filename 
unknown>:0
   at System.Diagnostics.TraceImpl.get_Listeners () [0x00000] in 
<filename unknown>:0
   at System.Diagnostics.TraceImpl.get_ListenersSyncRoot () [0x00000] in 
<filename unknown>:0
   at System.Diagnostics.TraceImpl.WriteLine (System.String message) 
[0x00000] in <filename unknown>:0
   at System.Diagnostics.Debug.WriteLine (System.String format, 
System.Object[] args) [0x00000] in <filename unknown>:0
   at Warehouse.Data.Str.WriteDebugMessage (System.String message, 
System.Object[] args) [0x00000] in <filename unknown>:0
   at Warehouse.Portal.Sync.Api.SyncPoll.GetCommand (System.Byte[] 
encIV, System.Byte[] encKey, System.Byte[] encParams) [0x00000] in 
<filename unknown>:0
   at (wrapper managed-to-native) 
System.Reflection.MonoMethod:InternalInvoke 
(System.Reflection.MonoMethod,object,object[],System.Exception&)
   at System.Reflection.MonoMethod.Invoke (System.Object obj, 
BindingFlags invokeAttr, System.Reflection.Binder binder, 
System.Object[] parameters, System.Globalization.CultureInfo culture) 
[0x00000] in <filename unknown>:0

after "sudo service apache2 restart" everything continued to work properly.
Something causes the configuration to become messed up in (what looks 
like) random or heavy load situations and this makes everything go south.

Unfortunately it looks like this part of mono is not in the primary (or 
maybe in no) focus for the Xamarin team so my best bet here is to:
1. Use the open source way, find and fix it myself and hope that we will 
have this change in the official mono one day.
2. Move to a Windows server with IIS which I know is not a secondary 
focus for MS.

- Vladimir

On 21.8.2013 г. 16:16 ч., Vladimir Dimitrov wrote:
> I got to this point in the sources too, but I have no idea what I can 
> do or why didn't many other people got the same problem?
>
> On 21.8.2013 г. 15:20 ч., Rafael Teixeira wrote:
>> From sources 
>> (https://github.com/mono/mono/blob/master/mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapDocumentationHandler.cs):
>>
>>     if (key == "wsdl" || key == "schema" || key == "code" || key ==
>>     "disco")
>>
>>     return;
>>     #if NET_2_0
>>     string help = WebServicesSection.Current.WsdlHelpGenerator.Href;
>>
>>     string path = Path.GetDirectoryName
>>     (ConfigurationManager.OpenMachineConfiguration().FilePath);
>>
>>     #else
>>     string help = WSConfig.Instance.WsdlHelpPage;
>>
>>     string path = Path.GetDirectoryName
>>     (WSConfig.Instance.ConfigFilePath);
>>
>>     #endif
>>     *...*
>>
>>     string physPath = Path.Combine (path, help);
>>
>>
>> So probably WebServicesSection.Current.WsdlHelpGenerator.Href is 
>> returning null or 
>> ConfigurationManager.OpenMachineConfiguration().FilePath is returning 
>> null.
>>
>> For the first case, as this is read from current configuration which 
>> can be reread from time to time as any part of the configuration 
>> chain changes it is possible that either some of those MonoTodos in 
>> https://github.com/mono/mono/blob/master/mcs/class/System.Web.Services/System.Web.Services.Configuration/WsdlHelpGeneratorElement.cs?source=cc are 
>> making things flaky:
>>
>> [MonoTODO ("probably verifies the Href property here, after 
>> deserializing?")]
>> protected override void DeserializeElement (XmlReader reader, bool 
>> serializeCollectionKey)
>>
>> {
>> base.DeserializeElement (reader, serializeCollectionKey);
>>
>> }
>> [MonoTODO]
>>
>> protected override void Reset (ConfigurationElement parentElement)
>>
>> {
>> base.Reset (parentElement);
>>
>> }
>>
>> or some locking is missing to avoid reading an incomplete current 
>> configuration instance...
>>
>> As for the second case after much navigating through sources it comes 
>> down to calling an internal call 'string get_machine_config_path ()' 
>> which I don't have time now to try to explore...
>>
>> Hope it helps,
>>
>> Rafael Teixeira
>> O..:.)oooo
>>
>>
>> On Wed, Aug 21, 2013 at 8:05 AM, Vladimir Dimitrov 
>> <vlad.dimitrov at gmail.com <mailto:vlad.dimitrov at gmail.com>> wrote:
>>
>>     Hey guys,
>>
>>     I have worked with mono for almost 7 years but I recently got
>>     involved in a project that used mono web services and apache
>>     together on Linux.
>>
>>     The problem is that as the load on the service started to rise we
>>     started getting different errors which appear in random intervals.
>>
>>     One of the errors is described here:
>>     https://bugzilla.novell.com/show_bug.cgi?id=522631 (not by me).
>>     And attempting to fix it I added some configuration that caused
>>     another error to appear once:
>>     http://img577.imageshack.us/img577/4473/44in.png
>>
>>     The only common spot between the errors seem to be the
>>     configuration. Looks like at some point it becomes invalid. This
>>     sometimes happens after the service gets restarted, but sometimes
>>     it happens while the service is running normally. A restart of
>>     apache usually fixes the problem.
>>
>>     Does anybody else encountered something similar or have an idea
>>     what can be the problem?
>>
>>     Thanks,
>>      Vladimir
>>
>>
>>     _______________________________________________
>>     Mono-devel-list mailing list
>>     Mono-devel-list at lists.ximian.com
>>     <mailto:Mono-devel-list at lists.ximian.com>
>>     http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130826/f143e02f/attachment-0001.html>


More information about the Mono-devel-list mailing list