Hi Jasmin,

The first problem seems to be a memory corruption bug in gem5. I'd suggest
compiling in debug mode (without tcmalloc!!!) and running with valgrind, as
long as it doesn't take too long to hit the problem.

For the second problem: I've never seen that before. There's no reason that
gem5 shouldn't be able to run a static binary. Again, I would probably try
to use a debugger or some debug flags to try to figure out what was going
on.

Good luck!
Jason

On Thu, Aug 18, 2016 at 10:23 AM Jasmin Jahic <[email protected]>
wrote:

> Hello,
>
> I faced two situations with gem5, which I was able to reproduce on 2
> different machines. It might be a bug, or it might be that I am doing
> something wrong, but would like to report it in any case.
>
> 1. Running gem5 from the developers version of gem5 in FS mode, for x86
> with gem5.opt for the images present on http://www.gem5.org/Download
> doesn't work (see the details below). Versions gem5.fast and gem5.debug
> work well. Also, all versions work well in the gem5-stable version.
> 2. Compiling a static simple program on host and transferring the binary to
> the gem5 fs image, doesn't work on x86 (see the details below). The system
> on image is a Gentoo Linux 2.6.22.9. I tried to compile the software on
> Linux Mint 18 Sarah and Ubuntu 12.04.
>
> 1. Details:
> scons build/X86/gem5.opt -j8
> -- Works fine
>
> Start script:
> export M5_PATH="/home/me/workspaceGEM5/gem5-full-system-files/x86-system"
>
> build/X86/gem5.opt \
> configs/example/fs.py \
> --mem-size=512MB \
> --kernel=x86_64-vmlinux-2.6.22.9 \
>
> Console output:
> Global frequency set at 1000000000000 ticks per second
> warn: DRAM device capacity (8192 Mbytes) does not match the address range
> assigned (512 Mbytes)
> info: kernel located at:
>
> /home/me/workspaceGEM5/gem5-full-system-files/x86-system/binaries/x86_64-vmlinux-2.6.22.9
> Listening for com_1 connection on port 3456
>       0: rtc: Real-time clock set to Sun Jan  1 00:00:00 2012
> 0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000
> warn: Reading current count from inactive timer.
> warn: ClockedObject: More than one power state change request encountered
> within the same simulation tick
> **** REAL SIMULATION ****
> info: Entering event queue @ 0.  Starting simulation...
> warn: Don't know what interrupt to clear for console.
> *** stack smashing detected ***: build/X86/gem5.opt terminated
> Program aborted at tick 7027708000
> --- BEGIN LIBC BACKTRACE ---
> build/X86/gem5.opt(_Z15print_backtracev+0x1c)[0x84db31c]
> build/X86/gem5.opt(_Z12abortHandleri+0x3e)[0x84ea65e]
> [0xb77a7c14]
> [0xb77a7c31]
> /lib/i386-linux-gnu/libc.so.6(gsignal+0x39)[0xb7037e89]
> /lib/i386-linux-gnu/libc.so.6(abort+0x157)[0xb70393e7]
> /lib/i386-linux-gnu/libc.so.6(+0x6725c)[0xb707325c]
> /lib/i386-linux-gnu/libc.so.6(__fortify_fail+0x68)[0xb71037c8]
> /lib/i386-linux-gnu/libc.so.6(+0xf7758)[0xb7103758]
>
> build/X86/gem5.opt(_ZNK10X86ISAInst12cvtfp80h_int7executeEP11ExecContextPN5Trace10InstRecordE+0x115)[0x92ed9f5]
> build/X86/gem5.opt(_ZN15AtomicSimpleCPU4tickEv+0x25d)[0x844557d]
> build/X86/gem5.opt(_ZN10EventQueue10serviceOneEv+0x94)[0x84e3bc4]
> build/X86/gem5.opt(_Z9doSimLoopP10EventQueue+0x78)[0x8507298]
> build/X86/gem5.opt(_Z8simulatey+0x257)[0x8507887]
> build/X86/gem5.opt[0x855c2cc]
>
> /usr/lib/i386-linux-gnu/libpython2.7.so.1.0(PyCFunction_Call+0xbe)[0xb74eb1fe]
>
> /usr/lib/i386-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6628)[0xb7488308]
>
> /usr/lib/i386-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80e)[0xb75c281e]
>
> /usr/lib/i386-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5dd1)[0xb7487ab1]
>
> /usr/lib/i386-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5ebe)[0xb7487b9e]
>
> /usr/lib/i386-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5ebe)[0xb7487b9e]
>
> /usr/lib/i386-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80e)[0xb75c281e]
>
> /usr/lib/i386-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x2e)[0xb7481b3e]
>
> /usr/lib/i386-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7e52)[0xb7489b32]
>
> /usr/lib/i386-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80e)[0xb75c281e]
>
> /usr/lib/i386-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5dd1)[0xb7487ab1]
>
> /usr/lib/i386-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80e)[0xb75c281e]
>
> /usr/lib/i386-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x2e)[0xb7481b3e]
>
> /usr/lib/i386-linux-gnu/libpython2.7.so.1.0(PyRun_StringFlags+0x68)[0xb7512498]
> build/X86/gem5.opt(_Z6m5MainiPPc+0x71)[0x84e9ee1]
> build/X86/gem5.opt(main+0x3c)[0x82fd39c]
> /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf7)[0xb7024637]
> --- END LIBC BACKTRACE ---
> Aborted
>
> 2. Details:
>
> Software:
>
> #include <stdio.h>
> int main()
> {
>     printf("Hello world!\n");
>     return 0;
> }
>
> Makefile:
>
> SRC = test.c
> GCC = g++
> GCCFLAGS = -static
> OUT = testBinary
>
> testBinary : test.o
>     $(GCC) $(GCCFLAGS) -o $(OUT) test.o
>
> test.o : test.c
>     $(GCC) -c -o $@ $<
>
> clean:
>     rm -f *.o $(OUT)
>
> - Mount the image and copy the testBinary to /usr.
> - Unmount image
> - On the gem5 fs, run: cd /usr; ./testBinary
>
> Console output:
> gem5.opt: build/X86/arch/x86/tlb.cc:348: Fault
> X86ISA::TLB::translate(RequestPtr, ThreadContext*, BaseTLB::Translation*,
> BaseTLB::Mode, bool&, bool): Assertion `entry' failed.
> Program aborted at cycle 84398750506500
> Aborted
>
> The same output is generated in gem5.debug, regardless if I use gem5 latest
> or gem5-stable version. The version gem5.fast reports an
> error:"Segmentation fault".
>
> Best regards,
> Jasmin
> _______________________________________________
> gem5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/gem5-dev
>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to