Skip to content

bug: session leak #6560

Closed
Closed
@dantengsky

Description

@dantengsky

Search before asking

  • I had searched in the issues and found no similar issues.

Version

b9e8582

What's Wrong?

object Session leaks

How to Reproduce?

# enable memory-profiling
cargo b  -p databend-query --features memory-profiling
# fire up databend-query
MALLOC_CONF=prof:true ./target/debug/databend-query --log-level=error

keep creating new sessions and quit, and then differ the memory

curl http://localhost:8080/debug/mem/pprof/profile > base_profile
for i in {1..1000}; do echo "select 1;" | mysql -h 127.0.0.1  -P3307 -uroot -s  -N > /dev/null; done
curl http://localhost:8080/debug/mem/pprof/profile > after_inserts
jeprof ./target/debug/databend-query --base=base_profile after_inserts --pdf > session_leak.pdf
evince session_leak.pdf

and then, got something like this, which indicates memory leaks:

session_leaks-1

session_leak.pdf

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

Labels

C-bugCategory: something isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions