gem5 x86 kvm doesn't work with error "KVM: Failed to enter virtualized mode (hw reason: 0x80000021)" - gem5

I tried to run gem5 fs mode with KVM to fast forward linux boot-up and failed with this error.
info: 0x4b564d04: 0x0
info: 0x3b: 0x0
info: 0x6e0: 0x0
info: 0x1a0: 0x0
info: 0x17a: 0x0
info: 0x17b: 0x0
info: 0x9e: 0x0
panic: KVM: Failed to enter virtualized mode (hw reason: 0x80000021)
Memory Usage: 33878524 KBytes
Program aborted at tick 186932115
--- BEGIN LIBC BACKTRACE ---
gem5/build/X86/gem5.opt(_Z15print_backtracev+0x28)[0x15e45d8]
gem5/build/X86/gem5.opt(_Z12abortHandleri+0x46)[0x15f5196]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7fb3c9f7d390]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7fb3c8a72428]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7fb3c8a7402a]
gem5/build/X86/gem5.opt[0x80f14f]
gem5/build/X86/gem5.opt[0x18cb151]
gem5/build/X86/gem5.opt(_ZN10BaseKvmCPU13handleKvmExitEv+0x1bc)[0x18cb8bc]
gem5/build/X86/gem5.opt(_ZN10BaseKvmCPU4tickEv+0x229)[0x18c8d69]
gem5/build/X86/gem5.opt(_ZN10EventQueue10serviceOneEv+0xd5)[0x15eb485]
gem5/build/X86/gem5.opt(_Z9doSimLoopP10EventQueue+0x48)[0x160a9c8]
gem5/build/X86/gem5.opt[0x160ad1f]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xbd57f)[0x7fb3c93e557f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fb3c9f736ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7fb3c8b4441d]
--- END LIBC BACKTRACE ---
I've used the gem5art and slightly modified the runscript not to run spec benchmark and run /bin/bash instead. It seems that this error has happened a while ago and issued in here. It seems that this problem has been fixed by the gem5 v19 but got the same error code. Could anyone explain why this error happens and how to fix it?

Related

Crash tool fails to load the vmcore file with error : Segmentation fault

I'm new to kernel debugging, I'm trying to analyze the vmcore file using crash tool on RHEL 7. I'm trying to open the dump with below command.
crash /lib/debug/lib/modules/3.10.0-1160.80.1.el7.x86_64/vmlinux vmcore
but tools fails to load the vmcore with below error:
WARNING: kernel relocated [460MB]: patching 87472 gdb minimal_symbol values
crash: page excluded: kernel virtual address: ffffffffffffffff type: "possible"
WARNING: cannot read cpu_possible_map
crash: page excluded: kernel virtual address: ffffffffffffffff type: "present"
WARNING: cannot read cpu_present_map
crash: page excluded: kernel virtual address: ffffffffffffffff type: "online"
WARNING: cannot read cpu_online_map
crash: page excluded: kernel virtual address: ffffffffffffffff type: "active"
WARNING: cannot read cpu_active_map
WARNING: kernel version inconsistency between vmlinux and dumpfile
crash: page excluded: kernel virtual address: ffffffffffffffff type: "cpu_present_map"
crash: page excluded: kernel virtual address: ffffffffffffffff type: "cpu_present_map"
crash: cannot determine thread return address
WARNING: cannot determine pgdat list for this kernel/architecture
please wait... (gathering kmem slab cache data)
crash: invalid kernel virtual address: 1c type: "kmem_cache objsize/object_size"
Segmentation fault (core dumped)
I'm not sure this the vmcore file issue or crash tool issue. Can someone please help resolve this issue.
Thanks in advance

Failed to use vscode remote ssh, but use ssh directly can work

Problem
I re-installed my server system.Before then, I can use remote-ssh normally.However, I can't use remote-ssh to connect to my server anymore.But I can still use ssh directly to connect to the server.
I suppose it managed to get into the system but somehow it broke down.
The error log is below:
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-77-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Tue 14 Sep 2021 09:56:58 PM CST
System load: 0.07 Processes: 117
Usage of /: 6.5% of 59.00GB Users logged in: 1
Memory usage: 10% IPv4 address for eth0: 10.0.12.2
Swap usage: 0%
* Super-optimized for small spaces - read how we shrank the memory
footprint of MicroK8s to make it the smallest full K8s around.
https://ubuntu.com/blog/microk8s-memory-optimisation
ready: 6425958cce28
Linux 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021
6425958cce28: running
bash: line 1: _exitcode: command not found
bash: line 2: syntax error near unexpected token `elif'
bash: line 2: ` elif [[ $ALLOW_CLIENT_DOWNLOAD == "1" ]]; then'
-sh: 4: function: not found
-sh: 69: [[: not found
-sh: 90: [[: not found
-sh: 155: Syntax error: "(" unexpected (expecting "then")
Transferred: sent 17180, received 4016 bytes, in 0.5 seconds
Bytes per second: sent 35433.6, received 8283.0
local-server-1> ssh child died, shutting down
[21:56:58.587] Failed to parse remote port from server output
[21:56:58.588] Resolver error: Error:
at Function.Create (/Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:64659)
at Object.t.handleInstallOutput (/Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:63302)
at Object.e [as tryInstallWithLocalServer] (/Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:387573)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async /Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:294473
at async Object.t.withShowDetailsEvent (/Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:406463)
at async /Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:386112
at async E (/Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:382710)
at async Object.t.resolveWithLocalServer (/Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:385728)
at async Object.t.resolve (/Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:1:295870)
at async /Users/luther/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.7/out/extension.js:127:110656
[21:56:58.592] ------
Tried
I tried delete the know_hosts file from host, re-install the remote-ssh plugin, but can't work
I am pretty new to remote-ssh, hope can give me more detailed solution.
Thanks :)
I downgraded remote-ssh.Then I changed my default shell into zsh and upgrade remote-ssh.It began to install '.vscode-server' file again and magically it worked.

run rabbitmq on windows

I was using rabbitmq on Windows about 6 months ago, now I am reinstalling rabbitmq and erlang but I get this error:
C:\Program Files\new_RabbitMQ Server\rabbitmq_server-3.8.12\sbin>rabbitmq-server
Configuring logger redirection
12:49:39.059 [warning] Using RABBITMQ_ADVANCED_CONFIG_FILE: c:/Users/ALFA RAYAN/AppData/Roaming/RabbitMQ/advanced.config
12:49:39.810 [error]
BOOT FAILED
12:49:39.810 [error] BOOT FAILED
===========
12:49:39.810 [error] ===========
ERROR: distribution port 25672 in use by another node: rabbit#Ali
12:49:39.810 [error] ERROR: distribution port 25672 in use by another node: rabbit#Ali
12:49:39.810 [error]
12:49:40.826 [error] Supervisor rabbit_prelaunch_sup had child prelaunch started with rabbit_prelaunch:run_prelaunch_first_phase() at undefined exit with reason {dist_port_already_used,25672,"rabbit","Ali"} in context start_error
12:49:40.826 [error] CRASH REPORT Process <0.150.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,"rabbit","Ali"}}},{rabbit_prelaunch_app,start,[normal,[]]}} in application_master:init/4 line 138
{"Kernel pid terminated",application_controller,"{application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,\"rabbit\",\"Ali\"}}},{rabbit_prelaunch_app,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,"rabbit","Ali"}}},{rabbit_prelau
Crash dump is being written to: erl_crash.dump...done
i use otp_win64_23.2 and rabbitmq-server-3.8.12
Go to windows services and look for RabbitMQ. Right click on it and stop the service.
Restart the RabbitMQ server in an administrator mode. This worked for me.

Rabbitmq server failed to boot

I'm trying to start my rabbitmq server using command:sudo rabbitmq-server on ubuntu 20.04 but it crashes.I have absolutely no clue whatsoever as to what I should do.
Rabbitmq version: 3.8.5 erlang version: 23
17:41:07.587 [error]
17:41:07.591 [error] BOOT FAILED
BOOT FAILED
17:41:07.592 [error] ===========
===========
17:41:07.592 [error] ERROR: distribution port 25672 in use by rabbit#nadaanbaalak
ERROR: distribution port 25672 in use by rabbit#nadaanbaalak
17:41:07.592 [error]
17:41:08.594 [error] Supervisor rabbit_prelaunch_sup had child prelaunch started with rabbit_prelaunch:run_prelaunch_first_phase() at undefined exit with reason {dist_port_already_used,25672,"rabbit","nadaanbaalak"} in context start_error
17:41:08.594 [error] CRASH REPORT Process <0.153.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,"rabbit","nadaanbaalak"}}},{rabbit_prelaunch_app,start,[normal,[]]}} in application_master:init/4 line 138
{"Kernel pid terminated",application_controller,"{application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,\"rabbit\",\"nadaanbaalak\"}}},{rabbit_prelaunch_app,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,"rabbit","nadaanbaalak"}}},{rabb
Crash dump is being written to: erl_crash.dump...done
Any help would be great
It's pretty simple. Just needed to look at the logs. killed the process at the port number "25672" and restarted the rabbitmq server.

running gem5 with SPEC2006

when running GEM5 X86 in SE mode, I am trying to run bzip2 from SPEC2006, at first it was failing because it says it can't run dynamic execution so I compiled it with -static flag.
now I get this error:
gem5 Simulator System. http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.
gem5 compiled Oct 27 2018 00:36:02
gem5 started Dec 22 2018 18:16:40
gem5 executing on Dan
command line: ./build/X86/gem5.opt configs/example/se.py -c /home/dan/SPEC2006/benchspec/CPU2006/401.bzip2/exe/bzip2_base.ia64-gcc42 -i /home/dan/SPEC2006/benchspec/CPU2006/401.bzip2/data/test/input/dryer.jpg
Could not import 03_BASE_FLAT
Could not import 03_BASE_NARROW
Global frequency set at 1000000000000 ticks per second
warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (4096 Mbytes)
0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000
**** REAL SIMULATION ****
info: Entering event queue # 0. Starting simulation...
panic: Tried to write unmapped address 0xffffedd8. Inst is at 0x400da4
# tick 5500
[invoke:build/X86/arch/x86/faults.cc, line 160]
Memory Usage: 4316736 KBytes
Program aborted at tick 5500
Aborted (core dumped)
I am running gem5 on ubuntu 17.10.
I tried to find solutions in google but I didn't see any one referring to this problem, does anyone know how to fix the problem?
Please check your host machine configuration. Bzip2 does not work in a 32-bit machine. My desktop is dual core have 32-bit X86 architecture, I tried to run bzip2 it had shown same error.