Skip to content

gh-117879: Fix test_httpservers for the build with profiling #117932

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

Merged

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Apr 16, 2024

@serhiy-storchaka
Copy link
Member Author

Alternatively we could simply use shutil.rmtree() or tempfile.TemoraryDirectory. But the current fragile code can catch some errors when an unexpected files are created by the CGI script.

@serhiy-storchaka serhiy-storchaka merged commit 8429b45 into python:main Apr 17, 2024
35 checks passed
@miss-islington-app
Copy link

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the test_httpservers-with-profiling branch April 17, 2024 09:50
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 17, 2024
@bedevere-app
Copy link

bedevere-app bot commented Apr 17, 2024

GH-117969 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 Apr 17, 2024
@serhiy-storchaka serhiy-storchaka added the 3.12 only security fixes label Apr 17, 2024
serhiy-storchaka added a commit that referenced this pull request Apr 17, 2024
@bedevere-bot
Copy link

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

Hi! The buildbot aarch64 Debian Clang LTO + PGO 3.12 has failed when building commit 0a40580.

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/1192/builds/943) and take a look at the build logs.
  4. Check if the failure is related to this commit (0a40580) 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/1192/builds/943

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

Click to see traceback logs
remote: Enumerating objects: 5, done.        
remote: Counting objects:  20% (1/5)        
remote: Counting objects:  40% (2/5)        
remote: Counting objects:  60% (3/5)        
remote: Counting objects:  80% (4/5)        
remote: Counting objects: 100% (5/5)        
remote: Counting objects: 100% (5/5), done.        
remote: Compressing objects:  20% (1/5)        
remote: Compressing objects:  40% (2/5)        
remote: Compressing objects:  60% (3/5)        
remote: Compressing objects:  80% (4/5)        
remote: Compressing objects: 100% (5/5)        
remote: Compressing objects: 100% (5/5), done.        
remote: Total 5 (delta 0), reused 2 (delta 0), pack-reused 0        
From https://github.com/python/cpython
 * branch                  3.12       -> FETCH_HEAD
Note: switching to '0a40580b854c74f57b9784fa5bccc1e897e437d2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 0a40580b85 [3.12] gh-117879: Fix test_httpservers for the build with profiling (GH-117932) (GH-117969)
Switched to and reset branch '3.12'

find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make[2]: [Makefile:2830: clean-retain-profile] Error 1 (ignored)
/bin/sh: 1: clang: not found
make[2]: *** [Makefile:1510: Programs/python.o] Error 127
make[2]: *** Waiting for unfinished jobs....
/bin/sh: 1: clang: not found
make[2]: *** [Makefile:2739: Parser/token.o] Error 127
make[1]: *** [Makefile:803: profile-gen-stamp] Error 2
make: *** [Makefile:815: profile-run-stamp] Error 2

find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make: [Makefile:2830: clean-retain-profile] Error 1 (ignored)

@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 RHEL7 3.12 has failed when building commit 0a40580.

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/1175/builds/889) and take a look at the build logs.
  4. Check if the failure is related to this commit (0a40580) 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/1175/builds/889

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

Click to see traceback logs
remote: Enumerating objects: 10, done.        
remote: Counting objects:  10% (1/10)        
remote: Counting objects:  20% (2/10)        
remote: Counting objects:  30% (3/10)        
remote: Counting objects:  40% (4/10)        
remote: Counting objects:  50% (5/10)        
remote: Counting objects:  60% (6/10)        
remote: Counting objects:  70% (7/10)        
remote: Counting objects:  80% (8/10)        
remote: Counting objects:  90% (9/10)        
remote: Counting objects: 100% (10/10)        
remote: Counting objects: 100% (10/10), done.        
remote: Compressing objects:  16% (1/6)        
remote: Compressing objects:  33% (2/6)        
remote: Compressing objects:  50% (3/6)        
remote: Compressing objects:  66% (4/6)        
remote: Compressing objects:  83% (5/6)        
remote: Compressing objects: 100% (6/6)        
remote: Compressing objects: 100% (6/6), done.        
remote: Total 10 (delta 4), reused 7 (delta 4), pack-reused 0        
From https://github.com/python/cpython
 * branch            3.12       -> FETCH_HEAD
Note: checking out '0a40580b854c74f57b9784fa5bccc1e897e437d2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 0a40580... [3.12] gh-117879: Fix test_httpservers for the build with profiling (GH-117932) (GH-117969)
Switched to and reset branch '3.12'

In file included from ../Include/internal/pycore_runtime.h:12:0,
                 from ../Parser/action_helpers.c:6:
../Include/internal/pycore_atomic.h:15:25: fatal error: stdatomic.h: No such file or directory
 #  include <stdatomic.h>
                         ^
compilation terminated.
In file included from ../Include/internal/pycore_runtime.h:12:0,
                 from ../Include/internal/pycore_pystate.h:11,
                 from ../Parser/pegen.c:3:
../Include/internal/pycore_atomic.h:15:25: fatal error: stdatomic.h: No such file or directory
 #  include <stdatomic.h>
                         ^
compilation terminated.
In file included from ../Include/internal/pycore_runtime.h:12:0,
                 from ../Include/internal/pycore_pystate.h:11,
                 from ../Include/internal/pycore_call.h:11,
                 from ../Parser/tokenizer.c:6:
../Include/internal/pycore_atomic.h:15:25: fatal error: stdatomic.h: No such file or directory
 #  include <stdatomic.h>
                         ^
compilation terminated.
In file included from ../Include/internal/pycore_runtime.h:12:0,
                 from ../Include/internal/pycore_pystate.h:11,
                 from ../Parser/myreadline.c:14:
../Include/internal/pycore_atomic.h:15:25: fatal error: stdatomic.h: No such file or directory
 #  include <stdatomic.h>
                         ^
compilation terminated.
In file included from ../Include/internal/pycore_runtime.h:12:0,
                 from ../Include/internal/pycore_pystate.h:11,
                 from ../Include/internal/pycore_call.h:11,
                 from ../Objects/abstract.c:5:
../Include/internal/pycore_atomic.h:15:25: fatal error: stdatomic.h: No such file or directory
 #  include <stdatomic.h>
                         ^
compilation terminated.
In file included from ../Include/internal/pycore_interp.h:15:0,
                 from ../Include/internal/pycore_object.h:13,
                 from ../Objects/boolobject.c:4:
../Include/internal/pycore_atomic.h:15:25: fatal error: stdatomic.h: No such file or directory
 #  include <stdatomic.h>
                         ^
compilation terminated.
In file included from ../Include/internal/pycore_runtime.h:12:0,
                 from ../Include/internal/pycore_pystate.h:11,
                 from ../Include/internal/pycore_call.h:11,
                 from ../Objects/bytesobject.c:9:
../Include/internal/pycore_atomic.h:15:25: fatal error: stdatomic.h: No such file or directory
 #  include <stdatomic.h>
                         ^
compilation terminated.
make: *** [Parser/action_helpers.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Parser/pegen.o] Error 1
In file included from ../Include/internal/pycore_interp.h:15:0,
                 from ../Include/internal/pycore_object.h:13,
                 from ../Objects/bytearrayobject.c:8:
../Include/internal/pycore_atomic.h:15:25: fatal error: stdatomic.h: No such file or directory
 #  include <stdatomic.h>
                         ^
compilation terminated.
make: *** [Parser/tokenizer.o] Error 1
make: *** [Parser/myreadline.o] Error 1
make: *** [Objects/abstract.o] Error 1
make: *** [Objects/boolobject.o] Error 1
make: *** [Objects/bytesobject.o] Error 1
make: *** [Objects/bytearrayobject.o] Error 1

find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make: [Makefile:2824: clean-retain-profile] Error 1 (ignored)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 only security fixes skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants