I'm seeing some output being dropped with `./pants...
# development
b
I'm seeing some output being dropped with
./pants run
. It's completely reproducible and
--no-pantsd
--no-dynamic-ui
and
2> out.txt
dont help. Pants
2.11.0
. THoughts?
1
Specifically this is logging output. I'm thinking this might be something to do with our logging handler as well
w
yikes. if you can reproduce it upstream, i can take a look asap
b
My predecessor invoked arcane dark arts in some places of our code. At the very least, absl_logging is at play
Let me peel away the onion
w
the actual process in play shouldn’t be relevant…? but i believe that @rhythmic-morning-87313 had seen an issue with missing
run
output in some cases, but they had an interesting use of subprocesses which i (lazily) chalked it up to =/
b
Too bad
run
doesnt sandbox quite like `test`nakes it harder to remove pants from the equation
w
i expect that it’s due to the interplay of tearing down the UI before giving exclusive access, so yea… would be hard to remove it from the equation. is output missing from the beginning of the run, or the end?
b
The end
w
got it.
um… are signals in play at all? is the process exiting normally?
b
I believe do,. There is some long related
atexit
code
w
got it. rather than the UI, it’s likely related to the graceful shutdown code, which changed in https://github.com/pantsbuild/pants/pull/14580
is the parent process supposed to be exiting gracefully?
b
I think so, but not sure. We're entering territory outside of my normal knowledge
Let me see if I can run with that change. Might take a bit to remove my plugins, or update them 😐
w
hm, that change is 2.11 i think…?
lemme see.
yea, its in 2.11.x
if you can open a ticket with as much information as you have, that would still be useful.
1
b
OK I have a reproducble example, will open ticket
I would like to apologize for the WTF code (especially w.r.t absl-py) 🙂
Hijacking this thread, because context. From one of my engs testing out Ctrl+C
services can take up to 5secs to close everything
@witty-crayon-22786 the PR you linked mentions a 3 second upper bound. What's our escape hatch here?
w
hm… is the Ctrl+C case a separate case from https://github.com/pantsbuild/pants/issues/15756 …?
b
yes
w
ah, ok. so… yea, the answer is going to be following up on the TODO from https://github.com/pantsbuild/pants/blob/7e02a2a524f46bbfdcb8d1241cfc5cdc8496e0c5/src/rust/engine/process_execution/src/children.rs#L10-L12 … probably as an optional field on
InteractiveProcess
, and provided from a field on
pex_binary
…?
possibly with a global default.
b
(I'm not using
pex_binary
I'm in the future in a world with https://docs.google.com/document/d/1R9m-DtM8Y5UKx5iam5ipeK531tZR40_P7El4ucYq4Po/edit?usp=sharing) 😈
w
yea, so global default as well then
is that something that you’re ok tackling if i grab https://github.com/pantsbuild/pants/issues/15756 ?
b
I'll give it a hearty college try!
w
haven’t started #15756, but will tomorrow: sorry. have been trying to get to a good breaking point on another one.
b
No worries, prepare to enter the WTF of abseil
Also if I was more adept at the rust side of things I'd tackle it nyself
SO on the SIGTERM thing, apparently the 5 second shutdown is due to a
sleep(5)
. So, problem solved 😂
😅 1
Still probably will take a stab at the issue