dongtan3306 2017-09-06 00:08
浏览 126

Laravel 5.5中的Segfaults

I recently started a little project in Laravel 5.5. I updated my Homestead box to the latest version.

While writing a test, I came across a segfault if I spelt an assertion method incorrectly, and I created an issue on the github repo which can be found at

The issue has been closed now, as rightfully, it was my mistake (asertPushedOn() instead of assertPushedOn()).

However I've recently come across another segfault, again, it was my error (incorrectly named relationship when trying to eagerload), but the problem is, this never happened prior to 5.5. Now, it seems when I mess something up, I'm randomly getting segfaults. I cant find anything to help debug them in the logs (Laravel logfile or nginx error log.

The only error message I get is Segmentation fault (core dumped) which doesn't tell me anything.

On the issue report, it mentioned xdebug dumps out the error. I had a google for laravel homestead xdebug but could only find resources for phpstorm (I'm a sublime user).


1) In Laravel 5.5 with an updated homestead box, I'm getting php segfaults now if I mess up somewhere. Is this a change in 5.5 / homestead?

2) How can I enable xdebug (will this actually help debug segfaults)?

3) If xdebug isn't the answer, how can I stop getting, or get more default debug info from segfaults?

As mentioned in the issue I created, I don't know much about segfaults.

If you need any further information, please let me know


I managed to enable xdebug with:

sudo phpenmod xdebug
sudo service nginx restart
php -m

But I've been unable to reproduce the segfault (with and without xdebug enabled), which makes segfaults all the more confusing for me.

  • 写回答

1条回答 默认 最新

  • douzhang2680 2017-09-07 08:34

    So while I wasn't able to reproduce the original segfault, another one did occur while xdebug wasn't enabled.

    When I enabled xdebug with the following:

    sudo phpenmod xdebug
    sudo service nginx restart

    and reran the script which gave me the segfault, I successfully got the recursion error with the filename and line number to resolve it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥15 maccms影视模板 制作影视网站失败 求
  • ¥15 stm32按键设置闹钟数进退位不正常
  • ¥15 三电平逆变器中点电位平衡问题
  • ¥20 这怎么写啊 java课设
  • ¥15 用C语言完成一个复杂的游戏
  • ¥15 如何批量更改很多个文件夹里的文件名中包含文件夹名?
  • ¥50 MTK手机模拟HID鼠标出现卡顿
  • ¥20 求下下面这个数据结构代码
  • ¥20 前端 二进制文件流图片转化异常
  • ¥15 github上的这个C语言项目如何跑起来