Skip to content

GH-145278: also filter mmap2 in strace_helper.filter_memory#148648

Merged
encukou merged 1 commit intopython:mainfrom
FFY00:fix-test-strace-helper-filter-memory-call-mmap2
Apr 20, 2026
Merged

GH-145278: also filter mmap2 in strace_helper.filter_memory#148648
encukou merged 1 commit intopython:mainfrom
FFY00:fix-test-strace-helper-filter-memory-call-mmap2

Conversation

@FFY00
Copy link
Copy Markdown
Member

@FFY00 FFY00 commented Apr 16, 2026

Signed-off-by: Filipe Laíns <lains@riseup.net>
@FFY00 FFY00 added skip news 🔨 test-with-buildbots Test PR w/ buildbots; report in status section labels Apr 16, 2026
@bedevere-bot
Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @FFY00 for commit 1880772 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F148648%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Apr 16, 2026
@FFY00 FFY00 requested a review from encukou April 16, 2026 13:24
Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vstinner
Copy link
Copy Markdown
Member

We should wait for "ARM Raspbian 3.x" buildbot worker to report if tests pass or not. Right now, there are two queued job on "ARM Raspbian PR": https://buildbot.python.org/#/builders/1062.

@FFY00
Copy link
Copy Markdown
Member Author

FFY00 commented Apr 16, 2026

Yep, I am monitoring it to see if this change actually fixes the buildbot failure 👍

@FFY00
Copy link
Copy Markdown
Member Author

FFY00 commented Apr 16, 2026

Raspbian seems to be passing now.

https://buildbot.python.org/all/#/builders/1062/builds/1357

I'll wait for the rest of the buildbots to finish, and then I'll merge.

def _filter_memory_call(call):
# mmap can operate on a fd or "MAP_ANONYMOUS" which gives a block of memory.
# Ignore "MAP_ANONYMOUS + the "MAP_ANON" alias.
if call.syscall == "mmap" and "MAP_ANON" in call.args[3]:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also would be happy with call.syscall.startswith('mmap') here as a guard against mmap3 / future extensions as well.

@encukou
Copy link
Copy Markdown
Member

encukou commented Apr 20, 2026

PR Buildbots are green; I'll merge.

startswith can go in the next PR -- third time's the charm, right?

@encukou encukou merged commit 513db72 into python:main Apr 20, 2026
126 checks passed
@cmaloney
Copy link
Copy Markdown
Contributor

This is more like 5th ><. There were a couple reverts getting bots clean to land the strace testing infrastructure...

If there is a more reliable way to check for accidental additions of stat or read system calls when reading a file am all ears. At least 3 times before the strace test people optimized and then more calls were accidentally added...

@encukou
Copy link
Copy Markdown
Member

encukou commented Apr 21, 2026

Well, the best way to classify accidental vs. intended additions is, still, human review. Can we make that easier? Perhaps change an error message to point to the place to fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants