This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Segmentation fault
Type: crash Stage:
Components: Interpreter Core Versions: Python 2.7
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Dmitry.Groshev, amaury.forgeotdarc, brett.cannon
Priority: normal Keywords:

Created on 2011-01-28 09:36 by Dmitry.Groshev, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit Dmitry.Groshev, 2011-01-28 09:36
Messages (6)
msg127266 - (view) Author: Dmitry Groshev (Dmitry.Groshev) Date: 2011-01-28 09:36
Here is a console output:
si14@si14-work:~/repos/monitoring/root$ python2.7 - - [2011-01-28 12:29:30] "GET /update HTTP/1.1" 200 320 "-" "Python-urllib/2.7"
{"seenby":[1],"received":1296207058.993983,"observer":1,"type":"ping","source":102,"time":1296207058.990101,"data":[[1296206970.543701,0.010154962539672852],[1296206980.383922,0.010203123092651367],[1296206990.222841,0.01015615463256836],[1296207000.050695,0.010264873504638672],[1296207009.876834,0.011881113052368164],[1296207019.698611,0.010120153427124023],[1296207029.519147,0.010251045227050781],[1296207039.342266,0.010113000869750977],[1296207049.167352,0.010238885879516602],[1296207058.990089,0.010174989700317383]],"class":"statistics"} - - [2011-01-28 12:30:59] "POST / HTTP/1.1" 200 2 "-" "Python-urllib/2.7"
Segmentation fault
I'm not sure that this is a gevent issue, so I'm posting it here. sources are attached.
msg127267 - (view) Author: Dmitry Groshev (Dmitry.Groshev) Date: 2011-01-28 09:40
I should also say that this bug appears at first time, but it doesn't make it less scary. The packet that crashed python was the same as the one shown and I've already used this tiny "server" for a day or two without modifications, so it seems to me that this is not my mistake.
msg127268 - (view) Author: Dmitry Groshev (Dmitry.Groshev) Date: 2011-01-28 09:51
Ok, I've played with this some more and got some more segmenation faults. It looks like a gevent problem, but I think that python shouldn't completely fall so easy. Here is more traces:

si14@si14-work:~/repos/monitoring/root$ python2.7 
{"seenby":[1],"received":1296208139.606481,"observer":1,"type":"ping","source":102,"time":1296208139.603046,"data":[[1296208051.083743,0.010155200958251953],[1296208060.923999,0.011048078536987305],[1296208070.76751,0.010570049285888672],[1296208080.613247,0.011930227279663086],[1296208090.454012,0.010123968124389648],[1296208100.283144,0.010128021240234375],[1296208110.114118,0.010215997695922852],[1296208119.943081,0.010147809982299805],[1296208129.774567,0.010593891143798828],[1296208139.603033,0.010541915893554688]],"class":"statistics"} - - [2011-01-28 12:48:59] "POST / HTTP/1.1" 200 2 "-" "Python-urllib/2.7"
Traceback (most recent call last):
  File "evhttp.pxi", line 473, in gevent.core._http_cb_handler (gevent/core.c:13165)
Segmentation fault - - [2011-01-28 12:47:30] "GET /update HTTP/1.1" 200 320 "-" "Python-urllib/2.7"
^CTraceback (most recent call last):
  File "", line 34, in <module>
    gevent.wsgi.WSGIServer(("localhost", 8020), printer).serve_forever()
  File "build/bdist.linux-i686/egg/gevent/", line 183, in serve_forever
TypeError: raise: arg 3 must be a traceback or None
Segmentation fault
msg127295 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2011-01-28 12:48
I don't reproduce the issue. Could you run python under gdb and give us the C backtrace?
msg127296 - (view) Author: Dmitry Groshev (Dmitry.Groshev) Date: 2011-01-28 13:01
I've changed gevent.wsgi server to gevent.pywsgi and it works as expected. Now I switched it back to gevent.wsgi and it doesn't crash too! That's strange, but I understand that you can't fix it without normal backtrace. I'm sorry for the inconvenience.
msg127321 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2011-01-28 18:17
Closing as invalid since gevent seems to be the culprit of the segfault.
Date User Action Args
2022-04-11 14:57:11adminsetgithub: 55244
2011-01-28 18:17:19brett.cannonsetstatus: open -> closed

nosy: + brett.cannon
messages: + msg127321

resolution: not a bug
2011-01-28 13:01:07Dmitry.Groshevsetmessages: + msg127296
2011-01-28 12:48:00amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg127295
2011-01-28 09:51:34Dmitry.Groshevsetmessages: + msg127268
2011-01-28 09:40:38Dmitry.Groshevsetmessages: + msg127267
2011-01-28 09:36:49Dmitry.Groshevcreate