swoole-src
swoole-src copied to clipboard
Using stevebauman/purify with swoole and pre/code tags enabled crashes worker processes.
Please answer these questions before submitting your issue.
- What did you do? If possible, provide a simple script for reproducing the error.
I've been using the purify library to sanitize html content. Once I added pre and code tags to the list of allowed html elements, the swoole process crashed. I'll try to pin it to where the problem was caused but didn't have any luck so far.
- What did you expect to see?
Sanitized html output.
- What did you see instead?
Swoole worker process crash, error message in the logs:
[2023-06-28 16:46:55 #30.0] WARNING Server::check_worker_exit_status(): worker(pid=146, id=10) abnormal exit, status=0, signal=11
- What version of Swoole are you using (show your
php --ri swoole)?
root@2114b38e8450:/var/www# php --ri swoole
swoole
Swoole => enabled
Author => Swoole Team <[email protected]>
Version => 5.0.3
Built => Jun 26 2023 00:31:00
coroutine => enabled with boost asm context
epoll => enabled
eventfd => enabled
signalfd => enabled
cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
http2 => enabled
json => enabled
pcre => enabled
zlib => 1.2.11
brotli => E16777225/D16777225
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
async_redis => enabled
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => On => On
swoole.unixsock_buffer_size => 8388608 => 8388608
I'm using swoole with Laravel Octane.
- What is your machine environment used (show your
uname -a&php -v&gcc -v) ?
- OS: Docker (
unamesaysLinux 6.1.34 #1-NixOS SMP PREEMPT_DYNAMIC Wed Jun 14 09:15:34 UTC 2023 x86_64) - GCC_VERSION: 10.2.1 20210110
- PHP_VERSION : 8.2.7
I will test it later.
@kolaente Hi.
I can not reproduce it.
Could you please use valgrind to track your program?
Have you used the xdebug extension?
Could you please use valgrind to track your program?
How do I do that?
Have you used the
xdebugextension?
I didn't use it.
Sorry, I hase made a mistake, use gdb to track your program.
ps aux | grep swoole
gdb attach 651337
And now executing your code until trigger the error.