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

ResourceLeakDetector does not retain the initial record #7781

Closed
trustin opened this issue Mar 15, 2018 · 2 comments
Closed

ResourceLeakDetector does not retain the initial record #7781

trustin opened this issue Mar 15, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@trustin
Copy link
Member

trustin commented Mar 15, 2018

Expected behavior

The leak report printed by ResourceLeakDetector retains the stack trace of the moment the buffer was created.

Actual behavior

The record with Created at: heading is not actually the creation record, e.g.

Created at:
    io.netty.buffer.AdvancedLeakAwareByteBuf.writeBytes(AdvancedLeakAwareByteBuf.java:616)
    ...

Steps to reproduce

Not sure, but probably write an app that generates a lot of access records and leak?

Minimal yet complete reproducer code (or URL to code)

Sorry, no.

Netty version

4.1.22

JVM version (e.g. java -version)

java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

OS version (e.g. uname -a)

Linux infinity 4.14.25-1-lts #1 SMP Fri Mar 9 22:02:42 CET 2018 x86_64 GNU/Linux
@normanmaurer
Copy link
Member

Will have a look

normanmaurer added a commit that referenced this issue Mar 15, 2018
Motivation:

We missed to correctly record the stacktrace of the creation of an ResourceLeak record. This could either have the effect to log the wrote stacktrace for creation or not log a stacktrace at all if the object was dropped on the floor after it was created.

Modifications:

Correctly create a Record on creation of the object.

Result:

Fixes #7781.
@normanmaurer
Copy link
Member

@trustin please check the PR.

@normanmaurer normanmaurer added this to the 4.1.23.Final milestone Mar 15, 2018
@normanmaurer normanmaurer self-assigned this Mar 15, 2018
normanmaurer added a commit that referenced this issue Mar 16, 2018
Motivation:

We missed to correctly record the stacktrace of the creation of an ResourceLeak record. This could either have the effect to log the wrote stacktrace for creation or not log a stacktrace at all if the object was dropped on the floor after it was created.

Modifications:

Correctly create a Record on creation of the object.

Result:

Fixes #7781.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants