syslogd(8) with OOM Killer protection

Marcelo Araujo araujobsdport at gmail.com
Thu Jan 28 13:49:18 UTC 2016


In my research, I might  be wrong, there is no clean way to make such
protection without intrusive code in every each deamon.

I'm still checking!!
On Jan 28, 2016 9:05 PM, "Eugene Grosbein" <eugen at grosbein.net> wrote:

> On 27.01.2016 13:32, Adrian Chadd wrote:
> > I like it,how's it not done via some command line tool that we can run
> > any tool with?
>
> I've already responded to such idea in a comment to my original PR
> and like to repeat it here. IMHO, it is nearly impossible to correctly
> implement
> such protection for arbitrary daemonizing service by means of rc.subr,
> without modifications of service source code. Currently.
>
> We do have protect(1) utility but it only can protect single process it
> starts or
> all current/future children of started process and for daemons both cases
> are wrong:
>
> - protection of single process is meaningless because it forks to become
> daemon and that ceases protection;
> - protection of all future children is dangerous for daemons capable of
> running arbitrary subprocesses like syslogd can with "vertical bar" syntax
> of syslog.conf(5) as those future children may be "runaway" memory hogs.
>
> Perhaps, we could have kernel facility that keeps decreasing counter of
> forks
> and ceases protection of children when counter reaches zero level.
> Then teach protect(1) to (re-)set counter value and make rc.subr use it.
>
>


More information about the freebsd-hackers mailing list