mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Add crash pattern rules for duplicate issue detection (#23658)
This commit is contained in:
6
.github/workflows/labeled.yml
vendored
6
.github/workflows/labeled.yml
vendored
@@ -142,8 +142,8 @@ jobs:
|
|||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const closeAction = JSON.parse('${{ steps.add-labels.outputs.close-action }}');
|
const closeAction = ${{ fromJson(steps.add-labels.outputs.close-action) }};
|
||||||
|
|
||||||
// Comment with the reason
|
// Comment with the reason
|
||||||
await github.rest.issues.createComment({
|
await github.rest.issues.createComment({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
@@ -151,7 +151,7 @@ jobs:
|
|||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
body: closeAction.comment
|
body: closeAction.comment
|
||||||
});
|
});
|
||||||
|
|
||||||
// Close the issue
|
// Close the issue
|
||||||
await github.rest.issues.update({
|
await github.rest.issues.update({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
|
|||||||
@@ -15,8 +15,11 @@ interface CloseAction {
|
|||||||
|
|
||||||
let closeAction: CloseAction | null = null;
|
let closeAction: CloseAction | null = null;
|
||||||
|
|
||||||
|
// Compute lowercase once for performance
|
||||||
|
const bodyLower = body.toLowerCase();
|
||||||
|
|
||||||
// Check for workers_terminated
|
// Check for workers_terminated
|
||||||
if (body.includes("workers_terminated")) {
|
if (bodyLower.includes("workers_terminated")) {
|
||||||
closeAction = {
|
closeAction = {
|
||||||
reason: "not_planned",
|
reason: "not_planned",
|
||||||
comment: `Duplicate of #15964
|
comment: `Duplicate of #15964
|
||||||
@@ -25,7 +28,10 @@ We are tracking worker stability issues in https://github.com/oven-sh/bun/issues
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for better-sqlite3 with RunCommand or AutoCommand
|
// Check for better-sqlite3 with RunCommand or AutoCommand
|
||||||
else if (body.includes("better-sqlite3") && (body.includes("[RunCommand]") || body.includes("[AutoCommand]"))) {
|
else if (
|
||||||
|
bodyLower.includes("better-sqlite3") &&
|
||||||
|
(bodyLower.includes("runcommand") || bodyLower.includes("autocommand"))
|
||||||
|
) {
|
||||||
closeAction = {
|
closeAction = {
|
||||||
reason: "not_planned",
|
reason: "not_planned",
|
||||||
comment: `Duplicate of #4290.
|
comment: `Duplicate of #4290.
|
||||||
@@ -33,12 +39,45 @@ better-sqlite3 is not supported yet in Bun due to missing V8 C++ APIs. For now,
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check for ENOTCONN with Transport and standalone_executable on v1.2.23
|
||||||
|
else if (
|
||||||
|
bodyLower.includes("enotconn") &&
|
||||||
|
bodyLower.includes("transport") &&
|
||||||
|
bodyLower.includes("standalone_executable") &&
|
||||||
|
/\bv?1\.2\.23\b/i.test(bodyLower)
|
||||||
|
) {
|
||||||
|
closeAction = {
|
||||||
|
reason: "completed",
|
||||||
|
comment: `Duplicate of #23342.
|
||||||
|
This issue was fixed in Bun v1.3. Please upgrade to the latest version:
|
||||||
|
|
||||||
|
\`\`\`sh
|
||||||
|
bun upgrade
|
||||||
|
\`\`\``,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for WASM IPInt 32 stack traces - be very specific to avoid false positives
|
||||||
|
else if (bodyLower.includes("wasm_trampoline_wasm_ipint_call_wide32")) {
|
||||||
|
closeAction = {
|
||||||
|
reason: "not_planned",
|
||||||
|
comment: `Duplicate of #17841.
|
||||||
|
This is a known issue with JavaScriptCore's WASM In-place interpreter on Linux x64. You can work around it by:
|
||||||
|
|
||||||
|
1. Setting \`BUN_JSC_useWasmIPInt=0\` to disable IPInt (reverts to older Wasm interpreter)
|
||||||
|
2. Using an aarch64 CPU instead of x86_64
|
||||||
|
3. Using \`BUN_JSC_jitPolicyScale=0\` to force JIT compilation (may impact startup performance)
|
||||||
|
|
||||||
|
We've reported this to WebKit and are tracking the issue in #17841.`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Check for CPU architecture issues (Segmentation Fault/Illegal Instruction with no_avx)
|
// Check for CPU architecture issues (Segmentation Fault/Illegal Instruction with no_avx)
|
||||||
else if (
|
else if (
|
||||||
(body.includes("Segmentation Fault") ||
|
(bodyLower.includes("segmentation fault") ||
|
||||||
body.includes("Illegal Instruction") ||
|
bodyLower.includes("illegal instruction") ||
|
||||||
body.includes("IllegalInstruction")) &&
|
bodyLower.includes("illegalinstruction")) &&
|
||||||
body.includes("no_avx")
|
bodyLower.includes("no_avx")
|
||||||
) {
|
) {
|
||||||
let comment = `Bun requires a CPU with the micro-architecture [\`nehalem\`](https://en.wikipedia.org/wiki/Nehalem_(microarchitecture)) or later (released in 2008). If you're using a CPU emulator like qemu, then try enabling x86-64-v2.`;
|
let comment = `Bun requires a CPU with the micro-architecture [\`nehalem\`](https://en.wikipedia.org/wiki/Nehalem_(microarchitecture)) or later (released in 2008). If you're using a CPU emulator like qemu, then try enabling x86-64-v2.`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user