-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stackMonitor::getCallStacks() always return empty results #484
Comments
I wonder why LinuxMonitor::handleMemMap is not called. Perhaps we are missing other places where Linux is allocating memory. |
Thanks for the response! May I know what you mean by "not called" with LinuxMonitor::handleMemMap? We actually found it is called. Here is the part of the error message which has handleMemMap (sorry we didn't put the whole message since it's quite huge.)
Despite the fact that it is called , the log message shows that it does not match stack pointers. Maybe it should be called on additional locations? |
Was handleMemMap called with the stack region? |
Sorry for the late response. I think it was not called with the stack region since the stack pointers in the log messages never falls into the range allocated in early mmap log messages. However in my understanding of the linux kernel, it does allocate stack memory for a process/thread with mmap, which will trigger |
Hello, I just checked the source code of linux kernel again. My understanding is that every function call involves a |
I am trying to get the CallStack when a state fork happens. I modified
ExecutionTracer::onFork()
and tried to invokestackMonitor::getCallStacks()
. However, the size of the returned callStacks is always 0. Here is the code:I digged into the code base to try understanding what happened under the hood. I realized that
m_stacks
inStackMonitorState
is always empty. The reason is that wheneverStackMonitorState::update()
is invoked, it failed to get the stack base and size fromBaseLInuxMonitor::getCurrentStack()
. And it fails to get this because it does not find any memory region information for the interested pid and stack pointer. One of the log messages I got is as follow:Apparently, the stack pointer
0x7ffdbc7fa530
does not fall into any of the memory regions in the memory map. I am not sure if I miss anything to make this problem. So my question is: How can I get the correct callStacks withstackMonitor::getCallStacks()
?Here is the simple program I am trying to symbolic execute:
The text was updated successfully, but these errors were encountered: