https://pantsbuild.org/ logo
#development
Title
# development
b

bitter-ability-32190

06/06/2022, 5:39 PM
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

witty-crayon-22786

06/06/2022, 6:15 PM
yikes. if you can reproduce it upstream, i can take a look asap
b

bitter-ability-32190

06/06/2022, 6:19 PM
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

witty-crayon-22786

06/06/2022, 6:21 PM
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

bitter-ability-32190

06/06/2022, 6:22 PM
Too bad
run
doesnt sandbox quite like `test`nakes it harder to remove pants from the equation
w

witty-crayon-22786

06/06/2022, 6:23 PM
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

bitter-ability-32190

06/06/2022, 6:24 PM
The end
w

witty-crayon-22786

06/06/2022, 6:24 PM
got it.
um… are signals in play at all? is the process exiting normally?
b

bitter-ability-32190

06/06/2022, 6:26 PM
I believe do,. There is some long related
atexit
code
w

witty-crayon-22786

06/06/2022, 6:28 PM
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

bitter-ability-32190

06/06/2022, 6:30 PM
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

witty-crayon-22786

06/06/2022, 6:31 PM
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

bitter-ability-32190

06/06/2022, 8:02 PM
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

witty-crayon-22786

06/06/2022, 8:36 PM
hm… is the Ctrl+C case a separate case from https://github.com/pantsbuild/pants/issues/15756 …?
b

bitter-ability-32190

06/06/2022, 8:37 PM
yes
w

witty-crayon-22786

06/06/2022, 8:39 PM
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

bitter-ability-32190

06/06/2022, 8:40 PM
(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

witty-crayon-22786

06/06/2022, 8:41 PM
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

bitter-ability-32190

06/06/2022, 8:45 PM
I'll give it a hearty college try!
w

witty-crayon-22786

06/06/2022, 11:50 PM
haven’t started #15756, but will tomorrow: sorry. have been trying to get to a good breaking point on another one.
b

bitter-ability-32190

06/06/2022, 11:51 PM
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