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

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit cbe80932c3aa6ff2148054f2b9937bc96f2a4aa2
Author: Xinyi Zou <[email protected]>
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 89a66b0658..542e0fd430 100644
--- a/be/src/util/mem_info.h
+++ b/be/src/util/mem_info.h
@@ -107,9 +107,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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to