[ic] interchange and thread enabled Perl

Mike Heins interchange-users@icdevgroup.org
Tue Apr 15 09:13:00 2003


Quoting Toni Mueller (support-ic@oeko.net):
> 
> Hello,
> 
> I just wanted to play with the latest interchange nightly, and got
> an error message from 'configure':
> 
> 	"Interchange will not work with a thread-enabled perl."
> 
> Tested with Interchange 4.9.7-200304140658 and perl 5.8.0-17 (on i386).
> 
> Digging in the mailing list archives revealed that there was a
> discussion about this around September last year, but there
> was little in the way of real reasoning and/or results explaining
> _why_ the problems occur, or where.
> Also, there seems to be no Perl 5.8.1, which was recommended
> to use, available...
> 
> I guess that thread enabled Perl will become more common in the
> near future.
> 
> Before grabbing the Perl source and rolling my own, what is the
> suggested course of action here?
> 
> A quick overview on the current state of affairs would be very nice.

Interchange doesn't use threads; but there are (as the authors of it
would readily admit) quite a few bugs in Perl's threads implementation.

It appears that Perl 5.8.0's ithread implementation is much better than
previous ones, which wouldn't even begin to run Interchange properly.
But it is not good enough to work well under all conditions. Randy
Moore of the core group discovered a case where vec() lost its map, and
I am positive there are many other little problems especially in
PreFork mode. Interchange pushes Perl pretty hard.

In fact, I wouldn't doubt that some of the locking problems people
are now having on Red Hat weren't due to this; I run some very
busy IC sites and don't see them at all.

Thus the new enforcement of the requirement. Before it was enforced
by the fact that noone distributed a Perl with threads enabled, and
the fact that Interchange wouldn't even start with threads enabled
should someone build such a Perl.

Red Hat distributed their perl for 8.0 and 9.0 with threads enabled,
which is *not* the default. This is an extremely bad decision; the
number of Perl scripts and programs which use threads must be far less
than one in 1,000, and anyone seriously using such a program must keep
up with the latest builds and modules to fight bugs.

It is another in a long line of bad Perl distributions by Red Hat. While
I like the Linux produced by my former employer and have been using it
exclusively for years, I abhor their Perl builds and when I install a new
system the first thing I do is build a new one.

In fact it sometimes seems as if the Python-heads there are trying to
sabotage Perl. I don't think that is the case; but there is no rational
reason to enable threads on Perl unless you are doing thread-based 
program development. I know of no such programs in the Red Hat
distribution; it would surprise me greatly if there are any.

Someone made the suggestion we try to make Interchange thread-safe and
actually use them. While this is a noble goal, it is simply not
practical. Leaving aside the work that would need be done on Interchange
itself, IC uses or can use dozens of other Perl modules, each of which
would need to be vetted. The types of problems caused by defects in
threadsafeness (sic) are also notoriously hard to debug.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

Clothes make the man.  Naked people have little or no influence on
society.  -- Mark Twain