[ic] Threaded perl (re: debian bug #203579)

Mike Heins mike at perusion.com
Sun Feb 27 00:38:59 EST 2005

Quoting Mike Heins (mike at perusion.com):
> Quoting Karl Schmidt (karl at xtronics.com):
> > 
> > >You can put this in your .bashrc for your interchange user:
> > >
> > >
> > >At that point, try it out. If it works for you, fine. 
> > 
> > How do I test for the problem?
> What problem? Again, the "problem" has manifested itself so many places in
> so many different ways, depending one which specific version of Perl, DBI,
> and DBD::* you use -- there is no "problem". At one point, you couldn't
> even start the Interchange server and get it to run pages. Then sometimes
> you would get problems after time passed. What is the current state? Beats
> me.

It occurs to me that maybe not everyone understands the type of problem
threading can cause.

Because threads involve sharing memory and variables within that memory
space, bugs in threads tend to cause random corruption of memory, usually
completely unrelated to the software running under it. Therefore they
are very, very difficult to track down, and indeed with large programs
often appear in different places each time you execute. This is why
a segmentation fault is the usual manifestation -- a pointer has been

It is like trying to track down a problem in a program that you are
reading off flaky media -- one sector might be bad one time and another
the next. There is no rhyme or reason to it from the perspective of the
application programmer.

It is quite possible for small or run-once programs to work fine
with threads because they have no variables that are repeatedly
referenced from a variety of scopes. A large persistent program
like Interchange is very demanding from that perspective and will 
exhibit faults when other programs seem to run flawlessly.

Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>

Nature, to be commanded, must be obeyed. -- Francis Bacon

More information about the interchange-users mailing list