[
https://issues.apache.org/jira/browse/IMPALA-13472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18021025#comment-18021025
]
Joe McDonnell commented on IMPALA-13472:
----------------------------------------
I think this is due to Redhat 8 ARM64 running with a 64KB page size. When
reading the stack memory, the code masks the stack pointer to try to get to the
beginning of the page, then it tries to read up to 32KB. However, with a 64KB
page and a top down stack, that 32KB doesn't contain any stack contents.
{noformat}
// Get information about the stack, given the stack pointer. We don't try to
// walk the stack since we might not have all the information needed to do
// unwind. So we just grab, up to, 32k of stack.
bool LinuxDumper::GetStackInfo(const void** stack, size_t* stack_len,
uintptr_t int_stack_pointer) {
// Move the stack pointer to the bottom of the page that it's in.
const uintptr_t page_size = getpagesize();
uint8_t* const stack_pointer =
reinterpret_cast<uint8_t*>(int_stack_pointer & ~(page_size - 1));
// The number of bytes of stack which we try to capture.
static const ptrdiff_t kStackToCapture = 32 * 1024;
const MappingInfo* mapping = FindMapping(stack_pointer);
if (!mapping)
return false;
const ptrdiff_t offset = stack_pointer -
reinterpret_cast<uint8_t*>(mapping->start_addr);
const ptrdiff_t distance_to_end =
static_cast<ptrdiff_t>(mapping->size) - offset;
*stack_len = distance_to_end > kStackToCapture ?
kStackToCapture : distance_to_end;
*stack = stack_pointer;
return true;
}{noformat}
[https://github.com/google/breakpad/blob/ff252ff6faf5e3a52dc4955aab0d84831697dc94/src/client/linux/minidump_writer/linux_dumper.cc#L783-L805]
It seems we have two options:
# Mask by something less than the page size when the page size > 32KB
# Increase the amount of memory captured when the page size > 32KB
I will try patching breakpad to see if it fixes the issue.
> Minidumps on ARM don't give the stack on Redhat8
> ------------------------------------------------
>
> Key: IMPALA-13472
> URL: https://issues.apache.org/jira/browse/IMPALA-13472
> Project: IMPALA
> Issue Type: Task
> Affects Versions: Impala 4.5.0
> Reporter: Fang-Yu Rao
> Assignee: zhangqianqiong
> Priority: Blocker
> Attachments: 75d667d8-3a76-4240-d95a63bd-01806ba9.dmp_dumpedv2,
> ce1d2431-ec45-4b30-8115d3a8-1c9b5e9e.dmp_dumpedv2,
> e85b9f26-2fd0-4beb-7823778e-cbed9c7b.dmp_dumpedv2
>
>
> Currently Minidumps for UBSAN on ARM don't give the stack as shown in
> [^e85b9f26-2fd0-4beb-7823778e-cbed9c7b.dmp_dumpedv2],
> [^ce1d2431-ec45-4b30-8115d3a8-1c9b5e9e.dmp_dumpedv2], and
> [^75d667d8-3a76-4240-d95a63bd-01806ba9.dmp_dumpedv2]. It would be good if the
> functions in each thread could be resolved.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]