[Mono-dev] ObjectPool
We have had some moving forward in our mono stability issues. I figured I would start up a chat here about one place that seems to be causing many problems. https://github.com/mono/mono/blob/master/mcs/class/corlib/System.Collections.Concurrent/ObjectPool.cs I am not really sure the code here is actually thread safe... Maybe it doesn't need to be for some reason? We have added volatiles for add/remove index (yuriy pointed out that threads were often stuck at line 86) but even with that im still not sure its actually threadsafe. There are some weird edge conditions that seem to be here (like if CompareExchange fails 3 times it will just never set the remove index and continue on). Somebody has obviously spent a lot of time thinking about this code and optimizing it. I want to make sure we get the full "why" behind things so we dont a) waste time b) introduce issues. Greg -- Le doute n'est pas une condition agréable, mais la certitude est absurde. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] ObjectPool
Yuriy will reply with more details but by just making Take return Creator() and nooping release many of our issues have gone away (including visible issues with concurrentstack). From what I have seen we also saw massive performance gains. On Wed, Jul 25, 2012 at 6:54 AM, Greg Young wrote: > We have had some moving forward in our mono stability issues. I > figured I would start up a chat here about one place that seems to be > causing many problems. > > > https://github.com/mono/mono/blob/master/mcs/class/corlib/System.Collections.Concurrent/ObjectPool.cs > > I am not really sure the code here is actually thread safe... Maybe it > doesn't need to be for some reason? > > We have added volatiles for add/remove index (yuriy pointed out that > threads were often stuck at line 86) but even with that im still not > sure its actually threadsafe. There are some weird edge conditions > that seem to be here (like if CompareExchange fails 3 times it will > just never set the remove index and continue on). > > Somebody has obviously spent a lot of time thinking about this code > and optimizing it. I want to make sure we get the full "why" behind > things so we dont a) waste time b) introduce issues. > > Greg > > -- > Le doute n'est pas une condition agréable, mais la certitude est absurde. -- Le doute n'est pas une condition agréable, mais la certitude est absurde. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] ObjectPool
On Wed, 2012-07-25 at 07:17 -0400, Greg Young wrote: > Yuriy will reply with more details but by just making Take return > Creator() and nooping release many of our issues have gone away > (including visible issues with concurrentstack). From what I have seen > we also saw massive performance gains. > Just for the curiosity: are you using SGEN? I've always thought that ObjectPool in ConcurrentStack was used to reduce the pressure on the garbage collector (Boehm, specifically). It is probably much less important with generational collector like SGEN. -- Regards, Konrad ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] ObjectPool
Yes we are using sgen. Good to know the history there as well. Cheers, Greg On Wed, Jul 25, 2012 at 7:22 AM, Konrad Kruczyński wrote: > On Wed, 2012-07-25 at 07:17 -0400, Greg Young wrote: >> Yuriy will reply with more details but by just making Take return >> Creator() and nooping release many of our issues have gone away >> (including visible issues with concurrentstack). From what I have seen >> we also saw massive performance gains. >> > > Just for the curiosity: are you using SGEN? I've always thought that > ObjectPool in ConcurrentStack was used to reduce the pressure on the > garbage collector (Boehm, specifically). It is probably much less > important with generational collector like SGEN. > > -- > Regards, > Konrad > > -- Le doute n'est pas une condition agréable, mais la certitude est absurde. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] ObjectPool
On Wed, 2012-07-25 at 07:28 -0400, Greg Young wrote: > Yes we are using sgen. > > Good to know the history there as well. > > Cheers, > > Greg > Well, *actually* this is my guess ;) -- Regards, Konrad ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] EV
Does anyone already have/know of a socket lib on top of EV for eventing? Cheers, Greg -- Le doute n'est pas une condition agréable, mais la certitude est absurde. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] ObjectPool
There were indeed two bugs in there, a missing barrier and the issue you described. I also commented out the code if you want more details. -- Jérémie Laval http://neteril.org On Wed, Jul 25, 2012 at 11:54 AM, Greg Young wrote: > We have had some moving forward in our mono stability issues. I > figured I would start up a chat here about one place that seems to be > causing many problems. > > > > https://github.com/mono/mono/blob/master/mcs/class/corlib/System.Collections.Concurrent/ObjectPool.cs > > I am not really sure the code here is actually thread safe... Maybe it > doesn't need to be for some reason? > > We have added volatiles for add/remove index (yuriy pointed out that > threads were often stuck at line 86) but even with that im still not > sure its actually threadsafe. There are some weird edge conditions > that seem to be here (like if CompareExchange fails 3 times it will > just never set the remove index and continue on). > > Somebody has obviously spent a lot of time thinking about this code > and optimizing it. I want to make sure we get the full "why" behind > things so we dont a) waste time b) introduce issues. > > Greg > > -- > Le doute n'est pas une condition agréable, mais la certitude est absurde. > ___ > 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] EV
You can look at manos code https://github.com/jacksonh/manos -- Jérémie Laval http://neteril.org 2012/7/25 Greg Young > Does anyone already have/know of a socket lib on top of EV for eventing? > > Cheers, > > Greg > > -- > Le doute n'est pas une condition agréable, mais la certitude est absurde. > ___ > 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] ObjectPool
Hi Jérémie, thank you for so quick fix! I'll build mono with your fix and let you know how it works. It seems that a lot of our previously reported problems with sockets are due to ObjectPool. -yuriy On Wed, Jul 25, 2012 at 2:43 PM, Jérémie Laval wrote: > There were indeed two bugs in there, a missing barrier and the issue you > described. > > I also commented out the code if you want more details. > > -- > Jérémie Laval > http://neteril.org > > > > On Wed, Jul 25, 2012 at 11:54 AM, Greg Young > wrote: >> >> We have had some moving forward in our mono stability issues. I >> figured I would start up a chat here about one place that seems to be >> causing many problems. >> >> >> >> https://github.com/mono/mono/blob/master/mcs/class/corlib/System.Collections.Concurrent/ObjectPool.cs >> >> I am not really sure the code here is actually thread safe... Maybe it >> doesn't need to be for some reason? >> >> We have added volatiles for add/remove index (yuriy pointed out that >> threads were often stuck at line 86) but even with that im still not >> sure its actually threadsafe. There are some weird edge conditions >> that seem to be here (like if CompareExchange fails 3 times it will >> just never set the remove index and continue on). >> >> Somebody has obviously spent a lot of time thinking about this code >> and optimizing it. I want to make sure we get the full "why" behind >> things so we dont a) waste time b) introduce issues. >> >> Greg >> >> -- >> Le doute n'est pas une condition agréable, mais la certitude est absurde. >> ___ >> 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 > -- Yuriy Solodkyy (y.solod...@gmail.com) ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] ObjectPool
We will be stress testing this. This seems to be the root cause of the other issues we have been experiencing, literally hundreds of things are broken because of this one little issue (anything with callbacks, concurrentstack/queue, etc etc). On Wed, Jul 25, 2012 at 7:43 AM, Jérémie Laval wrote: > There were indeed two bugs in there, a missing barrier and the issue you > described. > > I also commented out the code if you want more details. > > -- > Jérémie Laval > http://neteril.org > > > > On Wed, Jul 25, 2012 at 11:54 AM, Greg Young > wrote: >> >> We have had some moving forward in our mono stability issues. I >> figured I would start up a chat here about one place that seems to be >> causing many problems. >> >> >> >> https://github.com/mono/mono/blob/master/mcs/class/corlib/System.Collections.Concurrent/ObjectPool.cs >> >> I am not really sure the code here is actually thread safe... Maybe it >> doesn't need to be for some reason? >> >> We have added volatiles for add/remove index (yuriy pointed out that >> threads were often stuck at line 86) but even with that im still not >> sure its actually threadsafe. There are some weird edge conditions >> that seem to be here (like if CompareExchange fails 3 times it will >> just never set the remove index and continue on). >> >> Somebody has obviously spent a lot of time thinking about this code >> and optimizing it. I want to make sure we get the full "why" behind >> things so we dont a) waste time b) introduce issues. >> >> Greg >> >> -- >> Le doute n'est pas une condition agréable, mais la certitude est absurde. >> ___ >> Mono-devel-list mailing list >> Mono-devel-list@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/mono-devel-list > > -- Le doute n'est pas une condition agréable, mais la certitude est absurde. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] EV
Yeah I figured someone might have already built one and could save us a bit of time :) Rather generic code. If we decide to build we will OSS. On Wed, Jul 25, 2012 at 7:45 AM, Jérémie Laval wrote: > You can look at manos code https://github.com/jacksonh/manos > > -- > Jérémie Laval > http://neteril.org > > > > 2012/7/25 Greg Young >> >> Does anyone already have/know of a socket lib on top of EV for eventing? >> >> Cheers, >> >> Greg >> >> -- >> Le doute n'est pas une condition agréable, mais la certitude est absurde. >> ___ >> Mono-devel-list mailing list >> Mono-devel-list@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/mono-devel-list > > -- Le doute n'est pas une condition agréable, mais la certitude est absurde. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] EV
action jackson to the rescue as always! If anyone is looking for similar check out https://github.com/kersny/libuv-csharp from google summer of code student last year On Wed, Jul 25, 2012 at 8:01 AM, Greg Young wrote: > Yeah I figured someone might have already built one and could save us > a bit of time :) Rather generic code. If we decide to build we will > OSS. > > On Wed, Jul 25, 2012 at 7:45 AM, Jérémie Laval > wrote: >> You can look at manos code https://github.com/jacksonh/manos >> >> -- >> Jérémie Laval >> http://neteril.org >> >> >> >> 2012/7/25 Greg Young >>> >>> Does anyone already have/know of a socket lib on top of EV for eventing? >>> >>> Cheers, >>> >>> Greg >>> >>> -- >>> Le doute n'est pas une condition agréable, mais la certitude est absurde. >>> ___ >>> Mono-devel-list mailing list >>> Mono-devel-list@lists.ximian.com >>> http://lists.ximian.com/mailman/listinfo/mono-devel-list >> >> > > > > -- > Le doute n'est pas une condition agréable, mais la certitude est absurde. -- Le doute n'est pas une condition agréable, mais la certitude est absurde. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] EV
Thanks! On Wed, Jul 25, 2012 at 8:19 AM, Alfred Hall wrote: > I think https://github.com/txdv/LibuvSharp is more up to date, Bentkus seems > to be working on this actively.. > > On 25 Jul 2012, at 12:17, Greg Young wrote: > > action jackson to the rescue as always! > > If anyone is looking for similar check out > https://github.com/kersny/libuv-csharp from google summer of code > student last year > > On Wed, Jul 25, 2012 at 8:01 AM, Greg Young wrote: > > Yeah I figured someone might have already built one and could save us > > a bit of time :) Rather generic code. If we decide to build we will > > OSS. > > > On Wed, Jul 25, 2012 at 7:45 AM, Jérémie Laval > wrote: > > You can look at manos code https://github.com/jacksonh/manos > > > -- > > Jérémie Laval > > http://neteril.org > > > > > 2012/7/25 Greg Young > > > Does anyone already have/know of a socket lib on top of EV for eventing? > > > Cheers, > > > Greg > > > -- > > Le doute n'est pas une condition agréable, mais la certitude est absurde. > > ___ > > Mono-devel-list mailing list > > Mono-devel-list@lists.ximian.com > > http://lists.ximian.com/mailman/listinfo/mono-devel-list > > > > > > > -- > > Le doute n'est pas une condition agréable, mais la certitude est absurde. > > > > > -- > Le doute n'est pas une condition agréable, mais la certitude est absurde. > ___ > Mono-devel-list mailing list > Mono-devel-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-devel-list > > -- Le doute n'est pas une condition agréable, mais la certitude est absurde. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] EV
I think https://github.com/txdv/LibuvSharp is more up to date, Bentkus seems to be working on this actively.. On 25 Jul 2012, at 12:17, Greg Young wrote: > action jackson to the rescue as always! > > If anyone is looking for similar check out > https://github.com/kersny/libuv-csharp from google summer of code > student last year > > On Wed, Jul 25, 2012 at 8:01 AM, Greg Young wrote: >> Yeah I figured someone might have already built one and could save us >> a bit of time :) Rather generic code. If we decide to build we will >> OSS. >> >> On Wed, Jul 25, 2012 at 7:45 AM, Jérémie Laval >> wrote: >>> You can look at manos code https://github.com/jacksonh/manos >>> >>> -- >>> Jérémie Laval >>> http://neteril.org >>> >>> >>> >>> 2012/7/25 Greg Young Does anyone already have/know of a socket lib on top of EV for eventing? Cheers, Greg -- Le doute n'est pas une condition agréable, mais la certitude est absurde. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list >>> >>> >> >> >> >> -- >> Le doute n'est pas une condition agréable, mais la certitude est absurde. > > > > -- > Le doute n'est pas une condition agréable, mais la certitude est absurde. > ___ > 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] Mono and Microsoft open sourced Entity Framework
Companies, like people, can grow up and have a better understanding of the world around us. On Tuesday, July 24, 2012, Brandon Perry wrote: > Crazy from the company that said Linux was a cancer! > > On Tue, Jul 24, 2012 at 3:55 PM, Stifu wrote: >> I somehow missed that news. >> Great stuff! >> >> >> Marek Safar-2 wrote >>> >>> Hi, >>> >>> Yes, we are working on EF integration. >>> >>> Marek >>> >>> On Tue, Jul 24, 2012 at 9:09 PM, Daniel Morganwrote: >>> Since Microsoft has open sourced the Entity Framework, is anyone working on getting it to work on Mono? ___ Mono-devel-list mailing list Mono-devel-list@.ximian http://lists.ximian.com/mailman/listinfo/mono-devel-list >>> >>> ___ >>> Mono-devel-list mailing list >>> Mono-devel-list@.ximian >>> http://lists.ximian.com/mailman/listinfo/mono-devel-list >>> >> >> >> >> >> -- >> View this message in context: http://mono.1490590.n4.nabble.com/Mono-and-Microsoft-open-sourced-Entity-Framework-tp4650539p4650541.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 > > > > -- > http://volatile-minds.blogspot.com -- blog > http://www.volatileminds.net -- website > ___ > 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] Fail to run aspx web application on mod_mono-2.10 ( .Net 4 framework )
Hi Anas, Have you had any luck getting your application running, I believe I am running into the same issue. Thanks, Mike ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list