Skip to content
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

panic(main thread): Segmentation fault at address 0x7FFFC8321942 #15349

Open
PrinOrange opened this issue Nov 22, 2024 · 1 comment
Open

panic(main thread): Segmentation fault at address 0x7FFFC8321942 #15349

PrinOrange opened this issue Nov 22, 2024 · 1 comment
Labels
crash An issue that could cause a crash runtime windows An issue that is known to occur on Windows

Comments

@PrinOrange
Copy link

How can we reproduce the crash?

First, create a new project, and install the gpu.js, the gpu.js is a opensource calculation acceleration library for javascript.

bun i gpu.js

Then, write the code in index.ts and run it.

import { GPU } from 'gpu.js';

const gpu = new GPU();
const multiplyMatrix = gpu.createKernel(function(a: number[][], b: number[][]) {
  let sum = 0;
  for (let i = 0; i < 512; i++) {
    sum += a[this.thread.y][i] * b[i][this.thread.x];
  }
  return sum;
}).setOutput([512, 512]);

const c = multiplyMatrix(5, 5) as number[][];
console.log(c);

Then it crashed.

Relevant log output

PS E:\frontend-projects\ts-deduction> bun run index.tsx
107 |         return opts[p] || p;
108 |       })
109 |     );
110 |     tries.push(n);
111 |     try {
112 |       b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
                                                     ^
TypeError: LoadLibrary failed: ¨R`þ¥c^(DLL)
      at bindings (E:\frontend-projects\ts-deduction\node_modules\bindings\bindings.js:112:48)
      at E:\frontend-projects\ts-deduction\node_modules\gl\src\javascript\native-gl.js:1:7
      at E:\frontend-projects\ts-deduction\node_modules\gl\src\javascript\webgl-rendering-context.js:4:42
      at E:\frontend-projects\ts-deduction\node_modules\gl\src\javascript\node-index.js:3:32
      at E:\frontend-projects\ts-deduction\node_modules\gl\index.js:4:10
      at E:\frontend-projects\ts-deduction\node_modules\gpu.js\src\backend\headless-gl\kernel.js:1:7     
      at E:\frontend-projects\ts-deduction\node_modules\gpu.js\src\gpu.js:5:9
      at E:\frontend-projects\ts-deduction\node_modules\gpu.js\src\index.js:1:9

Bun v1.1.37-canary.33+746cf2cf0 (Windows x64)
============================================================
Bun Canary v1.1.37-canary.33 (746cf2cf) Windows x64
Windows v.win10_fe
CPU: sse42 avx avx2 avx512
Args: "C:\Users\PrinOrange\AppData\Roaming\npm\node_modules\bun\bin\bun.exe" "run" "index.tsx"
Features: jsc transpiler_cache(2) tsconfig(2) process_dlopen
Builtins: "bun:main" "node:fs" "node:path" "node:string_decoder" "node:util/types" 
Elapsed: 267ms | User: 62ms | Sys: 62ms
RSS: 0.14GB | Peak: 0.14GB | Commit: 0.18GB | Faults: 34249

panic(main thread): Segmentation fault at address 0x7FFFC8321942
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Stack Trace (bun.report)

Bun v1.1.37-canary (746cf2c) on windows x86_64 [RunCommand]

Segmentation fault at address 0x7FFFC0A51942

Features: process_dlopen, jsc, tsconfig

@PrinOrange PrinOrange added the crash An issue that could cause a crash label Nov 22, 2024
@github-actions github-actions bot added runtime windows An issue that is known to occur on Windows labels Nov 22, 2024
Copy link
Contributor

Thank you for reporting this crash.

For Bun's internal tracking, this issue is BUN-8RS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash An issue that could cause a crash runtime windows An issue that is known to occur on Windows
Projects
None yet
Development

No branches or pull requests

1 participant