perfkvmcounter ::附件失败(1)docker中运行GEM5 x86全系统模式的错误

发布于 2025-02-09 09:12:51 字数 7344 浏览 2 评论 0 原文

我正在从 x86-ubuntu-run-with-kvm.py 示例脚本时,出现了错误:

root@76ff3d8f98ef:~/gem5# build/X86/gem5.opt configs/example/gem5_library/x86-ubuntu-run-with-kvm.py
gem5 Simulator System.  https://www.gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 22.0.0.1
gem5 compiled Jun 20 2022 01:37:09
gem5 started Jun 20 2022 03:28:17
gem5 executing on 76ff3d8f98ef, pid 11037
command line: build/X86/gem5.opt configs/example/gem5_library/x86-ubuntu-run-with-kvm.py

warn: <orphan X86Board>.kvm_vm already has parent not resetting parent.
        Note: kvm_vm is not a parameter of X86Board
warn: (Previously declared as <orphan X86Board>.processor.kvm_vm
warn: The simulate package is still in a beta state. The gem5 project does not guarantee the APIs within this package will remain consistent across upcoming releases.
Global frequency set at 1000000000000 ticks per second
build/X86/mem/dram_interface.cc:692: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (4096 Mbytes)
build/X86/sim/kernel_workload.cc:46: info: kernel located at: /root/.cache/gem5/x86-linux-kernel-5.4.49
build/X86/base/statistics.hh:280: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated.
      0: board.pc.south_bridge.cmos.rtc: Real-time clock set to Sun Jan  1 00:00:00 2012
board.pc.com_1.device: Listening for connections on port 3459
build/X86/dev/intel_8254_timer.cc:128: warn: Reading current count from inactive timer.
0: board.remote_gdb: listening for remote gdb on port 7003
build/X86/cpu/kvm/base.cc:150: info: KVM: Coalesced MMIO disabled by config.
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 2
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 3
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 4
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 5
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 6
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 8
build/X86/cpu/kvm/base.cc:150: info: KVM: Coalesced MMIO disabled by config.
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 2
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 3
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 4
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 5
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 6
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 8
build/X86/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting simulation...
build/X86/cpu/kvm/perfevent.ccbuild/X86/cpu/kvm/perfevent.cc:183: panic: PerfKvmCounter::attach failed (1)
Memory Usage: 3885212 KBytes
:183: panic: PerfKvmCounter::attach failed (1)
Memory Usage: 3885212 KBytes
Program aborted at tick Aborted (core dumped)

我已经检查了有关资源文件的MD5SUM值<代码>“ x86-linux-kernel-5.4.49” 和“ x86-ubuntu-18.04-img” ,它们的值与“ NOROFOLL NOREFERRER”>资源

顺便说一句,我运行码头

 sudo docker run --name m00xxx --device=/dev/kvm --volume /usr2/m00xxx/gem5:/home/gem5 -P -it gem5test:0614 

,然后从

我从GDB获得了回溯:

(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007f2ef4cc47f1 in __GI_abort () at abort.c:79
#2  0x0000562c8e8383ef in gem5::Logger::exit_helper (this=<optimized out>) at build/X86/base/logging.hh:125
#3  0x0000562c8ea46f2d in gem5::PerfKvmCounter::attach (this=this@entry=0x562c920d2588, config=...,
    tid=tid@entry=0, group_fd=group_fd@entry=-1) at build/X86/cpu/kvm/perfevent.cc:183
#4  0x0000562c8ea2b6f9 in gem5::PerfKvmCounter::attach (tid=0, config=..., this=0x562c920d2588)
    at build/X86/cpu/kvm/perfevent.hh:208
#5  gem5::BaseKvmCPU::setupCounters (this=this@entry=0x562c920d2000) at build/X86/cpu/kvm/base.cc:1295
#6  0x0000562c8ea2e021 in gem5::BaseKvmCPU::restartEqThread (this=0x562c920d2000) at build/X86/cpu/kvm/base.cc:248
#7  0x0000562c8ef8ef5d in std::function<void ()>::operator()() const (this=0x562c958ccab8)
    at /usr/include/c++/7/bits/std_function.h:706
#8  gem5::EventFunctionWrapper::process (this=0x562c958cca80) at build/X86/sim/eventq.hh:1141
#9  gem5::EventQueue::serviceOne (this=this@entry=0x562c9128b3c0) at build/X86/sim/eventq.cc:223
#10 0x0000562c8efb70a0 in gem5::doSimLoop (eventq=eventq@entry=0x562c9128b3c0) at build/X86/sim/simulate.cc:308
#11 0x0000562c8efbb0c1 in gem5::SimulatorThreads::thread_main (queue=0x562c9128b3c0, this=0x562c91b765b0)
    at build/X86/sim/simulate.cc:157
#12 gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}::operator()(gem5::EventQueue*) const
    (eq=0x562c9128b3c0, __closure=<optimized out>) at build/X86/sim/simulate.cc:105
#13 std::__invoke_impl<void, gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}, gem5::EventQueue*>(std::__invoke_other, gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}&&, gem5::EventQueue*&&) (__f=...) at /usr/include/c++/7/bits/invoke.h:60
#14 std::__invoke<gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}, gem5::EventQueue*>(std::__invoke_result&&, (gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}&&)...) (__fn=...)
    at /usr/include/c++/7/bits/invoke.h:95
#15 std::thread::_Invoker<std::tuple<gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}, gem5::EventQueue*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (this=<optimized out>)
    at /usr/include/c++/7/thread:234
#16 std::thread::_Invoker<std::tuple<gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}, gem5::EventQueue*> >::operator()() (this=<optimized out>) at /usr/include/c++/7/thread:243
#17 std::thread::_State_impl<std::thread::_Invoker<std::tuple<gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}, gem5::EventQueue*> > >::_M_run() (this=<optimized out>) at /usr/include/c++/7/thread:186
#18 0x00007f2ef56e86df in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#19 0x00007f2ef6e986db in start_thread (arg=0x7f2e2eb19700) at pthread_create.c:463
#20 0x00007f2ef4da561f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

I am learning the gem5 from the document in a docker based on x86_64 ubuntu18.04,when I run the x86-ubuntu-run-with-kvm.py example script, the errors came up:

root@76ff3d8f98ef:~/gem5# build/X86/gem5.opt configs/example/gem5_library/x86-ubuntu-run-with-kvm.py
gem5 Simulator System.  https://www.gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 22.0.0.1
gem5 compiled Jun 20 2022 01:37:09
gem5 started Jun 20 2022 03:28:17
gem5 executing on 76ff3d8f98ef, pid 11037
command line: build/X86/gem5.opt configs/example/gem5_library/x86-ubuntu-run-with-kvm.py

warn: <orphan X86Board>.kvm_vm already has parent not resetting parent.
        Note: kvm_vm is not a parameter of X86Board
warn: (Previously declared as <orphan X86Board>.processor.kvm_vm
warn: The simulate package is still in a beta state. The gem5 project does not guarantee the APIs within this package will remain consistent across upcoming releases.
Global frequency set at 1000000000000 ticks per second
build/X86/mem/dram_interface.cc:692: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (4096 Mbytes)
build/X86/sim/kernel_workload.cc:46: info: kernel located at: /root/.cache/gem5/x86-linux-kernel-5.4.49
build/X86/base/statistics.hh:280: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated.
      0: board.pc.south_bridge.cmos.rtc: Real-time clock set to Sun Jan  1 00:00:00 2012
board.pc.com_1.device: Listening for connections on port 3459
build/X86/dev/intel_8254_timer.cc:128: warn: Reading current count from inactive timer.
0: board.remote_gdb: listening for remote gdb on port 7003
build/X86/cpu/kvm/base.cc:150: info: KVM: Coalesced MMIO disabled by config.
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 2
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 3
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 4
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 5
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 6
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 8
build/X86/cpu/kvm/base.cc:150: info: KVM: Coalesced MMIO disabled by config.
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 2
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 3
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 4
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 5
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 6
build/X86/arch/x86/cpuid.cc:181: warn: x86 cpuid family 0x0000: unimplemented function 8
build/X86/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting simulation...
build/X86/cpu/kvm/perfevent.ccbuild/X86/cpu/kvm/perfevent.cc:183: panic: PerfKvmCounter::attach failed (1)
Memory Usage: 3885212 KBytes
:183: panic: PerfKvmCounter::attach failed (1)
Memory Usage: 3885212 KBytes
Program aborted at tick Aborted (core dumped)

I've checked the md5sum value about the resources files "x86-linux-kernel-5.4.49" and "x86-ubuntu-18.04-img" , they are the same value as showed in the resources json.

BTW, I run the docker by

 sudo docker run --name m00xxx --device=/dev/kvm --volume /usr2/m00xxx/gem5:/home/gem5 -P -it gem5test:0614 

And I pull the original docker from https://www.gem5.org/documentation/general_docs/building.

I got the backtrace from gdb:

(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007f2ef4cc47f1 in __GI_abort () at abort.c:79
#2  0x0000562c8e8383ef in gem5::Logger::exit_helper (this=<optimized out>) at build/X86/base/logging.hh:125
#3  0x0000562c8ea46f2d in gem5::PerfKvmCounter::attach (this=this@entry=0x562c920d2588, config=...,
    tid=tid@entry=0, group_fd=group_fd@entry=-1) at build/X86/cpu/kvm/perfevent.cc:183
#4  0x0000562c8ea2b6f9 in gem5::PerfKvmCounter::attach (tid=0, config=..., this=0x562c920d2588)
    at build/X86/cpu/kvm/perfevent.hh:208
#5  gem5::BaseKvmCPU::setupCounters (this=this@entry=0x562c920d2000) at build/X86/cpu/kvm/base.cc:1295
#6  0x0000562c8ea2e021 in gem5::BaseKvmCPU::restartEqThread (this=0x562c920d2000) at build/X86/cpu/kvm/base.cc:248
#7  0x0000562c8ef8ef5d in std::function<void ()>::operator()() const (this=0x562c958ccab8)
    at /usr/include/c++/7/bits/std_function.h:706
#8  gem5::EventFunctionWrapper::process (this=0x562c958cca80) at build/X86/sim/eventq.hh:1141
#9  gem5::EventQueue::serviceOne (this=this@entry=0x562c9128b3c0) at build/X86/sim/eventq.cc:223
#10 0x0000562c8efb70a0 in gem5::doSimLoop (eventq=eventq@entry=0x562c9128b3c0) at build/X86/sim/simulate.cc:308
#11 0x0000562c8efbb0c1 in gem5::SimulatorThreads::thread_main (queue=0x562c9128b3c0, this=0x562c91b765b0)
    at build/X86/sim/simulate.cc:157
#12 gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}::operator()(gem5::EventQueue*) const
    (eq=0x562c9128b3c0, __closure=<optimized out>) at build/X86/sim/simulate.cc:105
#13 std::__invoke_impl<void, gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}, gem5::EventQueue*>(std::__invoke_other, gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}&&, gem5::EventQueue*&&) (__f=...) at /usr/include/c++/7/bits/invoke.h:60
#14 std::__invoke<gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}, gem5::EventQueue*>(std::__invoke_result&&, (gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}&&)...) (__fn=...)
    at /usr/include/c++/7/bits/invoke.h:95
#15 std::thread::_Invoker<std::tuple<gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}, gem5::EventQueue*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (this=<optimized out>)
    at /usr/include/c++/7/thread:234
#16 std::thread::_Invoker<std::tuple<gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}, gem5::EventQueue*> >::operator()() (this=<optimized out>) at /usr/include/c++/7/thread:243
#17 std::thread::_State_impl<std::thread::_Invoker<std::tuple<gem5::SimulatorThreads::runUntilLocalExit()::{lambda(gem5::EventQueue*)#1}, gem5::EventQueue*> > >::_M_run() (this=<optimized out>) at /usr/include/c++/7/thread:186
#18 0x00007f2ef56e86df in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#19 0x00007f2ef6e986db in start_thread (arg=0x7f2e2eb19700) at pthread_create.c:463
#20 0x00007f2ef4da561f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜味拾荒者 2025-02-16 09:12:51

您应该将perf_event_paranoid设置为“ -1”。在您的主机计算机类型中:

echo "-1" | sudo tee /proc/sys/kernel/perf_event_paranoid

You should set perf_event_paranoid to "-1". In your host machine type:

echo "-1" | sudo tee /proc/sys/kernel/perf_event_paranoid
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文