rhythmic-morning-87313
05/01/2022, 9:52 AM--no-run-cleanup
, the finalization process seems to interfere with my own cleanup procedures, crashing Python.
Can I keep my program to handle signals transparently?rhythmic-morning-87313
05/01/2022, 9:55 AMrhythmic-morning-87313
05/01/2022, 9:55 AMrhythmic-morning-87313
05/01/2022, 11:05 AMwitty-crayon-22786
05/01/2022, 5:00 PMwitty-crayon-22786
05/01/2022, 5:01 PM--no-run-cleanup
is intended as a debugging tool, rather than something you should run with in general.
what is the usecase here?rhythmic-morning-87313
05/02/2022, 4:56 AMrhythmic-morning-87313
05/02/2022, 4:59 AM./pants run
where the daemon is a multi-process asyncio Python program with custom signal handlers. It works well as a systemd service and a standalone foreground app.rhythmic-morning-87313
05/02/2022, 5:00 AM./pants run
, so I'd like to know if it has more options to control stdout/stderr of the child program.rhythmic-morning-87313
05/02/2022, 5:06 AMkill()
in src/rust/engine/process_execution/src/children.rs
so that it would deliver the signal only to the process group leader (as my program expects this) and to increase the graceful shutdown timeout from hard-coded 3 seconds to 10 seconds, but had no success.rhythmic-morning-87313
05/02/2022, 5:06 AMrhythmic-morning-87313
05/02/2022, 5:07 AMrhythmic-morning-87313
05/02/2022, 7:51 AMrhythmic-morning-87313
05/02/2022, 7:51 AMrhythmic-morning-87313
05/02/2022, 7:52 AMprint()
works finewitty-crayon-22786
05/02/2022, 5:23 PM(rebuilding the rust engine takes more than 3 minutes, so it is hard to fast-iterate over changing some rust codes...)it builds by default in
release
mode, which takes a lot longer, but is faster to run. if you don’t care about the runtime performance, can use debug
mode by setting `MODE=debug`: see https://www.pantsbuild.org/docs/contributions-rust#common-commands for more infowitty-crayon-22786
05/02/2022, 5:26 PMwitty-crayon-22786
05/02/2022, 5:28 PMAlso, the program’s startup logs are stripped (about the first ~80 lines are not displayed) when launched viathis sounds like a race condition in how we acquire access to stdout, but it’s fairly surprising, because that should all be synchronous. if you can file a report about this one too, that would be helpful, so I’d like to know if it has more options to control stdout/stderr of the child program../pants run
rhythmic-morning-87313
05/03/2022, 9:39 AM-ldebug
)rhythmic-morning-87313
05/03/2022, 9:52 AMsrc/python/pants/base/exception_sink.py
looks sanerhythmic-morning-87313
05/03/2022, 9:52 AMrhythmic-morning-87313
05/03/2022, 9:53 AMpants.base.exception_sink
as it is import that exact list of extension modules)rhythmic-morning-87313
05/03/2022, 10:20 AMrhythmic-morning-87313
05/03/2022, 10:20 AMrhythmic-morning-87313
05/03/2022, 10:21 AMrhythmic-morning-87313
05/03/2022, 10:25 AMrhythmic-morning-87313
05/03/2022, 10:29 AMsrc/rust/engine/src/nodes.rs
are:rhythmic-morning-87313
05/03/2022, 10:29 AMrhythmic-morning-87313
05/03/2022, 4:02 PMwitty-crayon-22786
05/03/2022, 4:38 PMrhythmic-morning-87313
05/03/2022, 4:40 PM