Skip to content

lightning OOM during write/ingest to TiKV when import large mount of data #59947

Closed

Description

@D3Hunter

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

the issue happened in two cases, one 2TB data, another 12TB data, both are using v8.1.2 version. current guess of the root cause is that pebble might have some bug, causes memory usage burst, and OOM, as the time window is very short, and pebble might allocate memory using CGO, we hasn't got any useful heap profile.
and we found that in v8.1.1 we have upgrade pebble to v1.1 in 888a58b since v8.1.1. so we try import the same data using v7.5.5, and it success.

we found a pebble OOM issue cockroachdb/pebble#3039, it might related

so the trigger condition might include

  • import large data set, say 2T. (we have tested with smaller data-set, say several hundreds of GB, no such issue)
  • using version >= v8.1.1 which have upgraded pebble

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

success

3. What did you see instead (Required)

oom on ingest

4. What is your TiDB version? (Required)

v8.1.2

Activity

  1. added
    affects-8.1This bug affects the 8.1.x(LTS) versions.
    affects-8.5This bug affects the 8.5.x(LTS) versions.
    component/lightningThis issue is related to Lightning of TiDB.
    type/bugThe issue is confirmed as a bug.
    on Mar 7, 2025
  2. kennedy8312 commented on Mar 13, 2025

    @kennedy8312

    /type regression
    Mark this one as regression since the same operation succeeded on an earlier version.

  3. OliverS929 commented on Mar 16, 2025

    @OliverS929
    Contributor

    /remove may-affects-6.1

  4. 4 remaining items

  5. OliverS929 commented on Mar 17, 2025

    @OliverS929
    Contributor

    /remove-label may-affects-7.1

  6. OliverS929 commented on Mar 17, 2025

    @OliverS929
    Contributor

    /remove-label may-affects-7.5

  7. added a commit that references this issue on Mar 20, 2025
    514204e
  8. added 2 commits that reference this issue on Mar 24, 2025
    9679a3f
    a6eeab5
  9. added a commit that references this issue on Mar 27, 2025
    8c81e79
  10. seiya-annie commented on Apr 11, 2025

    @seiya-annie

    Upgrade branch meet this issue:
    source: version <7.6.0
    target: version >=7.6.0
    blocking stage: post upgrade
    workaround: downgrade

  11. added a commit that references this issue on May 6, 2025
    9ae3b30
  12. jebter commented on May 29, 2025

    @jebter

    Regression Analysis
    PR caused this regression: #49514
    Related to issue/feature: #45037

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions