|
From: Julian S. <js...@ac...> - 2008-05-04 08:24:43
|
> Thanks. I see a mysterious line in the ppc64 output, that does not
> appear in the amd64 output:
>
> --22020:1:signals extending a stack base 0x7fefff000 down by 4096
>
> The address 0x7fefff000 looks to me like an address on Valgrind's
> stack. Is it normal that VG_(extend_stack)() gets called when
> Valgrind's stack is extended ? Shouldn't this function be called only
> for client stacks ?
I think it is a client stack. From earlier in the trace there is:
--22020:1:initimg Setup client stack: size will be 8388608
and then
--22020:1:sched sched_init_phase2: tid_main=1, cls_end=0x7ff000fff,
cls_sz=8388608
so the first thread's client stack is placed ending at 0x7ff000fff,
and so 0x7fefff000 is just 1fff (2 pages) before the end.
Also this is visible from the printed-out map:
--22020:1:aspacem 20: RSVN 07fe801000-07feffefff 8380416 ----- SmUpper
--22020:1:aspacem 21: anon 07fefff000-07ff000fff 8192 rwx--
Sections with lowercase names ("anon") belong to the client, and those
with uppercase names ("RSVN") belong to Valgrind. What this shows is
that there is an 8k client stack area belonging to the client and
immediately before it a "reservation" of 8388608 - 8192 == 8380416
belonging to Valgrind. The reservation is the place where V will expand
the stack into, on demand.
------
To answer your question re running_tid=1, at least in this example,
I would guess there is only one thread (no others have been created
yet) and so no ambiguity. In the kind of crash message that Nuno posted,
there is only one thread stack ("Thread 1: status = VgTs_Runnable" ..),
and so this is the root thread, not one created by pthread_create. If
there is > 1 thread then there would be > 1 thread stack shown.
------
Can you clarify the link between this mechanism for finding the highest
address in a stack, and why drd takes lots of memory on ppc? I assume
you have some hypothesis in mind, but I don't know what it is.
J
|