I have finally tracked the mysterious freezes in apt-get on certain
non-intel platforms to some bizzar bug in libpthread. When APT is linked
to the pthread library it will get stuck in pthread functions doing nice
infinite loops on some specific hardware platforms. Several people have
reported this on sparc IPCs and one has reported it on a Mac m68k. I don't
have much details about the exact configurations of the machines.
Removing pthreads immediately cures all problems and APT works as it
should on these specific bits of hardware. This is odd because the apt-get
program doesn't actually use pthreads - pthread capability is in
libapt-pkg for use by one of the experimental GUIs.
My initial guess is that something about the specific CPU type is
confusing pthread. Pthread relies on a cpu atomic move and exchange or
test and exchange opcode - if this opcode isn't found it falls back to
something else. There is a good chance that this something else is buggy
If anyone knows much about this then it would be great to get it fixed -
maybe a simple program that excecises pthread functions would bring the
real problem to light - APT seems to just be unlucky :< Otherwise, let
this be a warning that pthread in certain rare situations simply does not
work and must not be linked to any programs.
Future APT releases will not be linked to pthreads. A pre-release [not yet
in CVS] is at http://faure.debian.org/~jgg/ please test if if you have had