The aplication throws SIGSEGV when run under gdb debuger. #1535
Replies: 2 comments
-
No.
The raw allocation has metadata associated with it that comes before the address that gets handed out. The code calculates the real address to release. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The problem was cause by different thread writing to incorrect memory, not related to absl. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We updated libprotobut to 23.4.0 that is using abls 2023_01_25.
Normally application works fine but when run under gdb it throws SIGSEGV.
0x00007f063124de52 in absl::lts_20230125::base_internal::LowLevelAlloc::Free(void*) ()
from /opt/3rd/lib64/libprotobuf.so.23.4.0
(gdb) bt
#0 0x00007f063124de52 in absl::lts_20230125::base_internal::LowLevelAlloc::Free(void*) ()
from /opt/3rd/lib64/libprotobuf.so.23.4.0
#1 0x00007f06311e1be0 in absl::lts_20230125::synchronization_internal::ReclaimThreadIdentity(void*) ()
from /opt/3rd/lib64/libprotobuf.so.23.4.0
#2 0x00007f062dc17451 in __nptl_deallocate_tsd () at pthread_create.c:301
#3 0x00007f062dc181eb in __nptl_deallocate_tsd () at pthread_create.c:256
#4 start_thread (arg=) at pthread_create.c:490
I have looked at ReclaimThreadIdentity and this is a destructor caled when thread ends to cleanup some data set by mutex.cc
// Called in debug mode when a thread is about to acquire a lock in a way that
// may block.
SynchLocksHeld *all_locks = Synch_GetAllLocks();
Do I understand it correctly that those locks are added only when run under gdb ? What is the purpose of this ?
Also the address calculation LowLevelAlloc::Free sems quire strange.
LowLevelAlloc::Free(void *v)
AllocList *f = reinterpret_cast<AllocList *>(
reinterpret_cast<char *>(v) - sizeof (f->header));
It refers to some address before passed *v. I suspect this is causing SIGSEGV
What is the reelection between AllocList structure used in LowLevelAlloc::Free and SynchLocksHeld *all_locks passed as *v ?
Beta Was this translation helpful? Give feedback.
All reactions