Skip to content

tracer: load initial maps from /proc/<pid>/maps#655

Open
fw-immunant wants to merge 4 commits intomainfrom
fw/tracer-initial-maps
Open

tracer: load initial maps from /proc/<pid>/maps#655
fw-immunant wants to merge 4 commits intomainfrom
fw/tracer-initial-maps

Conversation

@fw-immunant
Copy link
Contributor

@fw-immunant fw-immunant commented Jan 8, 2026

Fixes #315. That said, this is atop #595 which causes problems as I haven't finished debugging the tracer's hangs.

The tracer hangs have now been resolved. 🎉

No longer atop #595. But it may be the case that there are lingering tracer hangs.

@oinoom
Copy link
Contributor

oinoom commented Jan 13, 2026

Maybe not directly related to this PR, but I was looking through the track memory map given your hang issues, and noted that I didn't see handling in the syscall-exit path for WAIT_GROUP_STOP, WAIT_SIGSEGV, WAIT_SIGNALED, WAIT_CONT, and WAIT_PTRACE_FORK. Hopefully this helps. I wonder about the last one and if that's the one that's causing the hangs

@fw-immunant fw-immunant force-pushed the fw/tracer-initial-maps branch from e5e90e7 to 5319f1b Compare February 4, 2026 18:11
@fw-immunant
Copy link
Contributor Author

fw-immunant commented Feb 4, 2026

Maybe not directly related to this PR, but I was looking through the track memory map given your hang issues, and noted that I didn't see handling in the syscall-exit path for WAIT_GROUP_STOP, WAIT_SIGSEGV, WAIT_SIGNALED, WAIT_CONT, and WAIT_PTRACE_FORK. Hopefully this helps. I wonder about the last one and if that's the one that's causing the hangs

This is intentional, but I've made it clearer in the commit "track_memory_map: print in more error cases" (landed as 73f7100).

@fw-immunant
Copy link
Contributor Author

fw-immunant commented Feb 4, 2026

@fw-immunant
Copy link
Contributor Author

fw-immunant commented Feb 6, 2026

If #661 lands first, then this PR will need a rebase and should be sure to include a commit reverting "memory-map: allow [pkey_]mprotect of unknown memory".

EDIT: I've put this atop #661 (with said revert) anyways, see next comment.

@fw-immunant fw-immunant force-pushed the fw/tracer-initial-maps branch from 4f8eebe to 4254351 Compare February 6, 2026 20:00
@fw-immunant
Copy link
Contributor Author

fw-immunant commented Feb 6, 2026

Hmm, this is giving "attempting to pkey_mprotect unmapped memory" errors even as-is. I'll see if rebasing atop #661 solves things.

EDIT: Wonderful, looks like it does.

@fw-immunant fw-immunant force-pushed the fw/tracer-initial-maps branch from 4254351 to 2cdcced Compare February 6, 2026 20:49
@fw-immunant fw-immunant force-pushed the fw/tracer-initial-maps branch from 2cdcced to 4149604 Compare February 10, 2026 00:58
@fw-immunant fw-immunant requested a review from oinoom February 10, 2026 01:10
@fw-immunant
Copy link
Contributor Author

This is now ready for review.

@fw-immunant
Copy link
Contributor Author

CI hit a strange failure that I've reproduced on main and filed as #667. Since it occurs on main, it isn't an issue with this PR.

@ayrtonm ayrtonm self-requested a review February 23, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory map does not track initial mappings

2 participants