On 24/06/16 06:29, Neeraj Sharma wrote:
While trying to upgrade Erlang in the rumprun-packages to the latest
Erlang 19.0 release I am noticing a very strange behavior.
Surprisingly the Erlang application main is never called (quick test
via gdb), while the vm is running indefinitely occupying 100% of a
core doing something. I spent a couple of minutes interrupting the run
within gdb (a couple of times via SIGINT and then continuing) but it
was not very useful. I am not too sure whether it's something to do
with the build (probably unlikely), which I plan to rebuild from
scratch tonight anyways. Having said that it'll be great to have a
tracing/debugging as to understand where the kernel is spending all
its time and why. Is there anything similar to lttng or alternate
means to get detailed logging of where the kernel is spending its
time?
Surprisingly the same build of rumprun works flawlessly with earlier
release of Erlang, which makes me wonder if this has something to do
with the result of the baking process? Note that the command to run
the kernel within qemu (with and without kvm) remains same across runs
(memory and stuff).
We should come up with a recipe for profiling. However, the class of
cases that your problem falls under, at least from what I can guess from
your mail, is easiest to debug with gdb. Just single-step the instance
and you should be able to find what it's looping around before hitting
main. Note: don't use kvm when single-stepping, in my experience it
doesn't work very well.