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

Fix malloc deadlock caused by contention profiler #2684

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

chenBright
Copy link
Contributor

@chenBright chenBright commented Jul 6, 2024

What problem does this PR solve?

Issue Number: resolve #859

Problem Summary:

What is changed and the side effects?

Changed:

目前contention profiler在最后submit的时候,有两种情况会申请内存:

  1. 第一次submit时创建单例:ObjectPool、AgentCombiner::Agent;
  2. ObjectPool::LocalPool::FreeChunk为空。

对于这两种情况,查找调用栈,发现存在malloc的符号,则不提交这次采样结果。

Side effects:

  • Performance effects(性能影响):

  • Breaking backward compatibility(向后兼容性):


Check List:

  • Please make sure your changes are compilable(请确保你的更改可以通过编译).
  • When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
  • Please follow Contributor Covenant Code of Conduct.(请遵循贡献者准则).

@chenBright chenBright force-pushed the fix_malloc_dead_lock branch 8 times, most recently from e7f38c7 to daf3e98 Compare July 7, 2024 02:15
@chenBright chenBright marked this pull request as draft July 7, 2024 04:01
@chenBright chenBright force-pushed the fix_malloc_dead_lock branch 2 times, most recently from 443723a to 79b01e5 Compare July 8, 2024 15:06
@chenBright chenBright marked this pull request as ready for review July 8, 2024 16:09
@chenBright chenBright changed the title Fix malloc dead lock cause by contention profiler Fix malloc deadlock caused by contention profiler Jul 9, 2024
@wwbmmm
Copy link
Contributor

wwbmmm commented Jul 11, 2024

LGTM

@chenBright
Copy link
Contributor Author

rebase解决冲突

@wwbmmm wwbmmm merged commit 75763d4 into apache:master Jul 23, 2024
20 checks passed
@chenBright chenBright deleted the fix_malloc_dead_lock branch July 23, 2024 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

链接jemalloc后可能会有死锁的问题
2 participants