Comments (5)
Hello, I have just compiled snort 3.1 on Arm64 machine
snort_strace_tmalloc.txt
with tcmalloc enabled, the snort binary won't run, it is stuck see attached log file.
without tcmalloc enabled, it works fine.
any idea?
from tcmalloc.
NOTE: I am building currently with the SMALL_BUT_SLOW
option on because I first thought maybe the default 1GB mapping was causing the issue, but I get the same problem with either option.
from tcmalloc.
As a general note, ARM64 support would be desirable, but it's not yet ready. Our per-CPU cache implementation relies on hand-written assembly and needs to be ported to ARM.
Do you know how your page table is configured with your kernel build? https://kernel.org/doc/Documentation/arm64/memory.txt has a discussion of 39- versus 48-bit address spaces.
As an optimization, we "tag" (by using an upper bit of the pointer) sampled objects during allocation. The tag makes it easy to distinguish sampled objects from unsampled ones. My suspicion is that we are unable to allocate memory with the right bit pattern--possibly due to a constrained 39-bit address space--and so we fail. One way of testing this hypothesis is to edit tcmalloc/common.h
's kAddressBits
to 39 (instead of 48) for the ARM configuration.
from tcmalloc.
Thanks for the quick reply! Based on the boot output, I think it is using 39-bit addresses:
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] modules : 0xffffff8000000000 - 0xffffff8008000000 ( 128 MB)
[ 0.000000] vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000 ( 250 GB)
[ 0.000000] .text : 0xffffff8008080000 - 0xffffff8008f60000 ( 15232 KB)
[ 0.000000] .rodata : 0xffffff8008f60000 - 0xffffff80095e0000 ( 6656 KB)
[ 0.000000] .init : 0xffffff80095e0000 - 0xffffff8009e40000 ( 8576 KB)
[ 0.000000] .data : 0xffffff8009e40000 - 0xffffff800a11b808 ( 2927 KB)
[ 0.000000] .bss : 0xffffff800a11b808 - 0xffffff800a1b3dbc ( 610 KB)
[ 0.000000] fixed : 0xffffffbefe7fd000 - 0xffffffbefec00000 ( 4108 KB)
[ 0.000000] PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000 ( 16 MB)
[ 0.000000] vmemmap : 0xffffffbf00000000 - 0xffffffc000000000 ( 4 GB maximum)
[ 0.000000] 0xffffffbf00000000 - 0xffffffbf03fc8000 ( 63 MB actual)
[ 0.000000] memory : 0xffffffc000000000 - 0xffffffc0ff200000 ( 4082 MB)
I'll give it a try to change the address bits and see if it works.
In the short term I'm interested in using tcmalloc for the heap profiling abilities, so even if the assembly code is not complete, do you expect tcmalloc to work functionally (albeit not at max performance) on ARM64?
from tcmalloc.
BTW, the change to 39-bits seems to work (at least for the hello_main
test program). Going to try with our main application. If you think that it's likely we'll run into other problems given the not-officially-supported nature, please let me know. Thanks agian!
from tcmalloc.
Related Issues (20)
- segmentation fault when build with tsan HOT 2
- failed mater branch build on Fedora 38 HOT 1
- bazel build error
- MemoryLimit issue on CentOS
- OSS-Fuzz issue 63111
- OSS-Fuzz issue 63140
- OSS-Fuzz issue 63195 HOT 1
- Following QuickStart does not Build Successfully HOT 2
- tcmalloc central cache too large memory HOT 2
- Is there any release branch or tag of current project? HOT 2
- issue for "improve malloc fast path codegen" HOT 1
- Possibly crash with kernel disabling CONFIG_PROC_PID_CPUSET HOT 2
- tcmalloc is trying to keep everything allocated for longer HOT 3
- Disabling tcmalloc cache HOT 2
- OSS-Fuzz issue 65919 HOT 1
- OSS-Fuzz issue 66172 HOT 1
- MADV_COLLAPSE
- Failed to build tcmalloc, Error info: junk at end of line HOT 1
- Quick start guide broken
- How to access tcmalloc MallocExtensions? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tcmalloc.