0
當我運行一個mod_wsgi應用程序時,我通過Python獲得了一段segfault。我得到了Python的調試符號,但我不知道如何獲得Debian 7的Python源代碼。當我做apt-get source python
時,我沒有得到實際的Python解釋器源文件。Debian 7上的Python 2.7 Segfault
首先,我在mod_wsgi代碼中遇到了崩潰。但是在我運行apt升級之後,我開始使用json模塊獲得segfault。但是,兩個段錯誤發生在PyObject_Malloc中obmalloc.c的第788行。現在,如果只有我能找到適當的源代碼,我可以弄清楚發生了什麼更好!
這裏是回溯的前幾名幀:
#0 PyObject_Malloc (nbytes=46) at ../Objects/obmalloc.c:788
#1 0x00007fffef3db145 in PyString_FromStringAndSize.part.17 (size=<optimized out>, str=0x0) at ../Objects/stringobject.c:88
#2 PyString_FromStringAndSize ([email protected]=0x0, [email protected]=9) at ../Objects/stringobject.c:57
#3 0x00007fffed57b644 in ascii_escape_str.2660 ([email protected]='message') at /home/jmm/py/python2.7-2.7.3/Modules/_json.c:302
#4 0x00007fffed57d25e in py_encode_basestring_ascii (pystr='message', self=0x0) at /home/jmm/py/python2.7-2.7.3/Modules/_json.c:827
#5 encoder_encode_string.isra.4.part.5 (obj='message') at /home/jmm/py/python2.7-2.7.3/Modules/_json.c:1962
#6 encoder_encode_string.isra.4 (obj='message') at /home/jmm/py/python2.7-2.7.3/Modules/_json.c:1977
#7 encoder_listencode_dict (indent_level=<optimized out>, dct={'message': 'Invalid params', 'code': -32602}, rval=
['{', '"jsonrpc"', ': ', '"2.0"', ', ', '"id"', ': ', '1', ', ', '"error"', ': ', '{'], s=0x555555d88758) at /home/jmm/py/python2.7-2.7.3/Modules/_json.c:2170
#8 encoder_listencode_obj.part.10.2731 ([email protected]=0x555555d88758, [email protected]=['{', '"jsonrpc"', ': ', '"2.0"', ', ', '"id"', ': ', '1', ', ', '"error"', ': ', '{'], [email protected]=
{'message': 'Invalid params', 'code': -32602}, [email protected]=0) at /home/jmm/py/python2.7-2.7.3/Modules/_json.c:2018
似乎很愚蠢的我沒有意識到這一點,但你是對的。希望我有所有的細節來嘗試解決這個問題。謝謝。 – 2014-10-09 22:05:25