squeaky-pl/japronto

Worker crashed on signal SIGSEGV!

imuxin opened this issue · 0 comments

I just test how much size the response header can load.

Env Info:

  • pip list
Package    Version
---------- -------
japronto   0.1.2
pip        20.1.1
setuptools 47.1.0
uvloop     0.14.0
wheel      0.36.2
  • Python 3.7.9

reproduced issue code:

from japronto import Application
from japronto.response import JsonResponse
def hello(request):
    headers = { "Auth-Token": "token"*200 }
    return JsonResponse(json={'hello': 'world'}, headers=headers)
app = Application()
app.router.add_route('/', hello)
app.run(debug=True)

run the above code and curl http://localhost:8080. And then Worker crashed on signal SIGSEGV!
log like this:

Accepting connections on http://0.0.0.0:8080
127.0.0.1 GET /
Fatal Python error: Segmentation fault

Current thread 0x0000000117f9ce00 (most recent call first):
  File "/Users/ql/WorkSpace/repo/github.com/imuxin/japronto/venv/lib/python3.7/site-packages/japronto/app/__init__.py", line 191 in serve
  File "/usr/local/Cellar/python@3.7/3.7.9_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/process.py", line 99 in run
  File "/usr/local/Cellar/python@3.7/3.7.9_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/process.py", line 297 in _bootstrap
  File "/usr/local/Cellar/python@3.7/3.7.9_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/popen_fork.py", line 74 in _launch
  File "/usr/local/Cellar/python@3.7/3.7.9_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/popen_fork.py", line 20 in __init__
  File "/usr/local/Cellar/python@3.7/3.7.9_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/context.py", line 277 in _Popen
  File "/usr/local/Cellar/python@3.7/3.7.9_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/context.py", line 223 in _Popen
  File "/usr/local/Cellar/python@3.7/3.7.9_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/process.py", line 112 in start
  File "/Users/ql/WorkSpace/repo/github.com/imuxin/japronto/venv/lib/python3.7/site-packages/japronto/app/__init__.py", line 237 in _run
  File "/Users/ql/WorkSpace/repo/github.com/imuxin/japronto/venv/lib/python3.7/site-packages/japronto/app/__init__.py", line 273 in run
  File "app.py", line 23 in <module>
Worker crashed on signal SIGSEGV!

I have no ideal how to debug this.