Re: [Mono-dev] Webapp stuck with Key duplication when adding: httpModules
After some more investigation, reading many lines of code with a collegue, we came to the conclusion that this exception is impossible :) (yet the web is stuck on it) m_ItemsContainer is an hashtable, and a private field of NameObjectCollectionBase class (new HashTable(0,StringComparer.Ordinal)). The exception tell us that there is already a key 'httpModules' in m_ItemsContainer. Reading the code the only way we go from BaseSet to BaseAdd is if FindFirstMatchedItem('httpModules'), so if (_Item)m_ItemsContainer[ 'httpModules'] is null, so if the value is null (the key exists, we got an exception to prove it :)) if i'm right, we are sure that we have ('httpModules',null) in m_ItemsContainer. Now m_ItemsContainer only modifications are: 0) m_ItemsContainer = new Hashtable (m_defCapacity, equality_comparer); 1) m_ItemsContainer.Clear (); 2) _Item newitem=new _Item(name, value); m_ItemsContainer.Add(name,newitem); 3) m_ItemsContainer.Remove(name); So there is no way there is ('httpModules',null) in m_ItemsContainer Please someone tell me where i'm wrong https://github.com/mono/mono/blob/master/mcs/class/System/System.Collections.Specialized/NameObjectCollectionBase.cs Thanks Etienne 2014-10-21 14:54 GMT+02:00 Etienne Champetier champetier.etie...@gmail.com : Hi, At my firm we are running multiple webapplication using mono (nginx + fastcgi-mono-server2.exe) on a cluster of 4 VM, 2 vcpus. One of them is restarted every day at 1h45 (small memory leak). 3 weeks ago we went from 8VM with 1vcpu (no restart problem) to 4VM with 2vcpus, and now, it's the 3rd time in 2 weeks that on one VM, the restart doesn't work well and we have: [System.ArgumentException]: Key duplication when adding: httpModules at System.Collections.Hashtable.PutImpl (System.Object key, System.Object value, Boolean overwrite) [0x0] in filename unknown:0 at System.Collections.Hashtable.Add (System.Object key, System.Object value) [0x0] in filename unknown:0 at System.Collections.Specialized.NameObjectCollectionBase.BaseAdd (System.String name, System.Object value) [0x0] in filename unknown:0 at System.Collections.Specialized.NameObjectCollectionBase.BaseSet (System.String name, System.Object value) [0x0] in filename unknown:0 at System.Configuration.ConfigurationSectionCollection.get_Item (System.String name) [0x0] in filename unknown:0 at System.Configuration.Configuration.GetSection (System.String path) [0x0] in filename unknown:0 at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path, System.Web.HttpContext context) [0x0] in filename unknown:0 at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path) [0x0] in filename unknown:0 at System.Web.Configuration.WebConfigurationManager.GetWebApplicationSection (System.String sectionName) [0x0] in filename unknown:0 at System.Web.HttpApplication.InitOnce (Boolean full_init) [0x0] in filename unknown:0 The really cool stuff is that even if it's a 500 error, the returned http code is 200 :) I've already checked and all files are equal (dll, exe, conf), all VM conf are equal (vcpu, memory, ...), ... I'm not able to reproduce the bug (restart under high load (ab -c 50 -n 10)) so can't tell if the bug is there in the newest version. We are using a version of mono before 3.2.7 (92887027be801b012846866208e6b4e362a4fc24) and fastcgi-mono-server2 (xsp) version 2.10.2-1 (old version build on 14/09/12 by someone at my firm) I know we are using old version but it seems that the bug is still there: https://bugzilla.xamarin.com/show_bug.cgi?id=18303 I've run lsof on the processes (the stuck one and one working), and by comparing the 2, i see that App_global.asax_XXX.dll is here in both case, but not App_Web_.dll (only on the working one) (see attachment) I have root access on the VM with the stuck process, and i'm on irc right now (champtar), so if you have some ideas to gather more info to kill this bug Thanks in advance Etienne ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Webapp stuck with Key duplication when adding: httpModules
On 23.10.2014 13:25, Etienne Champetier wrote: After some more investigation, reading many lines of code with a collegue, we came to the conclusion that this exception is impossible :) (yet the web is stuck on it) Are you sure that this NameObjectCollection isn't mistakenly accessed from multiple threads? Look System.Web.Configuration.WebConfigurationManager.GetSection all the way up the stacktrace. There are several scary parts that deal with locking. Robert m_ItemsContainer is an hashtable, and a private field of NameObjectCollectionBase class (new HashTable(0,StringComparer.Ordinal)). The exception tell us that there is already a key 'httpModules' in m_ItemsContainer. Reading the code the only way we go from BaseSet to BaseAdd is if FindFirstMatchedItem('httpModules'), so if (_Item)m_ItemsContainer[ 'httpModules'] is null, so if the value is null (the key exists, we got an exception to prove it :)) if i'm right, we are sure that we have ('httpModules',null) in m_ItemsContainer. Now m_ItemsContainer only modifications are: 0) m_ItemsContainer = new Hashtable (m_defCapacity, equality_comparer); 1) m_ItemsContainer.Clear (); 2) _Item newitem=new _Item(name, value); m_ItemsContainer.Add(name,newitem); 3) m_ItemsContainer.Remove(name); So there is no way there is ('httpModules',null) in m_ItemsContainer Please someone tell me where i'm wrong https://github.com/mono/mono/blob/master/mcs/class/System/System.Collections.Specialized/NameObjectCollectionBase.cs Thanks Etienne 2014-10-21 14:54 GMT+02:00 Etienne Champetier champetier.etie...@gmail.com : Hi, At my firm we are running multiple webapplication using mono (nginx + fastcgi-mono-server2.exe) on a cluster of 4 VM, 2 vcpus. One of them is restarted every day at 1h45 (small memory leak). 3 weeks ago we went from 8VM with 1vcpu (no restart problem) to 4VM with 2vcpus, and now, it's the 3rd time in 2 weeks that on one VM, the restart doesn't work well and we have: [System.ArgumentException]: Key duplication when adding: httpModules at System.Collections.Hashtable.PutImpl (System.Object key, System.Object value, Boolean overwrite) [0x0] in filename unknown:0 at System.Collections.Hashtable.Add (System.Object key, System.Object value) [0x0] in filename unknown:0 at System.Collections.Specialized.NameObjectCollectionBase.BaseAdd (System.String name, System.Object value) [0x0] in filename unknown:0 at System.Collections.Specialized.NameObjectCollectionBase.BaseSet (System.String name, System.Object value) [0x0] in filename unknown:0 at System.Configuration.ConfigurationSectionCollection.get_Item (System.String name) [0x0] in filename unknown:0 at System.Configuration.Configuration.GetSection (System.String path) [0x0] in filename unknown:0 at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path, System.Web.HttpContext context) [0x0] in filename unknown:0 at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path) [0x0] in filename unknown:0 at System.Web.Configuration.WebConfigurationManager.GetWebApplicationSection (System.String sectionName) [0x0] in filename unknown:0 at System.Web.HttpApplication.InitOnce (Boolean full_init) [0x0] in filename unknown:0 The really cool stuff is that even if it's a 500 error, the returned http code is 200 :) I've already checked and all files are equal (dll, exe, conf), all VM conf are equal (vcpu, memory, ...), ... I'm not able to reproduce the bug (restart under high load (ab -c 50 -n 10)) so can't tell if the bug is there in the newest version. We are using a version of mono before 3.2.7 (92887027be801b012846866208e6b4e362a4fc24) and fastcgi-mono-server2 (xsp) version 2.10.2-1 (old version build on 14/09/12 by someone at my firm) I know we are using old version but it seems that the bug is still there: https://bugzilla.xamarin.com/show_bug.cgi?id=18303 I've run lsof on the processes (the stuck one and one working), and by comparing the 2, i see that App_global.asax_XXX.dll is here in both case, but not App_Web_.dll (only on the working one) (see attachment) I have root access on the VM with the stuck process, and i'm on irc right now (champtar), so if you have some ideas to gather more info to kill this bug Thanks in advance Etienne ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Webapp stuck with Key duplication when adding: httpModules
I would be looking for threading issues here. On Thursday, October 23, 2014, Etienne Champetier champetier.etie...@gmail.com wrote: After some more investigation, reading many lines of code with a collegue, we came to the conclusion that this exception is impossible :) (yet the web is stuck on it) m_ItemsContainer is an hashtable, and a private field of NameObjectCollectionBase class (new HashTable(0,StringComparer.Ordinal)). The exception tell us that there is already a key 'httpModules' in m_ItemsContainer. Reading the code the only way we go from BaseSet to BaseAdd is if FindFirstMatchedItem('httpModules'), so if (_Item)m_ItemsContainer[ 'httpModules'] is null, so if the value is null (the key exists, we got an exception to prove it :)) if i'm right, we are sure that we have ('httpModules',null) in m_ItemsContainer. Now m_ItemsContainer only modifications are: 0) m_ItemsContainer = new Hashtable (m_defCapacity, equality_comparer); 1) m_ItemsContainer.Clear (); 2) _Item newitem=new _Item(name, value); m_ItemsContainer.Add(name,newitem); 3) m_ItemsContainer.Remove(name); So there is no way there is ('httpModules',null) in m_ItemsContainer Please someone tell me where i'm wrong https://github.com/mono/mono/blob/master/mcs/class/System/System.Collections.Specialized/NameObjectCollectionBase.cs Thanks Etienne 2014-10-21 14:54 GMT+02:00 Etienne Champetier champetier.etie...@gmail.com javascript:_e(%7B%7D,'cvml','champetier.etie...@gmail.com');: Hi, At my firm we are running multiple webapplication using mono (nginx + fastcgi-mono-server2.exe) on a cluster of 4 VM, 2 vcpus. One of them is restarted every day at 1h45 (small memory leak). 3 weeks ago we went from 8VM with 1vcpu (no restart problem) to 4VM with 2vcpus, and now, it's the 3rd time in 2 weeks that on one VM, the restart doesn't work well and we have: [System.ArgumentException]: Key duplication when adding: httpModules at System.Collections.Hashtable.PutImpl (System.Object key, System.Object value, Boolean overwrite) [0x0] in filename unknown:0 at System.Collections.Hashtable.Add (System.Object key, System.Object value) [0x0] in filename unknown:0 at System.Collections.Specialized.NameObjectCollectionBase.BaseAdd (System.String name, System.Object value) [0x0] in filename unknown:0 at System.Collections.Specialized.NameObjectCollectionBase.BaseSet (System.String name, System.Object value) [0x0] in filename unknown:0 at System.Configuration.ConfigurationSectionCollection.get_Item (System.String name) [0x0] in filename unknown:0 at System.Configuration.Configuration.GetSection (System.String path) [0x0] in filename unknown:0 at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path, System.Web.HttpContext context) [0x0] in filename unknown:0 at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path) [0x0] in filename unknown:0 at System.Web.Configuration.WebConfigurationManager.GetWebApplicationSection (System.String sectionName) [0x0] in filename unknown:0 at System.Web.HttpApplication.InitOnce (Boolean full_init) [0x0] in filename unknown:0 The really cool stuff is that even if it's a 500 error, the returned http code is 200 :) I've already checked and all files are equal (dll, exe, conf), all VM conf are equal (vcpu, memory, ...), ... I'm not able to reproduce the bug (restart under high load (ab -c 50 -n 10)) so can't tell if the bug is there in the newest version. We are using a version of mono before 3.2.7 (92887027be801b012846866208e6b4e362a4fc24) and fastcgi-mono-server2 (xsp) version 2.10.2-1 (old version build on 14/09/12 by someone at my firm) I know we are using old version but it seems that the bug is still there: https://bugzilla.xamarin.com/show_bug.cgi?id=18303 I've run lsof on the processes (the stuck one and one working), and by comparing the 2, i see that App_global.asax_XXX.dll is here in both case, but not App_Web_.dll (only on the working one) (see attachment) I have root access on the VM with the stuck process, and i'm on irc right now (champtar), so if you have some ideas to gather more info to kill this bug Thanks in advance Etienne -- Studying for the Turing test ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] GTK# Combobox - Limiting height of the dropdown?
Sorry if this has already been asked (I did search), but does anyone have any idea how to limit the height of the dropdown on a combobox? I've looked around a ton, but I couldn't find any solutions. Thanks! -- View this message in context: http://mono.1490590.n4.nabble.com/GTK-Combobox-Limiting-height-of-the-dropdown-tp4664338.html Sent from the Mono - Dev mailing list archive at Nabble.com. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Houston error during web request on Apache 2.4
Some news. I created a small test-case that submit a request every time bigger and I've been able to reproduce the problem. The strange thing is that the more logs I add the more loops are performed without errors. It makes me think that is something related to the data sent from apache to the input stream and that in some way are lost or not read correctly. Looking at the request processing I can see that the previous working requests works like that (this is mod_mono log): * Command received: GET_CLIENT_BLOCK (7) * requested size == 32768, actual size == 32768 received from apache == 2520 received from apache LE == 2520 write size 2520 - 4 status 4 received from apache 2 == 2520 write string 2520 status 2520 * Command received: GET_CLIENT_BLOCK (7) * requested size == 32768, actual size == 32768 received from apache == 2520 received from apache LE == 2520 write size 2520 - 4 status 4 received from apache 2 == 2520 write string 2520 status 2520 * Command received: GET_CLIENT_BLOCK (7) * requested size == 32768, actual size == 32768 received from apache == 3780 received from apache LE == 3780 write size 3780 - 4 status 4 received from apache 2 == 3780 write string 3780 status 3780 * Command received: GET_CLIENT_BLOCK (7) * requested size == 31078, actual size == 31078 received from apache == 2528 received from apache LE == 2528 write size 2528 - 4 status 4 received from apache 2 == 2528 write string 2528 status 2528 * Command received: GET_CLIENT_BLOCK (7) * requested size == 28550, actual size == 28550 received from apache == 2520 received from apache LE == 2520 write size 2520 - 4 status 4 received from apache 2 == 2520 write string 2520 status 2520 and so on until * Command received: GET_CLIENT_BLOCK (7) * requested size == 3350, actual size == 3350 received from apache == 3350 received from apache LE == 3350 write size 3350 - 4 status 4 received from apache 2 == 3350 write string 3350 status 3350 * Command received: SET_STATUS (8) Command received: SET_RESPONSE_HEADERS (2) Headers length: 109 Command received: SEND_FROM_MEMORY (0) sending from memory without flush Command received: CLOSE (4) Done. Status: 0 Usually xsp reads from mod_mono the same value that mod_mono reads from apache and everything works. When the request fails I see: Command received: GET_CLIENT_BLOCK (7) * requested size == 32768, actual size == 32768 received from apache == 32768 received from apache LE == 32768 write size 32768 - 4 status 4 received from apache 2 == 32768 write string 32768 status 32768 * Command received: GET_CLIENT_BLOCK (7) * requested size == 32768, actual size == 32768 received from apache == 8277 received from apache LE == 8277 write size 8277 - 4 status 4 received from apache 2 == 8277 write string 8277 status 8277 * Command received: SET_STATUS (8) Command received: SET_RESPONSE_HEADERS (2) Headers length: 107 Command received: SEND_FROM_MEMORY (0) sending from memory without flush Command received: CLOSE (4) Done. Status: 0 It seems ok but when mod_mono read 8277 bytes from apache xsp reads a value of 1465542519 and it throws the Houston error. There's someone that understand these kind of things that can drive me to the correct road to find the solution? Thanks in advance. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Heads up: Elimination of the 2.0 and 4.0 profiles
Miguel de Icaza-6 wrote We are going to remove the build for the .NET 2.0 APIs from Mono which are currently provided for bug/feature-compatibility for .NET 2.0 applications. Will you save .NET 3.5 or you are going to remove corlib 2.0 at all? Removing 2.0 profile is a good thing, but without support of .NET 3.5 it would be difficult to work with Unity 3D at least. -- View this message in context: http://mono.1490590.n4.nabble.com/Heads-up-Elimination-of-the-2-0-and-4-0-profiles-tp4664323p4664345.html Sent from the Mono - Dev mailing list archive at Nabble.com. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list