Re: [systemd-devel] Dropping core with Systemd.

2017-05-17 Thread Lennart Poettering
On Mon, 15.05.17 11:54, Steve Dickson (ste...@redhat.com) wrote:

> Hello,
> 
> I want rpcbind to drop core so I can debug 
> something but systemd keeps getting in the way
> 
> systemd: rpcbind.service: Main process exited, code=killed, status=6/ABRT
> audit: ANOM_ABEND auid=4294967295 uid=32 gid=32 ses=4294967295 
> subj=system_u:system_r:rpcbind_t:s0 pid=2787 comm="rpcbind" 
> exe="/usr/bin/rpcbind" sig=6
> systemd: rpcbind.service: Unit entered failed state.
> audit: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 
> subj=system_u:system_r:init_t:s0 msg='unit=rpcbind comm="systemd" 
> exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
> systemd: rpcbind.service: Failed with result 'signal'.
> systemd: Starting RPC Bind...
> systemd: Started RPC Bind.
> 
> How do I stop systemd from restarting rpcbind and allowing
> the process to drop core?

I figure rpcbind is restarted because a pending socket activation
request remains in rpcbind's socket?

systemd will stop restarting the service if the start limit of the
service is hit, but until that point it will keep restarting it. You
may configure the per-service start limit with StartLimitIntervalSec=
and StartLimitBurst=.

That said, if you just want to temporarily block a service from
starting use:

# systemctl mask --runtime rpcbind

and then, to remove the block again:

# systemctl unmask --runtime rpcbind

If you use a system where coredumpctl is enabled you can just type
"coredumpctl" to see the most recent coredumps. You can also type
"coredumpctl gdb" to get a gdb instance on it.

If you use some other coredump manager (abrt?) you'd have to ping that
community for help...

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Dropping core with Systemd.

2017-05-15 Thread Kai Krakow
Am Mon, 15 May 2017 11:54:08 -0400
schrieb Steve Dickson :

> Hello,
> 
> I want rpcbind to drop core so I can debug 
> something but systemd keeps getting in the way
> 
> systemd: rpcbind.service: Main process exited, code=killed,
> status=6/ABRT audit: ANOM_ABEND auid=4294967295 uid=32 gid=32
> ses=4294967295 subj=system_u:system_r:rpcbind_t:s0 pid=2787
> comm="rpcbind" exe="/usr/bin/rpcbind" sig=6 systemd: rpcbind.service:
> Unit entered failed state. audit: SERVICE_STOP pid=1 uid=0
> auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0
> msg='unit=rpcbind comm="systemd" exe="/usr/lib/systemd/systemd"
> hostname=? addr=? terminal=? res=failed' systemd: rpcbind.service:
> Failed with result 'signal'. systemd: Starting RPC Bind... systemd:
> Started RPC Bind.
> 
> How do I stop systemd from restarting rpcbind and allowing
> the process to drop core?
> 
> Note, this problem only happens when systemd starts rpcbind
> and ypbind so I need systemd to start the processes. 

Usually you should find it listed when you run "coredumpctl".

For this to work, sysctl should have:

kernel.core_pattern = |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %e
kernel.core_pipe_limit = 0
kernel.core_uses_pid = 1

This should be default with a default systemd installation. You may
need to mask/unmask one sysctl file.
Check /usr/lib/sysctl.d/50-coredump.conf.


-- 
Regards,
Kai

Replies to list-only preferred.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel