JuliaMath / JuliaMath/openlibm

mips64 / mips64el CI: spurious FPU exception flags under qemu-user

Open
#347 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
632
Forks
163
Avg merge
4m
Merged PRs (30d)
1

Description

The `mips64` and `mips64el` entries in `.github/workflows/cross.yml` are disabled because the in-tree test suite fails under `qemu-user` on Ubuntu 24.04. Disabled in #346.

## Symptom

`make test` (which runs `test/test-float` and `test/test-double`) reports ~1600 failures, all of the form:

\`\`\`
Failure: yn (1, 1.5) == -0.41230862697391129595: Exception "Invalid operation" set
Failure: yn (1, 2.0) == -0.10703243154093754689: Exception "Divide by zero" set
\`\`\`

The computed *value* is correct in each case — the test fails only because the FPU exception flag is unexpectedly set after the call. No numeric disagreement.

Failing run (mips64): https://github.com/JuliaMath/openlibm/actions/runs/27987699090/job/82832967366
Failing run (mips64el): https://github.com/JuliaMath/openlibm/actions/runs/27987699090/job/82832967387

32-bit `mips` and `mipsel` pass under the same qemu / toolchain combination, which strongly suggests this is `qemu-user` mishandling MIPS64 FPU status register semantics rather than an openlibm bug. Possibly related: qemu's softfloat IEEE flag mapping for the n64 ABI.

## To investigate

- Reproduce on bare metal or under `qemu-system-mips64` (full-system) and compare flag behavior.
- Check whether `qemu-user >= ` fixes it (current pin is Ubuntu 24.04's qemu).
- If qemu-user is unfixable here, decide whether to keep mips64 CI entirely or run only with exception-flag assertions skipped (the openlibm-test suite has `SKIP_FP_EXCEPT_TEST=1`; the in-tree suite would need an equivalent knob).

## How to re-enable

In `.github/workflows/cross.yml`, uncomment the two matrix entries:

\`\`\`yaml
- { arch: mips64, triple: mips64-linux-gnuabi64 }
- { arch: mips64el, triple: mips64el-linux-gnuabi64 }
\`\`\`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with `.github/workflows/cross.yml` and reproduce `make test`, including `test/test-float` and `test/test-double`, under the pinned Ubuntu 24.04 qemu-user setup. Compare exception-flag behavior on bare metal or `qemu-system-mips64`, and check whether a newer qemu changes it. Done means determining whether the CI entries can be re-enabled or documenting and implementing an equivalent exception-test skip.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, github-actions, ubuntu
Domain
ci-cd, operating-systems, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.