Skip to content

DAOS-623 test: instrument NLT fault-injection sweep hang - #18756

Draft
mjmac wants to merge 5 commits into
masterfrom
mjmac/DAOS-623-nlt-fi-hang
Draft

DAOS-623 test: instrument NLT fault-injection sweep hang#18756
mjmac wants to merge 5 commits into
masterfrom
mjmac/DAOS-623-nlt-fi-hang

Conversation

@mjmac

@mjmac mjmac commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Draft — diagnostic instrumentation, not for review or merge.

Purpose: capture evidence for the intermittent NLT hang that has aborted the NLT stage
~13 times in 5 days across 10 unrelated PRs (#18709, #18731, #17550, #18707, #18729,
#18718, #18733, #18737, #18740, #18741). Each occurrence costs the full stage timeout and
discards all artifacts, so no build so far has produced any diagnostic data.

What hangs

test_alloc_fail_cont_create in the NLT stage (which runs mode all). dfuse stops
answering FUSE requests it has already accepted; every client using the mount then blocks
in the kernel indefinitely, and NLT's sweep loop waits forever on children that can never
finish. Reproduced twice on a 16-core cloud client; intermittent (a second cluster ran the
same sweep 9 times without hanging).

The cause is not known. The obvious explanation — dfuse's threads all tied up
servicing stalled clients — is contradicted by the only thread stacks captured so far
(from a --thread-count 2 wedge, so not necessarily the same bug): the dfuse worker was
idle in read() while the kernel held 5 queued requests, i.e. requests accepted and never
answered rather than threads busy. Getting the equivalent stacks from a
default-configuration hang is exactly what this branch is for.

What this branch adds

  • A stall watchdog in the fault-injection sweep loop: if no child completes for
    NLT_FI_STALL_SECS (default 300), dump NLT thread stacks, per-child /proc state
    (wchan/syscall/State) and gdb backtraces of dfuse, the agent, the engine and the
    stalled children — then kill the wedged children so the run fails fast with artifacts
    intact instead of being aborted with none. Bounded by a wall-clock deadline, writes to a
    file as well as stdout, skips targets gdb cannot attach to, resumes any target a debugger
    left stopped, never blocks on children that outlive SIGKILL, and reports its own failure
    rather than aborting silently.
  • A bounded DFuse.stop() query. Teardown currently queries the very mount that may be
    wedged with no timeout, which is why a hang consumes the whole stage rather than one test.
  • Fail loudly when mode fi/all is requested but the build has no fault injection
    compiled in. Today that prints one line and exits green with the requested tests
    silently skipped.
  • Make dfuse's log level and thread count settable for FI runs; the sweep pins dfuse to
    WARN, so the prime suspect in a dfuse-side wedge logs nothing at all.

NLT-repeat: 5 is set to get multiple chances at an intermittent failure per build. Skip
pragmas restrict this to builds plus NLT.

Independent of this investigation, the watchdog and the bounded teardown would convert any
future NLT hang from a lost CI run into a fast, self-documenting test failure. If they look
useful beyond the debugging, they are worth proposing separately against master.

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

Ticket title is 'Generic ticket for minor code cleanup and improvement'
Status is 'Resolved'
Labels: 'request_for_2.6.5,request_for_2.6.6,request_for_2.8,scrubbed_2.6.5'
Job should run at elevated priority (1)
https://daosio.atlassian.net/browse/DAOS-623

@github-actions github-actions Bot added the priority Ticket has high priority (automatically managed) label Jul 30, 2026
@daosbuild3

Copy link
Copy Markdown
Collaborator

@mjmac mjmac changed the title DAOS-623 test: instrument the NLT fault-injection sweep hang (DRAFT - do not review) DAOS-623 test: instrument NLT fault-injection sweep hang Jul 30, 2026
@mjmac
mjmac force-pushed the mjmac/DAOS-623-nlt-fi-hang branch 3 times, most recently from b306f51 to 1e4d15e Compare July 30, 2026 22:46
@daosbuild3

Copy link
Copy Markdown
Collaborator

@daosbuild3

Copy link
Copy Markdown
Collaborator

mjmac added 4 commits August 3, 2026 13:54
A hung child stalls the sweep until the CI stage is killed, which
discards the artifacts and leaves nothing to diagnose.

Also fixes two bugs found while investigating: a wedged mount kept the
process alive past the end of the run, and a build without fault
injection support reported success without running anything.

Signed-off-by: Michael MacDonald <github@macdonald.cx>
A run that stops making progress shows from outside only as a futex
wait, which does not say which wait it is.  SIGUSR1 now dumps every
thread's Python stack, so a stall can be read rather than guessed at.

Signed-off-by: Michael MacDonald <michael.macdonald@hpe.com>
cleanup() runs from __del__, so it can fire during garbage collection,
where Thread.start() waits for a thread the collector will not schedule.
The thread existed to put a timeout on the flush, so the mechanism meant
to bound a hang was the hang: every run whose test failed stopped there,
holding the stage open for hours with its bzip2 children unreaped.

Bound the waits directly instead, which needs no thread.

Signed-off-by: Michael MacDonald <michael.macdonald@hpe.com>
CI Pylint spell-checks comments, but local hooks skip that check unless
python3-enchant is installed, so these only fail after a push.

Signed-off-by: Michael MacDonald <github@macdonald.cx>
@mjmac
mjmac force-pushed the mjmac/DAOS-623-nlt-fi-hang branch from 879ee0c to 01b0f11 Compare August 3, 2026 17:55
@daosbuild3

Copy link
Copy Markdown
Collaborator

The CI wrapper passes the variable through as an empty string when it is
unset, which is not the same as absent, so the fault injection
container-create test died before it ran a single iteration.

Signed-off-by: Michael MacDonald <github@macdonald.cx>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority Ticket has high priority (automatically managed)

Development

Successfully merging this pull request may close these issues.

2 participants