GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-145411: Add runtime (now: `unix` only) control to Tachyon by maurycy · Pull Request #149958 · python/cpython

Conversation

@maurycy

@maurycy maurycy commented May 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Only unix: for starters:

Control socket:
  --control URI         control socket URI (unix:<path>) (default: None)

Supported commands are enable, disable, ping, status and quit. Each command is confirmed with either ok or err.

Example session:

[1] 2026-05-17T21:18:38.400172000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (tachyon-runtime-socket ed77e71) % sudo -E ./python.exe -m profiling.sampling run --control unix:/tmp/tachyon.sock -r 666khz -m test test_asyncio &>/dev/null &
[1] 84494
2026-05-17T21:18:41.130015000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (tachyon-runtime-socket ed77e71) % echo -e 'ping' | sudo nc -U /tmp/tachyon.sock
ok
2026-05-17T21:18:42.759758000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (tachyon-runtime-socket ed77e71) % echo -e 'status' | sudo nc -U /tmp/tachyon.sock
ok enabled=True 
2026-05-17T21:18:44.875693000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (tachyon-runtime-socket ed77e71) % echo -e 'enable' | sudo nc -U /tmp/tachyon.sock
ok
2026-05-17T21:18:46.871140000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (tachyon-runtime-socket ed77e71) % echo -e 'disable' | sudo nc -U /tmp/tachyon.sock
ok
2026-05-17T21:18:48.756932000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (tachyon-runtime-socket ed77e71) % echo -e 'enable' | sudo nc -U /tmp/tachyon.sock
ok
2026-05-17T21:18:49.083766000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (tachyon-runtime-socket ed77e71) % echo -e 'zażółć gęślą jaźn' | sudo nc -U /tmp/tachyon.sock
err unknown_command
2026-05-17T21:18:50.670507000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (tachyon-runtime-socket ed77e71) % echo -e 'quit' | sudo nc -U /tmp/tachyon.sock
ok
[1]  + done       sudo -E ./python.exe -m profiling.sampling run --control  -r 666khz -m test 

Closes #149958

  • Issue: Add runtime control for profiling.sampling #145411

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@maurycy
here goes my sunday
ed77e71
@maurycy
maurycy requested a review from pablogsal as a code owner May 17, 2026 19:33
@bedevere-app bedevere-app Bot added the awaiting review label May 17, 2026
@bedevere-app bedevere-app Bot mentioned this pull request May 17, 2026
Add runtime control for profiling.sampling #145411
Open
maurycy
maurycy commented May 17, 2026
View reviewed changes
Comment thread Lib/profiling/sampling/_control.py
if conn in self._connections:
self._flush_connection(conn)

def _dispatch(self, conn, command):

@maurycy maurycy May 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

No dump / snapshot yet.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/profiling/sampling/cli.py
if getattr(args, 'control', None) is not None:
if args.subprocesses:
parser.error("--control is incompatible with --subprocesses.")
if os.name == "nt":

@maurycy maurycy May 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Unfortunately, I don't have access to Windows.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/profiling/sampling/cli.py

if getattr(args, 'control', None) is not None:
if args.subprocesses:
parser.error("--control is incompatible with --subprocesses.")

@maurycy maurycy May 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@pablogsal Proper communication with children would be very complex. Maybe we can just use signals for enabling and disabling them.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/profiling/sampling/_control.py
from .errors import ControlError, ControlURIError


class ProfilerControl:

@maurycy maurycy May 17, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I did not want to inject this into LiveCollector but the direction is clear.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@maurycy

maurycy commented May 17, 2026

Copy link
Copy Markdown
Contributor Author

cc @pablogsal @ivonastojanovic @lkollar

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maurycy maurycy changed the title gh-145411: Add socket control to Tachyon gh-145411: Add runtime (now: unix only) control to Tachyon May 17, 2026
maurycy added 3 commits May 17, 2026 21:48
@maurycy
blurb
1bc72ec
@maurycy
skip sample_interval_usec in v0
71c6b97
@maurycy
from ... contextlib
0fe9ad1
maurycy
maurycy commented May 17, 2026
View reviewed changes
Comment thread Lib/profiling/sampling/cli.py

with _get_child_monitor_context(args, args.pid):
server = None
with ExitStack() as stack:

@maurycy maurycy May 17, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Keeping should-be-soon-to-be-added signal (SIGUSR1, SIGUSR2 for enabling or disabling?) support in mind.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
maurycy and others added 3 commits May 17, 2026 22:01
@maurycy
accidentially removed comment
005098d
@maurycy
fix ci
63447d3
@maurycy
after sleeping over: 1-100ms latency here is ok
20bc76b
lkollar
lkollar reviewed May 18, 2026
View reviewed changes
Comment thread Lib/profiling/sampling/_control.py
self.close_after_write = False


class ControlServer:

@lkollar lkollar May 18, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for the PR @maurycy, this looks really interesting. I think we should introduce an abstraction here to be able to implement other transport protocols. Most importantly, I think we will need named pipes on Windows, but it would also allow things like adding TCP transport later down the line.

I spoke with @pablogsal briefly about this and we agreed that ideally we'd have Windows support also included in this change. Do you think you could look into that? I can run Windows in a VM and may be able to help out, but I'm not sure when I'll be able to get around to it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ivonastojanovic ivonastojanovic May 18, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

+1 on the abstraction, it would be great to have everything here. I’d also love to see the snapshot command in this change.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@maurycy maurycy May 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@ivonastojanovic @lkollar Thank you for the kind words. :) These are great ideas! I will get back to it on Monday. I will try to take a stab at named pipe over the weekend

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@maurycy maurycy May 31, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I've got drowned by other things, hence the delay.

@chris-eibl Would you be willing to pair on this? :-) I can open a PR in my fork.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chris-eibl reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@chris-eibl chris-eibl Jun 1, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sure thing!

I am a low on time atm, but should get better mid next week.

I think we should introduce an abstraction

Are you going to prepare the abstraction so I can concentrate on the named pipes on Windows?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

maurycy reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@maurycy maurycy mentioned this pull request May 24, 2026
_remote_debugging: reading whole pages over and over #149584
Open
@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Aug 30, 2026
@maurycy

maurycy commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for the reminder, bot. I will prioritize addressing the points raised during the review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Sep 5, 2026
@maurycy
Merge branch 'main' into tachyon-runtime-socket
44fa622
@bedevere-app bedevere-app Bot added the type-feature A feature request or enhancement label Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ivonastojanovic ivonastojanovic ivonastojanovic left review comments
@chris-eibl chris-eibl chris-eibl left review comments
@pablogsal pablogsal Awaiting requested review from pablogsal pablogsal is a code owner
+1 more reviewer
@lkollar lkollar lkollar left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review type-feature A feature request or enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@maurycy @lkollar @ivonastojanovic @chris-eibl
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.