typesense docker image not working on latest WSL release
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- docker, linux
- Ambito
- backend, infrastructure, operating-systems
Direzione di ricerca
Start by reproducing docker run typesense/typesense on the reported WSL kernel and checking whether /proc/self/io exists. Read the brpc startup path described in the report, along with the inline Dockerfile and procio-shim.c workaround. Done means the Typesense image starts without a segmentation fault on the affected WSL versions, including the reported 30.1 and 31.1 images.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug Description
Using the latest WSL versions typesense docker image is not working anymore. i did not test default installation but i guess it would have the same problem.
WSL-Version: 3.0.1.0
Kernelversion: 6.18.40.1-1
Error is "Segmentation fault".
Reproduction Steps
On a windows machine using the latest WSL version run the image inside wsl
docker run typesense/typesense
Expected vs Actual
Expected behavior
typesense should start up
Actual behavior
Segmentation fault.
Environment
- Typesense version: 31.1 and 30.1
Additional Context
i got claude opus 5.5 to fix this issue by building new container image and LD_PRELOAD a helper class. It describes the problem like this:
Cause: The issue is with the WSL kernel 6.18.40.1-microsoft-standard-WSL2. It was built without CONFIG_TASKSTATS, which means that the file /proc/self/io does not exist.
Typesense uses the brpc library internally, and brpc reads this file during program startup. When the file is missing, brpc tries to log an error before the logging system is initialized, causing it to crash.
That is why even --version resulted in an immediate segfault, with no output at all, across all versions from 27.1 through 30.1.
I confirmed this with a gdb backtrace.
dockerfile:
ARG TYPESENSE_VERSION=30.1
FROM ubuntu:22.04 AS shim
RUN apt-get update && apt-get install -y --no-install-recommends gcc libc6-dev && rm -rf /var/lib/apt/lists/*
COPY procio-shim.c /src/
RUN gcc -O2 -shared -fPIC -o /src/procio-shim.so /src/procio-shim.c -ldl
FROM typesense/typesense:${TYPESENSE_VERSION}
COPY --from=shim /src/procio-shim.so /usr/local/lib/procio-shim.so
ENV LD_PRELOAD=/usr/local/lib/procio-shim.so
procio-shim.so
// WSL kernels built without CONFIG_TASKSTATS have no /proc/<pid>/io.
// brpc (used by typesense) reads it during static init and segfaults when it is missing.
#define _GNU_SOURCE
#include <dlfcn.h>
#include <stdio.h>
#include <string.h>
static const char FAKE_IO[] =
"rchar: 0\nwchar: 0\nsyscr: 0\nsyscw: 0\n"
"read_bytes: 0\nwrite_bytes: 0\ncancelled_write_bytes: 0\n";
static int is_proc_io(const char *path) {
if (!path) return 0;
if (strcmp(path, "/proc/self/io") == 0) return 1;
size_t n = strlen(path);
return strncmp(path, "/proc/", 6) == 0 && n > 3 && strcmp(path + n - 3, "/io") == 0;
}
static FILE *fake_io(const char *path, const char *mode) {
FILE *real = NULL;
FILE *(*real_fopen)(const char *, const char *) = dlsym(RTLD_NEXT, "fopen");
if (real_fopen) real = real_fopen(path, mode);
if (real) return real;
return fmemopen((void *)FAKE_IO, sizeof(FAKE_IO) - 1, "r");
}
FILE *fopen(const char *path, const char *mode) {
if (is_proc_io(path)) return fake_io(path, mode);
FILE *(*real)(const char *, const char *) = dlsym(RTLD_NEXT, "fopen");
return real(path, mode);
}
FILE *fopen64(const char *path, const char *mode) {
if (is_proc_io(path)) return fake_io(path, mode);
FILE *(*real)(const char *, const char *) = dlsym(RTLD_NEXT, "fopen64");
return real(path, mode);
}
- Lingua principale
- C++
- Stelle
- 27.1k
- Fork
- 1k
- Merge medio
- 4g 4h
- PR unite (30g)
- 15
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di typesense/typesense
-
pre-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
typesense/typesense#3070 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Bundled OpenSSL is pinned to 3.0.5, and the 3.0 branch reached end of life on 7 September 2026Forse già presa @mbkkong l’ha presa 41 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 2 giorni
-
Match scoring loop performs a heap allocation per window iteration for every candidate documentApertafeature-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
[Feature Request] Skip regenerating auto-embeddings on update when the source fields haven't changedApertafeature-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
typesense/typesense#2932 · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di typesense/typesense
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cython/cython#8110 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
PR bot doesn't recognize hip-tests as a unit test directoryForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ROCm/rocm-systems#14923 ·
I maintainer di solito rispondono entro 2 giorni
-
arrays asr pass bug ICE intrinsic medium priority
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Area: World-Readiness
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
microsoft/calculator#2522 ·
-
missing `catch.hpp`Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
microsoft/inflatelib#34 · 1 commento ·