Skip to content

xfs_repair: pthread creation failure recovery fixes

[email protected] linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3xfs_repair: clear pthread_t when pthread_create failsrepair/prefetch.c+2 -01 reply
2/3xfs_repair: add prefetch trace calls to debug thread creation failuresrepair/prefetch.c+8 -11 reply
3/3xfs_repair: fix thread creation failure recoveryrepair/prefetch.c+32 -60 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchEric Sandeen
1/3R-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] xfs_repair: pthread creation failure recovery fixes

From: Jeff Mahoney <[email protected]>

Hi all -

I recently had a bug report where xfs_repair in the dracut initramfs environment was crashing. It turned out to be due to systemd setting up cgroup pids limits and pthread_create was failing. The "real" fix is to remove that limit, but it created a easily reproducable scenario with which to test thread creation failure recovery. A combination of a small pids limit and MALLOC_PERTURB_ shook out a few bugs. There's more work to be done here since it should probably fall back to single threads whenever we can't create a thread, but I only tackled the cases that were already being handled gracefully instead of erroring out.

-Jeff

---

Jeff Mahoney (3):
xfs_repair: clear pthread_t when pthread_create fails
xfs_repair: add prefetch trace calls to debug thread creation failures
xfs_repair: fix thread creation failure recovery

 repair/prefetch.c | 49 ++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 42 insertions(+), 7 deletions(-)
Signature · 1 line
2.7.1