[master] f3e9c54cf Fix regression from 6bead571da6a2027a518af81e14d87a247f38156

Nils Goroll nils.goroll at uplex.de
Thu Nov 22 16:26:08 UTC 2018


commit f3e9c54cf7a1ecc7aab1bffc15219849174c6352
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Thu Nov 22 17:22:19 2018 +0100

    Fix regression from 6bead571da6a2027a518af81e14d87a247f38156
    
    Seen once, and failed to reprocuce (yet), needs to be understood
    better
    
    from vmod_blobdigest tests/usage.vtc:
    
    **** v1    1.8 CLI RX|No panic to clear
    ***  v1    1.8 debug|Info: manager stopping child
    ***  v1    1.8 debug|Debug: Stopping Child
    **** v1    1.9 vsl|          0 CLI             - EOF on CLI connection, worker stops
    ***  v1    2.8 debug|Info: Child (174227) ended
    ***  v1    2.8 debug|Info: Child (174227) said Child dies
    ***  v1    2.8 debug|Debug: Child cleanup complete
    ***  v1    2.8 debug|Assert error in MCH_TrackHighFd(), mgt/mgt_child.c line 203:
    ***  v1    2.8 debug|  Condition(fd > 0) not true.
    **** v1    2.9 STDOUT poll 0x10
    **   v1    2.9 WAIT4 pid=174215 status=0x0086 (user 0.914949 sys 0.567445)
    *    v1    2.9 Expected exit: 0x0 signal: 0 core: 0
    ---- v1    2.9 Bad exit status: 0x0086 exit 0x0 signal 6 core 128
    *    top   2.9 failure during reset

diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c
index 6d3d7a09e..e6fd7c514 100644
--- a/bin/varnishd/mgt/mgt_child.c
+++ b/bin/varnishd/mgt/mgt_child.c
@@ -215,7 +215,9 @@ MCH_Fd_Inherit(int fd, const char *what)
 {
 
 	assert(fd >= 0);
-	MCH_TrackHighFd(fd);
+	// XXX why?
+	if (fd > 0)
+		MCH_TrackHighFd(fd);
 	if (fd_map == NULL)
 		fd_map = vbit_new(128);
 	AN(fd_map);


More information about the varnish-commit mailing list