Illegal instruction on FreeBSD 6.2 with Rails 2.0

I’m upgrading an existing application from Rails 1.2 to 2.0. After
deploying the new application to a production FreeBSD 6.2 server, I
can’t do anything without an illegal instruction trap (SIGILL). Even
a basic Model.find(:all) on a small table from script/console traps.
Googling points to a stack overflow as the likely culprit (too many
nested method calls).

The application works fine in development on another OS and no changes
were made that would explain a deeper call stack.

Has anyone deployed a Rails 2.0 application on FreeBSD 6.2? Has
anyone successfully upgraded a working application from 1.2 to 2.0?


Steve M. [email protected]
Light Year Software, LLC http://lightyearsoftware.com
ZingLists: Stay organized, and share lists online. http://zinglists.com

Steve M. wrote:

I’m upgrading an existing application from Rails 1.2 to 2.0. After
deploying the new application to a production FreeBSD 6.2 server, I
can’t do anything without an illegal instruction trap (SIGILL). Even
a basic Model.find(:all) on a small table from script/console traps.
Googling points to a stack overflow as the likely culprit (too many
nested method calls).

The application works fine in development on another OS and no changes
were made that would explain a deeper call stack.

Has anyone deployed a Rails 2.0 application on FreeBSD 6.2? Has
anyone successfully upgraded a working application from 1.2 to 2.0?

Might we see the entire model code?

James B. wrote:

Has anyone deployed a Rails 2.0 application on FreeBSD 6.2? Has
anyone successfully upgraded a working application from 1.2 to 2.0?

Just to reasure you, I’ve had rails 2.0 apps running for quite some time
on FreeBSD 6.2, 6.3 and 7.0 (32 and 64 bit) with no problem whatsoever.

We would need to see the code you suspect is wrong to know anymore. A
stack overflow might give this error, but an illegal instruction may
equally be a fault in a compiled library (or ruby itself). I assume you
built everything from ports and you have them all up to date?

Either that or you have a hardware problem. Faulty memory would
potentially give this error too. Running a memory checker (and HD check)
wouldn’t do any harm…

Cheers,
Gary.

On Apr 22, 2:37 am, Gary D. [email protected] wrote:

Just to reasure you, I’ve had rails 2.0 apps running for quite some time
on FreeBSD 6.2, 6.3 and 7.0 (32 and 64 bit) with no problem whatsoever.

Thanks for the reassurance that FreeBSD is fine. I took another look
at things and was able to fairly quickly find the problem. It was an
infinite recursion corner case, which I now have a regression test for
and have fixed. So it was a stack overflow and not a hardware issue.

Interestingly enough, while my production server is a less powerful
machine than my development machine, it fails far quicker. My
regression test will happily run for minutes, which is enough of a red
flag that I’ll notice something is not right. Too bad Test::Unit
doesn’t provide a “this block shouldn’t run for X seconds” assertion.


Steve M. [email protected]
Light Year Software, LLC http://lightyearsoftware.com
ZingLists: Stay organized, and share lists online. http://zinglists.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs