From owner-freebsd-stable@freebsd.org Thu Oct 31 14:58:51 2019 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1EF6715BCA1 for ; Thu, 31 Oct 2019 14:58:51 +0000 (UTC) (envelope-from petefrench@ingresso.co.uk) Received: from constantine.ingresso.co.uk (constantine.ingresso.co.uk [31.24.6.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 473pP56Wnvz4RPr for ; Thu, 31 Oct 2019 14:58:49 +0000 (UTC) (envelope-from petefrench@ingresso.co.uk) Received: from [2a02:b90:3002:411::6] (helo=dilbert.ingresso.co.uk) by constantine.ingresso.co.uk with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1iQBuR-0005vz-FD; Thu, 31 Oct 2019 14:58:47 +0000 Received: from petefrench by dilbert.ingresso.co.uk with local (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1iQBuR-000BU2-CN; Thu, 31 Oct 2019 14:58:47 +0000 To: darius@dons.net.au, petefrench@ingresso.co.uk Subject: Re: python dameon coredumps when started from boot, but not by hand Cc: freebsd-stable@freebsd.org In-Reply-To: <28335B0B-43D8-4E78-8112-334D7153AFE3@dons.net.au> Message-Id: From: Pete French Date: Thu, 31 Oct 2019 14:58:47 +0000 X-Rspamd-Queue-Id: 473pP56Wnvz4RPr X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=ingresso.co.uk; spf=pass (mx1.freebsd.org: domain of petefrench@ingresso.co.uk designates 31.24.6.74 as permitted sender) smtp.mailfrom=petefrench@ingresso.co.uk X-Spamd-Result: default: False [-5.96 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:31.24.6.74]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_POLICY_ALLOW(-0.50)[ingresso.co.uk,none]; IP_SCORE(-3.16)[ip: (-9.74), ipnet: 31.24.0.0/21(-4.87), asn: 16082(-1.10), country: GB(-0.08)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16082, ipnet:31.24.0.0/21, country:GB]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Oct 2019 14:58:51 -0000 > Hmm very odd.. > Does the tool depend on something else running? No, not at all. Earlier versions of the tool dont do this either. On a machine running the tool started by hand the two processes look like this: 0 86918 1 0 20 0 34268 23860 wait I 0- 0:00.92 python /usr/local/sbin/waagent -daemon (python3.6) 0 86986 86918 0 23 0 42380 27236 select S 0- 46:59.62 python3 -u /usr/local/sbin/waagent -run-exthandlers (python3.6) > What does the rc.d file for it look like? very simple.... #!/bin/sh # PROVIDE: waagent # REQUIRE: sshd netif dhclient # KEYWORD: nojail . /etc/rc.subr PATH=$PATH:/usr/local/bin:/usr/local/sbin name="waagent" rcvar="waagent_enable" pidfile="/var/run/waagent.pid" command="/usr/local/sbin/${name}" command_interpreter="python" command_args="start" load_rc_config $name run_rc_command "$1" my installed python is a symblic link to python3.6, and thats about as basic as an rc file gets. Its in /etc/rc.d not /usr/local/etc/rc.d but I dont think thats going to matter. I suppose I could try and find the bit in the python where it starts the 2nd process and chnage that to log any outout somehow maybe ? -pete.