Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Driver exits and does not restart after a syntax error #31

Closed
smacker opened this issue Feb 20, 2019 · 5 comments
Closed

Driver exits and does not restart after a syntax error #31

smacker opened this issue Feb 20, 2019 · 5 comments
Assignees
Labels
Milestone

Comments

@smacker
Copy link

smacker commented Feb 20, 2019

Bblfshd: v2.11.7
Driver: v2.7.0

Logs from the server:

FATAL <file>: syntax error: Syntax error, unexpected ')' on line 4
FATAL <file>: driver failure: unexpected end of JSON input
FATAL <file>: driver failure: native driver is not running

I can reproduce it locally:

root@a743b6d87529:/# bblfshctl parse fail.phpt
Status: Fatal
Elapsed: 1.2380209s
Errors:
	- syntax error: Syntax error, unexpected ')' on line 4


root@a743b6d87529:/# bblfshctl parse fail.phpt
Status: Fatal
Elapsed: 4.0194ms
Errors:
	- syntax error: Syntax error, unexpected ')' on line 4


root@a743b6d87529:/# bblfshctl parse fail.phpt
Status: Fatal
Elapsed: 3.6043ms
Errors:
	- syntax error: Syntax error, unexpected ')' on line 4


root@a743b6d87529:/# bblfshctl parse fail.phpt
Status: Fatal
Elapsed: 2.2709ms
Errors:
	- syntax error: Syntax error, unexpected ')' on line 4


root@a743b6d87529:/# bblfshctl parse fail.php
Status: Fatal
Elapsed: 1.8465598s
Errors:
	- driver failure: unexpected end of JSON input


root@a743b6d87529:/# bblfshctl parse fail.phpt
Status: Fatal
Elapsed: 1.4034ms
Errors:
	- driver failure: native driver is not running

Any request to PHP driver after that (with correct files too) end up with the same error: driver failure: native driver is not running

I'll send files in private

@creachadair creachadair changed the title Driver failure Driver exits and does not restart after a syntax error Feb 20, 2019
@juanjux
Copy link
Contributor

juanjux commented Feb 21, 2019

I'm working on this. Currently:

  • Native driver without the Go (annotation + SDK) layer or bblfshd: works.
  • Go+native driver running on its own docker without bblfshd: crash.
  • bblfshd calling the driver: crash.

I'll now check the Go driver without bblfshd and, if it crash (and I'm pretty sure it'll since no other part use JSON and the error is JSON related) I'll continue debugging from there.

@bzz
Copy link
Contributor

bzz commented Mar 21, 2019

This should have been fixed by now in bblfsh/sdk#381 and needs to be tested on bblfshd v2.11.9 once it's out.

@bzz bzz added this to the v2.7.2 milestone Mar 21, 2019
@dennwc dennwc assigned dennwc and unassigned juanjux Mar 28, 2019
@dennwc
Copy link
Member

dennwc commented Mar 28, 2019

@smacker Can you please send the file?

@smacker
Copy link
Author

smacker commented Mar 28, 2019

done in private

dennwc pushed a commit to dennwc/php-driver that referenced this issue Mar 28, 2019
Signed-off-by: Denys Smirnov <[email protected]>
@dennwc
Copy link
Member

dennwc commented Mar 28, 2019

The crash will be fixed by #41 and the root cause is #42.

dennwc pushed a commit to dennwc/php-driver that referenced this issue Apr 8, 2019
@dennwc dennwc closed this as completed in #41 Apr 8, 2019
dennwc pushed a commit that referenced this issue Apr 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants