Re: relayd: random abnormal termination on daemon reload

Lloyd <[email protected]>
Newsgroups gmane.os.openbsd.bugs
Message-ID <gRI0Or9YbX_vxIXiTGqQ5Tev0w58E-zvbg4Q3yfNzGSfAJ-TA2TDpEOWReMfAkpyb_4JcvD3ZevYnnHMnA8mZTPTEB5gKn6CfHFzbtzKTjo=@proton.me>
Hi Rafael

I have a theory on the second issue. I'm not super-familiar with the
inner-workings of relayd but it would appear fatalx() is used to kill
the child process with an abnormal exit. This kicked off a sequence
where all the other relayd processes sequentially shut down.

However the error codes do not propagate to the parent process.

parent_shutdown() is used to perform the final exit and it always
exits with error code of 0.

This is why rcctl reported OK on the aborted reload.

Regards
Lloyd

Rafael Sadowski wrote:

> Yet another reload race issue.
> 
> Thanks for the report. The problem is caused by a faulty IMSG in the
> IMSG dispatcher that terminates with fatalx(). This happens when
> processes send IMGS during a reload. That would be okay if we didn't
> have races.
> 
> A quick fix would be to replace the fatalx with log_debug after a
> careful audit, and then, in a second step, fundamentally redesign the
> reload concept.
> 
> I'll take care of the first one for the release.
> 
> Rafael
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.