uchenily opened a new issue, #65545:
URL: https://github.com/apache/doris/issues/65545

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   4.1 7126cf65d96ebc43fce0906f51e92c1a2ccf24a6 cloud version
   
   ### What's Wrong?
   
   In some environment, the inode statistics f_files/f_ffree are 0, which 
causes a BE division-by-zero error.
   
   inode_total = stat.f_files = 0
   inode_free = stat.f_ffree = 0
   
   ```
   Thread 185 "run_background_" received signal SIGFPE, Arithmetic exception.
   0x000055556bce32e8 in doris::io::disk_used_percentage (path=..., 
percent=0x7fff109ead50) at 
/home/chen/Programming/doris-4.1/be/src/io/cache/block_file_cache.cpp:1822
   1822     int inode_percentage = cast_set<int>(inode_free * 100 / 
inode_total);
   (gdb) bt
   #0  0x000055556bce32e8 in doris::io::disk_used_percentage (path=..., 
percent=0x7fff109ead50) at 
/home/chen/Programming/doris-4.1/be/src/io/cache/block_file_cache.cpp:1822
   #1  0x000055556bce422a in 
doris::io::BlockFileCache::check_disk_resource_limit (this=0x7fff151c6000) at 
/home/chen/Programming/doris-4.1/be/src/io/cache/block_file_cache.cpp:1901
   #2  0x000055556bce564d in doris::io::BlockFileCache::run_background_monitor 
(this=0x7fff151c6000) at 
/home/chen/Programming/doris-4.1/be/src/io/cache/block_file_cache.cpp:1998
   #3  0x000055556bd313c3 in std::__invoke_impl<void, void 
(doris::io::BlockFileCache::*)(), doris::io::BlockFileCache*> (
       __f=@0x7fff14da6ff0: (void 
(doris::io::BlockFileCache::*)(doris::io::BlockFileCache * const)) 
0x55556bce54b4 <doris::io::BlockFileCache::run_background_monitor()>, 
__t=@0x7fff14da6fe8: 0x7fff151c6000)
       at 
/home/chen/Programming/doris-4.1/ldb_toolchain/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/invoke.h:76
   #4  0x000055556bd31228 in std::__invoke<void 
(doris::io::BlockFileCache::*)(), doris::io::BlockFileCache*> (
       __fn=@0x7fff14da6ff0: (void 
(doris::io::BlockFileCache::*)(doris::io::BlockFileCache * const)) 
0x55556bce54b4 <doris::io::BlockFileCache::run_background_monitor()>)
       at 
/home/chen/Programming/doris-4.1/ldb_toolchain/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/invoke.h:98
   #5  0x000055556bd30a99 in std::thread::_Invoker<std::tuple<void 
(doris::io::BlockFileCache::*)(), doris::io::BlockFileCache*> >::_M_invoke<0ul, 
1ul> (this=0x7fff14da6fe8)
       at 
/home/chen/Programming/doris-4.1/ldb_toolchain/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_thread.h:303
   #6  0x000055556bd3078c in std::thread::_Invoker<std::tuple<void 
(doris::io::BlockFileCache::*)(), doris::io::BlockFileCache*> >::operator() 
(this=0x7fff14da6fe8)
       at 
/home/chen/Programming/doris-4.1/ldb_toolchain/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_thread.h:310
   #7  0x000055556bd30222 in 
std::thread::_State_impl<std::thread::_Invoker<std::tuple<void 
(doris::io::BlockFileCache::*)(), doris::io::BlockFileCache*> > >::_M_run 
(this=0x7fff14da6fe0)
       at 
/home/chen/Programming/doris-4.1/ldb_toolchain/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_thread.h:255
   #8  0x000055557c6bc014 in execute_native_thread_routine ()
   #9  0x00007ffff6962d19 in start_thread () from /lib64/libc.so.6
   #10 0x00007ffff69e664c in __clone3 () from /lib64/libc.so.6
   (gdb) p stat
   $5 = {f_type = 2435016766, f_bsize = 4096, f_blocks = 124348672, f_bfree = 
83618897, f_bavail = 83530293, f_files = 0, f_ffree = 0, f_fsid = {__val = 
{-1491911987, -353343286}}, f_namelen = 255, f_frsize = 4096, 
     f_flags = 4128, f_spare = {0, 0, 0, 0}}
   (gdb) p inode_free
   $6 = 0
   (gdb) p inode_total
   $7 = 0
   ```
   
   ### What You Expected?
   
   not coredump
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to