Issue #7 resolved

[PHP7] Segfault after shutdown

Ruslan Osmanov
repo owner created an issue
<?php
eio_nop(0, function () {
    echo "nop\n";
});

eio_event_loop();
(gdb) r -n -d extension=eio.so  -dextension_dir=./.libs t.php
Starting program: /usr/bin/php -n -d extension=eio.so  -dextension_dir=./.libs t.php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffef4f7700 (LWP 30800)]
nop

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffef4f7700 (LWP 30800)]
0x00007ffff5261023 in pthread_cond_wait () from /lib64/libpthread.so.0
(gdb) 

Comments (3)

  1. Ruslan Osmanov reporter

    eio_set_max_parallel(0) seems to stop unfinished threads. However, PHP often finishes quicker, thus causing the segfault. I'm thinking of nanosleep(100usec) :-/

  2. Log in to comment