Do you actually need fastthread?

274 views
Skip to first unread message

gobigdave

unread,
Apr 6, 2009, 12:54:56 PM4/6/09
to Phusion Passenger Discussions
I had some problems installing Passenger on a couple of systems, and
the issues were all related to fastthread. Even after finally getting
things installed, I still ended up with other issues related to
fastthread that I didn't have before. FYI, these were on fully
functioning environments where I moved from Mongrel to Passenger. Pre-
Passenger, I had no fasthread issues. What happens now is that God.rb
will crash after about a day. Interestingly, it dies with a similar
error that prevented me from installing Passenger.

The error:
/usr/local/bin/ruby: symbol lookup error: /usr/local/lib/ruby/gems/1.8/
gems/fastthread-1.0.4/lib/fastthread.so: undefined symbol:
rb_thread_alive_p

This happens on multiple systems, and only after about a day for
normal execution.

What confuses me is that as far as I can tell fasthread isn't even
necessary anymore as long as you have Ruby > 1.8.5. I have:

ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux]

Does Passenger (2.1.3) really require it? If so, why? One more thing,
I had 0 issues related to Passenger or Fastthread with 2.1.2. It was
only when I installed 2.1.3 from scratch that I had a problem.

Essentially, if it isn't necessary anymore, I prefer to get rid of
anything that is causing me problems.

Hongli Lai

unread,
Apr 6, 2009, 3:24:51 PM4/6/09
to phusion-...@googlegroups.com

Yes, we use fastthread if the Ruby interpreter's version is < 1.9.
Fastthread actually is required for 1.8.6 because we found a few
threading bugs while developing Phusion Passenger, which were fixed by
loading fastthread.

I see that you're using fastthread 1.0.4. 1.0.4 was recently released
(like a month ago or so) and there's a bug in that version related to
rb_thread_alive_p, as shown in your output. The latest version of
fastthread is 1.0.6; you should upgrade.

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

Hongli Lai

unread,
Apr 6, 2009, 3:26:42 PM4/6/09
to phusion-...@googlegroups.com
On Mon, Apr 6, 2009 at 6:54 PM, gobigdave <gobi...@gmail.com> wrote:
> Does Passenger (2.1.3) really require it? If so, why? One more thing,
> I had 0 issues related to Passenger or Fastthread with 2.1.2. It was
> only when I installed 2.1.3 from scratch that I had a problem.

I think that at the time you installed 2.1.2, fastthread was still at
version 1.0.0 (it had been in 1.0.0 for a long time). Then 1.0.4 with
the bug was released, and then you installed Phusion Passenger 2.1.3
before fastthread 1.0.6 was released.

gobigdave

unread,
Apr 7, 2009, 10:43:18 AM4/7/09
to Phusion Passenger Discussions
This is the most likely scenario. I guess I was just lucky. I ended up
going back to fastthread 1.0.1 to prevent the runtime issue, but it
looks like I can upgrade again to 1.0.6.

On Apr 6, 3:26 pm, Hongli Lai <hon...@phusion.nl> wrote:
> On Mon, Apr 6, 2009 at 6:54 PM, gobigdave <gobigd...@gmail.com> wrote:
> > Does Passenger (2.1.3) really require it? If so, why? One more thing,
> > I had 0 issues related to Passenger or Fastthread with 2.1.2. It was
> > only when I installed 2.1.3 from scratch that I had a problem.
>
> I think that at the time you installed 2.1.2, fastthread was still at
> version 1.0.0 (it had been in 1.0.0 for a long time). Then 1.0.4 with
> the bug was released, and then you installed Phusion Passenger 2.1.3
> before fastthread 1.0.6 was released.
>
> --
> Phusion | The Computer Science Company
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl

gobigdave

unread,
Apr 8, 2009, 11:12:36 AM4/8/09
to Phusion Passenger Discussions
Nope, I'm still having the problem with fastthread 1.0.6. It's strange
how god.rb runs for about 24 hours before dying with:

/usr/local/bin/ruby: symbol lookup error: /usr/local/lib/ruby/gems/1.8/
gems/fastthread-1.0.6/lib/fastthread.so: undefined symbol:
rb_thread_alive_p

What is interesting is that it happened within 10 minutes on two
separate environments.

I guess I'm going back to 1.0.1 and seeing what happens. Either way,
fastthread has been causing way too many headaches since my upgrade to
Passenger.

Hongli Lai

unread,
Apr 8, 2009, 11:23:48 AM4/8/09
to Phusion Passenger Discussions
I've reported this problem to the fastthread author.

Hongli Lai

unread,
Apr 8, 2009, 1:43:00 PM4/8/09
to Phusion Passenger Discussions
gobigdave, are you sure that your Ruby version is 1.8.6-p0, and not
some kind of prerelease version? The problem that you're experiencing
is caused by your Ruby interpreter not having the function
rb_thread_alive_p, but upon inspecting 1.8.6-p0's source code, this
version should have this version.

gobigdave

unread,
Apr 8, 2009, 7:31:34 PM4/8/09
to Phusion Passenger Discussions
ruby -v # => ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux]

I installed ruby on three environments (CentOS 5) as follows:

wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz
tar xzvf ruby-1.8.6.tar.gz
cd ruby-1.8.6
./configure
make
make install

Anything else I can check to be sure?

Hongli Lai

unread,
Apr 9, 2009, 4:09:45 AM4/9/09
to phusion-...@googlegroups.com
On Thu, Apr 9, 2009 at 1:31 AM, gobigdave <gobi...@gmail.com> wrote:
>
> ruby -v # => ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux]
>
> I installed ruby on three environments (CentOS 5) as follows:
>
> wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz
> tar xzvf ruby-1.8.6.tar.gz
> cd ruby-1.8.6
> ./configure
> make
> make install
>
> Anything else I can check to be sure?

After some investigation, it turns out that in 1.8.6-p0 doesn't
publish rb_thread_alive_p to extensions, i.e. it's a static function.
After digging through the code history, it was revealed that
rb_thread_alive_p was made non-static since 1.8.6-p31.

Fastthread's author has just released version 1.0.7 which fixes this problem.

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl

gobigdave

unread,
Apr 9, 2009, 9:29:35 AM4/9/09
to Phusion Passenger Discussions
Thanks! I will try version 1.0.7.

On Apr 9, 4:09 am, Hongli Lai <hon...@phusion.nl> wrote:
> On Thu, Apr 9, 2009 at 1:31 AM, gobigdave <gobigd...@gmail.com> wrote:
>
> > ruby -v # => ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux]
>
> > I installed ruby on three environments (CentOS 5) as follows:
>
> > wgetftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz
> > tar xzvf ruby-1.8.6.tar.gz
> > cd ruby-1.8.6
> > ./configure
> > make
> > make install
>
> > Anything else I can check to be sure?
>
> After some investigation, it turns out that in 1.8.6-p0 doesn't
> publish rb_thread_alive_p to extensions, i.e. it's a static function.
> After digging through the code history, it was revealed that
> rb_thread_alive_p was made non-static since 1.8.6-p31.
>
> Fastthread's author has just released version 1.0.7 which fixes this problem.
>
> --
> Phusion | The Computer Science Company
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl
Reply all
Reply to author
Forward
0 new messages