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-109371: Fix monitoring with instruction events set by gaogaotiantian · Pull Request #109385 · python/cpython

Conversation

@gaogaotiantian

@gaogaotiantian gaogaotiantian commented Sep 13, 2023 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Two things were fixed:

  1. In initialize_tools, we need to deopt INSTRUMENTED_INSTRUCTION to get the opcode to check for event. Unfortunately as whether the current opcode is instrumented is needed in the context later, we can't do _Py_GetBaseOpcode here to reduce the seemingly redundant logic.
  2. In instrument, assertion that after deinstrumenting INSTRUMENTED_LINE and INSTRUMENTED_INSTRUCTION, the opcode would be NOT instrumented is invalid - it could still be instrumented for events like PY_RETURN.

Test cases were added for both scenarios.

  • Issue: Crash in test_sys_setprofile if it follows test_sys_settrace #109371

Sorry, something went wrong.

Uh oh!

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

yunline reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@gaogaotiantian
Fix monitoring with instruction events set
460f14e
@bedevere-app bedevere-app Bot added the awaiting review label Sep 13, 2023
@bedevere-app bedevere-app Bot mentioned this pull request Sep 13, 2023
Crash in test_sys_setprofile if it follows test_sys_settrace #109371
Closed
@gaogaotiantian
gaogaotiantian requested a review from markshannon September 13, 2023 20:29
@blurb-it
📜🤖 Added by blurb_it.
ede1305
corona10
corona10 approved these changes Sep 18, 2023
View reviewed changes

@corona10 corona10 left a comment

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.

LGTM with my little knowlege.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Sep 18, 2023
@corona10 corona10 added the needs backport to 3.12 only security fixes label Sep 18, 2023
@Yhg1s
Merge branch 'main' into monitoring-instruction-fix
78208a0
@corona10
corona10 merged commit 412f5e8 into python:main Sep 18, 2023
@miss-islington

miss-islington commented Sep 18, 2023

Copy link
Copy Markdown
Contributor

Thanks @gaogaotiantian for the PR, and @corona10 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting core review label Sep 18, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 18, 2023
@gaogaotiantian @miss-islington
pythongh-109371: Fix monitoring with instruction events set (pythongh…
e473bf5
…-109385)

(cherry picked from commit 412f5e8)

Co-authored-by: Tian Gao <[email protected]>
@bedevere-app

bedevere-app Bot commented Sep 18, 2023

Copy link
Copy Markdown

GH-109542 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Sep 18, 2023
@bedevere-bot

bedevere-bot commented Sep 18, 2023

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x SLES 3.x has failed when building commit 412f5e8.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/540/builds/6561) and take a look at the build logs.
  4. Check if the failure is related to this commit (412f5e8) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/540/builds/6561

Failed tests:

  • test.test_asyncio.test_subprocess

Failed subtests:

  • test_subprocess_consistent_callbacks - test.test_asyncio.test_subprocess.SubprocessThreadedWatcherTests.test_subprocess_consistent_callbacks

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/test/test_asyncio/test_subprocess.py", line 788, in test_subprocess_consistent_callbacks
    self.loop.run_until_complete(main())
  File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/test/test_asyncio/test_subprocess.py", line 780, in main
    self.assertEqual(events, [
AssertionError: Lists differ: [('pi[29 chars]t'), 'pipe_connection_lost', ('pipe_data_recei[57 chars]ted'] != [('pi[29 chars]t'), ('pipe_data_received', 2, b'stderr'), 'pi[57 chars]ted']
All reactions

Sorry, something went wrong.

Uh oh!

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

Yhg1s pushed a commit that referenced this pull request Sep 18, 2023
@miss-islington @gaogaotiantian
[3.12] gh-109371: Fix monitoring with instruction events set (gh-109385…
9412a87
…) (#109542)

gh-109371: Fix monitoring with instruction events set (gh-109385)
(cherry picked from commit 412f5e8)

Co-authored-by: Tian Gao <[email protected]>
@gaogaotiantian
gaogaotiantian deleted the monitoring-instruction-fix branch September 18, 2023 17:54
csm10495 pushed a commit to csm10495/cpython that referenced this pull request Sep 28, 2023
@gaogaotiantian @csm10495
pythongh-109371: Fix monitoring with instruction events set (pythongh…
ea21924
…-109385)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@corona10 corona10 corona10 approved these changes
@markshannon markshannon Awaiting requested review from markshannon

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.

5 participants

@gaogaotiantian @miss-islington @bedevere-bot @corona10 @Yhg1s
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.