This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit ef765dda04e5b623148be6c64283d113444ce0f2
Author: Xinyi Zou <zouxiny...@gmail.com>
AuthorDate: Tue Jul 4 20:35:13 2023 +0800

    [fix](memory) fix jemalloc purge arena dirty pages core dump (#21486)
    
    Issue Number: close #xxx
    
    jemalloc/jemalloc#2470
    Occasional core dump during stress test.
---
 be/src/util/mem_info.h | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/be/src/util/mem_info.h b/be/src/util/mem_info.h
index 2779591427..0831e79e16 100644
--- a/be/src/util/mem_info.h
+++ b/be/src/util/mem_info.h
@@ -106,9 +106,15 @@ public:
 
     static inline void je_purge_all_arena_dirty_pages() {
 #ifdef USE_JEMALLOC
-        // Purge all unused dirty pages for arena <i>, or for all arenas if 
<i> equals MALLCTL_ARENAS_ALL.
-        jemallctl(fmt::format("arena.{}.purge", MALLCTL_ARENAS_ALL).c_str(), 
nullptr, nullptr,
-                  nullptr, 0);
+        try {
+            // Purge all unused dirty pages for arena <i>, or for all arenas 
if <i> equals MALLCTL_ARENAS_ALL.
+            jemallctl(fmt::format("arena.{}.purge", 
MALLCTL_ARENAS_ALL).c_str(), nullptr, nullptr,
+                      nullptr, 0);
+        } catch (...) {
+            // https://github.com/jemalloc/jemalloc/issues/2470
+            // Occasional core dump during stress test.
+            LOG(WARNING) << "Purge all unused dirty pages for all arenas 
failed";
+        }
 #endif
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to