I have written an apache module, which links protobuf library.

My apache is in prefork module. When the child process get killed after 
serving some request, the child process get core dump.

The log in apache error_log as follow:
*** glibc detected *** /usr/sbin/httpd: double free or corruption (out): 
0x00007f05f31be960 ***
======= Backtrace: =========
/lib64/libc.so.6[0x7f05efe3a2ef]
/lib64/libc.so.6(cfree+0x4b)[0x7f05efe3a73b]
/usr/lib64/libprotobuf.so.7[0x7f05e5de98ff]
/usr/lib64/libprotobuf.so.7(_ZN6google8protobuf20FileDescriptorTablesD1Ev+0x18)[0x7f05e5dec838]
/lib64/libc.so.6(exit+0xe5)[0x7f05efdfb3a5]
/usr/sbin/httpd[0x7f05f1e284d1]
/usr/sbin/httpd[0x7f05f1e2896b]
/usr/sbin/httpd[0x7f05f1e28b2a]
/usr/sbin/httpd(ap_mpm_run+0x78d)[0x7f05f1e2938d]
/usr/sbin/httpd(main+0x7e8)[0x7f05f1e03e48]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x7f05efde5994]
/usr/sbin/httpd[0x7f05f1e03199]

The core stack as follow:
(gdb) bt
#0  0x00007f88c2986265 in raise () from /lib64/libc.so.6
#1  0x00007f88c2987d10 in abort () from /lib64/libc.so.6
#2  0x00007f88c29c084b in __libc_message () from /lib64/libc.so.6
#3  0x00007f88c29c82ef in _int_free () from /lib64/libc.so.6
#4  0x00007f88c29c873b in free () from /lib64/libc.so.6
#5  0x00007f88b20522ff in deallocate (this=0x7f88b22eabc0)
    at 
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/ext/new_allocator.h:94
#6  _M_put_node (this=0x7f88b22eabc0)
    at 
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/ext/hashtable.h:301
#7  _M_delete_node (this=0x7f88b22eabc0)
    at 
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/ext/hashtable.h:623
#8  __gnu_cxx::hashtable<std::pair<const std::pair<const 
google::protobuf::EnumDescriptor*, int>, const 
google::protobuf::EnumValueDescriptor*>,std::pair<const 
google::protobuf::EnumDescriptor*, 
int>,google::protobuf::<unnamed>::PointerIntegerPairHash<std::pair<const 
google::protobuf::EnumDescriptor*, int> >,std::_Select1st<std::pair<const 
std::pair<const google::protobuf::EnumDescriptor*, int>, const 
google::protobuf::EnumValueDescriptor*> >,std::equal_to<std::pair<const 
google::protobuf::EnumDescriptor*, int> >,std::allocator<const 
google::protobuf::EnumValueDescriptor*> >::clear(void) (this=0x7f88b22eabc0)
    at 
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/ext/hashtable.h:1086
#9  0x00007f88b2054ce8 in ~hashtable (this=0x7f88b22eab20, __in_chrg=<value 
optimized out>)
    at 
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/ext/hashtable.h:361
#10 ~hash_map (this=0x7f88b22eab20, __in_chrg=<value optimized out>)
    at 
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/ext/hash_map:93
#11 ~hash_map (this=0x7f88b22eab20, __in_chrg=<value optimized out>) at 
./google/protobuf/stubs/hash.h:165
#12 google::protobuf::FileDescriptorTables::~FileDescriptorTables 
(this=0x7f88b22eab20, __in_chrg=<value optimized out>)
    at google/protobuf/descriptor.cc:500
#13 0x00007f88c29893a5 in exit () from /lib64/libc.so.6
#14 0x00007f88c49b64d1 in ?? ()
#15 0x00007f88c49b64eb in ?? ()
#16 <signal handler called>

My apache server is httpd-2.2.3, protobuf is 2.4.2.

It looks protobuf have some problem with dlopen:
http://code.google.com/p/protobuf/issues/detail?id=128
http://code.google.com/p/protobuf/issues/detail?id=370

I don't know if my problem is the same issue.
Any one has any ideas?

thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to