Skip to content
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

Report not printing backtrace issue #10

Open
Bojun-Seo opened this issue Jan 6, 2023 · 6 comments
Open

Report not printing backtrace issue #10

Bojun-Seo opened this issue Jan 6, 2023 · 6 comments

Comments

@Bojun-Seo
Copy link
Collaborator

In some cases,(64-bits for kernel, and 32-bits for user environment)

[heaptrace] dump allocation status for /proc/1234/maps (caeaq)
=== backtrace #1 === [count/peak: 118838/118842] [size/peak: 163.510 MB/168.129 MB] [age: 28 mins 31 secs]                                             

Report doesn't print backtraces.

I checked the reason and found that backtrace function,
https://man7.org/linux/man-pages/man3/backtrace.3.html
which is called inside record_backtrace function, returns zero.

@honggyukim
Copy link
Owner

Hmm.. I don't really understand what the problem is. Is this error shown only in 64-bit kernel and 32-bit user environment?

@Bojun-Seo
Copy link
Collaborator Author

Bojun-Seo commented Jan 9, 2023

The problem is that it prints only the report I attached(no backtraces are printed)
I only found this issue happened on 64-bit arm chip with 64-bit kernel and 32-bit user environment.
I will check whether I could share more information about test environment.

@Bojun-Seo
Copy link
Collaborator Author

Bojun-Seo commented Jun 23, 2023

I found the way to reproduce this issue.

  1. Flash raspberry-pi 32bits OS on raspberry-pi4 (I used rpi-imager)
$ cat /etc/issue.net
Raspbian GNU/Linux 11
$ uname -r
6.1.21-v8+
  1. Clone heaptrace and build it on target
  2. Run ./heaptrace samples/sample_leak.out
    Will generate following result
$ ./heaptrace samples/sample_leak.out
[heaptrace] initialized for /proc/4862/maps (sample_leak.out)
[heaptrace]   finalized for /proc/4862/maps (sample_leak.out)
=================================================================
[heaptrace] dump allocation sorted by 'size' for /proc/4862/maps (sample_leak.out)
=== backtrace #1 === [count/peak: 1/2] [size/peak: 4 bytes/1.0 MB] [age: 884.292 us]

[heaptrace] heap traced num of backtrace : 1
[heaptrace] heap traced allocation size  : 4 bytes
[heaptrace] allocator info (virtual)     : 135.168 KB
[heaptrace] allocator info (resident)    : 22.712 KB
[heaptrace] statm info (VSS/RSS/shared)  : 4.370 MB / 2.801 MB / 2.646 MB

@honggyukim
Copy link
Owner

Hi, I don't have a raspberry-pi board so can this be reproduced in x86_64 machine in some ways?

@Bojun-Seo
Copy link
Collaborator Author

I'll let you know, if I found a way to reproduce this issue in x86_64 machine.

@honggyukim
Copy link
Owner

That would be helpful. Please let me know how to reproduce it in host machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants