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

brief-engineer-67497

07/24/2019, 7:57 AM
I have a task that according to pants server is never ending while the log and the result says otherwise. It's a simple-gen task that use a jvm cli. I print the code returned by self.runjava (and see the generated sources) but the server shows that the corresponding workunit is not stoping. Any guess of where I should look to solve this ?
a

aloof-angle-91616

07/26/2019, 4:32 PM
hello! sorry for the delayed response! so i actually was in this situation a few weeks ago and was able to use jvmtop (https://github.com/patric-r/jvmtop) to see which methods were getting used the most in the scala program i had written that was looping infinitely (I would get my process's id via
ps aux | grep 'my-process-name'
and then
jvmtop --profile <pid>
on the pid from that). it showed the top 20 hottest functions on my program as it was running, and i was able to see it was failing to take into account graph cycles because it was doing some graph operations, and fixed it.
is the issue just about debugging the infinite looping in general, or are you saying pants is hiding the output somehow?
b

brief-engineer-67497

07/30/2019, 9:29 AM
thanks for the answer. Sorry for the delay. The problem was about debugging an infinite loop I imagine but now I cannot reproduce it >_<
5 Views