From: Richard J. <R.E...@ke...> - 2006-03-10 14:56:14
|
While writing a new collector, we have stumbled across a problem whereby what we had assumed should be an uninterruptible sequence of code is interrupted. If anyone has any suggestions for why this might happens or what we might do about it, we'd be very grateful. We are using Jikes RVM 2.3.3, running jbb2000 (which is multi-threaded). We find that VM_Interface.triggerCollection(), called by Plan.poll(), is interrupted by a different call to Plan.poll (due to another allocation request from jbb2000). This results in concurrent calls to triggerCollection(). One succeeds and completes a GC. However, immediately after the second call runs although the state for a GC, set up by poll, is now invalid. This causes the "_assert(collectionsInitiated > 0)" in StopTheWorld.collect() to fail. I cannot see why two threads should be allowed to enter triggerCollection simultaneously. Our Plan class is declared as public class Plan extends StopTheWorldGC implements VM_Uninterruptible Its poll() method is declared as public final boolean poll(boolean mustCollect, MemoryResource mr) throws VM_PragmaLogicallyUninterruptible VM_Interface.triggerCollection is declared as public static final void triggerCollection(int why) throws VM_PragmaInterruptible Our other GC classes are declared as implementing VM_Uninterruptible. Richard |
From: David P G. <gr...@us...> - 2006-03-14 12:48:23
|
I'm not sure of the internals of how that version of MMTk worked, but the PragmaLogicallyInterruptible is a loophole mechanism for uninterruptibiloity. Possibly something in that method is yielding in an unexpected fashion? I also seem to recall this assertion was tripping on our nightly regression runs for a while and there was a defect for it. If I'm remembering this correctly, you might be able to find out more by searching the bug database (both open & closed defects,,,,if it was fixed in a later version of MMTk the defect should be in the closed state). --dave > While writing a new collector, we have stumbled across a problem whereby what > we had assumed should be an uninterruptible sequence of code is interrupted. If > anyone has any suggestions for why this might happens or what we might do about > it, we'd be very grateful. > > We are using Jikes RVM 2.3.3, running jbb2000 (which is multi-threaded). > > We find that VM_Interface.triggerCollection(), called by Plan.poll(), is > interrupted by a different call to Plan.poll (due to another allocation request > from jbb2000). This results in concurrent calls to triggerCollection(). One > succeeds and completes a GC. However, immediately after the second call runs > although the state for a GC, set up by poll, is now invalid. This causes the > "_assert(collectionsInitiated > 0)" in StopTheWorld.collect() to fail. I cannot > see why two threads should be allowed to enter triggerCollection simultaneously. > > Our Plan class is declared as > public class Plan extends StopTheWorldGC implements VM_Uninterruptible > > Its poll() method is declared as > public final boolean poll(boolean mustCollect, MemoryResource mr) throws > VM_PragmaLogicallyUninterruptible > > VM_Interface.triggerCollection is declared as > public static final void triggerCollection(int why) throws > VM_PragmaInterruptible > > Our other GC classes are declared as implementing VM_Uninterruptible. > > Richard > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Jikesrvm-researchers mailing list > Jik...@li... > https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers |