Skip to content

Add swift crash producer support #1927

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

cachemeifyoucan
Copy link
Contributor

When swift compiler crashed with swift caching enabled, create a crash reproducer automatically.

@cachemeifyoucan cachemeifyoucan requested a review from artemcm June 11, 2025 21:43
@nkcsgexi
Copy link
Contributor

nkcsgexi commented Jun 11, 2025

Super excited to see this is happening! Why does it have to be guarded behind CAS enablement?

@cachemeifyoucan
Copy link
Contributor Author

Super excited to see this is happening! Why does it have to be guarded behind CAS enablement?

For now, it is. When CAS is enabled, it is easy to capture the full dependency just from the failing swift-frontend command. It is not that trivial from a non-CAS build since all the clang dependencies are hidden. clang is adding a way to create reproducer that requires a full scan, but that needs to orchestrated by driver/build system, not that easy to do from a single crashed swift-frontend command.

@cachemeifyoucan cachemeifyoucan force-pushed the eng/PR-swift-caching-reproducer branch from 8c1852f to aeff0a4 Compare June 26, 2025 18:27
@cachemeifyoucan cachemeifyoucan marked this pull request as ready for review June 26, 2025 18:27
@cachemeifyoucan cachemeifyoucan force-pushed the eng/PR-swift-caching-reproducer branch from aeff0a4 to 1e64859 Compare July 9, 2025 17:10
@cachemeifyoucan cachemeifyoucan force-pushed the eng/PR-swift-caching-reproducer branch from 1e64859 to 830c07b Compare July 22, 2025 16:15
@cachemeifyoucan
Copy link
Contributor Author

Rebase and ping. This is the driver support for swiftlang/swift#82128

@cachemeifyoucan cachemeifyoucan force-pushed the eng/PR-swift-caching-reproducer branch from 830c07b to 7e04da4 Compare July 22, 2025 20:32
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

When swift compiler crashed with swift caching enabled, create a crash
reproducer automatically.
@cachemeifyoucan cachemeifyoucan force-pushed the eng/PR-swift-caching-reproducer branch from 7e04da4 to c3d36dc Compare July 24, 2025 18:13
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

@cachemeifyoucan
Copy link
Contributor Author

@artemcm @nkcsgexi Can you review the new patch again? The previous implementation registered a callback that extends the lifetime of Driver to be hold on by Executor and its delegations. That has unintended consequences for the resources like CAS lifetime.

The new approach adds a new function to JobExecutionDelegate to avoid let driver doing all the work. This will also make swift-build implementation easier.

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test windows platform

@cachemeifyoucan cachemeifyoucan merged commit 0e6d6dd into swiftlang:main Jul 25, 2025
3 checks passed
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.

3 participants