[Mono-devel-list] RE: [Gc] [PATCH] Race condition when restarting threads

2005-08-04 Thread Boehm, Hans
I still don't think I understand the scenario. The original thread in (1) was suspended from the last GC? My assumption is that if thread A sends a signal to thread B, then Bs handler sees all memory operations performed by A before the signal was sent. I don't think that's officially guaranteed

[Mono-devel-list] RE: [Gc] [PATCH] Race condition when restarting threads

2005-08-04 Thread Boehm, Hans
Sorry about the long delay. I don't quite understand the problem here. If GC_stop_count has just been incremented, then I'm about to send another suspend signal to the thread, and it will have to stop again before we think the world is stopped. Can you be a bit more specific about the race her

[Mono-devel-list] RE: [Gc] [PATCH] Race condition when restarting threads

2005-08-01 Thread Ben Maurer
On Mon, 2005-08-01 at 16:41 -0700, Boehm, Hans wrote: > My assumption is that if thread A sends a signal to thread B, then > Bs handler sees all memory operations performed by A before the > signal was sent. I don't think that's officially guaranteed, but I > would be amazed if it weren't true eve

[Mono-devel-list] RE: [Gc] [PATCH] Race condition when restarting threads

2005-08-01 Thread Ben Maurer
On Mon, 2005-08-01 at 15:09 -0700, Boehm, Hans wrote: > I don't quite understand the problem here. If GC_stop_count has > just been incremented, then I'm about to send another suspend > signal to the thread, and it will have to stop again before > we think the world is stopped. My situation is:

[Mono-devel-list] RE: [Gc] [PATCH] Race condition when restarting threads

2005-07-12 Thread Ben Maurer
On Tue, 2005-07-12 at 11:42 -0700, Boehm, Hans wrote: > > Your patch had the fields set as volatile, so shouldn't the > > compiler ensure that the cpu does not reorder the stores? > We had a long discussion of that on the C++ memory model list. > The answer is architecture dependent. Volatile wil

[Mono-devel-list] RE: [Gc] [PATCH] Race condition when restarting threads

2005-07-12 Thread Ben Maurer
On Tue, 2005-07-12 at 11:13 -0700, Boehm, Hans wrote: > I think I generally also prefer your solution. > > But it seems to me that it has a very low probability memory ordering > issue. > > If I see GC_world_is_stopped set because I'm trying to stop the > world for the next GC, but I still see th

[Mono-devel-list] RE: [Gc] [PATCH] Race condition when restarting threads

2005-07-12 Thread Ben Maurer
On Mon, 2005-07-11 at 14:15 -0700, Boehm, Hans wrote: > I've attached a different patch, which I think should solve the > problem without additional synchronization and context switches, > at least in the vast majority of cases. (It should solve the > problem in all cases. Additional context swit