Skip to content

[fix](stacktrace) Fix Jemalloc enable profile fail to run BE after rewrites dl_iterate_phdr.#22549

Merged
xinyiZzz merged 1 commit intoapache:masterfrom
xinyiZzz:20230802_fix_remove_phdr_cache
Aug 3, 2023
Merged

[fix](stacktrace) Fix Jemalloc enable profile fail to run BE after rewrites dl_iterate_phdr.#22549
xinyiZzz merged 1 commit intoapache:masterfrom
xinyiZzz:20230802_fix_remove_phdr_cache

Conversation

@xinyiZzz
Copy link
Contributor

@xinyiZzz xinyiZzz commented Aug 3, 2023

Proposed changes

Jemalloc heap profile follows libgcc's way of backtracing by default.
rewrites dl_iterate_phdr will cause Jemalloc to fail to run after enable profile.

TODO, two solutions:

  1. Jemalloc specifies GNU libunwind as the prof backtracing way, but my test failed,
    --enable-prof-libunwind not work: --enable-prof-libunwind not work jemalloc/jemalloc#2504
  2. ClickHouse/libunwind solves Jemalloc profile backtracing, but the branch of ClickHouse/libunwind
    has been out of touch with GNU libunwind and LLVM libunwind, which will leave the fate to others.

Maybe the error of jeprof dump profile can also be solved
image

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@xinyiZzz xinyiZzz changed the title [fix](stacktrace) Fix Jemalloc enable profile fail to run after rewrites dl_iterate_phdr. [fix](stacktrace) Fix Jemalloc enable profile fail to run BE after rewrites dl_iterate_phdr. Aug 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

@yiguolei yiguolei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yiguolei
Copy link
Contributor

yiguolei commented Aug 3, 2023

run buildall

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Aug 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

PR approved by anyone and no changes requested.

Copy link
Contributor

@wangbo wangbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xinyiZzz xinyiZzz merged commit 96a4630 into apache:master Aug 3, 2023
xiaokang pushed a commit to xiaokang/doris that referenced this pull request Aug 9, 2023
…writes dl_iterate_phdr (apache#22549)

Jemalloc heap profile follows libgcc's way of backtracing by default.
rewrites dl_iterate_phdr will cause Jemalloc to fail to run after enable profile.

TODO, two solutions:

- Jemalloc specifies GNU libunwind as the prof backtracing way, but my test failed,
--enable-prof-libunwind not work: --enable-prof-libunwind not work jemalloc/jemalloc#2504

- ClickHouse/libunwind solves Jemalloc profile backtracing, but the branch of ClickHouse/libunwind
has been out of touch with GNU libunwind and LLVM libunwind, which will leave the fate to others.
xiaokang pushed a commit that referenced this pull request Aug 11, 2023
…writes dl_iterate_phdr (#22549)

Jemalloc heap profile follows libgcc's way of backtracing by default.
rewrites dl_iterate_phdr will cause Jemalloc to fail to run after enable profile.

TODO, two solutions:

- Jemalloc specifies GNU libunwind as the prof backtracing way, but my test failed,
--enable-prof-libunwind not work: --enable-prof-libunwind not work jemalloc/jemalloc#2504

- ClickHouse/libunwind solves Jemalloc profile backtracing, but the branch of ClickHouse/libunwind
has been out of touch with GNU libunwind and LLVM libunwind, which will leave the fate to others.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/2.0.1-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants