Understanding Apache core dump with gdb - apache

I have a pretty straightforward LAMP stack, with Apache 2.4.23 running a handful of SSL-enabled sites, with PHP 7.1.8 running in a typical mod_php setup. I compiled Apache against OpenSSL 1.0.2j, and everything works great 99% of the time. I've had a handful of segfaults over the past few months, and this morning there was something that just went horribly awry and basically brought the server to its knees. When I rebooted, there was a 2.8 GB core file from Apache, and another 0.9 GB one from the day before. The backtrace seems to both indicate they had issues in the same area. Both have this line:
ssleay_rand_add.part.0 () from /usr/local/openssl/lib/libcrypto.so.1.0.0
...followed by a failed assertion from libc, and then the dump:
(gdb) thread apply all bt
Thread 27 (Thread 0x7f99e4ff9700 (LWP 8493)):
#0 0x00007f99fc6693d1 in do_lookup_x () from /lib64/ld-linux-x86-64.so.2
#1 0x00007f99fc669caf in _dl_lookup_symbol_x () from /lib64/ld-linux-x86-64.so.2
#2 0x00007f99fc66e5b6 in _dl_fixup () from /lib64/ld-linux-x86-64.so.2
#3 0x00007f99fc6750c0 in _dl_runtime_resolve () from /lib64/ld-linux-x86-64.so.2
#4 0x0000000000459148 in sig_coredump (sig=6) at mpm_unix.c:959
#5 <signal handler called>
#6 0x00007f99fb1921d7 in raise () from /lib64/libc.so.6
#7 0x00007f99fb1938c8 in abort () from /lib64/libc.so.6
#8 0x00007f99fb18b146 in __assert_fail_base () from /lib64/libc.so.6
#9 0x00007f99fb18b1f2 in __assert_fail () from /lib64/libc.so.6
#10 0x00007f99f8114617 in ssleay_rand_add.part.0 () from /usr/local/openssl/lib/libcrypto.so.1.0.0
#11 0x00007f99f86d5df0 in ssl_rand_seed (s=s#entry=0x2605c58, p=0x7f99e8045438, nCtx=nCtx#entry=SSL_RSCTX_CONNECT, prefix=prefix#entry=0x7f99f86e11dd "") at ssl_engine_rand.c:112
#12 0x00007f99f86c3a0b in ssl_init_ssl_connection (c=0x7f99e8045748, r=0x0) at mod_ssl.c:468
#13 0x0000000000456edb in ap_run_pre_connection (c=c#entry=0x7f99e8045748, csd=csd#entry=0x7f99e80454b0) at connection.c:43
#14 0x000000000046a11a in process_socket (my_thread_num=8, my_child_num=0, cs=0x7f99e80456b8, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1052
#15 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#16 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#17 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 26 (Thread 0x7f99e47f8700 (LWP 8494)):
#0 ap_method_number_of (method=0x7f99ac0ce478 "POST") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f99ac0ce3f0, r=0x7f99ac0ccee0) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e803f4a8) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e803f4a8) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e803f4a8) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e803f4a8) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=9, my_child_num=0, cs=0x7f99e803f418, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 25 (Thread 0x7f99dcfe9700 (LWP 8509)):
#0 ap_method_number_of (method=0x7f99780c9b10 "GET") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f99780c9a80, r=0x7f99780c8570) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e8053d68) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e8053d68) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e8053d68) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e8053d68) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=24, my_child_num=0, cs=0x7f99e8053cd8, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 24 (Thread 0x7f99e77fe700 (LWP 8488)):
#0 apr_md5_init (context=context#entry=0x7f99e77fdd80) at crypto/apr_md5.c:147
#1 0x00000000004561ae in ap_md5_binary (p=0x7f99e80495f8, buf=0x2585820 "(DOMAIN NAME REMOVED):443", length=25) at util_md5.c:63
#2 0x00007f99f86c3a72 in ssl_init_ssl_connection (c=0x7f99e8049908, r=0x0) at mod_ssl.c:493
#3 0x0000000000456edb in ap_run_pre_connection (c=c#entry=0x7f99e8049908, csd=csd#entry=0x7f99e8049670) at connection.c:43
#4 0x000000000046a11a in process_socket (my_thread_num=3, my_child_num=0, cs=0x7f99e8049878, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1052
#5 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#6 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#7 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 23 (Thread 0x7f99e5ffb700 (LWP 8491)):
#0 apr_md5_init (context=context#entry=0x7f99e5ffad80) at crypto/apr_md5.c:147
#1 0x00000000004561ae in ap_md5_binary (p=0x7f99e804d7b8, buf=0x2585820 "(DOMAIN NAME REMOVED):443", length=25) at util_md5.c:63
#2 0x00007f99f86c3a72 in ssl_init_ssl_connection (c=0x7f99e804dac8, r=0x0) at mod_ssl.c:493
#3 0x0000000000456edb in ap_run_pre_connection (c=c#entry=0x7f99e804dac8, csd=csd#entry=0x7f99e804d830) at connection.c:43
#4 0x000000000046a11a in process_socket (my_thread_num=6, my_child_num=0, cs=0x7f99e804da38, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1052
#5 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#6 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#7 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 22 (Thread 0x7f99df7ee700 (LWP 8504)):
#0 ap_method_number_of (method=0x7f998411d5d8 "GET") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f998411d550, r=0x7f998411c040) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e804fba8) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e804fba8) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e804fba8) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e804fba8) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=19, my_child_num=0, cs=0x7f99e804fb18, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 21 (Thread 0x7f99e17f2700 (LWP 8500)):
#0 apr_md5_init (context=context#entry=0x7f99e17f1d80) at crypto/apr_md5.c:147
#1 0x00000000004561ae in ap_md5_binary (p=0x7f99e8059cf8, buf=0x2585820 "(DOMAIN NAME REMOVED):443", length=25) at util_md5.c:63
#2 0x00007f99f86c3a72 in ssl_init_ssl_connection (c=0x7f99e805a008, r=0x0) at mod_ssl.c:493
#3 0x0000000000456edb in ap_run_pre_connection (c=c#entry=0x7f99e805a008, csd=csd#entry=0x7f99e8059d70) at connection.c:43
#4 0x000000000046a11a in process_socket (my_thread_num=15, my_child_num=0, cs=0x7f99e8059f78, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1052
#5 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#6 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#7 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 20 (Thread 0x7f99e7fff700 (LWP 8487)):
#0 0x00007f99fb24ee27 in munmap () from /lib64/libc.so.6
#1 0x00007f99fb18b137 in __assert_fail_base () from /lib64/libc.so.6
#2 0x00007f99fb18b1f2 in __assert_fail () from /lib64/libc.so.6
#3 0x00007f99f8114617 in ssleay_rand_add.part.0 () from /usr/local/openssl/lib/libcrypto.so.1.0.0
#4 0x00007f99f86d5df0 in ssl_rand_seed (s=s#entry=0x258ca08, p=0x7f99e8038ef8, nCtx=nCtx#entry=SSL_RSCTX_CONNECT, prefix=prefix#entry=0x7f99f86e11dd "") at ssl_engine_rand.c:112
#5 0x00007f99f86c3a0b in ssl_init_ssl_connection (c=0x7f99e8039218, r=0x0) at mod_ssl.c:468
#6 0x0000000000456edb in ap_run_pre_connection (c=c#entry=0x7f99e8039218, csd=csd#entry=0x7f99e8038f80) at connection.c:43
#7 0x000000000046a11a in process_socket (my_thread_num=2, my_child_num=0, cs=0x7f99e8039188, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1052
#8 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#9 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 19 (Thread 0x7f99e0ff1700 (LWP 8501)):
#0 ap_method_number_of (method=0x7f99a4068468 "POST") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f99a40683e0, r=0x7f99a4066ed0) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e803b2f8) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e803b2f8) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e803b2f8) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e803b2f8) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=16, my_child_num=0, cs=0x7f99e803b268, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 18 (Thread 0x7f99e2ff5700 (LWP 8497)):
#0 ap_method_number_of (method=0x7f997acaead8 "POST") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f997acaea50, r=0x7f997acad540) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e8037118) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e8037118) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e8037118) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e8037118) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=12, my_child_num=0, cs=0x7f99e8037088, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 17 (Thread 0x7f99e37f6700 (LWP 8496)):
#0 0x00007f99fb24ee27 in munmap () from /lib64/libc.so.6
#1 0x00007f99fb18b137 in __assert_fail_base () from /lib64/libc.so.6
#2 0x00007f99fb18b1f2 in __assert_fail () from /lib64/libc.so.6
#3 0x00007f99f8114617 in ssleay_rand_add.part.0 () from /usr/local/openssl/lib/libcrypto.so.1.0.0
#4 0x00007f99f86d5df0 in ssl_rand_seed (s=s#entry=0x258ca08, p=0x7f99e8055b38, nCtx=nCtx#entry=SSL_RSCTX_CONNECT, prefix=prefix#entry=0x7f99f86e11dd "") at ssl_engine_rand.c:112
#5 0x00007f99f86c3a0b in ssl_init_ssl_connection (c=0x7f99e8055e48, r=0x0) at mod_ssl.c:468
#6 0x0000000000456edb in ap_run_pre_connection (c=c#entry=0x7f99e8055e48, csd=csd#entry=0x7f99e8055bb0) at connection.c:43
#7 0x000000000046a11a in process_socket (my_thread_num=11, my_child_num=0, cs=0x7f99e8055db8, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1052
#8 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#9 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 16 (Thread 0x7f99defed700 (LWP 8505)):
#0 ap_method_number_of (method=0x7f998812ff18 "GET") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f998812fe90, r=0x7f998812e980) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e8062388) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e8062388) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e8062388) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e8062388) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=20, my_child_num=0, cs=0x7f99e80622f8, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 15 (Thread 0x7f99e3ff7700 (LWP 8495)):
#0 ap_method_number_of (method=0x7f99b005d778 "GET") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f99b005d6f0, r=0x7f99b005c1e0) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e8068628) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e8068628) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e8068628) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e8068628) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=10, my_child_num=0, cs=0x7f99e8068598, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 14 (Thread 0x7f99e07f0700 (LWP 8502)):
#0 ap_method_number_of (method=0x7f998c004218 "GET") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f998c004190, r=0x7f998c002c80) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e8047828) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e8047828) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e8047828) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e8047828) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=17, my_child_num=0, cs=0x7f99e8047798, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 13 (Thread 0x7f99ddfeb700 (LWP 8507)):
#0 ap_method_number_of (method=0x7f99800da758 "GET") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f99800da6d0, r=0x7f99800d91c0) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e8066548) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e8066548) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e8066548) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e8066548) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=22, my_child_num=0, cs=0x7f99e80664b8, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 12 (Thread 0x7f99e27f4700 (LWP 8498)):
#0 ap_method_number_of (method=0x7f999c0e1ba0 "GET") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f999c0e1b10, r=0x7f999c0e0600) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e805c0e8) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e805c0e8) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e805c0e8) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e805c0e8) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=13, my_child_num=0, cs=0x7f99e805c058, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 11 (Thread 0x7f99e57fa700 (LWP 8492)):
#0 apr_md5_init (context=context#entry=0x7f99e57f9d80) at crypto/apr_md5.c:147
#1 0x00000000004561ae in ap_md5_binary (p=0x7f99e8051978, buf=0x2585820 "(DOMAIN NAME REMOVED):443", length=25) at util_md5.c:63
#2 0x00007f99f86c3a72 in ssl_init_ssl_connection (c=0x7f99e8051c88, r=0x0) at mod_ssl.c:493
#3 0x0000000000456edb in ap_run_pre_connection (c=c#entry=0x7f99e8051c88, csd=csd#entry=0x7f99e80519f0) at connection.c:43
#4 0x000000000046a11a in process_socket (my_thread_num=7, my_child_num=0, cs=0x7f99e8051bf8, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1052
#5 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#6 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#7 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 10 (Thread 0x7f99dc7e8700 (LWP 8510)):
#0 0x00007f99fb72d6d5 in pthread_cond_wait##GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x000000000046d3cc in ap_queue_info_wait_for_idler (queue_info=0x257f008, had_to_block=had_to_block#entry=0x7f99dc7e7ebc) at fdqueue.c:180
#2 0x000000000046a523 in get_worker (have_idle_worker_p=0x7f99dc7e7eb0, blocking=1, all_busy=0x7f99dc7e7ebc) at event.c:1328
#3 0x000000000046b2c8 in get_worker (all_busy=0x7f99dc7e7ebc, blocking=1, have_idle_worker_p=0x7f99dc7e7eb0) at event.c:1203
#4 listener_thread (thd=0x2580028, dummy=<optimized out>) at event.c:1762
#5 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#6 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 9 (Thread 0x7f99ed7fe700 (LWP 8485)):
#0 ap_method_number_of (method=0x7f99d40e6ce8 "GET") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f99d40e6c60, r=0x7f99d40e5750) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e8043668) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e8043668) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e8043668) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e8043668) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=0, my_child_num=0, cs=0x7f99e80435d8, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 8 (Thread 0x7f99de7ec700 (LWP 8506)):
#0 ap_method_number_of (method=0x7f997c06aa08 "GET") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f997c06a980, r=0x7f997c069470) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e8064468) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e8064468) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e8064468) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e8064468) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=21, my_child_num=0, cs=0x7f99e80643d8, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 7 (Thread 0x7f99fc871740 (LWP 8483)):
#0 0x00007f99fb73049d in read () from /lib64/libpthread.so.0
#1 0x000000000045a034 in ap_mpm_podx_check (pod=<optimized out>) at mpm_unix.c:535
#2 0x000000000042b3f7 in child_main (child_num_arg=child_num_arg#entry=0, child_bucket=child_bucket#entry=0) at event.c:2368
#3 0x000000000046c2a7 in make_child (s=0x25b8d58, slot=0, bucket=bucket#entry=0) at event.c:2461
#4 0x000000000046cb45 in perform_idle_server_maintenance (num_buckets=<optimized out>, child_bucket=<optimized out>) at event.c:2664
#5 server_main_loop (num_buckets=1, remaining_children_to_start=<optimized out>) at event.c:2798
#6 event_run (_pconf=<optimized out>, plog=<optimized out>, s=<optimized out>) at event.c:2876
#7 0x000000000043271e in ap_run_mpm (pconf=pconf#entry=0x2555138, plog=0x2582378, s=0x25b8d58) at mpm_common.c:94
#8 0x000000000042be71 in main (argc=3, argv=0x7fff71da6a28) at main.c:783
Thread 6 (Thread 0x7f99ecffd700 (LWP 8486)):
#0 ap_method_number_of (method=0x7f99cc006ea8 "GET") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f99cc006e20, r=0x7f99cc005910) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e8057f28) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e8057f28) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e8057f28) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e8057f28) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=1, my_child_num=0, cs=0x7f99e8057e98, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 5 (Thread 0x7f99e6ffd700 (LWP 8489)):
#0 0x00007f99fb24ee27 in munmap () from /lib64/libc.so.6
#1 0x00007f99fb18b137 in __assert_fail_base () from /lib64/libc.so.6
#2 0x00007f99fb18b1f2 in __assert_fail () from /lib64/libc.so.6
#3 0x00007f99f8114617 in ssleay_rand_add.part.0 () from /usr/local/openssl/lib/libcrypto.so.1.0.0
#4 0x00007f99f86d5e88 in ssl_rand_seed (s=s#entry=0x2590578, p=0x7f99e8041278, nCtx=nCtx#entry=SSL_RSCTX_CONNECT, prefix=prefix#entry=0x7f99f86e11dd "") at ssl_engine_rand.c:119
#5 0x00007f99f86c3a0b in ssl_init_ssl_connection (c=0x7f99e8041588, r=0x0) at mod_ssl.c:468
#6 0x0000000000456edb in ap_run_pre_connection (c=c#entry=0x7f99e8041588, csd=csd#entry=0x7f99e80412f0) at connection.c:43
#7 0x000000000046a11a in process_socket (my_thread_num=4, my_child_num=0, cs=0x7f99e80414f8, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1052
#8 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#9 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 4 (Thread 0x7f99dffef700 (LWP 8503)):
#0 ap_method_number_of (method=0x7f99900da7d8 "GET") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f99900da750, r=0x7f99900d9240) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e804b9e8) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e804b9e8) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e804b9e8) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e804b9e8) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=18, my_child_num=0, cs=0x7f99e804b958, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 3 (Thread 0x7f99e67fc700 (LWP 8490)):
#0 apr_md5_init (context=context#entry=0x7f99e67fbd80) at crypto/apr_md5.c:147
#1 0x00000000004561ae in ap_md5_binary (p=0x7f99e805deb8, buf=0x2585780 "(DOMAIN NAME #2 REMOVED):443", length=20) at util_md5.c:63
#2 0x00007f99f86c3a72 in ssl_init_ssl_connection (c=0x7f99e805e1c8, r=0x0) at mod_ssl.c:493
#3 0x0000000000456edb in ap_run_pre_connection (c=c#entry=0x7f99e805e1c8, csd=csd#entry=0x7f99e805df30) at connection.c:43
#4 0x000000000046a11a in process_socket (my_thread_num=5, my_child_num=0, cs=0x7f99e805e138, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1052
#5 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#6 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#7 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 2 (Thread 0x7f99e1ff3700 (LWP 8499)):
#0 ap_method_number_of (method=0x7f99a0004218 "GET") at http_protocol.c:940
#1 0x0000000000438ad5 in read_request_line (bb=0x7f99a0004190, r=0x7f99a0002c80) at protocol.c:634
#2 ap_read_request (conn=conn#entry=0x7f99e80602a8) at protocol.c:973
#3 0x000000000045eb5d in ap_process_http_async_connection (c=0x7f99e80602a8) at http_core.c:146
#4 ap_process_http_connection (c=0x7f99e80602a8) at http_core.c:248
#5 0x0000000000456da0 in ap_run_process_connection (c=c#entry=0x7f99e80602a8) at connection.c:42
#6 0x000000000046a1b2 in process_socket (my_thread_num=14, my_child_num=0, cs=0x7f99e8060218, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1102
#7 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#8 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#9 0x00007f99fb25473d in clone () from /lib64/libc.so.6
Thread 1 (Thread 0x7f99dd7ea700 (LWP 8508)):
#0 0x00007f99fb1921d7 in raise () from /lib64/libc.so.6
#1 0x00007f99fb1938c8 in abort () from /lib64/libc.so.6
#2 0x00007f99fb18b146 in __assert_fail_base () from /lib64/libc.so.6
#3 0x00007f99fb18b1f2 in __assert_fail () from /lib64/libc.so.6
#4 0x00007f99f8114617 in ssleay_rand_add.part.0 () from /usr/local/openssl/lib/libcrypto.so.1.0.0
#5 0x00007f99f86d5df0 in ssl_rand_seed (s=s#entry=0x2605c58, p=0x7f99e803d0b8, nCtx=nCtx#entry=SSL_RSCTX_CONNECT, prefix=prefix#entry=0x7f99f86e11dd "") at ssl_engine_rand.c:112
#6 0x00007f99f86c3a0b in ssl_init_ssl_connection (c=0x7f99e803d3c8, r=0x0) at mod_ssl.c:468
#7 0x0000000000456edb in ap_run_pre_connection (c=c#entry=0x7f99e803d3c8, csd=csd#entry=0x7f99e803d130) at connection.c:43
#8 0x000000000046a11a in process_socket (my_thread_num=23, my_child_num=0, cs=0x7f99e803d338, sock=<optimized out>, p=<optimized out>, thd=<optimized out>) at event.c:1052
#9 worker_thread (thd=<optimized out>, dummy=<optimized out>) at event.c:1963
#10 0x00007f99fb729dc5 in start_thread () from /lib64/libpthread.so.0
#11 0x00007f99fb25473d in clone () from /lib64/libc.so.6
However, I'm no expert at reading core dumps - I've read through a few posts like How to analyze a program's core dump file with gdb? and https://httpd.apache.org/dev/debugging.html, but I'm not quite sure where to go next.
Should I be assuming that there's something wrong in my OpenSSL library and I should recompile it? Or am I missing something else? All feedback welcome!

Should I be assuming that there's something wrong in my OpenSSL library and I should recompile it?
Most likely.
You are using /usr/local/openssl/lib/libcrypto.so.1.0.0, which I assume is not the one that came with your distribution.
It appears that you didn't compile this library for use with threads, but your Apache is using that library from multiple threads, triggering assertion failure.
This is the only assert I can find inside ssleay_rand_add, and it is only compiled in when !defined(OPENSSL_THREADS), which I assume is true for your build, and is the result of ./Configure no-threads ....
You should rebuild libcrypto.so with ./Configure threads .... Documentation.

Related

LeakSanitizer in macos: <unknown module> for objective-c function in stacktrace

clang is:
└──( /opt/homebrew/Cellar/llvm/13.0.1_1/bin/clang++ --version
Homebrew clang version 13.0.1
Target: arm64-apple-darwin21.1.0
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/llvm/13.0.1_1/bin
ASAN_OPTIONS is detect_stack_use_after_return=false detect_leaks=1
CMakeLists.txt has:
add_compile_options(-fsanitize=address -fsanitize=leak -g)
add_link_options(-fsanitize=address)
after the program exits, lots of leaks report, but in stacktrace, all objective-c function show as <unknown module>, and the address 0x3f368001a2e367b4 also seems wrong:
Direct leak of 40 byte(s) in 1 object(s) allocated from:
#0 0x10343b678 in wrap_malloc+0x8c (libclang_rt.asan_osx_dynamic.dylib:arm64+0x3f678)
#1 0x19ff4d638 in _Block_copy+0x3c (libsystem_blocks.dylib:arm64+0x1638)
#2 0x3f368001a2e367b4 (<unknown module>)
#3 0x5c5b8001a2e363c4 (<unknown module>)
#4 0xea608001a2dec090 (<unknown module>)
#5 0x8e440001a2debf14 (<unknown module>)
#6 0x875a8001a2debdd0 (<unknown module>)
#7 0x2498001a2debd28 (<unknown module>)
#8 0x2a408001a2e3eab8 (<unknown module>)
#9 0x731e8001a31bbce4 (<unknown module>)
#10 0x48600001029f37dc (<unknown module>)
#11 0x102942cac in bgfx::gl::RendererContextGL::setRenderContextSize(unsigned int, unsigned int, unsigned int) renderer_gl.cpp:3475
#12 0x1028f97d0 in bgfx::gl::RendererContextGL::init(bgfx::Init const&) renderer_gl.cpp:1817
#13 0x1028f9024 in bgfx::gl::rendererCreate(bgfx::Init const&) renderer_gl.cpp:4044
#14 0x102865bc0 in bgfx::rendererCreate(bgfx::Init const&) bgfx.cpp:2606
#15 0x102866714 in bgfx::Context::rendererExecCommands(bgfx::CommandBuffer&) bgfx.cpp:2657
but while debugging, these symbols are correct shown in debugger:
so how to make them right in LeakSanitizer's report? thanks very much.

issues saving changes with Directus

I'm noticing some issues that aren't happening in the demo. I haven't started customizing anything yet other than populating the database.
If I change the project logo in global settings i get an error:
Argument type should be in array (identifier, literal, select, value)
[2020-05-01 16:33:29] api[trisev].ERROR: Directus\Validator\Exception\InvalidRequestException: collection: This value should not be blank. in /var/directus/src/core/Directus/Services/AbstractService.php:186
Changing collection layout was when I first noticed this issue.
enter image description here
The log I get after changing the layout:
[2020-05-01 16:33:29] api[trisev].ERROR: Directus\Validator\Exception\InvalidRequestException: collection: This value should not be blank. in /var/directus/src/core/Directus/Services/AbstractService.php:186
Stack trace:
#0 /var/directus/src/core/Directus/Services/AbstractService.php(120): Directus\Services\AbstractService->throwErrorIfAny
#1 /var/directus/src/core/Directus/Services/AbstractService.php(398): Directus\Services\AbstractService->validate
#2 /var/directus/src/core/Directus/Services/ItemsService.php(188): Directus\Services\AbstractService->validatePayload
#3 /var/directus/src/core/Directus/Services/ItemsService.php(341): Directus\Services\ItemsService->validateParentCollectionFields
#4 /var/directus/src/core/Directus/Services/CollectionPresetsService.php(62): Directus\Services\ItemsService->update
#5 /var/directus/src/endpoints/CollectionPresets.php(89): Directus\Services\CollectionPresetsService->update
#6 [internal function]: Directus\Api\Routes\CollectionPresets->update
#7 /var/directus/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func
#8 /var/directus/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke
#9 /var/directus/src/core/Directus/Application/Http/Middleware/AbstractRateLimitMiddleware.php(34): Slim\Route->__invoke
#10 [internal function]: Directus\Application\Http\Middleware\AbstractRateLimitMiddleware->__invoke
#11 /var/directus/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array
#12 [internal function]: Slim\DeferredCallable->__invoke
#13 /var/directus/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func
#14 /var/directus/src/core/Directus/Application/Http/Middleware/AuthenticationMiddleware.php(124): Slim\Route->Slim\{closure}
#15 [internal function]: Directus\Application\Http\Middleware\AuthenticationMiddleware->__invoke
#16 /var/directus/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array
#17 [internal function]: Slim\DeferredCallable->__invoke
#18 /var/directus/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func
#19 /var/directus/src/core/Directus/Application/Http/Middleware/TableGatewayMiddleware.php(25): Slim\Route->Slim\{closure}
#20 [internal function]: Directus\Application\Http\Middleware\TableGatewayMiddleware->__invoke
#21 /var/directus/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array
#22 [internal function]: Slim\DeferredCallable->__invoke
#23 /var/directus/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func
#24 /var/directus/src/core/Directus/Application/Http/Middleware/DatabaseMigrationMiddleware.php(15): Slim\Route->Slim\{closure}
#25 [internal function]: Directus\Application\Http\Middleware\DatabaseMigrationMiddleware->__invoke
#26 /var/directus/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array
#27 [internal function]: Slim\DeferredCallable->__invoke
#28 /var/directus/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func
#29 /var/directus/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim\{closure}
#30 /var/directus/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack
#31 /var/directus/vendor/slim/slim/Slim/App.php(503): Slim\Route->run
#32 /var/directus/src/core/Directus/Application/Http/Middleware/AbstractRateLimitMiddleware.php(34): Slim\App->__invoke
#33 [internal function]: Directus\Application\Http\Middleware\AbstractRateLimitMiddleware->__invoke
#34 /var/directus/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array
#35 [internal function]: Slim\DeferredCallable->__invoke
#36 /var/directus/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func
#37 /var/directus/vendor/directus/proxy-detection/src/ProxyDetectionMiddleware.php(30): Slim\App->Slim\{closure}
#38 /var/directus/src/core/Directus/Application/Http/Middleware/ProxyMiddleware.php(18): RKA\Middleware\ProxyDetectionMiddleware->__invoke
#39 [internal function]: Directus\Application\Http\Middleware\ProxyMiddleware->__invoke
#40 /var/directus/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array
#41 [internal function]: Slim\DeferredCallable->__invoke
#42 /var/directus/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func
#43 /var/directus/vendor/akrabat/ip-address-middleware/src/IpAddress.php(113): Slim\App->Slim\{closure}
#44 [internal function]: RKA\Middleware\IpAddress->__invoke
#45 /var/directus/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array
#46 [internal function]: Slim\DeferredCallable->__invoke
#47 /var/directus/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func
#48 /var/directus/src/core/Directus/Application/Http/Middleware/CorsMiddleware.php(71): Slim\App->Slim\{closure}
#49 [internal function]: Directus\Application\Http\Middleware\CorsMiddleware->__invoke
#50 /var/directus/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array
#51 [internal function]: Slim\DeferredCallable->__invoke
#52 /var/directus/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func
#53 /var/directus/src/core/Directus/Application/Http/Middleware/ResponseCacheMiddleware.php(63): Slim\App->Slim\{closure}
#54 [internal function]: Directus\Application\Http\Middleware\ResponseCacheMiddleware->__invoke
#55 /var/directus/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array
#56 [internal function]: Slim\DeferredCallable->__invoke
#57 /var/directus/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func
#58 /var/directus/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}
#59 /var/directus/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack
#60 /var/directus/vendor/slim/slim/Slim/App.php(297): Slim\App->process
#61 /var/directus/src/core/Directus/Application/Application.php(161): Slim\App->run
#62 /var/directus/public/index.php(5): Directus\Application\Application->run [] []
I've used DigitalOcean's One-Click setup and enabled SSL and remote access to view the database outside of the droplet.
Any leads in the proper direction would be great. I can't find where I can set the collection layout manually either to bypass this for now so my layouts are stuck if i changed it.

object->ref_count > 0 Assertion failures when using webkitgtk

I'm experimenting with an app that creates a tray menu. One of the tray menu items creates a window that connects to a login service. However, I'm getting assertion failures despite the fact that it otherwise appears to work. I must be doing something simple that is wrong, but what?
The below program demonstrates the problem.
test.cpp
#include <gtk/gtk.h>
#include <webkit/webkit.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
GtkWidget * web_window = NULL;
WebKitWebView * web_view = NULL;
gtk_init(0L, 0L);
if (web_window = gtk_window_new(GTK_WINDOW_TOPLEVEL)){
//g_object_ref(G_OBJECT(web_window));
gtk_window_set_default_size(GTK_WINDOW(web_window), 800, 600);
g_signal_connect(web_window, "delete_event", G_CALLBACK(gtk_widget_hide_on_delete), NULL);
if (web_view = WEBKIT_WEB_VIEW(webkit_web_view_new())){
//g_object_ref(G_OBJECT(web_view));
gtk_window_set_title(GTK_WINDOW(web_window), "Web View Test");
gtk_container_add(GTK_CONTAINER(web_window), GTK_WIDGET(web_view));
webkit_web_view_load_uri(web_view, "http://www.google.com/");
gtk_widget_grab_focus(GTK_WIDGET(web_view));
gtk_widget_show_all(web_window);
gtk_window_present(GTK_WINDOW(web_window));
gtk_main();
}
else
printf("Failed to create WebView\n");
}
return 0;
}
Compiled with:
g++ test.cpp $(pkg-config --cflags --libs webkitgtk-3.0) $(pkg-config --cflags --libs gtk+-3.0)
After the window is opened and the URL is loaded I see these assertion failures:
(a.out:20179): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed
(a.out:20179): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed
When I then click the close button (which should hide the window) I then see these assertion failures:
(a.out:20179): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed
(a.out:20179): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed
As you can see I tried adding ref counts to the web_window and web_view to see if that was where the problem is, but it made no difference.
Turning on G_DEBUG=fatal-warnings produced a core dump which I backtraced with gdb below.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0 0x00007fdd04662c13 in g_logv () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
(gdb) bt
#0 0x00007fdd04662c13 in g_logv () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1 0x00007fdd04662d72 in g_log () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fdd090c9aea in g_object_ref ()
from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#3 0x00007fdd090de05f in g_signal_emit_valist ()
from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#4 0x00007fdd090dece2 in g_signal_emit ()
from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#5 0x00007fdd095345e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#6 0x00007fdd0953609a in gtk_style_context_invalidate ()
from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#7 0x00007fdd09537e4c in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#8 0x00007fdd090c9dba in g_object_unref ()
from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9 0x00007fdd08440133 in derefGPtr<_GtkStyleContext> (ptr=<optimized out>)
at ../Source/WTF/wtf/gobject/GRefPtr.h:235
#10 ~GRefPtr (this=0x7ffd0e22c3d0, __in_chrg=<optimized out>)
at ../Source/WTF/wtf/gobject/GRefPtr.h:70
#11 WebCore::styleColor (themePart=themePart#entry=WebCore::Entry,
state=state#entry=(GTK_STATE_FLAG_SELECTED | GTK_STATE_FLAG_FOCUSED),
colorType=colorType#entry=WebCore::StyleColorForeground)
at ../Source/WebCore/platform/gtk/RenderThemeGtk3.cpp:1098
#12 0x00007fdd084401f5 in WebCore::RenderThemeGtk::platformActiveSelectionForegr---Type <return> to continue, or q <return> to quit---
oundColor (this=<optimized out>)
at ../Source/WebCore/platform/gtk/RenderThemeGtk3.cpp:1121
#13 0x00007fdd07dba689 in WebCore::RenderTheme::activeSelectionForegroundColor
(this=0x7fdcf40e2870) at ../Source/WebCore/rendering/RenderTheme.cpp:567
#14 0x00007fdd07d6e521 in WebCore::RenderObject::selectionColor (
this=0x7fdc811b4738, colorProperty=335)
at ../Source/WebCore/rendering/RenderObject.cpp:1462
#15 0x00007fdd07d6e55e in WebCore::RenderObject::selectionForegroundColor (
this=this#entry=0x7fdc811b4738)
at ../Source/WebCore/rendering/RenderObject.cpp:1469
#16 0x00007fdd07de27c4 in WebCore::computeTextSelectionPaintStyle (
textPaintStyle=..., renderer=..., lineStyle=..., paintInfo=...,
paintSelectedTextOnly=#0x7ffd0e22c5f1: false,
paintSelectedTextSeparately=#0x7ffd0e22c5f2: false,
selectionShadow=#0x7ffd0e22c628: 0x0)
at ../Source/WebCore/rendering/TextPaintStyle.cpp:127
#17 0x00007fdd07c5265a in WebCore::InlineTextBox::paint (this=0x1956f60,
paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/InlineTextBox.cpp:575
#18 0x00007fdd07c4bc91 in WebCore::InlineFlowBox::paint (
this=this#entry=0x1956fc0, paintInfo=..., paintOffset=..., lineTop=...,
lineTop#entry=..., lineBottom=..., lineBottom#entry=...)
at ../Source/WebCore/rendering/InlineFlowBox.cpp:1162
---Type <return> to continue, or q <return> to quit---
#19 0x00007fdd07dd46c1 in WebCore::RootInlineBox::paint (this=0x1956fc0,
paintInfo=..., paintOffset=..., lineTop=..., lineBottom=...)
at ../Source/WebCore/rendering/RootInlineBox.cpp:210
#20 0x00007fdd07d4252e in WebCore::RenderLineBoxList::paint (
this=0x7fdc811b62e0, renderer=0x7fdc811b6240, paintInfo=...,
paintOffset=...) at ../Source/WebCore/rendering/RenderLineBoxList.cpp:265
#21 0x00007fdd07c59759 in WebCore::RenderBlock::paintContents (
this=this#entry=0x7fdc811b6240, paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2373
#22 0x00007fdd07c6a473 in WebCore::RenderBlock::paintObject (
this=0x7fdc811b6240, paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2509
#23 0x00007fdd07c57135 in WebCore::RenderBlock::paint (this=0x7fdc811b6240,
paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2186
#24 0x00007fdd07c42b4c in WebCore::InlineElementBox::paint (this=0x195b4c0,
paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/InlineElementBox.cpp:88
#25 0x00007fdd07c4bc91 in WebCore::InlineFlowBox::paint (
this=this#entry=0x195b500, paintInfo=..., paintOffset=..., lineTop=...,
lineTop#entry=..., lineBottom=..., lineBottom#entry=...)
at ../Source/WebCore/rendering/InlineFlowBox.cpp:1162
#26 0x00007fdd07dd46c1 in WebCore::RootInlineBox::paint (this=0x195b500,
---Type <return> to continue, or q <return> to quit---
paintInfo=..., paintOffset=..., lineTop=..., lineBottom=...)
at ../Source/WebCore/rendering/RootInlineBox.cpp:210
#27 0x00007fdd07d4252e in WebCore::RenderLineBoxList::paint (
this=0x7fdc811b63a0, renderer=0x7fdc811b6300, paintInfo=...,
paintOffset=...) at ../Source/WebCore/rendering/RenderLineBoxList.cpp:265
#28 0x00007fdd07c59759 in WebCore::RenderBlock::paintContents (
this=this#entry=0x7fdc811b6300, paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2373
#29 0x00007fdd07c6a473 in WebCore::RenderBlock::paintObject (
this=0x7fdc811b6300, paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2509
#30 0x00007fdd07c57135 in WebCore::RenderBlock::paint (this=0x7fdc811b6300,
paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2186
#31 0x00007fdd07c5988a in WebCore::RenderBlock::paintChild (
this=this#entry=0x7fdc811b63c0, child=..., paintInfo=..., paintOffset=...,
paintInfoForChild=..., usePrintRect=usePrintRect#entry=false)
at ../Source/WebCore/rendering/RenderBlock.cpp:2423
#32 0x00007fdd07c59b72 in WebCore::RenderBlock::paintChildren (
this=0x7fdc811b63c0, paintInfo=..., paintOffset=...,
paintInfoForChild=..., usePrintRect=false)
at ../Source/WebCore/rendering/RenderBlock.cpp:2393
#33 0x00007fdd07c59730 in WebCore::RenderBlock::paintContents (
---Type <return> to continue, or q <return> to quit---
this=this#entry=0x7fdc811b63c0, paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2386
#34 0x00007fdd07c6a473 in WebCore::RenderBlock::paintObject (
this=0x7fdc811b63c0, paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2509
#35 0x00007fdd07c57135 in WebCore::RenderBlock::paint (this=0x7fdc811b63c0,
paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2186
#36 0x00007fdd07c5988a in WebCore::RenderBlock::paintChild (
this=this#entry=0x7fdc811b69c0, child=..., paintInfo=..., paintOffset=...,
paintInfoForChild=..., usePrintRect=usePrintRect#entry=false)
at ../Source/WebCore/rendering/RenderBlock.cpp:2423
#37 0x00007fdd07c59b72 in WebCore::RenderBlock::paintChildren (
this=0x7fdc811b69c0, paintInfo=..., paintOffset=...,
paintInfoForChild=..., usePrintRect=false)
at ../Source/WebCore/rendering/RenderBlock.cpp:2393
#38 0x00007fdd07c59730 in WebCore::RenderBlock::paintContents (
this=this#entry=0x7fdc811b69c0, paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2386
#39 0x00007fdd07c6a473 in WebCore::RenderBlock::paintObject (
this=0x7fdc811b69c0, paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2509
#40 0x00007fdd07c57135 in WebCore::RenderBlock::paint (this=0x7fdc811b69c0,
---Type <return> to continue, or q <return> to quit---
paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2186
#41 0x00007fdd07c5988a in WebCore::RenderBlock::paintChild (
this=this#entry=0x7fdc811b6a80, child=..., paintInfo=..., paintOffset=...,
paintInfoForChild=..., usePrintRect=usePrintRect#entry=false)
at ../Source/WebCore/rendering/RenderBlock.cpp:2423
#42 0x00007fdd07c59b72 in WebCore::RenderBlock::paintChildren (
this=0x7fdc811b6a80, paintInfo=..., paintOffset=...,
paintInfoForChild=..., usePrintRect=false)
at ../Source/WebCore/rendering/RenderBlock.cpp:2393
#43 0x00007fdd07c59730 in WebCore::RenderBlock::paintContents (
this=this#entry=0x7fdc811b6a80, paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2386
#44 0x00007fdd07c6a473 in WebCore::RenderBlock::paintObject (
this=0x7fdc811b6a80, paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2509
#45 0x00007fdd07c57135 in WebCore::RenderBlock::paint (this=0x7fdc811b6a80,
paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2186
#46 0x00007fdd07c5988a in WebCore::RenderBlock::paintChild (
this=this#entry=0x7fdc811b6b40, child=..., paintInfo=..., paintOffset=...,
paintInfoForChild=..., usePrintRect=usePrintRect#entry=false)
at ../Source/WebCore/rendering/RenderBlock.cpp:2423
---Type <return> to continue, or q <return> to quit---
#47 0x00007fdd07c59b72 in WebCore::RenderBlock::paintChildren (
this=0x7fdc811b6b40, paintInfo=..., paintOffset=...,
paintInfoForChild=..., usePrintRect=false)
at ../Source/WebCore/rendering/RenderBlock.cpp:2393
#48 0x00007fdd07c59730 in WebCore::RenderBlock::paintContents (
this=this#entry=0x7fdc811b6b40, paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2386
#49 0x00007fdd07c6a473 in WebCore::RenderBlock::paintObject (
this=0x7fdc811b6b40, paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2509
#50 0x00007fdd07c57135 in WebCore::RenderBlock::paint (this=0x7fdc811b6b40,
paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2186
#51 0x00007fdd07c5988a in WebCore::RenderBlock::paintChild (
this=this#entry=0x7fdc98144540, child=..., paintInfo=..., paintOffset=...,
paintInfoForChild=..., usePrintRect=usePrintRect#entry=false)
at ../Source/WebCore/rendering/RenderBlock.cpp:2423
#52 0x00007fdd07c59b72 in WebCore::RenderBlock::paintChildren (
this=0x7fdc98144540, paintInfo=..., paintOffset=...,
paintInfoForChild=..., usePrintRect=false)
at ../Source/WebCore/rendering/RenderBlock.cpp:2393
#53 0x00007fdd07c59730 in WebCore::RenderBlock::paintContents (
this=this#entry=0x7fdc98144540, paintInfo=..., paintOffset=...)
---Type <return> to continue, or q <return> to quit---
at ../Source/WebCore/rendering/RenderBlock.cpp:2386
#54 0x00007fdd07c6a473 in WebCore::RenderBlock::paintObject (
this=0x7fdc98144540, paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2509
#55 0x00007fdd07c57135 in WebCore::RenderBlock::paint (this=0x7fdc98144540,
paintInfo=..., paintOffset=...)
at ../Source/WebCore/rendering/RenderBlock.cpp:2186
#56 0x00007fdd07d15c74 in WebCore::RenderLayer::paintForegroundForFragmentsWithPhase (this=this#entry=0x193c340,
phase=phase#entry=WebCore::PaintPhaseForeground, layerFragments=...,
context=context#entry=0x7ffd0e22e7c0, localPaintingInfo=...,
paintBehavior=paintBehavior#entry=0,
subtreePaintRootForRenderer=subtreePaintRootForRenderer#entry=0x0)
at ../Source/WebCore/rendering/RenderLayer.cpp:4477
#57 0x00007fdd07d1aad6 in WebCore::RenderLayer::paintForegroundForFragments (
this=this#entry=0x193c340, layerFragments=...,
context=context#entry=0x7ffd0e22e7c0,
transparencyLayerContext=transparencyLayerContext#entry=0x7ffd0e22e7c0,
transparencyPaintDirtyRect=...,
haveTransparency=haveTransparency#entry=false, localPaintingInfo=...,
paintBehavior=paintBehavior#entry=0,
subtreePaintRootForRenderer=subtreePaintRootForRenderer#entry=0x0,
selectionOnly=selectionOnly#entry=false,
---Type <return> to continue, or q <return> to quit---
forceBlackText=forceBlackText#entry=false)
at ../Source/WebCore/rendering/RenderLayer.cpp:4441
#58 0x00007fdd07d27406 in WebCore::RenderLayer::paintLayerContents (
this=this#entry=0x193c340, context=context#entry=0x7ffd0e22e7c0,
paintingInfo=..., paintFlags=224)
at ../Source/WebCore/rendering/RenderLayer.cpp:4162
#59 0x00007fdd07d27a7f in WebCore::RenderLayer::paintLayerContentsAndReflection
(this=this#entry=0x193c340, context=context#entry=0x7ffd0e22e7c0,
paintingInfo=..., paintFlags=paintFlags#entry=224)
at ../Source/WebCore/rendering/RenderLayer.cpp:3858
#60 0x00007fdd07d283d9 in WebCore::RenderLayer::paintLayer (
this=this#entry=0x193c340, context=context#entry=0x7ffd0e22e7c0,
paintingInfo=..., paintFlags=paintFlags#entry=224)
at ../Source/WebCore/rendering/RenderLayer.cpp:3839
#61 0x00007fdd07d29d02 in WebCore::RenderLayer::paintList (this=0x192bcd0,
list=0x7fdc8115a830, context=0x7ffd0e22e7c0, paintingInfo=...,
paintFlags=224) at ../Source/WebCore/rendering/RenderLayer.cpp:4255
#62 0x00007fdd07d27520 in WebCore::RenderLayer::paintLayerContents (
this=this#entry=0x192bcd0, context=context#entry=0x7ffd0e22e7c0,
paintingInfo=..., paintFlags=224)
at ../Source/WebCore/rendering/RenderLayer.cpp:4173
#63 0x00007fdd07d27a7f in WebCore::RenderLayer::paintLayerContentsAndReflection
(this=this#entry=0x192bcd0, context=context#entry=0x7ffd0e22e7c0,
---Type <return> to continue, or q <return> to quit---
paintingInfo=..., paintFlags=paintFlags#entry=224)
at ../Source/WebCore/rendering/RenderLayer.cpp:3858
#64 0x00007fdd07d283d9 in WebCore::RenderLayer::paintLayer (
this=this#entry=0x192bcd0, context=context#entry=0x7ffd0e22e7c0,
paintingInfo=..., paintFlags=paintFlags#entry=224)
at ../Source/WebCore/rendering/RenderLayer.cpp:3839
#65 0x00007fdd07d29d02 in WebCore::RenderLayer::paintList (this=0x180d8f0,
list=0x7fdc8115a840, context=0x7ffd0e22e7c0, paintingInfo=...,
paintFlags=224) at ../Source/WebCore/rendering/RenderLayer.cpp:4255
#66 0x00007fdd07d27520 in WebCore::RenderLayer::paintLayerContents (
this=this#entry=0x180d8f0, context=context#entry=0x7ffd0e22e7c0,
paintingInfo=..., paintFlags=224)
at ../Source/WebCore/rendering/RenderLayer.cpp:4173
#67 0x00007fdd07d27a7f in WebCore::RenderLayer::paintLayerContentsAndReflection
(this=this#entry=0x180d8f0, context=context#entry=0x7ffd0e22e7c0,
paintingInfo=..., paintFlags=paintFlags#entry=0)
at ../Source/WebCore/rendering/RenderLayer.cpp:3858
#68 0x00007fdd07d283d9 in WebCore::RenderLayer::paintLayer (
this=this#entry=0x180d8f0, context=context#entry=0x7ffd0e22e7c0,
paintingInfo=..., paintFlags=paintFlags#entry=0)
at ../Source/WebCore/rendering/RenderLayer.cpp:3839
#69 0x00007fdd07d2867e in WebCore::RenderLayer::paint (
this=this#entry=0x180d8f0, context=context#entry=0x7ffd0e22e7c0,
---Type <return> to continue, or q <return> to quit---
damageRect=..., paintBehavior=0,
subtreePaintRoot=subtreePaintRoot#entry=0x0, region=region#entry=0x0,
paintFlags=paintFlags#entry=0)
at ../Source/WebCore/rendering/RenderLayer.cpp:3623
#70 0x00007fdd07bdda1d in WebCore::FrameView::paintContents (
this=0x7fdcf40dd800, p=0x7ffd0e22e7c0, rect=...)
at ../Source/WebCore/page/FrameView.cpp:3507
#71 0x00007fdd082ef894 in WebCore::ScrollView::paint (this=0x7fdcf40dd800,
context=0x7ffd0e22e7c0, rect=...)
at ../Source/WebCore/platform/ScrollView.cpp:1162
#72 0x00007fdd074bc3bb in paintWebView (dirtyRegion=..., frame=0x7fdcf40f5c00,
webView=0x17dc440)
at ../Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:588
#73 WebKit::ChromeClient::paint (this=0x173da00)
at ../Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:631
#74 0x00007fdd075c67b1 in WebCore::ThreadTimers::sharedTimerFiredInternal (
this=0x7fdcf4108f50) at ../Source/WebCore/platform/ThreadTimers.cpp:132
#75 0x00007fdd075dea62 in WebCore::sharedTimerTimeoutCallback ()
at ../Source/WebCore/platform/gtk/SharedTimerGtk.cpp:49
#76 0x00007fdd0465c703 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#77 0x00007fdd0465bce5 in g_main_context_dispatch ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#78 0x00007fdd0465c048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#79 0x00007fdd0465c30a in g_main_loop_run ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#80 0x00007fdd094a6e25 in gtk_main ()
from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#81 0x0000000000400d52 in main ()
It's natural to think that you are doing something wrong but when it comes to GLib-GObject-CRITICAL failures the issue has little, if anything, to do with your code and more to do with the GNOME ecosystem.
For instance, I can reproduce this issue with both well established projects and barebone GTK+ 3 applications in C++/Python by running them on older versions of GNOME but the issue goes away with a recent version of GNOME.
Since I didn't modify the code between tests then the code must be fine.
If you develop with planned obsolescence in mind, forcing users of your software to upgrade GNOME in order to use it then this is probably non-issue nowadays.
But if you are developing against an older version of GNOME or for some reason this (or a new) GLib-GObject-CRITICAL failure is present with a recent version of GNOME then the easiest solution is to filter it out.
Personally, I would unit test where applicable and ignore the following GLib-GObject-CRITICAL failure patterns:
object->ref_count > 0
source->priv != NULL

Infrequent crash when redrawing the screen with wxWidgets

I'm getting a very infrequent ( once every 10-15 days ) crash of my application. Based on the core dump backtrace, its crashing while redrawing the UI during the function cairo_pattern_destroy.
wxWidgets version 2.95
cairo version 1.8.0
Fedora core 10
LXDE windows manager
Here is the full backtrace for one of the crashes. I have 3 of them and they all end at __libc_free in cairo_pattern_destroy. If anyone has any suggestions it would be greatly appreciated.
#0 __libc_free (mem=0x7) at malloc.c:3599
3599 if (chunk_is_mmapped(p)) /* release mmapped memory. */
(gdb) bt
#0 __libc_free (mem=0x7) at malloc.c:3599
#1 0x00ff76d6 in cairo_pattern_destroy (pattern=0xc7b5088)
at cairo-pattern.c:738
#2 0x00fe7a5d in _cairo_gstate_fini (gstate=0xd20bc00) at cairo-gstate.c:204
#3 0x00fe7a98 in _cairo_gstate_restore (gstate=0x0, freelist=0xdb2e1f4)
at cairo-gstate.c:260
#4 0x00fe1ffd in cairo_restore (cr=0xdb2e070) at cairo.c:363
#5 0x07881fe2 in gdk_pango_renderer_draw_glyphs (renderer=0xc50d800,
font=0xa29d808, glyphs=0xceed960, x=129024, y=91136) at gdkpango.c:247
#6 0x07d345ea in pango_renderer_draw_glyphs (renderer=0xc50d800,
font=0xa29d808, glyphs=0xceed960, x=129024, y=91136)
at pango-renderer.c:639
#7 0x07d3466e in pango_renderer_default_draw_glyph_item (renderer=0xc50d800,
text=0xd411b00 "Pause", glyph_item=0xb2e11d80, x=129024, y=91136)
at pango-renderer.c:715
#8 0x07d3455a in pango_renderer_draw_glyph_item (renderer=0xc50d800,
text=0xd411b00 "Pause", glyph_item=0xb2e11d80, x=129024, y=91136)
at pango-renderer.c:703
#9 0x07d34dd3 in pango_renderer_draw_layout_line (renderer=0xc50d800,
line=0xd242648, x=129024, y=91136) at pango-renderer.c:568
#10 0x07d350e1 in pango_renderer_draw_layout (renderer=0xc50d800,
layout=0xd5a5e10, x=129024, y=77824) at pango-renderer.c:192
#11 0x07880f11 in IA__gdk_draw_layout_with_colors (drawable=0xc690580,
---Type <return> to continue, or q <return> to quit---
gc=0xa26f050, x=126, y=76, layout=0xd5a5e10, foreground=0x0,
background=0x0) at gdkpango.c:951
#12 0x078810c1 in IA__gdk_draw_layout (drawable=0xc690580, gc=0xa26f050,
x=126, y=76, layout=0xd5a5e10) at gdkpango.c:1013
#13 0x07a96e92 in gtk_default_draw_layout (style=0xa360500, window=0xc690580,
state_type=GTK_STATE_INSENSITIVE, use_text=0, area=0xcdf165c,
widget=0xd7afa60, detail=0x7c42081 "label", x=126, y=76, layout=0xda63110)
at gtkstyle.c:5084
#14 0x07a92fa2 in IA__gtk_paint_layout (style=0xa360500, window=0xc690580,
state_type=GTK_STATE_INSENSITIVE, use_text=0, area=0xcdf165c,
widget=0xd7afa60, detail=0x7c42081 "label", x=126, y=76, layout=0xda63110)
at gtkstyle.c:6401
#15 0x07a0ea9c in gtk_label_expose (widget=0xd7afa60, event=0xcdf1650)
at gtklabel.c:2848
#16 0x07a1e116 in _gtk_marshal_BOOLEAN__BOXED (closure=0xa1daae8,
return_value=0xbfae5910, n_param_values=2, param_values=0xdb00740,
invocation_hint=0xbfae58fc, marshal_data=0x7a0e990) at gtkmarshalers.c:84
#17 0x05a80959 in g_type_class_meta_marshal (closure=0xa1daae8,
return_value=0xbfae5910, n_param_values=2, param_values=0xdb00740,
invocation_hint=0xbfae58fc, marshal_data=0xc8) at gclosure.c:878
#18 0x05a82108 in IA__g_closure_invoke (closure=0xa1daae8,
return_value=0xbfae5910, n_param_values=2, param_values=0xdb00740,
invocation_hint=0xbfae58fc) at gclosure.c:767
---Type <return> to continue, or q <return> to quit---
#19 0x05a982cd in signal_emit_unlocked_R (node=0xa1dabe0, detail=0,
instance=0xd7afa60, emission_return=0xbfae5a48,
instance_and_params=0xdb00740) at gsignal.c:3282
#20 0x05a99bbb in IA__g_signal_emit_valist (instance=0xd7afa60, signal_id=38,
detail=0, var_args=0xbfae5aa0 "�Z��P\026�\f`�z\r�\225�\a`�z\rho\035\n")
at gsignal.c:2987
#21 0x05a9a1b6 in IA__g_signal_emit (instance=0xd7afa60, signal_id=38,
detail=0) at gsignal.c:3034
#22 0x07b333ae in gtk_widget_event_internal (widget=0xd7afa60, event=0xcdf1650)
at gtkwidget.c:4745
#23 0x079941a3 in IA__gtk_container_propagate_expose (container=0xc050930,
child=0xd7afa60, event=0xda6fdf8) at gtkcontainer.c:2687
#24 0x079941d1 in gtk_container_expose_child (child=0xd7afa60,
client_data=0xbfae5b68) at gtkcontainer.c:2575
#25 0x0795e61d in gtk_bin_forall (container=0xc050930, include_internals=1,
callback=0x79941b0 <gtk_container_expose_child>, callback_data=0xbfae5b68)
at gtkbin.c:128
#26 0x07994d66 in IA__gtk_container_forall (container=0xc050930,
callback=0x79941b0 <gtk_container_expose_child>, callback_data=0xbfae5b68)
at gtkcontainer.c:1455
#27 0x07996450 in gtk_container_expose (widget=0xc050930, event=0xda6fdf8)
at gtkcontainer.c:2598
#28 0x079689b1 in gtk_button_expose (widget=0xc050930, event=0xda6fdf8)
---Type <return> to continue, or q <return> to quit---
at gtkbutton.c:1348
#29 0x07a1e116 in _gtk_marshal_BOOLEAN__BOXED (closure=0xa1daae8,
return_value=0xbfae5d70, n_param_values=2, param_values=0xd6b2140,
invocation_hint=0xbfae5d5c, marshal_data=0x7968930) at gtkmarshalers.c:84
#30 0x05a80959 in g_type_class_meta_marshal (closure=0xa1daae8,
return_value=0xbfae5d70, n_param_values=2, param_values=0xd6b2140,
invocation_hint=0xbfae5d5c, marshal_data=0xc8) at gclosure.c:878
#31 0x05a82108 in IA__g_closure_invoke (closure=0xa1daae8,
return_value=0xbfae5d70, n_param_values=2, param_values=0xd6b2140,
invocation_hint=0xbfae5d5c) at gclosure.c:767
#32 0x05a982cd in signal_emit_unlocked_R (node=0xa1dabe0, detail=0,
instance=0xc050930, emission_return=0xbfae5ea8,
instance_and_params=0xd6b2140) at gsignal.c:3282
#33 0x05a99bbb in IA__g_signal_emit_valist (instance=0xc050930, signal_id=38,
detail=0,
var_args=0xbfae5f00 "\030_�����\r0\t\005\f�\225�\a0\t\005\fho\035\n")
at gsignal.c:2987
#34 0x05a9a1b6 in IA__g_signal_emit (instance=0xc050930, signal_id=38,
detail=0) at gsignal.c:3034
#35 0x07b333ae in gtk_widget_event_internal (widget=0xc050930, event=0xda6fdf8)
at gtkwidget.c:4745
#36 0x079941a3 in IA__gtk_container_propagate_expose (container=0xc010228,
child=0xc050930, event=0xbfae63f4) at gtkcontainer.c:2687
---Type <return> to continue, or q <return> to quit---
#37 0x079941d1 in gtk_container_expose_child (child=0xc050930,
client_data=0xbfae5fd8) at gtkcontainer.c:2575
#38 0x079d2f79 in gtk_fixed_forall (container=0xc010228, include_internals=1,
callback=0x79941b0 <gtk_container_expose_child>, callback_data=0xbfae5fd8)
at gtkfixed.c:449
#39 0x07994d66 in IA__gtk_container_forall (container=0xc010228,
callback=0x79941b0 <gtk_container_expose_child>, callback_data=0xbfae5fd8)
at gtkcontainer.c:1455
#40 0x07996450 in gtk_container_expose (widget=0xc010228, event=0xbfae63f4)
at gtkcontainer.c:2598
#41 0x07a1e116 in _gtk_marshal_BOOLEAN__BOXED (closure=0xa1daae8,
return_value=0xbfae61b0, n_param_values=2, param_values=0xd1e88c8,
invocation_hint=0xbfae619c, marshal_data=0x79963b0) at gtkmarshalers.c:84
#42 0x05a80959 in g_type_class_meta_marshal (closure=0xa1daae8,
return_value=0xbfae61b0, n_param_values=2, param_values=0xd1e88c8,
invocation_hint=0xbfae619c, marshal_data=0xc8) at gclosure.c:878
#43 0x05a821db in IA__g_closure_invoke (closure=0xa1daae8,
return_value=0xbfae61b0, n_param_values=2, param_values=0xd1e88c8,
invocation_hint=0xbfae619c) at gclosure.c:767
#44 0x05a982cd in signal_emit_unlocked_R (node=0xa1dabe0, detail=0,
instance=0xc010228, emission_return=0xbfae62e8,
instance_and_params=0xd1e88c8) at gsignal.c:3282
#45 0x05a99bbb in IA__g_signal_emit_valist (instance=0xc010228, signal_id=38,
---Type <return> to continue, or q <return> to quit---
detail=0,
var_args=0xbfae6340 "Xc���c��(\002\001\f�\225�\a(\002\001\fho\035\n")
at gsignal.c:2987
#46 0x05a9a1b6 in IA__g_signal_emit (instance=0xc010228, signal_id=38,
detail=0) at gsignal.c:3034
#47 0x07b333ae in gtk_widget_event_internal (widget=0xc010228,
event=0xbfae63f4) at gtkwidget.c:4745
#48 0x07a1821d in IA__gtk_main_do_event (event=0xbfae63f4) at gtkmain.c:1553
#49 0x07892625 in gdk_window_process_updates_internal (window=0xc690580)
at gdkwindow.c:2598
#50 0x07892c3f in IA__gdk_window_process_all_updates () at gdkwindow.c:2664
#51 0x07994eff in gtk_container_idle_sizer (data=0x0) at gtkcontainer.c:1309
#52 0x078760cb in gdk_threads_dispatch (data=0xc935530) at gdk.c:473
#53 0x066122d1 in g_idle_dispatch (source=0xd663908, callback=0xffffffff,
user_data=0xc935530) at gmain.c:4235
#54 0x06614208 in g_main_dispatch () at gmain.c:2144
#55 IA__g_main_context_dispatch (context=0xa1d5508) at gmain.c:2697
#56 0x066178b3 in g_main_context_iterate (context=0xa1d5508, block=1,
dispatch=1, self=0xa1ba5e0) at gmain.c:2778
#57 0x06617dd2 in IA__g_main_loop_run (loop=0xbb03cc0) at gmain.c:2986
#58 0x07a18489 in IA__gtk_main () at gtkmain.c:1200
#59 0x006b333d in wxGUIEventLoop::DoRun ()
from /usr/local/lib/libwx_gtk2u_core-2.9.so.5
This is an old question, so no one may actually be interested in the answer. I ran into this on an older version of Fedora 10 LXDE, with a very similar stack trace, and a crash in the same place. This turns out to be a design problem with Cairo 1.8.0.
Looking a frame 1 in my case, I see the following code:
734 i = solid_pattern_cache.size++ %
735 ARRAY_LENGTH (solid_pattern_cache.patterns);
736 /* swap an old pattern for this 'cache-hot' pattern */
737 if (solid_pattern_cache.patterns[i])
738 free (solid_pattern_cache.patterns[i]);
739
740 solid_pattern_cache.patterns[i] = (cairo_solid_pattern_t *) pattern;
They are using a counter with modular arithmetic to form the index into a fixed size cache. The counter is declared as a signed integer:
(gdb) ptype solid_pattern_cache
type = struct {
cairo_solid_pattern_t *patterns[4];
int size;
}
In my case, the counter has overflowed, resulting in a negative index into the cache. This results in attempting to free a random address.
(gdb) p solid_pattern_cache
$2 = {patterns = {0xb441b5e0, 0xb4983688, 0xb495bf58, 0xb3978388},
size = -2147483644}
(gdb) p /x solid_pattern_cache.size
$4 = 0x80000004
It's not clear to me why an unsigned counter was not used instead.

Magento - 1064 You have an error in your SQL syntax Error

I get quite a few of the below errors in my Magento exception log. Does anyone know how I would go about fixing this?
2011-12-10T22:13:41+00:00 ERR (3):
exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1' in /home/mysite/public_html/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/mysite/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/mysite/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/mysite/public_html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/mysite/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /home/mysite/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `catalog...', Array)
#5 /home/mysite/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `catalog...', Array)
#6 /home/mysite/public_html/lib/Zend/Db/Adapter/Abstract.php(753): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#7 /home/mysite/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(375): Zend_Db_Adapter_Abstract->fetchRow(Object(Varien_Db_Select))
#8 /home/mysite/public_html/app/code/core/Mage/Core/Model/Abstract.php(225): Mage_Core_Model_Resource_Db_Abstract->load(Object(Mage_Catalog_Model_Category), Object(Mage_Catalog_Model_Category), NULL)
#9 /home/mysite/public_html/app/code/local/Mage/Catalog/Block/Product/Newcustom.php(80): Mage_Core_Model_Abstract->load(Object(Mage_Catalog_Model_Category))
#10 /home/mysite/public_html/app/code/local/Mage/Catalog/Block/Product/Newcustom.php(145): Mage_Catalog_Block_Product_Newcustom->_getProductCollection()
#11 /home/mysite/public_html/app/code/core/Mage/Core/Block/Abstract.php(862): Mage_Catalog_Block_Product_Newcustom->_beforeToHtml()
#12 /home/mysite/public_html/app/code/core/Mage/Core/Model/Email/Template/Filter.php(191): Mage_Core_Block_Abstract->toHtml()
#13 [internal function]: Mage_Core_Model_Email_Template_Filter->blockDirective(Array)
#14 /home/mysite/public_html/lib/Varien/Filter/Template.php(134): call_user_func(Array, Array)
#15 /home/mysite/public_html/app/code/core/Mage/Core/Model/Email/Template/Filter.php(502): Varien_Filter_Template->filter('<h3>New Watches...')
#16 /home/mysite/public_html/app/code/core/Mage/Cms/Block/Block.php(54): Mage_Core_Model_Email_Template_Filter->filter('<h3>New Watches...')
#17 /home/mysite/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Cms_Block_Block->_toHtml()
#18 /home/mysite/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#19 /home/mysite/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#20 /home/mysite/public_html/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#21 /home/mysite/public_html/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('right', true)
#22 /home/mysite/public_html/app/design/frontend/default/twistedtime/template/page/2columns-right.phtml(56): Mage_Core_Block_Abstract->getChildHtml('right')
#23 /home/mysite/public_html/app/code/local/Mage/Core/Block/Template.php(469): include('/home/mysite/...')
#24 /home/mysite/public_html/app/code/local/Mage/Core/Block/Template.php(531): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#25 /home/mysite/public_html/app/code/local/Mage/Core/Block/Template.php(559): Mage_Core_Block_Template->renderView()
#26 /home/mysite/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#27 /home/mysite/public_html/app/code/core/Mage/Core/Model/Layout.php(529): Mage_Core_Block_Abstract->toHtml()
#28 /home/mysite/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(391): Mage_Core_Model_Layout->getOutput()
#29 /home/mysite/public_html/app/code/core/Mage/Catalog/Helper/Product/View.php(147): Mage_Core_Controller_Varien_Action->renderLayout()
#30 /home/mysite/public_html/app/code/core/Mage/Catalog/controllers/ProductController.php(132): Mage_Catalog_Helper_Product_View->prepareAndRender(27, Object(Mage_Catalog_ProductController), Object(Varien_Object))
#31 /home/mysite/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Catalog_ProductController->viewAction()
#32 /home/mysite/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
#33 /home/mysite/public_html/app/code/community/ArtsOnIT/OfflineMaintenance/Controller/Router/Standard.php(46): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#34 /home/mysite/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): ArtsOnIT_OfflineMaintenance_Controller_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#35 /home/mysite/public_html/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#36 /home/mysite/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#37 /home/mysite/public_html/index.php(80): Mage::run('', 'store')
#38 {main}
Check filters in your _getProductCollection function. If you don't have any then check init methods of all custom models you have.