This article mainly introduces how to solve the segfault error in Python, and analyzes the causes and Corresponding Solutions of the segfault error in system logs, for more information about how to solve the segfault error in Python, see this article. We will share this with you for your reference. The details are as follows:
Recently, python may occasionally cause system segfault errors during the running process and may occur from time to time in different code segments. Therefore, one-step debugging cannot determine which line of code is the problem.
This is a strange phenomenon. In the system log, the message indicates the python library. libmysqlclient and cjson library are prompted in the background.
If there is a problem with the python or mysql database in a specific hardware environment, it cannot be said. If it is caused by cjson, after all, cjson is not a standard library, and the probability of a problem is higher.
[Cjson error]
The Code is as follows:
Kernel: [1207747.915932] python [29797]: segfault at 7f3fc280e036 ip Route 7f3fc0a35722 sp route 7fff52b6bcd0 error 4 in cjson. so [7f3fc0a32000 + 5000]
Therefore, cjson is replaced with json, and there is no segment error after the python program. Isn't that a bit difficult.