[Mono-list] Addresses marked as ??? in Valgrind stack trace
mail at kerrickstaley.com
Tue Oct 9 16:40:56 UTC 2012
On Thu, Oct 4, 2012 at 1:40 PM, Tom Hughes <tom at compton.nu> wrote:
> The "mono_jit_runtime_invoke" is a big clue - those will be run time
> generated code that the JIT has created so they won't be in the symbol table.
Ah, that makes a lot more sense than my theory.
On Thu, Oct 4, 2012 at 1:50 PM, Philippe Waroquiers
<philippe.waroquiers at skynet.be> wrote:
> If that is effectively the case, have you given
> the argument --smc-check=all (or =all-non-file) ?
> One of these two is for sure mandatory in a JITted env (on x86/amd64
> at least).
Yes, I'm passing this argument.
> Otherwise, you might always try using gdb/vgdb to connect to the process
> under Valgrind when the error is raised : gdb might maybe help
> to see what is going on.
You mean I should use --db-attach=yes (as Greg suggested)?
On Thu, Oct 4, 2012 at 5:38 PM, Gregory Junker <gjunker at dayark.com> wrote:
> Well, for starters, you can look at what line 5791 in mini.c is doing:
Not everyone runs master :)
It looks like the line is calling runtime_invoke, which means it's
running JIT code (as others suggested).
> One thing you can do with Valgrind is have it break to debugger on errors,
> by supplying the --attach-db=yes option. If you still can't get function
> names in GDB, you may be able to get module names (the addresses look to be
> in different modules than the Mono runtime), and from there you might have
> to get your hands dirty with nm or objdump.
OK, I'll try seeing what I can turn up with gdb. Initial results
aren't promising; when I try the disassemble command at the site of
the error, it tells me "No function contains program counter for
On Fri, Oct 5, 2012 at 1:11 PM, Rodrigo Kumpera <kumpera at gmail.com> wrote:
> Mono features a JIT that dynamically generates code and those unknown frames
> are precisely that.
> Look at the man page to see how to enable valgrind integration to show
> actual names instead.
Per the manpage, I tried setting MONO_XDEBUG=true and passing
--debug=gdb to Mono; neither caused the ???'s to be replaced with
useful information. Mono generated an xdb.il and an xdb.s file when I
did this, but it doesn't seem like GDB can use these files. I'm going
to see if I can get anywhere with the --aot flag (enabling
I also noticed this blog post describing Valgrind integration for Mono:
but it doesn't appear that that patch ever made it into Mono:
More information about the Mono-list