Bug #77465 [Opn->Csd]: Segfault with PHP built-in server

From: Date: Thu, 21 Feb 2019 16:12:45 +0000
Subject: Bug #77465 [Opn->Csd]: Segfault with PHP built-in server
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219684@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77465&edit=1 ID: 77465 Updated by: nikic@php.net Reported by: girgias@php.net Summary: Segfault with PHP built-in server -Status: Open +Status: Closed Type: Bug Package: Built-in web server Operating System: WSL with Ubuntu 18.04 PHP Version: 7.3.1 -Assigned To: +Assigned To: nikic Block user comment: N Private report: N New Comment: Closing this, as the xdebug issue in bug #77287 has been resolved in the meantime. Previous Comments: ------------------------------------------------------------------------ [2019-01-16 15:43:00] girgias@php.net Yeah, works just fine without xDebug, Is there a PR or thread somewhere where I can attach this bug report? I suppose the xDebug creators are aware of the issue. Oh and thanks for your time. ------------------------------------------------------------------------ [2019-01-16 15:36:27] nikic@php.net The SIGPIPE you're seeing is likely harmless and only shows up because you're running under gdb. You can skip it using "c" (maybe multiple times) or instruct gdb to not stop on it ("handle SIGPIPE nostop"). Or try running without gdb and see if it runs through clearly. It seems to me that xdebug is the culprit though. Quite a few people are hitting bug #77287. ------------------------------------------------------------------------ [2019-01-16 15:23:38] girgias@php.net Seems like disabling xDebug allowed me to at least start the server and get one page to respond New output (yes the root of the website has a 301 redirection loop which I need to fix): (gdb) r Starting program: /usr/bin/php -S localhost:8000 -t public/ -d display_errors=1 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". PHP 7.3.1-1+ubuntu18.04.1+deb.sury.org+1 Development Server started at Wed Jan 16 16:20:31 2019 Listening on http://localhost:8000 Document root is /mnt/c/Dev/Sites/personal/public Press Ctrl-C to quit. [Wed Jan 16 16:20:38 2019] 127.0.0.1:58286 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58287 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58288 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58289 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58290 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58291 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58292 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58293 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58294 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58295 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58296 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58297 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58298 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58299 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58300 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58301 [301]: / [Wed Jan 16 16:20:38 2019] 127.0.0.1:58302 [301]: / [Wed Jan 16 16:20:39 2019] 127.0.0.1:58303 [301]: / [Wed Jan 16 16:20:39 2019] 127.0.0.1:58304 [301]: / [Wed Jan 16 16:20:39 2019] 127.0.0.1:58305 [301]: / [Wed Jan 16 16:20:39 2019] 127.0.0.1:58306 [301]: / [Wed Jan 16 16:20:52 2019] 127.0.0.1:58307 [200]: /blog [Wed Jan 16 16:20:52 2019] 127.0.0.1:58308 [404]: /favicon.ico - No such file or directory Program received signal SIGPIPE, Broken pipe. 0x00007ffffd2f2c4d in __libc_send (fd=5, buf=0x83919f0, len=13, flags=0) at ../sysdeps/unix/sysv/linux/send.c:28 28 ../sysdeps/unix/sysv/linux/send.c: No such file or directory. (gdb) bt #0 0x00007ffffd2f2c4d in __libc_send (fd=5, buf=0x83919f0, len=13, flags=0) at ../sysdeps/unix/sysv/linux/send.c:28 #1 0x000000000832df17 in ?? () #2 0x000000000832ff2f in ?? () #3 0x0000000008330d48 in ?? () #4 0x00000000080f0752 in ?? () #5 0x00007ffffd1f1b97 in __libc_start_main (main=0x80f0420, argc=7, argv=0x7ffffffee3b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffffffee3a8) at ../csu/libc-start.c:310 #6 0x00000000080f09da in _start () (gdb) ------------------------------------------------------------------------ [2019-01-16 14:33:00] nikic@php.net Just to exclude the obvious, could you check whether disabling (i.e. removing the extension from php.ini) xdebug helps? XDebug has some known issues with PHP 7.3, so it would be good to exclude it as a possible cause. ------------------------------------------------------------------------ [2019-01-16 13:45:06] girgias@php.net Run the bt command after the SIGSEGV and got this output: Starting program: /usr/bin/php -S localhost:8000 -t public/ -d display_errors=1 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". PHP 7.3.1-1+ubuntu18.04.1+deb.sury.org+1 Development Server started at Wed Jan 16 14:43:38 2019 Listening on http://localhost:8000 Document root is /mnt/c/Dev/Sites/personal/public Press Ctrl-C to quit. Program received signal SIGSEGV, Segmentation fault. 0x00000000080eb66f in ?? () (gdb) bt #0 0x00000000080eb66f in ?? () #1 0x000000000831fc68 in execute_ex () #2 0x00007ffffa12f335 in xdebug_execute_ex (execute_data=0x7ffffa61f240) at ./build-7.3/xdebug.c:1868 #3 0x00000000080e7db3 in ?? () #4 0x000000000831fc68 in execute_ex () #5 0x00007ffffa12f335 in xdebug_execute_ex (execute_data=0x7ffffa61f1f0) at ./build-7.3/xdebug.c:1868 #6 0x00000000080e7db3 in ?? () #7 0x000000000831fc68 in execute_ex () #8 0x00007ffffa12f335 in xdebug_execute_ex (execute_data=0x7ffffa61f0f0) at ./build-7.3/xdebug.c:1868 #9 0x00000000080e7db3 in ?? () #10 0x000000000831fc68 in execute_ex () #11 0x00007ffffa12f335 in xdebug_execute_ex (execute_data=0x7ffffa61f030) at ./build-7.3/xdebug.c:1868 #12 0x0000000008326393 in zend_execute () #13 0x0000000008297a52 in zend_execute_scripts () #14 0x0000000008237d60 in php_execute_script () #15 0x000000000832ece2 in ?? () #16 0x000000000832fc04 in ?? () #17 0x000000000833015c in ?? () #18 0x0000000008330cce in ?? () #19 0x00000000080f0752 in ?? () #20 0x00007ffffd1f1b97 in __libc_start_main (main=0x80f0420, argc=7, argv=0x7ffffffee3b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffffffee3a8) at ../csu/libc-start.c:310 #21 0x00000000080f09da in _start () (gdb) Hope this helps ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=77465 -- Edit this bug report at https://bugs.php.net/bug.php?id=77465&edit=1

« previous php.bugs (#219684) next »