-
Notifications
You must be signed in to change notification settings - Fork 484
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
Memory corruption when running the Hurl CLI with --test
mode
#3297
Comments
To add more context, the issue is not related to |
Hi @lambrospetrou, |
Yeah, sometimes it needs a few attempts to get it crashing. I always get it happening if I run the |
Hi all, I tried to reproduce the bug on my machine (MBP M1), I didn't reproduce it either in local (with brew's Hurl), or in a Docker container (with instructions provided by @lambrospetrou ). I've tried hard 😅! In the case of Docker, I've not used the .deb file (its only for x86 arch), but I've installed the arm64 precompiled binary. That's said, I've run the sample through valgrind and got this result:
So there is one thread leaked detected by valgrind. Not sure if this is related but we should fix this. @lambrospetrou can you try to reproduce the issue by not using |
I cannot reproduce without the I am attaching a video showcasing that it happens every few times on my side with the 20241013T1753-WindowsTerminal_X9zeNbsHax.mp4Also, when using only 1 thread with |
Your Docker host is a Windows machine I'm correct? I will try to reproduce the bug from a Windows machine (with Docker etc). You're reproducing it quite easily while I can't make it, it maybe make a difference? (It doesn't explain why it happens on skybear.net though) |
Locally, I am using WSL2 ( For Skybear.NET, I use Fly.io and my container is based off |
I have added an integ test that combines |
I haven't managed to reproduce it, but I think there's something I would make a little cleaner in the graceful shutdown of threads workers. I don't know if it will fix this issue or not but it will be a cleaner and it's worth trying (plus it can fix the valgring issue that tickles me). As soon as I've time to do it ! |
For the record, I have retries on Skybear.NET now, so that when it happens again it just retries the script execution, so it's not urgent at the moment. It would be nice though to see what in the parallelism could cause race conditions on memory. I might take a stub in reading some Rust later in the week 😏 |
What is the current bug behavior?
There is a corrupt memory heap operation somewhere when finalizing the Hurl run. I am getting the following errors every few hundreds of runs of a simple Hurl script:
Errors occurring:
One time I got this error instead as well
malloc_consolidate(): unaligned fastbin chunk detected
, which is memory related too.Steps to reproduce
Create the file
Dockerfile-hurl-memory-issue
with contents:Build the image and get inside the container:
Create the Hurl file:
Run the Hurl file (you might need to repeat the following a few times till you cause the memory error):
What is the expected correct behavior?
It should complete successfully without any errors.
Execution context
hurl --version
):root@f2abb0a5ee0c:/# hurl --version hurl 5.0.1 (x86_64-pc-linux-gnu) libcurl/8.5.0 OpenSSL/3.0.13 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libssh/0.10.6/openssl/zlib nghttp2/1.59.0 Features (libcurl): alt-svc AsynchDNS brotli HSTS HTTP2 IDN IPv6 Largefile libz NTLM SPNEGO SSL TLS-SRP UnixSockets zstd Features (built-in): brotli
The issue occurs on
ubuntu:noble
latest tag as of today: https://hub.docker.com/layers/library/ubuntu/noble-20240904.1/images/sha256-74f92a6b3589aa5cac6028719aaac83de4037bad4371ae79ba362834389035aa?context=exploreAnd also happens with
debian:trixie-slim
: https://hub.docker.com/layers/library/debian/trixie-slim/images/sha256-4cc21783b221c03e841bc1274e5babef8c52ccabfc20abadc37e83e37bed6990?context=explorePossible fixes
Not sure...
The text was updated successfully, but these errors were encountered: