Bug#831894: systemd: "Out of memory" timing error when calling systemctl in pipeline
Michael Biebl
biebl at debian.org
Thu Dec 15 23:10:45 GMT 2016
Control: fixed -1 232-7
Hi Brian
thanks for the detail bug report.
On Wed, 20 Jul 2016 09:59:18 -0500 Brian Kroth <bpkroth at gmail.com> wrote:
>
> Hi, I was trying to do some simple systemctl scripting for some service change rollouts and discovered what looks to be a timing bug related to calling systemctl in a pipeline.
>
> When called like this we get an "Out of memory." error on most of our VMs, though they certainly have enough free memory available on the system.
>
> I have not yet observed the issue on a physical machine yet.
>
> # systemctl list-unit-files | awk '( $1 ~ /inetd.service$/ ) { print $1 }' | xargs -r -t systemctl stop
> systemctl stop inetd.service openbsd-inetd.service
> Out of memory.
>
>
> If on the other hand I do the same thing with either a slightly different (and less heavy weight) systemctl call at the beginning, or else add a short splay before the xargs call, then it works without the error:
>
> # systemctl list-units | awk '( $1 ~ /inetd.service$/ ) { print $1 }' | xargs -r -t systemctl stop
> systemctl stop inetd.service
> (no memory error reported)
>
> # systemctl list-unit-files | awk '( $1 ~ /inetd.service$/ ) { print $1 }' | ( sleep .05; xargs -r -t systemctl stop )
> systemctl stop inetd.service openbsd-inetd.service
> (no memory error reported)
>
>
> In case it helps, below is the output of running the first command with the SYSTEMD_LOG_LEVEL=debug environment variable set.
>
> I've tried to strace it to see where exactly the error turns up, but that seems to disrupt the timing enough that the error message does not appear.
>
> Let me know if you need any other info.
I can reproduce the issue on jessie, but it seems to work fine on
stretch/sid with v232, so marking the bug accordingly.
I don't consider this issue important enough (especially since it is
fixed in stretch) that I will work on this myself.
If someone wants to dig deeper and finds a fix which is not too
intrusive, this would be great though and I would consider including
this in the next stable point release. A git bisect might help find the
usptream commit which fixed this issue.
Regards,
Michael
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20161216/40efd65d/attachment-0001.sig>
More information about the Pkg-systemd-maintainers
mailing list