You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "LuGuangming (via GitHub)" <gi...@apache.org> on 2026/04/11 08:29:05 UTC

[PR] [fix](Reliability)Fix Doris query service fails after the file handles on the BE node are used up [doris]

LuGuangming opened a new pull request, #62393:
URL: https://github.com/apache/doris/pull/62393

   ### What problem does this PR solve?
   
   Issue Number: close #62392
   
   Related PR: #xxx
   
   Problem Summary:
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](Reliability)Fix Doris query service fails after the file handles on the BE node are used up [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #62393:
URL: https://github.com/apache/doris/pull/62393#issuecomment-4248920343

   PR approved by anyone and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](Reliability)Fix Doris query service fails after the file handles on the BE node are used up [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #62393:
URL: https://github.com/apache/doris/pull/62393#issuecomment-4248920189

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](Reliability)Fix Doris query service fails after the file handles on the BE node are used up [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #62393:
URL: https://github.com/apache/doris/pull/62393#issuecomment-4250207728

   # BE Regression && UT Coverage Report
   Increment line coverage `0.00% (0/11)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/62393_0d9df1f5ba54c4941bd2359cb925e0bc6a123027_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/62393_0d9df1f5ba54c4941bd2359cb925e0bc6a123027_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 73.61% (27391/37210) |
   | Line Coverage     | 57.29% (295922/516522) |
   | Region Coverage   | 54.55% (246714/452244) |
   | Branch Coverage   | 56.17% (106840/190208) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](Reliability)Fix Doris query service fails after the file handles on the BE node are used up [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #62393:
URL: https://github.com/apache/doris/pull/62393#discussion_r3085777826


##########
be/src/common/metrics/system_metrics.cpp:
##########
@@ -431,6 +432,18 @@ void SystemMetrics::_update_cpu_metrics() {
         char buf[64];
         LOG(WARNING) << "open /proc/stat failed, errno=" << errno
                      << ", message=" << strerror_r(errno, buf, 64);

Review Comment:
   `_file_handle_deplenish_counter` is only reset on a non-`EMFILE` open failure, not on a successful `/proc/stat` read. That means three intermittent `EMFILE` blips over an arbitrarily long time window will still trip the fatal exit even if the process recovered between failures. If the intent is to require consecutive exhaustion before killing the BE, this counter needs to be reset on the success path (or derived from a real FD-pressure signal) before normal operation resumes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](Reliability)Fix Doris query service fails after the file handles on the BE node are used up [doris]

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on PR #62393:
URL: https://github.com/apache/doris/pull/62393#issuecomment-4251237981

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](Reliability)Fix Doris query service fails after the file handles on the BE node are used up [doris]

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on PR #62393:
URL: https://github.com/apache/doris/pull/62393#issuecomment-4248927608

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](Reliability)Fix Doris query service fails after the file handles on the BE node are used up [doris]

Posted by "Thearas (via GitHub)" <gi...@apache.org>.
Thearas commented on PR #62393:
URL: https://github.com/apache/doris/pull/62393#issuecomment-4229107590

   
   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR).
   
   Please clearly describe your PR:
   1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
   2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
   3. What features were added. Why was this function added?
   4. Which code was refactored and why was this part of the code refactored?
   5. Which functions were optimized and what is the difference before and after the optimization?
       


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](Reliability)Fix Doris query service fails after the file handles on the BE node are used up [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #62393:
URL: https://github.com/apache/doris/pull/62393#discussion_r3083812505


##########
be/src/common/metrics/system_metrics.cpp:
##########
@@ -431,6 +432,18 @@ void SystemMetrics::_update_cpu_metrics() {
         char buf[64];
         LOG(WARNING) << "open /proc/stat failed, errno=" << errno

Review Comment:
   Blocking: this counter is only reset when `fopen("/proc/stat")` fails with a non-`EMFILE` errno. A successful `fopen` leaves the previous value intact, so the logic counts lifetime `EMFILE` incidents rather than the "consecutive failures" mentioned in the comment. Concrete case: one `EMFILE` spike today, then many successful updates, then two isolated `EMFILE` spikes later will still trigger the fatal exit. Please clear `_file_handle_deplenish_counter` on the success path so the threshold really means consecutive failures.



##########
be/src/common/config.cpp:
##########
@@ -1775,6 +1775,7 @@ DEFINE_Validator(concurrency_stats_dump_interval_ms,
 DEFINE_mBool(cloud_mow_sync_rowsets_when_load_txn_begin, "true");
 
 DEFINE_mBool(enable_cloud_make_rs_visible_on_be, "false");
+DEFINE_mInt32(file_handles_deplenish_frequency_times, "3");

Review Comment:
   Blocking: this new mutable config needs a validator such as `> 0`. With the current comparison in `system_metrics.cpp`, a value of `0` or a negative number makes `counter >= config::file_handles_deplenish_frequency_times` true on the first `fopen` failure, even when `errno != EMFILE`. That means an accidental config change can force BE to exit on an unrelated transient `/proc/stat` error.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](Reliability)Fix Doris query service fails after the file handles on the BE node are used up [doris]

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on PR #62393:
URL: https://github.com/apache/doris/pull/62393#issuecomment-4251295557

   skip check_coverage


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](Reliability)Fix Doris query service fails after the file handles on the BE node are used up [doris]

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on PR #62393:
URL: https://github.com/apache/doris/pull/62393#issuecomment-4248916635

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](Reliability)Fix Doris query service fails after the file handles on the BE node are used up [doris]

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #62393:
URL: https://github.com/apache/doris/pull/62393


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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