开发者

R segfault when running via Rpy on linux

I'm running R via Rpy on a redhat linux distribution. Periodically I'll encounter this error message:

*** caught segfault ***
address (nil), cause 'unknown'

And the entire program dies right there. It usually occurs when I run a lot of regression r.lm(). But by simply running the identical code a开发者_运维知识库gain, the problem may or may not go away (so not always reproduceable). Does anyone know what might be causing this, and/or how I can prevent it from happening?


There are a few possibilities.

  1. The problem is with the R code. To test this, run the code in R itself and see if you can replicate the issue.

  2. The problem is with Rpy. Run the program in a debugger and see what exactly you are passing from Python to R and from R to Python. At a guess, you have some kind of variable mismatch that only occurs under some conditions.

  3. The problem is with the environment. Does some other software need to be loaded for the progam to run? Does it work once then fail when you run it again? (Perhaps you aren't closing a connection to a file?) Does it fail on other people's machines or just yours?

  4. The problem is with the data. Are you randomly generating anything? That would explain the intermittent nature of the problem.

If you're still stuck, read some tips on debugging.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜