yasd
yasd copied to clipboard
Artisan command errors using Laravel Sail + Octane + Swoole + YASD
Please answer these questions before submitting your issue. Thanks!
- What did you do? If possible, provides a simple script and debug step to reproduce the problem.
I tried to use YASD with Laravel Sail (Docker) and Octane. I added YASD installation to the Dockerfile and configured it. I can successfully connect with VS Code, set breakpoints and debug my Code.
In order to reproduce run the following with docker installed (or setup fresh Laravel + Sail + Yasd like in the Commit):
git clone https://github.com/SquadMS/Squad-MS.git && \
cd Squad-MS && \
git checkout 152c0a5 && \
composer install && \
cp .env.example .env && \
php artisan key:generate && \
./vendor/bin/sail up -d && \
./vendor/bin/sail npm install && \
./vendor/bin/sail npm run dev && \
./vendor/bin/sail down && \
./vendor/bin/sail up -d && \
./vendor/bin/sail composer update
If you just run ./vendor/bin/sail up and watch the output you will see errors getting logged occasionally
2. What did you expect to see?
I did expect artisan commands to keep working and no additional errors to be caused by the debugger.
- What did you see instead?
After installing YASD, i am getting occasional errors like the following one:
free(): invalid next size (fast)
double free or corruption (!prev)
Also, running any artisan command will result in the same error. Additionally, running composer update will result in the following error in post-autoload-dump when running artisan package:discover --ansi:
Package manifest generated successfully.
free(): invalid next size (fast)
Aborted (core dumped)
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 134
corrupted size vs. prev_size
- What is your machine environment used (show your
uname -a&php -v&gcc -v) ?
Linux ee31d887dcaf 5.8.0-53-generic #60-Ubuntu SMP Thu May 6 07:46:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
PHP 8.0.5 (cli) (built: May 3 2021 11:30:57) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.5, Copyright (c) Zend Technologies
with Zend OPcache v8.0.5, Copyright (c), by Zend Technologies
with Yasd v0.3.9-alpha, Our Copyright, by codinghuang
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
it still pretty hard to integrate with Octane right now. I spin up the php artisan serve for xdebug purpose My trick: https://medium.com/p/14238abc0d08
Can consider to use swoole https://github.com/swoole/swoole-src/tree/support-xdebug
You can use xdebug directly, as long as the PHP version is 8.1 or greater