[pgpool-hackers: 3995] Re: Fix pgpoolLogger uses 100% cpu when log rotation is enabled

Tatsuo Ishii ishii at sraoss.co.jp
Thu Aug 12 16:22:24 JST 2021


> If timeout.tv_usec is not initialized and its value happened to be a very large number, the select returns -1 immediately ,with errno EINVAL. The code is in a for() statement, so the cpu goes up to 100%.
> 
> One can reproduce it by setting
> timeout.tv_sec = 5000; // >0
> timeout.tv_usec = 234567890123456;

Oh, that makes sense.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list