mattn / mattn/go-sqlite3

Segmentation fault in Ubuntu 18.04 with GLIBC_2.34

Open
#1,243 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
9.2k
Forks
1.2k
Avg merge
19m
Merged PRs (30d)
4

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by building and running the Dockerfile reproduction with the commands in the issue, then inspect the minimal repository and its GLIBC requirements. Compare the Ubuntu 18.04 environment with the preloaded glibc setup and use the exit code or a core dump to isolate the segmentation fault; done means the compatibility cause and a supported next step are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go, sqlite, ubuntu
Domain
databases, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.