Re: python dameon coredumps when started from boot, but not by hand
> Does it crash if you run it from the command line with 'env -i' in front? > > That clears out the environment and will be a lot closer to the rc.d > environment. Interesting idea, but no, that works fine. Annoyingly! > If that doesn't show anything then you will have to try capturing stderr > from the rc.d run as that will hopefully have the reason why Python is > aborting (ie what Py_FatalError is complaining about). So, I naiively tried to do this by simply sticking a '2> /tmp/waagent.stderr' on the end of the rc.d command arguments, but it didnt produce anything (i.e. an empty file was created). Will try some other ways though, as you are right that getting the output from that is how to find the issue. -pete. ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: python dameon coredumps when started from boot, but not by hand
> On 31 Oct 2019, at 20:49, Pete French wrote: > >> Does it crash if you run it from the command line with 'env -i' in front? >> >> That clears out the environment and will be a lot closer to the rc.d >> environment. > > Interesting idea, but no, that works fine. Annoyingly! Hmm very odd.. Does the tool depend on something else running? >> If that doesn't show anything then you will have to try capturing stderr >> from the rc.d run as that will hopefully have the reason why Python is >> aborting (ie what Py_FatalError is complaining about). > > So, I naiively tried to do this by simply sticking a '2> /tmp/waagent.stderr' > on the end of the rc.d command arguments, but it didnt produce anything (i.e. > an empty file was created). Will try some other ways though, as you are > right that getting the output from that is how to find the issue. What does the rc.d file for it look like? -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: python dameon coredumps when started from boot, but not by hand
> 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 03426823860 wait I 0- 0:00.92 python /usr/local/sbin/waagent -daemon (python3.6) 0 86986 86918 0 23 04238027236 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. ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: python dameon coredumps when started from boot, but not by hand
> On 1 Nov 2019, at 01:28, Pete French wrote: > >> 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 03426823860 wait I 0- 0:00.92 > python /usr/local/sbin/waagent -daemon (python3.6) > 0 86986 86918 0 23 04238027236 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? > > 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 ? Hmm, does changing the command_args line to this work: command_args="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 ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"