Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPEC2017: 505.mcf_r failure #20

Open
NikitaSobolev opened this issue Apr 29, 2020 · 1 comment
Open

SPEC2017: 505.mcf_r failure #20

NikitaSobolev opened this issue Apr 29, 2020 · 1 comment

Comments

@NikitaSobolev
Copy link

NikitaSobolev commented Apr 29, 2020

505.mcf_r test fails and calls stack trace.

How to reproduce this build:
https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/wiki/SPEC2017#how-to-run-prebuilt-spec

Config file used:
arc.cfg.txt
[Delte .txt extension before usage]

Test output: see below or in the file:
505.mcf_r_out.log

runcpu v5825
Using 'linux-arc-HSDKv1' tools
Reading file manifests... read 32282 entries from 2 files in 1.93s (16721 files/s)
Loading runcpu modules.................
Locating benchmarks...found 47 benchmarks in 53 benchsets.
Reading config file '/home/root/build/config/arc.cfg'
1 configuration selected:

 Action    Run Mode   Workload     Report Type      Benchmarks
--------   --------   --------   ----------------   ---------------------------
validate   rate       refrate    SPECrate2017_int   505.mcf_r
-------------------------------------------------------------------------------

Setting up environment for running 505.mcf_r...
Starting runcpu for 505.mcf_r...
Running "specperl /home/root/build/bin/sysinfo" to gather system information.
sysinfo: r5974 of 2018-05-19 (9bcde8f2999c33d61f64985e45859ea9)
sysinfo: Getting system information for Linux...
sysinfo: ...getting CPU info
sysinfo: ...getting info from numactl
sysinfo: ...getting memory info
sysinfo: ...getting OS info
sysinfo: ...getting disk info
Retrieving flags file (/home/root/build/config/flags/gcc.xml)...
Benchmarks selected: 505.mcf_r
Compiling Binaries
  Building 505.mcf_r base mytest-m32: (build_base_mytest-m32.0000) [2020-04-08 19:39:41]

Build successes for intrate: 505.mcf_r(base)
Build errors for intrate: None

Setting Up Run Directories
  Setting up 505.mcf_r refrate (ref) base mytest-m32 (1 copy): run_base_refrate_mytest-m32.0000
Running Benchmarks
  Running 505.mcf_r refrate (ref) base mytest-m32 (1 copy) [2020-04-08 19:39:58]

Oops
Path: /home/root/build/benchspec/CPU/505.mcf_r/run/run_base_refrate_mytest-m32.0000/mcf_r_base.mytest-m32
CPU: 2 PID: 2150 Comm: mcf_r_base.myte Not tainted 5.3.15 #1

[ECR   ]: 0x00060008 => Execute from Non-exec Page
[EFA   ]: 0x9003ecf4
[BLINK ]: __handle_domain_irq+0x40/0xd8
[ERET  ]: irq_enter+0x34/0x8c
[STAT32]: 0x00081a42 :   K DE
BTA: 0x9007dc90  SP: 0xbd2dbf58  FP: 0x00000f9e
LPS: 0x0001423a LPE: 0x000142a4 LPC: 0x00000000
r00: 0x00000000 r01: 0x00000010 r02: 0x00010000
r03: 0x40000002 r04: 0x00055c18 r05: 0x5feb1afc
r06: 0x009896f8 r07: 0x00000000 r08: 0x40c28518
r09: 0x00000001 r10: 0x5feb1a94 r11: 0x0001423a
r12: 0x9007dc90 r13: 0x900321bc r14: 0x00000000
r15: 0x000007cd r16: 0x00000000 r17: 0x00000602
r18: 0x00000001 r19: 0x00000000 r20: 0x00000000
r21: 0x00000000 r22: 0x0277b7e8 r23: 0x009326e0
r24: 0x900358de r25: 0xbd020800



Stack Trace:
  irq_enter+0x34/0x8c
  __handle_domain_irq+0x40/0xd8
  ret_from_exception+0x0/0x8
@vineetgarc
Copy link

vineetgarc commented May 19, 2020

This is not a test issue but a system issue (untranslated kernel code can't possibly take a ProtV exception) and I saw it too (on HSDKv1) with base image from Eugeniy D (and running SPEC2000 but not the same test).

My workaround was to build this function with -O0

diff --git a/kernel/softirq.c b/kernel/softirq.c
-void irq_enter(void)
+void __attribute__((optimize ("-O0"))) irq_enter(void)

shahab-vahedi pushed a commit that referenced this issue Nov 23, 2022
The following WARN is triggered from kvm_vm_ioctl_set_clock():
 WARNING: CPU: 10 PID: 579353 at arch/x86/kvm/../../../virt/kvm/kvm_main.c:3161 mark_page_dirty_in_slot+0x6c/0x80 [kvm]
 ...
 CPU: 10 PID: 579353 Comm: qemu-system-x86 Tainted: G        W  O      5.16.0.stable #20
 Hardware name: LENOVO 20UF001CUS/20UF001CUS, BIOS R1CET65W(1.34 ) 06/17/2021
 RIP: 0010:mark_page_dirty_in_slot+0x6c/0x80 [kvm]
 ...
 Call Trace:
  <TASK>
  ? kvm_write_guest+0x114/0x120 [kvm]
  kvm_hv_invalidate_tsc_page+0x9e/0xf0 [kvm]
  kvm_arch_vm_ioctl+0xa26/0xc50 [kvm]
  ? schedule+0x4e/0xc0
  ? __cond_resched+0x1a/0x50
  ? futex_wait+0x166/0x250
  ? __send_signal+0x1f1/0x3d0
  kvm_vm_ioctl+0x747/0xda0 [kvm]
  ...

The WARN was introduced by commit 03c0304 ("KVM: Warn if
mark_page_dirty() is called without an active vCPU") but the change seems
to be correct (unlike Hyper-V TSC page update mechanism). In fact, there's
no real need to actually write to guest memory to invalidate TSC page, this
can be done by the first vCPU which goes through kvm_guest_time_update().

Reported-by: Maxim Levitsky <mlevitsk@redhat.com>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20220407201013.963226-1-vkuznets@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants