Hi Gem5 developers,

My name is Minesh and I'm working on a school project at Carnegie Mellon
University using the GEM5 simulator in FS x86 Ruby (MOESI_hammer) mode. I'm
running into an issue with the Ruby system's "void
*RubySystem::serialize(std::ostream &os)"* functionality.

In /src/mem/ruby/system/System.cc:148, the "*RubySystem::serialize" *function
takes some traces, swaps to a custom event queue by swapping out the HEAD,
runs the simulator, and then restores the original queue. The hope is to
atomically run some cache flushes in zero simulator time.

I'm running into an issue where after the queues are swapped and simulation
begins, a panic() call occurs (panic("event not found!")). I've been trying
to find a workaround for a while now and can't seem to do so. Debugging the
actual panic leads me nowhere.

I then came across your posts at [
https://www.mail-archive.com/[email protected]/msg11701.html] about the
exact same issue. However, the issue still does not seem to be resolved.
Would you be able to provide me with insight into the cause of the issue or
a potential solution?

I have included some relevant snippets of code and a partial backtrace
leading up to the event below.


*Build command line:*

> scons CPU_MODELS="all" PROTOCOL="MOESI_hammer" build/X86/gem5.debug -j 9


*Execution command line:*

> build/X86/gem5.debug
>   configs/example/fs.py \
> --kernel=$M5_PATH/binaries/x86_64-vmlinux-2.6.32-smp \
> --disk-image=$M5_PATH/disks/linux-x86.img  \
> --cpu-type=timing \
> --ruby


*panic() call @ src/sim/eventq.cc:195 . Offending condition is the "!curr",
as verified in GDB (see backtrace below for specifics)*

>     if (!curr || *curr != *event)
>         panic("event not found!");


*EventQueue dump (EventQueue::dump()) before call to
EventQueue::reschedule():*

> ============================================================
> EventQueue Dump  (cycle 16792663527000)
> ------------------------------------------------------------
> Event Event_2161887 (generic)
> Flags: 0x7a42
> Scheduled for 16792663527000, priority 0
> ============================================================



*Partial backtrace of the panic following the simulate() call in *
*RubySystem::serialize**:*


> #0  0x00007ffff6688cc9 in __GI_raise (sig=sig@entry=6) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> #1  0x00007ffff668c0d8 in __GI_abort () at abort.c:89
> #2  0x0000000000d9a341 in __exit_epilogue (code=-1, func=0x1e01133
> <EventQueue::remove(Event*)::__FUNCTION__> "remove",
>     file=0x1e00de9 "build/X86/sim/eventq.cc", line=195, format=0x1e00e17
> "event not found!") at build/X86/base/misc.cc:94
> #3  0x0000000000c25499 in __exit_message<>(char const*, int, char const*,
> char const*, int, char const*) (prefix=0x1e00e28 "panic", code=-1,
>     func=0x1e01133 <EventQueue::remove(Event*)::__FUNCTION__> "remove",
> file=0x1e00de9 "build/X86/sim/eventq.cc", line=195,
>     format=0x1e00e17 "event not found!") at build/X86/base/misc.hh:81
> #4  0x0000000000d37621 in EventQueue::remove (this=0x301d1d0,
> event=0x39d2090) at build/X86/sim/eventq.cc:195
> #5  0x0000000000c39d1e in EventQueue::reschedule (this=0x301d1d0,
> event=0x39d2090, when=18446744073709551615, always=false)
>     at build/X86/sim/eventq_impl.hh:95
> #6  0x0000000000d3ce6a in BaseGlobalEvent::reschedule (this=0x38acf00,
> when=18446744073709551615) at build/X86/sim/global_event.cc:104
> #7  0x0000000000d6154a in simulate (num_cycles=18446744073709551615) at
> build/X86/sim/simulate.cc:113



Thanks,

Minesh Patel
[email protected]
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to