Perhaps this is an issue with the order of initialization after the
checkpoint restore? 

If when is 1875000000000 and curTick is
1915819058000 the value this is used to reschedule the when event should
be 3790819058000 (sum). Maybe curTick isn't getting added back or
curTick hasn't been advanced to the restored tick yet? 

Ali 

On
22.01.2012 21:49, Anders Handler wrote: 

> Hi Ali, 
> The problem is
reproducible. I think a x86 FS boot will make the error. 
> In my
current setup the checkpoint is made at time tick 1915819058000. The
curTick() yields 1915819058000, but _when is only 1875000000000, causing
the bad value. 
> Just saving the _when value might work, but I think it
will just cause an event scheduled in the past error. But I will need to
test. 
> / Anders 
> 
> On Sat, Jan 21, 2012 at 4:43 PM, Ali Saidi
<sa...@umich.edu [5]> wrote:
> 
>> Hi Anders,
>> 
>> No clue. It looks
like Nilay last edited that code 3 months ago. So maybe he can shed some
light on it. Is the problem reproducible in the checkpoints?
>> 
>>
tickEvent is scheduled when the device is created and isn't ever
de-scheduled, so it should always have a positive value.
>> 
>> _when is
positive in the checkpoint, correct?
>> 
>> because it's rescheduled for
curTIck() + _when which would then always be positive. We certainly
shouldn't be saving a negative tick value in the checkpoint file and I'm
a little confused as to why we bother subtracting curTick in the
serialize() method and adding it back in the unserialize(). Just leaving
it alone should be good enough.
>> 
>> Thanks,
>> Ali
>> 
>> On Jan 19,
2012, at 4:51 AM, Anders Handler wrote:
>> 
>> > Hi,
>> >
>> > When I
create a checkpoint I get a negative value stored in rtcClockTickOffset,
which will make Gem5 crash when restoring the checkpoint, complaining
that an event cannot be scheduled in the past.
>> >
>> > The failure is
that the "RTCEvent event" holds an old tick value (_when) which I think
it should not. The code is in:
>> > src/dev/mc146818.hh
>> >
src/dev/mc146818.cc
>> >
>> > The workaround I am using is manually
removing the "-" from the rtcClockTickOffset variable in the checkpoint
file (m5.cpt).
>> >
>> > I run x86.
>> >
>> > Anyone has a clue how to
fix?
>> >
>> > Best regards
>> > Anders >
_______________________________________________
>> > gem5-users mailing
list
>> > gem5-users@gem5.org [1]
>> >
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users [2]
>> 
>>
_______________________________________________
>> gem5-users mailing
list
>> gem5-users@gem5.org [3]
>>
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users [4]




Links:
------
[1] mailto:gem5-users@gem5.org
[2]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
[3]
mailto:gem5-users@gem5.org
[4]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
[5]
mailto:sa...@umich.edu
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to