[wp-trac] [WordPress Trac] #39338: class-wp-hook.php - apply_filters() infinite loop

WordPress Trac noreply at wordpress.org
Wed Jul 17 07:45:11 UTC 2019


#39338: class-wp-hook.php - apply_filters() infinite loop
--------------------------+-----------------------------
 Reporter:  frettled      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Plugins       |     Version:  4.7
 Severity:  critical      |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------

Comment (by mordisko):

 This is a backtrace that I've managed to get from a faulty system process
 that was stuck in one of those endless loops. As some of you mentioned,
 there seems to be a garbage collector call which might be the reason as to
 way some variables are misbehaving:

 {{{
 #0  0x00007f0ba5f2aeb0 in __open_nocancel () from /lib64/libc.so.6
 #1  0x000000000042fabf in php_log_err_with_severity ()
 #2  0x000000000042fea3 in php_error_cb ()
 #3  0x00007f0b99405113 in soap_error_handler () from
 /opt/alt/php72/usr/lib64/php/modules/soap.so
 #4  0x0000000000431dc1 in zend_error_noreturn ()
 #5  0x00000000004324ef in zend_internal_type_error ()
 #6  0x0000000000432914 in zend_wrong_parameter_type_error ()
 #7  0x000000000076ba5a in execute_ex ()
 #8  0x00000000006bb47b in zend_call_function ()
 #9  0x00000000006bb9b5 in _call_user_function_ex ()
 #10 0x00000000005f5c85 in user_shutdown_function_call ()
 #11 0x00000000006ddbab in zend_hash_apply ()
 #12 0x00000000005f9ab6 in php_call_shutdown_functions ()
 #13 0x00000000006663dd in php_request_shutdown ()
 #14 0x0000000000775928 in lsapi_sigterm ()
 #15 0x00000000006f745d in zend_signal_handler ()
 #16 0x00000000006f75ab in zend_signal_handler_defer ()
 #17 <signal handler called>
 #18 0x00000000006f436e in gc_scan ()
 #19 0x00000000006f4d99 in zend_gc_collect_cycles ()
 #20 0x00000000006f49ae in gc_possible_root ()
 #21 0x000000000073b079 in ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_USED_HANDLER ()
 #22 0x000000000076f515 in execute_ex ()
 #23 0x0000000000774643 in zend_execute ()
 #24 0x00000000006cb653 in zend_execute_scripts ()
 #25 0x00000000006676b0 in php_execute_script ()
 #26 0x0000000000776c9b in lsapi_module_main ()
 #27 0x0000000000776f46 in processReq ()
 #28 0x0000000000436b1a in main ()
 }}}

 Also, here's the process' strace, although is not very interesting, as
 it's constantly writing the log due to the loop described in this ticket:


 {{{
 open("error_log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 5
 write(5, "[16-Jul-2019 15:13:02 UTC] PHP Warning:  current() expects
 parameter 1 to be array, null given in /home/USERNAME/public_html/wp-
 includes/class-wp-hook.php on line 275\n", 167) = 167
 close(5)                                = 0
 open("error_log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 5
 write(5, "[16-Jul-2019 15:13:02 UTC] PHP Warning:  Invalid argument
 supplied for foreach() in /home/USERNAME/public_html/wp-includes/class-wp-
 hook.php on line 277\n", 153) = 153
 close(5)                                = 0
 open("error_log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 5
 write(5, "[16-Jul-2019 15:13:02 UTC] PHP Warning:  next() expects
 parameter 1 to be array, null given in /home/USERNAME/public_html/wp-
 includes/class-wp-hook.php on line 291\n", 164) = 164
 close(5)                                = 0
 open("error_log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 5
 write(5, "[16-Jul-2019 15:13:02 UTC] PHP Warning:  current() expects
 parameter 1 to be array, null given in /home/USERNAME/public_html/wp-
 includes/class-wp-hook.php on line 275\n", 167) = 167
 close(5)                                = 0
 open("error_log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 5
 write(5, "[16-Jul-2019 15:13:02 UTC] PHP Warning:  Invalid argument
 supplied for foreach() in /home/USERNAME/public_html/wp-includes/class-wp-
 hook.php on line 277\n", 153) = 153
 close(5)                                = 0
 open("error_log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 5
 write(5, "[16-Jul-2019 15:13:02 UTC] PHP Warning:  next() expects
 parameter 1 to be array, null given in /home/USERNAME/public_html/wp-
 includes/class-wp-hook.php on line 291\n", 164) = 164
 close(5)                                = 0
 open("error_log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 5
 write(5, "[16-Jul-2019 15:13:02 UTC] PHP Warning:  current() expects
 parameter 1 to be array, null given in /home/USERNAME/public_html/wp-
 includes/class-wp-hook.php on line 275\n", 167) = 167
 close(5)                                = 0
 open("error_log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 5
 write(5, "[16-Jul-2019 15:13:02 UTC] PHP Warning:  Invalid argument
 supplied for foreach() in /home/USERNAME/public_html/wp-includes/class-wp-
 hook.php on line 277\n", 153) = 153
 close(5)                                = 0
 open("error_log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 5
 write(5, "[16-Jul-2019 15:13:02 UTC] PHP Warning:  next() expects
 parameter 1 to be array, null given in /home/USERNAME/public_html/wp-
 includes/class-wp-hook.php on line 291\n", 164) = 164
 close(5)
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/39338#comment:58>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list