2017-09-06 00:08
浏览 121

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.

图片转代码服务由CSDN问答提供 功能建议

我最近在Laravel 5.5中开始了一个小项目。 我将我的Homestead盒子更新到最新版本。

在编写测试时,如果我拼错了一个断言方法,我遇到了一个段错误,我在github repo上创建了一个问题,它可以 可在 找到

现在问题已经解决,正确地说,这是我的错误( asertPushedOn()而不是 assertPushedOn())。

然而,我最近遇到了另一个段错误,再次,这是我的错误(在尝试eagerload时错误地命名关系),但问题是,这在5.5之前从未发生过。 现在,似乎当我搞砸了什么,我随机得到了段错误。 我无法找到任何帮助在日志中调试它们(Laravel日志文件或nginx错误日志。

我得到的唯一错误消息是 Segmentation fault(core dumped) 它没有告诉我任何事情。

在问题报告中,它提到xdebug转出错误。我有一个谷歌的 laravel homestead xdebug 但只能 找到phpstorm的资源(我是一个崇高的用户)。


1)在Laravel 5.5中有一个更新的宅基地盒, 如果我搞砸了某个地方,我现在正在获得php segfaults。 这是5.5 /宅基地的变化吗?


3)如果xdebug不是答案,怎么能 我停止了,或从segfaults获得更多默认调试信息?

正如我在创建的问题中所提到的,我对segfaults知之甚少。 < p>如果您需要任何进一步的信息,请告诉我



  sudo phpenmod xdebug 
sudo service nginx restart 
php -m 

但我一直无法 重现segfault(启用和不启用xdebug),这使得segfaults对我来说更加困惑。

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

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.

    打赏 评论

相关推荐 更多相似问题