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 in Ubuntu 18.04 with GLIBC_2.34 #1243

Open
Teajey opened this issue May 21, 2024 · 1 comment
Open

Segmentation fault in Ubuntu 18.04 with GLIBC_2.34 #1243

Teajey opened this issue May 21, 2024 · 1 comment

Comments

@Teajey
Copy link

Teajey commented May 21, 2024

My server runs Ubuntu 18.04 and I'm having trouble getting my app (that uses go-sqlite) to run there.

First, I had to install a newer version of glibc:

$ ./sqlite-linux-repro
./sqlite-linux-repro: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by ./sqlite-linux-repro)
./sqlite-linux-repro: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./sqlite-linux-repro)
./sqlite-linux-repro: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./sqlite-linux-repro)
./sqlite-linux-repro: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./sqlite-linux-repro)

And since doing that I've been getting a segfault

$ LD_PRELOAD=/opt/glibc-2.34/lib/libc.so.6 ./sqlite-linux-repro
[1]    3707 segmentation fault (core dumped)  LD_PRELOAD=/opt/glibc-2.34/lib/libc.so.6 ./sqlite-linux-repro

Here's a minimal reproduction: https://github.com/Teajey/sqlite-linux-repro

There's a Dockerfile that recreates the conditions:

docker build -t sqlite-linux-repro .
docker run -it --rm sqlite-linux-repro

There's no stderr output for some reason. But you can verify the segfault by checking the exit code:

$ echo $?
139

Perhaps it's a problem with using these versions of Ubuntu and glibc together.

I'm unfortunately not clued-up enough to find the core dump file, let alone make sense of it.

Thanks for any help.

@otoolep
Copy link
Contributor

otoolep commented May 21, 2024

./sqlite-linux-repro: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.28' not found (required by ./sqlite-linux-repro)`

implies you built your application on a distro that is newer than 18.04, you app then requires a newer version of libc, but that the only version of libc available is too old. Instead build your application on Ubuntu 18.04 if you want to be sure it will run on 18.04. It'll probably also then run on newer versions of Ubuntu, since newer versions of libc should work fine too (but not the other way around, which is what you're hitting).

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

No branches or pull requests

2 participants