pypy 1.9+mysql_ctypes 0.5+libmysqlclient15 got Segmentation fault on CentOS 5.8 64bit

在一台CentOS 5.8 64bit的机器上使用pypy 1.9, mysql_ctypes 0.5查询数据库出现Segmentation fault。gdb了一下,堆栈都被破坏了。只好另觅他法。

When I use pypy 1.9, mysql_ctypes 0.5, I got a Segmentation fault querying MySQL database. First I try to gdb it, the stack is messed up. Have to find another way out.

想起有另一台机器使用同样程序与库一直正常,一番查找发现差别只在于libmysqlclient.so的版本。正常的机器有多个版本,最高版本是16;而出错的机器最高的是15。将libmysqlclient.so.16复制到出错机器,发现查询正常了。为了库的完整,找了一个libmysqlclient16的rpm安装。

Then I remember that there is another machine running the same version of program and library. Finally I found that the only difference between these two machines is the version of libmysqlclient.so. In the normal machine, there are multiple versions, the largest version is 16. And in the problem machine the largest version is 15. Then I try to copy the libmysqlclient.so.16 to the problem machine, everything is OK. For competence, I found a libmysqlclient16 rpm and install it.

问题解决。

Problem solved.


  • Myoula

    mysqldb-python 已经支持 pypy了