[Backgroundrb-devel] loading C extension in worker causes bus error on OS X only
masonhale at gmail.com
Mon Jan 29 17:03:01 EST 2007
I ran into this issue before:
This is apparently a bug in the way external libraries are loaded on Mac OS
X, in Ruby and other scripting languages. It has to do with the contents of
the argv array changing between the launch of the scripting environment and
the loading of the external module. It does not appear to be specific to
BackgroundRb or even Ruby. A search for "mac os x bus error" in google will
find reports of similar issues cropping up in the Perl and Python
I'm working around the issue by using the pure-ruby Postgres driver on Mac
OS. If you find a better solution, I'd very much appreciate a follow-up
message with a better workaround. It's useful to note that a similar issue
was reported in Rails when using script/console, but a work around was found
for that case.
On 1/29/07, Patrick Crosby <patrick at xblabs.com> wrote:
> In all likelihood, this doesn't have anything to do with backgroundrb,
> but I'm stuck so I thought someone might be able to help.
> I have a pretty simple C extension that I built into a gem and have
> installed on my system. It works fine when required from rails
> But when I have a Backgroundrb worker class use the extension (under
> os x), I get:
> [BUG] Bus Error
> ruby 1.8.4 (2005-12-24) [i686-darwin8.8.1]
> (That's the right version of ruby).
> I've tried all kinds of stuff. I installed a trace function, but it's
> crashing on the require statement.
> Trying to isolate the problem, even using irb, it gets a bus error (so
> definitely not backgroundrb's fault). I tried it on a linux server
> (through irb) and it worked fine.
> Anyone have any ideas?
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Backgroundrb-devel