Skip to content

Conversation

savannahostrowski
Copy link
Member

@savannahostrowski savannahostrowski commented Jul 31, 2025

This PR normalizes stencil names and then modifies the Makefile to select the appropriate JIT stencil header based on the host.

@savannahostrowski
Copy link
Member Author

savannahostrowski commented Jul 31, 2025

Fixes the segfault on my machine but feel free to test if we think there's anything dubious here. I opted to remove the autoconf substitution here since this seems pretty straightforward.

@brandtbucher
Copy link
Member

Could we do jit_stencils*.h to catch both files with one pattern?

Also, does the PCbuild logic need to be updated? Or is it good?

@savannahostrowski
Copy link
Member Author

I'm no make expert, but based on my testing and what I've read, it seems like the wildcard keyword is required for proper glob expansion in Makefiles. It doesn't expand out in the same way as it would in a shell with * (see failed commits above 🫠 ). Windows should be good since we explicitly enumerate the stencils by platform.

That said...I...I am truly perplexed as I can no longer reproduce the segfault. The first commit from last night fixed the issue locally, so I know that this did solve the issue I was seeing, but...????

@brandtbucher Can you still repro?

@savannahostrowski
Copy link
Member Author

I know what the issue is here, will fix later.

@devdanzin
Copy link
Member

I am truly perplexed as I can no longer reproduce the segfault.

I have the exact same problem, it suddenly stopped crashing and I haven't figured out a way to get into the segfaulting state ever since. So it seems normal for this abnormal issue.

@savannahostrowski savannahostrowski merged commit 85c1ef6 into python:main Sep 19, 2025
67 checks passed
@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 FreeBSD 3.x (tier-3) has failed when building commit 85c1ef6.

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/1223/builds/7107) and take a look at the build logs.
  4. Check if the failure is related to this commit (85c1ef6) 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/1223/builds/7107

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

Click to see traceback logs
remote: Enumerating objects: 15, done.        
remote: Counting objects:   6% (1/15)        
remote: Counting objects:  13% (2/15)        
remote: Counting objects:  20% (3/15)        
remote: Counting objects:  26% (4/15)        
remote: Counting objects:  33% (5/15)        
remote: Counting objects:  40% (6/15)        
remote: Counting objects:  46% (7/15)        
remote: Counting objects:  53% (8/15)        
remote: Counting objects:  60% (9/15)        
remote: Counting objects:  66% (10/15)        
remote: Counting objects:  73% (11/15)        
remote: Counting objects:  80% (12/15)        
remote: Counting objects:  86% (13/15)        
remote: Counting objects:  93% (14/15)        
remote: Counting objects: 100% (15/15)        
remote: Counting objects: 100% (15/15), 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 8 (delta 7), reused 3 (delta 3), pack-reused 0 (from 0)        
From https://github.com/python/cpython
 * branch                    main       -> FETCH_HEAD
Note: switching to '85c1ef647751d18194bbc52eb2b1305871e03d10'.

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 85c1ef64775 GH-137218: Update `make` for JIT stencils (#137265)
Switched to and reset branch 'main'

make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3291: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3293: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3295: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3297: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3299: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3301: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3303: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3305: Invalid line type
make: Fatal errors encountered -- cannot continue

make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3291: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3293: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3295: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3297: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3299: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3301: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3303: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3305: Invalid line type
make: Fatal errors encountered -- cannot continue

@vstinner
Copy link
Member

This change broke the build on FreeBSD: https://buildbot.python.org/#/builders/1223/builds/7107

make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3291: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3293: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3295: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3297: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3299: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3301: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3303: Invalid line type
make: "/buildbot/buildarea/3.x.ware-freebsd/build/Makefile" line 3305: Invalid line type

@savannahostrowski
Copy link
Member Author

Ah, sorry about that. CI didn't catch it. I understand what happened here. I'll open a PR to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build skip news topic-JIT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants