[Libguestfs] [collectd] collectd leaks SIGCHLD == SIG_IGN into plugins

Peter Dimitrov peterd at telco.com
Tue Nov 13 13:17:33 UTC 2018


I was extending the virt plugin.
It already collects similar data (about VMs) using Libvirt's API, but lacks
disk usage information.

I went through some hoops to link libguestfs correctly to collectd.
Is it okay to just include fork(), waitpid() example? It does reproduce the
issue.

Best Regards,
Peter


On Tue, Nov 13, 2018 at 1:34 PM Richard W.M. Jones <rjones at redhat.com>
wrote:

> On Tue, Nov 13, 2018 at 12:00:19PM +0100, Florian Forster wrote:
> > Hi,
> >
> > thank you very much for reporting this! Sounds like a bug in the exec
> plugin –
> > it never ceases to amaze me how many issues a single plugin can have ;)
> >
> > > > > This means that any plugin that does the usual pattern of:
> > > > >
> > > > >   pid = fork ();
> >
> > Note that the exec plugin is the *only* plugin that does this. All other
> > plugins are forbidden to fork(), popen() or create new processes in any
> other
> > way. The only plugin doing that, the exec plugin, has had enough issues
> over
> > the years for me to feel justified in that decision. ;-)
> >
> > As mentioned before, a Github issue would be appreciated so we can
> properly
> > track this problem.
>
> I don't know if Peter is using the exec plugin or is trying to write
> an ordinary plugin.  However the library he is using (libguestfs)
> certainly does fork subprocess(es).
>
> Rich.
>
> --
> Richard Jones, Virtualization Group, Red Hat
> http://people.redhat.com/~rjones
> Read my programming and virtualization blog: http://rwmj.wordpress.com
> virt-builder quickly builds VMs from scratch
> http://libguestfs.org/virt-builder.1.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20181113/ae34b7a8/attachment.htm>


More information about the Libguestfs mailing list