Open mk-fg opened 4 days ago
I've also tried using alpine-based image with musl (python:3.12.7-alpine3.20), but I think rust library doesn't work there at all due to being linked against glibc.
Small correction here - no, it also segfaults with musl, not a ENOENT from linker:
Oct 06 19:33:33 test kernel: python[5303]: segfault at 10 ip 00007bf1bf6b895e sp 00007ffc6ff327d8 error 4 in ld-musl-x86_64.so.1[7bf1bf6a8000+54000] likely on CPU 2 (core 2, socket 0)
Oct 06 19:33:33 test kernel: Code: 1f 80 7f fc 00 74 11 85 f6 74 01 f4 8b 77 f8 81 fe ff ff 00 00 7f 01 f4 89 f0 c1 e0 04 48 98 48 29 c7 48 8b 47 f0 48 8d 4f f0 <48> 39 48 10 74 01 f4 0f b6 48 20 83 e1 1f 39 d1 7d 01 f4 8b 48 18
I've installed stretchable==1.1.1 into venv from pip on an Arch machine, but importing it into any script causes one of following memory errors on script exit:
taffylib.free(self.__ptr)
line seem to be causing it, regardless of whether library is actually used in any way or not.Module/library itself seem to work though, at least with basic examples from documentation, just apparently has some memory management issues in that final free() call.
Issue seem to be 100% reproducible on different Linux systems with stretchable 1.1.0 and 1.1.1, but not present in 1.0.0 (picked at random to find any working older release). A bit sad to see random memory failures popping up immediately with a rust library in particular.
Easy way to reproduce it anywhere can be using docker/podman (on any OS). Put following into a file named
Dockerfile
:Then run
docker build .
(orpodman build .
if using podman instead).Expected result is this script running to a completion without issues, for example (with stretchable==1.0.0):
Actual result:
python:3.12.7-bookworm
used here is an "docker-official" container image with debian-stable + python pre-installed.I've also tried using alpine-based image with musl (
python:3.12.7-alpine3.20
), but I think rust library doesn't work there at all due to being linked against glibc.Thanks!