|
From: | Sven Reschke |
Subject: | Re: Re: Bootlogd captured in endless while loop |
Date: | Tue, 23 Jul 2024 12:20:05 +0200 |
User-agent: | Mozilla Thunderbird |
Hi,On 2024-07-11 05:44, Sven Reschke wrote:I am attaching an updated bootlogd.c source file which I think should avoid the issue. The original, endless loop doesn't make sense to me. We make one attempt to re-open the file, but if that doesn't work we should probably assume it's not going to become available in the future. So we'll just drop out of the function. I'm open to thoughts or other ways to improve this situation. (Maybe a maximum of 99 attempts with a sleep() call?)I have a rented root server, where I have a yocto build running, which utilizes sysvinit. After logging in, the /var/log/boot file is empty and the process is taking up to 95% of cpu usage. Also the process doesn't react on SIGINT. After some debugging, I saw, that the process is trying to open the /dev/ttyS0 device, but this fails everytime with an EIO. There's no counter for a maximal retry of EIO errors, so the process is stuck trying to open the not available serial console... I guess the serial console shouldn't return EIO in the first place (at least not the whole time), but on the other hand, in my humbled opinion, the process should be able to handle this situation.
[Prev in Thread] | Current Thread | [Next in Thread] |