Skip to content
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

Request hangs on the first ParseUAST call after a previous request with a FATAL error #26

Closed
juanjux opened this issue Jun 14, 2017 · 0 comments
Labels

Comments

@juanjux
Copy link
Contributor

juanjux commented Jun 14, 2017

Summary

Doing ParseUAST requests in a loop for several files will hang on ParseUAST() if the previous request returned a FATAL error, even reconnecting after it.

Expected result

If we handle the error subsequent ParseUASTRequest for different files should continue, maybe after doing a reconnect to the server.

Obtained result

The server log show the source code of the next file but the client process hangs on the next ParseUAST request.

/usr/lib/python3.6/__future__.py
/usr/lib/python3.6/__phello__.foo.py
/usr/lib/python3.6/_bootlocale.py
/usr/lib/python3.6/_collections_abc.py
/usr/lib/python3.6/_compat_pickle.py
/usr/lib/python3.6/_compression.py
/usr/lib/python3.6/_dummy_thread.py
/usr/lib/python3.6/_markupbase.py
/usr/lib/python3.6/_osx_support.py
/usr/lib/python3.6/_pydecimal.py
FATAL error with the file [ /usr/lib/python3.6/_pydecimal.py ]: [buffer size exceeded]
/usr/lib/python3.6/_pyio.py
# HANGS HERE

Reproducible: yes

How to reproduce:

  1. Download this .go file that reproduces the problem doing server requests for all of Python library (change the path of the Python stdlib directory to adapt to your system, it doesn't matter the version): https://gist.github.com/juanjux/f0ae6ed109522265a8bead8e2522d252

If no files crash (because SDK PR #127 has been merged), copy this file to the directory with the others (its intentionally so huge that it'll crash even with the 4MB buffer): https://gist.github.com/juanjux/b6a51cd934368c142e6ea235811d1f33

  1. Start the server: docker run --privileged -p 9432:9432 --name bblfsh bblfsh/server

  2. go run py2uast2pb.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants