Discussion:
[Opendnssec-user] SIGPIPE kills ods-enforcerd in response to CLI commands
Peter Wemm
2017-11-30 05:38:32 UTC
Permalink
If I interrupt the output of ods-enforcer, the server gets killed with
SIGPIPE. eg:

***@ns-master:~ ods-enforcer key list -v | head -1
Keys:
***@ns-master:~ ods-enforcer key list -v | head -1
Unable to connect to engine. connect() failed: Connection refused
("/usr/local/var/run/opendnssec/enforcer.sock")

24256 ods-enforcerd NAMI "/usr/local/var/opendnssec/kasp.db-wal"
24256 ods-enforcerd RET fstatat -1 errno 2 No such file or directory
24256 ods-enforcerd CALL fstat(0xe,0x7fffdf5f79a0)
24256 ods-enforcerd STRU struct stat {dev=1381458..., size=143360,
blksize=131072, blocks=536, flags=0x800 }
24256 ods-enforcerd RET fstat 0
24256 ods-enforcerd CALL fcntl(0xe,F_SETLK,0x7fffdf5f7a00)
24256 ods-enforcerd RET fcntl 0
24256 ods-enforcerd CALL write(0xd,0x7fffdf5f7c5d,0x3)
24256 ods-enforcerd RET write -1 errno 32 Broken pipe
24256 ods-enforcerd PSIG SIGPIPE SIG_DFL code=SI_KERNEL

I've seen this on FreeBSD-11 and 12. Anyone else see this or is it just a
FreeBSD thing?

opendnssec version: 2.1.3
--
Peter Wemm - ***@wemm.org; ***@FreeBSD.org; ***@yahoo-inc.com; KI6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246
Emil Natan
2017-11-30 06:56:04 UTC
Permalink
On my Linux (Ubuntu 16.04) box running ODS 2.1.1 it does not happen.

Emil
Post by Peter Wemm
If I interrupt the output of ods-enforcer, the server gets killed with
Unable to connect to engine. connect() failed: Connection refused
("/usr/local/var/run/opendnssec/enforcer.sock")
24256 ods-enforcerd NAMI "/usr/local/var/opendnssec/kasp.db-wal"
24256 ods-enforcerd RET fstatat -1 errno 2 No such file or directory
24256 ods-enforcerd CALL fstat(0xe,0x7fffdf5f79a0)
24256 ods-enforcerd STRU struct stat {dev=1381458..., size=143360,
blksize=131072, blocks=536, flags=0x800 }
24256 ods-enforcerd RET fstat 0
24256 ods-enforcerd CALL fcntl(0xe,F_SETLK,0x7fffdf5f7a00)
24256 ods-enforcerd RET fcntl 0
24256 ods-enforcerd CALL write(0xd,0x7fffdf5f7c5d,0x3)
24256 ods-enforcerd RET write -1 errno 32 Broken pipe
24256 ods-enforcerd PSIG SIGPIPE SIG_DFL code=SI_KERNEL
I've seen this on FreeBSD-11 and 12. Anyone else see this or is it just a
FreeBSD thing?
opendnssec version: 2.1.3
--
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246
_______________________________________________
Opendnssec-user mailing list
https://lists.opendnssec.org/mailman/listinfo/opendnssec-user
Yuri Schaeffer
2017-11-30 07:57:33 UTC
Permalink
Hi Peter,
Post by Peter Wemm
If I interrupt the output of ods-enforcer, the server gets killed with
I've seen this on FreeBSD-11 and 12.  Anyone else see this or is it
just a
FreeBSD thing?
I came across this as well and have it fixed in one of the development
branches. It will be in a future release (TBD).

Meanwhile if you want you can apply the following patch:

diff --git a/enforcer/src/daemon/engine.c b/enforcer/src/daemon/engine.c
index 3ed311612..c6604559e 100644
--- a/enforcer/src/daemon/engine.c
+++ b/enforcer/src/daemon/engine.c
@@ -632,6 +632,7 @@ engine_init(engine_type* engine, int daemonize)
sigaction(SIGHUP, &action, NULL);
sigaction(SIGTERM, &action, NULL);
sigaction(SIGINT, &action, NULL);
+ sigaction(SIGPIPE, &action, NULL);
engine->dbcfg_list = NULL;
}

Regards,
Yuri

Loading...