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

drcachesim.drstatecmp-fuzz timeout on a64 #6944

Open
derekbruening opened this issue Aug 28, 2024 · 6 comments
Open

drcachesim.drstatecmp-fuzz timeout on a64 #6944

derekbruening opened this issue Aug 28, 2024 · 6 comments

Comments

@derekbruening
Copy link
Contributor

Hit a timeout in the drstatecmp-fuzz test on a64:

https://github.com/DynamoRIO/dynamorio/actions/runs/10586853907/job/29336444651?pr=6943

363/386 Test #317: code_api|tool.drcachesim.drstatecmp-fuzz .........................***Timeout 180.00 sec
@ivankyluk
Copy link
Contributor

When I try to reproduce the failure on a local machine, I get SEGV instead of timeout.

Here are some examples of instruction which causes SEGV:

instr 1e020008: scvtf %w0 $0x40 -> %s8
instr 05a00c07: uzp2 %z0.q %z0.q -> %z7.q
instr 1e43000e: ucvtf %w0 $0x40 -> %d14
instr 1e030008: ucvtf %w0 $0x40 -> %s8

generate_encoded_inst() in drstatecmp-fuzz-app.c randomizes the last 4 bits of the operand.

The issue is seen after the following commit:

commit 34b7435
Author: Assad Hashmi [email protected]
Date: Wed Apr 3 15:09:23 2024 +0100

i#5365 AArch64 SVE core, part 2: add signals support (#6725)

I can't reproduce the issue at the previous commit:

commit 0838ea7
Author: Derek Bruening [email protected]
Date: Tue Apr 2 17:52:37 2024 -0400

i#6712 record bounds: Add record filter sanity checks (#6749)

@ivankyluk
Copy link
Contributor

@AssadHashmi I've tried and failed to find a function that correctly verify if an instruction with a randomized operand is valid or not.

Are there ways to filter invalid functions for the test, drstatecmp-fuzz-app.c, and in general?

The instructions above passed the tests below:

static int
check_decoded_inst(instr_t *decoded_inst)
{
return instr_valid(decoded_inst) && instr_get_opcode(decoded_inst) != OP_xx &&
instr_raw_bits_valid(decoded_inst) && instr_operands_valid(decoded_inst);
}

@xdje42
Copy link
Contributor

xdje42 commented Sep 18, 2024

@AssadHashmi
Copy link
Contributor

Apologies for the late response @ivankyluk @derekbruening.

It looks like all the drcachesim.drstatecmp-fuzz failures referenced in this issue have been in aarch64-precommit and not in aarch64-sve-precommit-*. Looking at the example failures:

instr 1e020008: scvtf %w0 $0x40 -> %s8
instr 05a00c07: uzp2 %z0.q %z0.q -> %z7.q
instr 1e43000e: ucvtf %w0 $0x40 -> %d14
instr 1e030008: ucvtf %w0 $0x40 -> %s8

I notice there's an SVE instruction uzp2 %z0.q %z0.q -> %z7.q generated by the fuzzer. The aarch64-precommit tests are run on a Neoverse N1 machine which doesn't support SVE. The aarch64-sve-precommit-* are run on a Neoverse V1 machine which supports SVE and they don't fail drcachesim.drstatecmp-fuzz AFAICT.

It looks like commit 34b7435 should have included changes to the fuzz tests detecting hardware features in order to only generate instructions available on the hardware. Can you confirm that you have not seen drcachesim.drstatecmp-fuzz failing in the aarch64-sve-precommit-*s?

@derekbruening
Copy link
Contributor Author

Every failure should be linked to here so clicking on all the xrefs above should show which jobs+machines they ran on

@AssadHashmi
Copy link
Contributor

Every failure should be linked to here so clicking on all the xrefs above should show which jobs+machines they ran on

I've checked all the xrefs linked here and drcachesim.drstatecmp-fuzz only fails on aarch64-precommit so I'm going to assume that the failures are to do with the test running SVE instructions on non-SVE hardware.

ivankyluk added a commit that referenced this issue Oct 3, 2024
…is fixed. (#7017)

Ignore CI test drcachesim.drstatecmp-fuzz failure until #6944 is fixed.

Issue: #6944
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants