core dump python_Python服务器“已中止(核心已转储)”

使用web.py创建的Python Web服务器在解决线性规划问题时偶尔崩溃,日志显示'Aborted (core dumped)'。错误可能源自web.py或CBC库。如何追踪并解决这个C错误?解决方案包括定位核心转储文件、使用gdb分析调用堆栈,并可能需要安装Python调试符号来关联解释器堆栈和运行的Python代码。
摘要由CSDN通过智能技术生成

I use web.py to create a Python web server. This server is called to solve linear programming problems, and it uses the library CBC to do that.

Every once in a while, the server crashes with a log that looks like that:

78.243.184.3:56271 - - [03/Jun/2016 04:35:54] "HTTP/1.1 GET /optimization" - 200 OK

Aborted (core dumped)

I belive "Aborted (core dumped)" is a C error, so it comes from either web.py or CBC.

Is there any way to trace back the source of the error?

解决方案

A core dump is caused by a fault in the native code in your web server. Python is pretty darn solid these days, so such faults are almost always caused by bugs in C extensions in my experience.

You therefore have 3 problems.

You need to find the core dump file. This is usually in the current working directory of the process that dumped. However, there are configation options that can change this.

You need to debug the call stack of what has failed. That is covered in StackOverflow - see How to analyze a program's core dump file with gdb?

You might need to relate the Python interpreter stack back to the Python code that you were running. To do this you will need to install the Python debug symbols and Python extensions for gdb. The Python wiki has good advice on how to do that here.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值