microsoft / microsoft/injectorppforrust

getenv doctest hangs on armv7-unknown-linux-gnueabihf CI

Open
#111 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
404
Forks
19
Avg merge
23h 57m
Merged PRs (30d)
1

Description

Description

The \getenv\ doctest at \src/lib.rs\ line 438 hangs indefinitely on the \rmv7-unknown-linux-gnueabihf\ CI target (ubuntu-24.04-arm runner). All other 28 doctests pass. The same doctest passes on all other platforms including \ humbv7neon-unknown-linux-gnueabihf\ (same ARM32 architecture, different instruction set).

Steps to reproduce

Run \cargo test --target armv7-unknown-linux-gnueabihf --doc\ on an ubuntu-24.04-arm GitHub Actions runner.

Evidence from CI logs

\
test src/lib.rs - (line 493) ... ok
test src/lib.rs - (line 438) has been running for over 60 seconds
\\

Job ID: 66241023177 in workflow run 22838910297.

Root cause analysis

The doctest patches the C \getenv\ function using injectorpp. On armv7, the patched function appears to enter an infinite loop or deadlock. Possible causes:

  1. libc version change: The ubuntu-24.04-arm runner has been updated since the last successful main CI run (September 2025). A newer glibc may use a different \getenv\ implementation (e.g., different PLT/GOT layout, ifunc resolvers, or thread-safety wrappers) that conflicts with the ARM32 patching mechanism.

  2. Cross-compilation artifact: armv7 tests are cross-compiled on an aarch64 host. The \getenv\ symbol resolution may differ from native armv7 compilation.

  3. Thumb vs ARM mode: The armv7 target may compile \getenv\ call sites differently than thumbv7neon, affecting how the patched trampoline redirects execution.

Current workaround

PR #110 changed the ARM CI test command from \cargo test\ to \cargo test --tests\ to skip doctests on ARM targets. Doctests are still validated on x86_64 (Linux, Windows), aarch64 (Linux, Windows, macOS), and other platforms.

Environment

  • Runner: ubuntu-24.04-arm (aarch64 host)
  • Target: armv7-unknown-linux-gnueabihf (cross-compiled)
  • Rust toolchain: stable
  • Works on: x86_64, aarch64, thumbv7neon, macOS aarch64, Windows x86_64, Windows aarch64

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read src/lib.rs around line 438 and reproduce with cargo test --target armv7-unknown-linux-gnueabihf --doc on an ubuntu-24.04-arm runner. Compare the failing getenv doctest with thumbv7neon behavior and review PR #110's ARM test change. Done means the armv7 doctest no longer hangs and its CI handling is clear.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.