Closed
Description
Description
While attempting to reproduce an issue in our own PHP extension, I've encountered some complaints in php-fpm by Valgrind in fpm_event_fire(). The test involved ~40 requests started at the same time with curl. I cannot reproduce this with any regularity.
Sample trace:
Invalid read of size 8
at 0x74AA39: fpm_event_fire (fpm_events.c:483)
by 0x75A6C4: fpm_event_epoll_wait (epoll.c:141)
by 0x74A759: fpm_event_loop (fpm_events.c:427)
by 0x743D9F: fpm_run (fpm.c:113)
by 0x34BF4A: main (fpm_main.c:1813)
Address 0x16c1b2c8 is 152 bytes inside a block of size 248 free'd
at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x7446D0: fpm_child_free (fpm_children.c:62)
by 0x7446D0: fpm_child_close (fpm_children.c:86)
by 0x7446D0: fpm_children_bury (fpm_children.c:263)
by 0x74A7F2: fpm_event_fire (fpm_events.c:487)
by 0x74A7F2: fpm_event_loop (fpm_events.c:467)
by 0x743D9F: fpm_run (fpm.c:113)
by 0x34BF4A: main (fpm_main.c:1813)
Block was alloc'd at
at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x744298: fpm_child_alloc (fpm_children.c:45)
by 0x744298: fpm_resources_prepare (fpm_children.c:310)
by 0x744298: fpm_children_make (fpm_children.c:399)
by 0x744710: fpm_children_bury (fpm_children.c:294)
by 0x74A7F2: fpm_event_fire (fpm_events.c:487)
by 0x74A7F2: fpm_event_loop (fpm_events.c:467)
by 0x743D9F: fpm_run (fpm.c:113)
by 0x34BF4A: main (fpm_main.c:1813)
PHP Version
PHP 8.2.3
Operating System
Ubuntu 22.04 (in a docker container, running on Ubuntu 22.04)