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

miri reports leaking memory with 1.1.5 #45

Closed
TimDiekmann opened this issue Feb 8, 2023 · 6 comments
Closed

miri reports leaking memory with 1.1.5 #45

TimDiekmann opened this issue Feb 8, 2023 · 6 comments

Comments

@TimDiekmann
Copy link

Hello 👋🏻

With the latest release of thread_local, miri reports a memory leak. I tracked this down to the version bump of thread_local v1.1.5.

This is the output of miri:

     Running tests/test_span_trace.rs (target/miri/x86_64-unknown-linux-gnu/debug/deps/test_span_trace-315bdddcdb7b9126)

running 2 tests
test captured ... ok
test provided ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

The following memory was leaked: alloc281964 (Rust heap, size: 64, align: 8) {
    0x00 │ 01 00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ │ .........░░░░░░░
    0x10 │ 02 00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ │ .........░░░░░░░
    0x20 │ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ │ ░░░░░░░░░░░░░░░░
    0x30 │ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ │ ░░░░░░░░░░░░░░░░
}

error: the evaluated program leaked memory

note: pass `-Zmiri-ignore-leaks` to disable this check

error: aborting due to previous error
@TimDiekmann
Copy link
Author

TimDiekmann commented Feb 8, 2023

I was able to track down the bug further. The bug happened after #44 was merged.

trunk-io bot pushed a commit to hashintel/hash that referenced this issue Feb 8, 2023
## 🌟 What is the purpose of this PR?

With `thread_local` v1.1.5 `miri` reports a memory leak. This pins the version of `thread_local` until the issue is fixed.

## 🔗 Related links

- Amanieu/thread_local-rs#45
@Amanieu
Copy link
Owner

Amanieu commented Feb 9, 2023

Can you get a backtrace of where the leak came from? It's not obvious to me what is causing this.

@Amanieu
Copy link
Owner

Amanieu commented Feb 9, 2023

Nevermind, I found the problem and yanked 1.1.5.

trunk-io bot pushed a commit to hashintel/hash that referenced this issue Feb 9, 2023
This reverts commit 9e13ea2

## 🌟 What is the purpose of this PR?

With #2033 we pinned `thread_local` to `1.1.4` as a. bug was discovered in `1.1.5`. The release was yanked, so it's safe to stop pinning the version.

## 🔗 Related links

- #2033 
- Amanieu/thread_local-rs#45
@terrarier2111
Copy link
Contributor

Will there be a new release including a patch for this issue?

@Amanieu
Copy link
Owner

Amanieu commented Feb 10, 2023

Fixed in 1.1.6.

@Amanieu Amanieu closed this as completed Feb 10, 2023
@TimDiekmann
Copy link
Author

Thanks for the quick actions!

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

3 participants