From owner-freebsd-stable@freebsd.org Thu Oct 31 20:56:26 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 2D7F9166415 for ; Thu, 31 Oct 2019 20:56:26 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail05.adl3.internode.on.net (ipmail05.adl3.internode.on.net [150.101.137.13]) by mx1.freebsd.org (Postfix) with ESMTP id 473yKg1Fp2z3LVm for ; Thu, 31 Oct 2019 20:56:21 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ppp14-2-90-194.adl-apt-pir-bras31.tpg.internode.on.net (HELO midget.dons.net.au) ([14.2.90.194]) by ipmail05.adl3.internode.on.net with ESMTP; 01 Nov 2019 07:26:13 +1030 Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.15.2/8.15.2) with ESMTPS id x9VKtx5v020013 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 1 Nov 2019 07:26:09 +1030 (ACDT) (envelope-from darius@dons.net.au) Received: (from mailnull@localhost) by midget.dons.net.au (8.15.2/8.15.2/Submit) id x9VKs3Hx016675 for ; Fri, 1 Nov 2019 07:24:03 +1030 (ACDT) (envelope-from darius@dons.net.au) X-Authentication-Warning: midget.dons.net.au: mailnull set sender to using -f X-MIMEDefang-Relay-be813b1f1da6d6b27d681222cb70cc4f5b642383: 10.0.2.38 Received: from havok.dons.net.au ([10.0.2.38]) by ns.dons.net.au (envelope-sender ) (MIMEDefang) with ESMTP id x9VKrsvE016667; Fri, 01 Nov 2019 07:24:03 +1030 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: python dameon coredumps when started from boot, but not by hand From: "O'Connor, Daniel" In-Reply-To: Date: Fri, 1 Nov 2019 07:23:54 +1030 Cc: freebsd-stable@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <8782B7F4-71E9-45D9-A18D-7C846380E9F7@dons.net.au> References: To: Pete French X-Mailer: Apple Mail (2.3445.104.11) X-Spam-Score: -1 () No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Scanned-By: MIMEDefang 2.83 on 10.0.2.1 X-Rspamd-Queue-Id: 473yKg1Fp2z3LVm X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of darius@dons.net.au has no SPF policy when checking 150.101.137.13) smtp.mailfrom=darius@dons.net.au X-Spamd-Result: default: False [3.66 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; HAS_XAW(0.00)[]; AUTH_NA(1.00)[]; DMARC_NA(0.00)[dons.net.au]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_MEDIUM(0.45)[0.454,0]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(0.95)[0.949,0]; R_SPF_NA(0.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:4739, ipnet:150.101.0.0/16, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.75)[ipnet: 150.101.0.0/16(2.49), asn: 4739(1.27), country: AU(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 20:56:26 -0000 > On 1 Nov 2019, at 01:28, Pete French = wrote: >=20 >> Hmm very odd.. >> Does the tool depend on something else running? >=20 > No, not at all. Earlier versions of the tool dont do this either. >=20 > On a machine running the tool started by hand the two processes look = like this: >=20 > 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) OK. >> What does the rc.d file for it look like? >=20 > very simple.... >=20 > #!/bin/sh >=20 > # PROVIDE: waagent > # REQUIRE: sshd netif dhclient > # KEYWORD: nojail >=20 > . /etc/rc.subr >=20 > PATH=3D$PATH:/usr/local/bin:/usr/local/sbin > name=3D"waagent" > rcvar=3D"waagent_enable" > pidfile=3D"/var/run/waagent.pid" > command=3D"/usr/local/sbin/${name}" > command_interpreter=3D"python" > command_args=3D"start" >=20 > load_rc_config $name > run_rc_command "$1" >=20 > 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. >=20 > 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 ? Hmm, does changing the command_args line to this work: command_args=3D"start 2>/tmp/waagent.log" work? -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum