-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server keeps crashing with latest 4.5 release. #418
Comments
Here's the output from another project project2
Files in question are |
Seems to be a parser bug and related to #368 (comment) ( |
@felixfbecker Even using the intellisense extension 1.3.0 the server crashes for both projects. Exact same out for project 2, slightly different for project 1 with exception.
|
wait. How in the world you have the tolerant parser in v1.3.0 // cc @felixfbecker Did you changed something in the re-release progress? |
Due to @felixfbecker's boo boo :). Fixed now. |
I can't repro those issues. Does it happen with those files alone or maybe only part of a project? I don't think it was related to the require/include issue from earlier, that would have been fixed in 1.4.1 and wasn't a crash. Can you tell me which version of PHP you're running with? |
Not sure what you mean. I always get the same errors for those 2 project folders.
PHP 7.1.2-4+deb.sury.org~xenial+1 |
@ADmad Are you sure the language server is crashing and this is the STDERR output? Exceptions that happen during indexing of a single file will be logged, but indexing should continue with the next file. The error you see matches the message here: https://sourcegraph.com/github.com/felixfbecker/php-language-server/-/blob/src/Indexer.php#L228-229, which speaks against this being the reason of a crash (if there was any) |
Yes, the errors I have shown are repeated 5 times and then vscode shows notification that the language server has crashed 5 times and won't be restarted. |
Could you also check the dev console whether STDERR output is logged there? As said, this shouldn't cause a crash, so the error of the actual crash may be not shown in the output panel. |
This is what i see in the dev console
|
Then the crash reason seems to be a PHP SEGFAULT. |
That doesn't make much sense to me. Where does the problem lie since v1.3 of intellisense plugin works fine? |
This is what i get for
|
That sounds much more valuable for @roblourens |
But the constant is defined in that class. Maybe it needs to be defined at the top of the file?
Anything could cause a SEGFAULT. A SEGFAULT should never happen, it means a bug in PHP. |
True, but it's some code in the new parser that's triggering it. If we can find what maybe it can be circumvented. |
This is the output shown in "Output" window for folder containing CakePHP. project3 / cakephp
|
Worth a try. Could move it before the function definitions start. |
The problem was with the particular PHP version. I upgrade my packages to get Thanks everyone for your patience and sorry for the trouble. P. S. It might still be a good idea to move the constant definitions to top of class. |
Thanks for trying that @ADmad. Seems like a pretty extreme bug to have in a stable version of PHP... I will move the constant definitions up in case it helps. |
This is probably related to this report: microsoft/tolerant-php-parser#155 (comment) Filed here on PHP, reported as fixed: |
That's a nasty bug indeed. Good that it was fixed quickly enough. Someone did a much better job at debugging the issue than me :) |
I want to find a mitigation for this but I can't repro the segfault. I built 7.1.2 on ubuntu but don't see it. The minimal repro from the php issue is:
Does anyone know if just avoiding the |
Here's the output in VSCode using intellisense extension 1.4.1
project1
The files in question are https://github.com/cakephp/app/blob/master/bin/cake.php and https://gist.github.com/ADmad/f531707db2cb70f1bc69c35e1f581b9b
The text was updated successfully, but these errors were encountered: