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

Segmentation fault at address 0xA On Ubuntu 24.04 LTS after build frome source code #11261

Open
doe24 opened this issue May 22, 2024 · 5 comments
Labels
crash An issue that could cause a crash needs repro Needs an example to reproduce

Comments

@doe24
Copy link

doe24 commented May 22, 2024

How can we reproduce the crash?

Before start, I'm sorry for my English grammar may not correct.
I use Ubuntu 20.04 LTS, and I have build Bun following contributing guide, I have installed all dependencies that the guild said.
But after I build and debug or I build release and run it show this error.
In bun debug: (In this pic, command 'bun nn.js' is use Bun in global install from npm)
Screenshot from 2024-05-22 15-34-58

In bun release build:
eiei

I don't know why it crash, before these day I build and run successfully every time when I able to install LLVM though this way in my Ubuntu machine:
' wget https://apt.llvm.org/llvm.sh -O - | sudo bash -s -- 16 all '

But now it cannot (now = since 20 May 24, the day that I reinstall Ubuntu) it cannot install though above method, I manually install though this:
' https://github.com/llvm/llvm-project/releases?page=3 '

I try LLVM [16.0.2, 16.0.3, 16.0.4] and try to build 16.0.6 and use in my Ubuntu machine but it failed.
I don't know why.

The JS code that I test it just:
" console.log('Hello world') " and code that generate by bun init.

JavaScript/TypeScript code that reproduces the crash?

No response

Relevant log output

No response

Stack Trace (bun.report)

Bun v1.1.10-canary (9399b70) on linux x86_64 [AutoCommand]

Segmentation fault at address 0x0000000A

Features: jsc, tsconfig

@doe24 doe24 added the crash An issue that could cause a crash label May 22, 2024
@Electroid Electroid added the needs repro Needs an example to reproduce label May 22, 2024
@doe24
Copy link
Author

doe24 commented May 22, 2024

@Electroid I clone source code from main branch "https://github.com/oven-sh/bun".

The last commit when I clone is "9399b70".

@doe24
Copy link
Author

doe24 commented May 23, 2024

Now I have clone source code from main branch "https://github.com/oven-sh/bun".

The last commit when I clone is "d06498b".

And now I have changed llvm to version 16.0.6

But it still crash.

Screenshot from 2024-05-23 14-28-44

@Jarred-Sumner
Copy link
Collaborator

@doe24 it’s a C++ ABI issue. The debug build of WebKit is compiled with an older libc than the one on your machine. You’ll unfortunately need to compile Bun’s WebKit and then pass -DWEBKIT_DIR=path-to-WebKitBuild/Release to the cmake

@doe24
Copy link
Author

doe24 commented May 25, 2024

@Jarred-Sumner I following your instruction, but it still got the same error.

I compile Bun’s WebKit using clang-16 and clang++-16 from this repo:
"https://github.com/oven-sh/WebKit"

and I save all bun-web-kit to release folder, but it still not work.

@doe24
Copy link
Author

doe24 commented May 26, 2024

I forgot to tell you about BunWebkit, it run normally after I compile it.

Screenshot from 2024-05-26 15-29-15

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 needs repro Needs an example to reproduce
Projects
None yet
Development

No branches or pull requests

3 participants