sysvinit-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bootlogd captured in endless while loop


From: Sven Reschke
Subject: Re: Bootlogd captured in endless while loop
Date: Tue, 23 Jul 2024 19:49:13 +0200
User-agent: Mozilla Thunderbird

On 2024-07-23 09:17, Jesse Smith wrote:
On 2024-07-11 05:44, Sven Reschke wrote:
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.

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?)

Sorry for the late response, vacation time...
I tested your new bootlog.c file, but sadly, bootlogd is still trapped in an endless loop :-(

My two cents here are, that the re-opening of the device will still succeed everytime, i.e. the call to open_nb(realcons)) in write_err().


If I understand correctly, you're saying the device is opened for writing successfully. However attempts to write to the device always fail, which drops us into the loop?

To be honest I don't know :-(.
I can add some debugging printfs and get back to you, when I have more insights.

Best regards,
Sven

reply via email to

[Prev in Thread] Current Thread [Next in Thread]