php / pecl-networking-gearman

PHP wrapper to libgearman
https://pecl.php.net/package/gearman
Other
33 stars 25 forks source link

Packet that is being freed has not been allocated, most likely this is do to freeing a gearman_task_st or other object twice #17

Open easterism opened 2 years ago

easterism commented 2 years ago

Could you explain please, what happened

libgearman/packet.cc:253 Assertion "packet->universal" failed for function "gearman_packet_free" likely for "Packet that is being freed has not been allocated, most likely this is do to freeing a gearman_task_st or other object twice"

Begin stack trace, frames found: 34
?0  0x7efcd4cf7f0f in /usr/local/lib/libgearman.so.8(+0x7f0f) [0x7efcd4cf7f0f]
?1  0x7efcd4d028e0 in /usr/local/lib/libgearman.so.8(+0x128e0) [0x7efcd4d028e0]
?2  0x7efcd4cfbf8d in /usr/local/lib/libgearman.so.8(+0xbf8d) [0x7efcd4cfbf8d]
?3  0x7efcd4cfbfed in /usr/local/lib/libgearman.so.8(+0xbfed) [0x7efcd4cfbfed]
?4  0x7efcd4d058a0 in /usr/local/lib/libgearman.so.8(+0x158a0) [0x7efcd4d058a0]
?5  0x7efcd4d058dd in /usr/local/lib/libgearman.so.8(+0x158dd) [0x7efcd4d058dd]
#6  0x7efcd4d08898 in gearman_worker_free at /usr/local/lib/libgearman.so.8
#7  0x7efcd4d2f831 in zim_GearmanWorker___destruct at /usr/lib/php/20200930/gearman.so
?8  0x7efcd7065499 in /usr/lib/php/20200930/xdebug.so(+0x16499) [0x7efcd7065499]
#9  0x5612e5d09452 in zend_call_function at php8.0
#10  0x5612e5d09705 in zend_call_known_function at php8.0
#11  0x5612e5d99a84 in zend_objects_destroy_object at php8.0
#12  0x5612e5d9e474 in zend_objects_store_del at php8.0
#13  0x5612e5d7dc7f in execute_ex at php8.0
?14  0x7efcd7064e3a in /usr/lib/php/20200930/xdebug.so(+0x15e3a) [0x7efcd7064e3a]
?15  0x5612e5b6007c in php8.0(+0x10a07c) [0x5612e5b6007c]
#16  0x5612e5d7fd89 in execute_ex at php8.0
?17  0x7efcd7064e3a in /usr/lib/php/20200930/xdebug.so(+0x15e3a) [0x7efcd7064e3a]
?18  0x5612e5b6007c in php8.0(+0x10a07c) [0x5612e5b6007c]
#19  0x5612e5d7fd89 in execute_ex at php8.0
?20  0x7efcd7064e3a in /usr/lib/php/20200930/xdebug.so(+0x15e3a) [0x7efcd7064e3a]
?21  0x5612e5b6007c in php8.0(+0x10a07c) [0x5612e5b6007c]
#22  0x5612e5d7fd89 in execute_ex at php8.0
?23  0x7efcd7064e3a in /usr/lib/php/20200930/xdebug.so(+0x15e3a) [0x7efcd7064e3a]
?24  0x5612e5b6007c in php8.0(+0x10a07c) [0x5612e5b6007c]
#25  0x5612e5d7fd89 in execute_ex at php8.0
?26  0x7efcd7064e3a in /usr/lib/php/20200930/xdebug.so(+0x15e3a) [0x7efcd7064e3a]
#27  0x5612e5d800fc in zend_execute at php8.0
#28  0x5612e5d16b6d in zend_execute_scripts at php8.0
#29  0x5612e5cb361b in php_execute_script at php8.0
?30  0x5612e5da5dce in php8.0(+0x34fdce) [0x5612e5da5dce]
?31  0x5612e5b69aeb in php8.0(+0x113aeb) [0x5612e5b69aeb]
#32  0x7efcd960f09b in __libc_start_main at /lib/x86_64-linux-gnu/libc.so.6
#33  0x5612e5b69c4a in _start at php8.0
esabol commented 2 years ago

@zacek posted analysis and suggested a potential fix to the code here: https://github.com/php/pecl-networking-gearman/issues/12#issuecomment-1280379848

@easterism : any chance you can test @zacek's suggestions?