jetson nano上的valgrind错误m_execontext.c:411(record_execontext_



我正试图用valgrind跟踪我的nvidia jetson nano上的内存消耗,但我得到了:

stiv@nano:~/jsoft/dgpu_core$ valgrind --tool=massif ./build/dgpu_core
==8379== Massif, a heap profiler
==8379== Copyright (C) 2003-2017, and GNU GPL'd, by Nicholas Nethercote
==8379== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==8379== Command: ./build/dgpu_core
==8379==
valgrind: m_execontext.c:411 (record_ExeContext_wrk2): Assertion 'n_ips >= 1 && n_ips <= VG_(clo_backtrace_size)' failed.
host stacktrace:
==8379==    at 0x5800A0A8: ??? (in /usr/lib/valgrind/massif-arm64-linux)
sched status:
  running_tid=1
Thread 1: status = VgTs_Runnable (lwpid 8379)
==8379==    at 0x4842E9C: malloc (in /usr/lib/valgrind/vgpreload_massif-arm64-linux.so)

Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there's a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.
If that doesn't help, please report this bug to: www.valgrind.org
In the bug report, send all the above text, the valgrind
version, and what OS and version you are using.  Thanks.

这是什么意思?有什么已知的方法可以解决这个问题吗?

您的问题是Valgrind看到的堆栈深度超出了预期范围。

我的建议是

  1. 在使用其他Valgrind工具之前,请始终确保您的应用程序使用memcheck运行干净
  2. 使用Valgrind的最新版本(在撰写本文时,目前为3.16.1,2020年7月(

最新更新