-
Notifications
You must be signed in to change notification settings - Fork 127
Description
I created a test application that has a structure like this:
if (0 == odp_init_global(&instance, NULL, NULL)) {
printf("odp_init_global: success!\n");
if (0 == odp_init_local(instance, ODP_THREAD_CONTROL)) {
printf("odp_init_local: success!\n");
ofp_init_global_param(&app_init_params);
}
else {
printf("Error: ODP local init failed.\n");
odp_term_global(instance);
}
}
else {
printf("Error: ODP global init failed.\n");
}
I put the above lines inside the constructor of my class FOO. and I do these things at the constructor:
ofp_term_local();
ofp_term_global();
odp_term_local();
if (m_instance) {
odp_term_global(m_instance);
}
When I ran my application for the first time, everything was ok. if I close my application and try to rerun it, it will crash and this is the backtrace output in gdb:
(gdb) bt
#0 0xffffcd4c in ?? ()
#1 0xf798afd2 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#2 0xf75fd306 in clone () from /lib/i386-linux-gnu/libc.so.6
Steps before I run my application:
- I set hugepage number: sudo echo 512 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
- I mount hugepages:
sudo mount -t hugetlbfs pagesize=1GB /mnt/huge
I was also thinking that maybe after first run, some processes or FD or something else left on my system. but there is no process left as I saw at htop.
Also, I tried to remove everything in these directories:
sudo rm -r /mnt/huge/0/
sudo rm -r /dev/shm/0/
But still receive SIGSEGV on the second run. Did I miss some steps in the cleanup process?
It's worth mentioning that I'm developing my application inside wsl(Debian Buster). maybe it causes the issue? is there any restriction on wsl?