Skip to content

unexpected memory usage of memory tracker #54005

Closed
@XuHuaiyu

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

data.txt
query.txt
schema.txt

# mysql -h 10.71.205.177 -uroot -P 4000 --local-infile=1 --comments
source schema.txt
source data.txt
source query.txt

After executing this SQL, the heap profile shows that the memory usage related to the tracker is significantly high. This behavior is unexpected.

  1. The tracker's memory should not occupy such a large portion.
  2. This memory is not being tracked, and therefore it is not included in the total memory usage of a single SQL statement. This can prevent the SQL from being canceled in a timely manner, potentially leading to an Out of Memory risk.
截屏2024-06-13 17 38 43

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

nightly
8d28b23

Metadata

Assignees

No one assigned

    Labels

    affects-5.4This bug affects the 5.4.x(LTS) versions.affects-6.1This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.2severity/majorsig/executionSIG executiontype/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions