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 — Align faulthandler watchdog timeouts with CPython by youknowdot · Pull Request #9775 · RustPython/RustPython

Conversation

@youknowdot

@youknowdot youknowdot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Accept timeout= in dump_traceback_later and signum= in register, matching CPython 3.15.
  • Convert watchdog timeouts through the existing signed pytime helper after repeat/exit truth conversion. Preserve integer-protocol precedence, float-subclass handling, exception order, microsecond rounding, and native/C-long limits before file lookup.
  • Keep the watchdog's original deadline across condition-variable notifications instead of treating any wake as an expired timeout.
  • Add deterministic conversion probes and a notification regression test. Tiny positive timeout probes use an invalid descriptor and never start a watchdog; the successful keyword probe uses a long, immediately cancelled timeout.

This patch does not change signal callbacks or frame traversal. Existing watchdog max_threads, file-retention, and cancellation-joining gaps remain outside its scope. It adds no work to the VM execution loop.

Validation

  • Fresh Linux release build passed.
  • Affected time/signal snippets pass under both RustPython and CPython 3.15.1. The previous RustPython binary fails the new timeout-keyword regression.
  • Workspace Rust tests: 1,535 passed, 20 ignored. C-API tests: 149 passed, 2 ignored. Both strict all-target Clippy runs passed.
  • Full test_faulthandler, test_time, and test_signal passed: respectively 51/65/57 tests run and 11/19/25 skipped. The affected pytest snippet cases passed.
  • Full native snippet run: 242 passed, 6 failed. The same six failures reproduce with the previous binary: four AF_UNIX restrictions, one chown EINVAL in this executor, and the default build's missing SQLite feature. CPython 3.15.1 also reproduces the AF_UNIX and chown restrictions. This is not a full snippet pass.
  • Independent read-only review and normal commit hooks passed.
  • The final commit has the tested source tree. Windows and 32-bit runtime validation remain for hosted CI; no cross-platform runtime pass is claimed.

Reference

CPython 3.15.1 faulthandler implementation and Clinic wrappers.

AI assistance: OpenAI Codex assisted implementation, review, and validation. Both commits include an Assisted-by trailer.

Sorry, something went wrong.

Uh oh!

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

All reactions
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

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

youknowone
youknowone requested changes Nov 10, 2026
View reviewed changes
Comment thread extra_tests/snippets/stdlib_time.py Outdated


# Faulthandler watchdogs use the same signed-nanosecond conversion as sleep.
import faulthandler

@youknowone youknowone Nov 10, 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.

this is improper. do not add import faulthandler in stdlib_time. separate stdlib_faulthandler for this

Sorry, something went wrong.

Uh oh!

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

All reactions

@youknowdot youknowdot Nov 11, 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.

Moved the timeout and register regression tests into stdlib_faulthandler.py in f88bd7d, leaving stdlib_time.py and stdlib_signal.py unchanged. The dedicated snippet passes on RustPython and CPython 3.15.1.

Sorry, something went wrong.

Uh oh!

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

All reactions
youknowone
youknowone approved these changes Nov 11, 2026
View reviewed changes
@youknowdot
youknowdot force-pushed the fix/watchdog-timeouts-20261110 branch from f88bd7d to 3d437ee Compare November 11, 2026 14:43
@youknowdot youknowdot mentioned this pull request Nov 11, 2026
Match remaining native signatures and watchdog thread limits #9808
Merged
@youknowdot
youknowdot force-pushed the fix/watchdog-timeouts-20261110 branch from 3d437ee to 4669cb0 Compare November 12, 2026 02:44
youknowdot added 3 commits November 12, 2026 18:17
@youknowdot @codex
Align faulthandler watchdog timeouts with CPython
bebc736
Use the shared signed PyTime conversion and platform bounds, accept timeout/signum keywords, and preserve the watchdog deadline across notifications. Add safe numeric-conversion and notification regression coverage.

Assisted-by: OpenAI Codex:model version not exposed
@youknowdot @codex
Mark watchdog regression module explicitly as test-only
01ece93
Keep the native-platform guard separate so the tests_outside_test_module Clippy lint recognizes the cfg(test) module.

Assisted-by: OpenAI Codex:model version not exposed
@youknowdot @codex
Separate faulthandler regression snippets
261911f
Move watchdog timeout and signal-registration probes into stdlib_faulthandler.py, preserving their assertions and guards. Keep the time and signal snippets focused on their own modules.

Assisted-by: OpenAI Codex:model version not exposed
@youknowdot
youknowdot force-pushed the fix/watchdog-timeouts-20261110 branch from 4669cb0 to 261911f Compare November 12, 2026 09:19
@codspeed

codspeed Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 62 untouched benchmarks
⏩ 4 skipped benchmarks1


Comparing youknowdot:fix/watchdog-timeouts-20261110 (261911f) with main (586d38a)

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

All reactions

Sorry, something went wrong.

Uh oh!

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

@youknowone
youknowone marked this pull request as ready for review November 12, 2026 10:53
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-12T10:53:50.455389Z
We couldn’t complete this review. Comment @codex review to try again.
261911f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

All reactions

Sorry, something went wrong.

Uh oh!

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

@youknowone
youknowone merged commit e2abc4c into RustPython:main Nov 12, 2026
28 checks passed

Uh oh!

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

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

Reviewers

@youknowone youknowone youknowone approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

2 participants

@youknowdot @youknowone
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 01402503 — 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.