-
Notifications
You must be signed in to change notification settings - Fork 15.5k
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
FileDescriptorTables *** glibc detected *** double free or corruption (out) #194
Comments
It's impossible to say more without actually looking at your source. A double free is often tricky to debug because you can do something incorrectly (free an object too early) and get a stack trace only much later, on the second free.
Likely what is happening is that you have some code that is calling Maybe try running your program under Valgrind? |
thanks first! |
Valgrind information: ==22518== Invalid write of size 8 ==22518== Invalid free() / delete / delete[] / realloc() |
Yes, there are some global variables, for example the "generated descriptor pool". But just using global variables doesn't make a program double-free. Do you have more specific theories or evidence? You haven't given us any information on what your program is doing. There are many ways for a C++ program to corrupt memory, usually due to some API misuse, stray pointer, or lifetime issue. If you can give us a program that will reproduce this error, we will try to look into it. But right now there is not enough information to diagnose further. The fact that the final crash happens during |
@cloudkey I sent the pull request to fix this problem and it was merged. |
I use Lua to write a C++.So shared library, which contains protobuf.
My WebService is nginx, the request is dealt with the Lua, and at the end of request,write a Pb log. But when nginx worker exit, it will be core:
#0 0x000000302af2e2ed in raise () from /lib64/tls/libc.so.6
#1 0x000000302af2fa3e in abort () from /lib64/tls/libc.so.6
#2 0x000000302af62db1 in __libc_message () from /lib64/tls/libc.so.6
#3 0x000000302af6888e in int_free () from /lib64/tls/libc.so.6
#4 0x000000302af68bd6 in free () from /lib64/tls/libc.so.6
#5 0x000000302d3ae19e in operator delete(void*) () from /usr/lib64/libstdc++.so.6
#6 0x0000000000620298 in gnu_cxx::hashtable<std::pair<std::pair<google::protobuf::EnumDescriptor const*, int> const, google::protobuf::EnumValueDescriptor const>, std::pair<google::protobuf::EnumDescriptor const, int>, google::protobuf::(anonymous namespace)::PointerIntegerPairHash<std::pair<google::protobuf::EnumDescriptor const*, int> >, std::Select1st<std::pair<std::pair<google::protobuf::EnumDescriptor const*, int> const, google::protobuf::EnumValueDescriptor const> >, std::equal_to<std::pair<google::protobuf::EnumDescriptor const, int> >, std::allocator<google::protobuf::EnumValueDescriptor const*> >::clear (
#7 0x00000000006094e0 in ~hashtable (this=, __in_chrg=)
#8 0x00000000006094e0 in ~hash_map (this=, __in_chrg=)
#9 0x00000000006094e0 in ~hash_map (this=0x242e, __in_chrg=)
#10 0x00000000006094e0 in google::protobuf::FileDescriptorTables::~FileDescriptorTables (this=0xa256c0 google::protobuf::FileDescriptorTables::kEmpty,
#11 0x000000302af30c65 in exit () from /lib64/tls/libc.so.6
#12 0x00000000004e4420 in ngx_worker_process_exit (cycle=0xdcb1a0) at src/os/unix/ngx_process_cycle.c:1103
#13 0x00000000004e3cc6 in ngx_worker_process_cycle (cycle=0xdcb1a0, data=) at src/os/unix/ngx_process_cycle.c:844
#14 0x00000000004e1bab in ngx_spawn_process (cycle=0xdcb1a0, proc=0x4e3bcd <ngx_worker_process_cycle>, data=0x0, name=0x7da525 "worker process", respawn=-3)
#15 0x00000000004e33ce in ngx_start_worker_processes (cycle=0xdcb1a0, n=1, type=-3) at src/os/unix/ngx_process_cycle.c:394
#16 0x00000000004e2dd8 in ngx_master_process_cycle (cycle=0xdcb1a0) at src/os/unix/ngx_process_cycle.c:166
#17 0x00000000004c70fe in main (argc=5, argv=) at src/core/nginx.c:412
I guess this is related to protobuf FileDescriptorTables?
The text was updated successfully, but these errors were encountered: