Django South Seg 故障 [英] Django South Seg Fault

查看:18
本文介绍了Django South Seg 故障的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从 Ubuntu 12.04 更新到 13.04,我在迁移一些过去可以工作的代码时遇到了问题.谷歌搜索并没有发现任何明显相关的东西,除了一些晦涩的 R 引用,虽然我的项目确实使用了 R,但我不希望它会在迁移中出现.我以前从未处理过调试段错误,更不用说在 3rd 方代码中了.我应该如何进行?

I just updated from Ubuntu 12.04 to 13.04, and I am having issues migrating some code that used to work. Googling does not reveal anything that obviously looks related except some obscure R references, and though my project does use R I would not expect it to crop up in migrations. I have never dealt with debugging seg faults before, much less in 3rd party code. How should I proceed?

(project)ben@Watt:~/Projects/project/project$ python project/manage.py migrate
Error: 'rho' must be an environment not NULL: detected in C-level eval
Segmentation fault (core dumped)

它看起来像 rpy2 的问题,使用下面答案中的 ltrace 找到.仍然想知道迁移是如何出现的.

It looks like a problem with rpy2, found using the ltrace from the answer below. Still wondering how that came up in migrate.

我的 R 版本已经更新,超出了 Rpy2 的喜好.恢复固定的东西.这在 ./manage.py migrate 中是如何出现的对我来说很神秘.

My R version had been updated beyond what Rpy2 likes. Reverting fixed things. How this came up in ./manage.py migrate is mysterious to me.

推荐答案

我将从使用 strace 开始,因为它已经安装在许多系统上.这可能使您能够根据所做的系统调用来缩小当前正在执行的模块的范围.例如

I would start by using strace since that's already installed on many systems. That might enable you to narrow down which module is currently executing based on the system calls made. eg

$ strace -o ~/tmp/strace.log -f python project/manage.py migrate

或者,安装 ltrace 并查看调用顺序.

or, install ltrace and view the sequence of calls.

$ sudo apt-get install ltrace
$ ltrace python project/manage.py migrate

如果做不到这一点,由于核心已被转储,您可以在核心上使用 gdb 来查看问题发生的确切位置

Failing that, since the core has been dumped, you can use gdb on the core to see exactly where the problem occurred

$ gdb core

使用 bt 等命令来显示堆栈跟踪.为了使这更容易,您可能需要找到具有可用调试符号的可执行文件/库.

The use commands such as bt to show a stack trace. To make this easier, you may need to find executables/libraries that have debugging symbols available.

这篇关于Django South Seg 故障的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆