Skip to content

gh-126775: make linecache.checkcache threadsafe and GC re-entrency safe #126776

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

graingert
Copy link
Contributor

@graingert graingert commented Nov 13, 2024

@graingert graingert marked this pull request as ready for review November 13, 2024 11:01
@graingert graingert requested a review from cfbolz December 4, 2024 04:26
@bedevere-app
Copy link

bedevere-app bot commented Dec 4, 2024

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@graingert
Copy link
Contributor Author

I have made the requested changes; please review again

@bedevere-app
Copy link

bedevere-app bot commented Dec 4, 2024

Thanks for making the requested changes!

@cfbolz: please review the changes made to this pull request.

@bedevere-app bedevere-app bot requested a review from cfbolz December 4, 2024 09:53
@graingert graingert added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Dec 4, 2024
@cfbolz cfbolz merged commit 2233c30 into python:main Dec 10, 2024
41 of 42 checks passed
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 10, 2024
…ncy safe (pythonGH-126776)

(cherry picked from commit 2233c30)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bartosz Sławecki <bartoszpiotrslawecki@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 10, 2024
…ncy safe (pythonGH-126776)

(cherry picked from commit 2233c30)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bartosz Sławecki <bartoszpiotrslawecki@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Dec 10, 2024

GH-127778 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Dec 10, 2024
@bedevere-app
Copy link

bedevere-app bot commented Dec 10, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Dec 10, 2024
@graingert graingert deleted the make-linecache-clearcache-thread-and-gc-reentrant-safe branch December 10, 2024 07:41
cfbolz pushed a commit that referenced this pull request Dec 10, 2024
…ency safe (GH-126776) (#127779)

gh-126775: make linecache.checkcache threadsafe and GC re-entrency safe (GH-126776)

(cherry picked from commit 2233c30)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bartosz Sławecki <bartoszpiotrslawecki@gmail.com>
cfbolz pushed a commit that referenced this pull request Dec 10, 2024
…ency safe (GH-126776) (#127778)

gh-126775: make linecache.checkcache threadsafe and GC re-entrency safe (GH-126776)

(cherry picked from commit 2233c30)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bartosz Sławecki <bartoszpiotrslawecki@gmail.com>
@bedevere-bot
Copy link

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

Hi! The buildbot aarch64 Android 3.13 has failed when building commit 9d0252f.

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/#/builders/1590/builds/283) and take a look at the build logs.
  4. Check if the failure is related to this commit (9d0252f) 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/#/builders/1590/builds/283

Failed tests:

  • test_android

Failed subtests:

  • test_bytes - test.test_android.TestAndroidOutput.test_bytes

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/data/user/0/org.python.testbed/files/python/lib/python3.13/test/test_android.py", line 57, in setUp
    self.assert_log("I", tag, message, skip=True, timeout=5)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/user/0/org.python.testbed/files/python/lib/python3.13/test/test_android.py", line 69, in assert_log
    self.fail(f"line not found: {expected!r}")
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: line not found: 'test.test_android.TestAndroidOutput.test_bytes 1733818864.1652749'


Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Volumes/InternalDisk/Users/android/buildarea/3.13.mhsmith-android-aarch64/build/Android/android.py", line 531, in run_testbed
    async with asyncio.TaskGroup() as tg:
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/taskgroups.py", line 134, in __aexit__
    raise propagate_cancellation_error
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/taskgroups.py", line 110, in __aexit__
    await self._on_completed_fut
asyncio.exceptions.CancelledError


Traceback (most recent call last):
  File "/data/user/0/org.python.testbed/files/python/lib/python3.13/test/test_android.py", line 67, in assert_log
    line = self.logcat_queue.get(timeout=(deadline - time()))
  File "/data/user/0/org.python.testbed/files/python/lib/python3.13/queue.py", line 212, in get
    raise Empty
_queue.Empty

srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
…ncy safe (python#126776)


Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bartosz Sławecki <bartoszpiotrslawecki@gmail.com>
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.

4 participants