bug in/triggered by rename() (was :Re: dpkg-source -x *****s system
On Wed, Feb 10, 1999 at 09:48:06PM +0000, M.C. Vernon wrote:
> When running debian-source -x on ud (a small package), it gets as
> far as unpacking ud-fooo in ud-0.7.1/, and then hangs. If I ^c or ^z it,
> then I get bash back again, but cd .. or ls, or anything like that will
> hang......
What Matthew is experiencing here is what Roland explained to me in these
words (you may skip this):
"Is it really many ^Cs that's required, or just ^C and then wait one second?
The behavior of ^C does nothing for one or two seconds, and then kills the
program, is "normal lossage". That means that the process is blocked in an
RPC to some server (probably a filesystem) that is failing to respond, and
even failing to respond to the interrupt_operation request generated when
you hit ^C. The signal code in libc gives the server one second (or maybe
its two) to respond gracefully to the interrupt_operation, and if the
server doesn't respond in time, then it just drops the pending RPC on the
floor."
But it is indeed that you have to type multiple ^C, maybe there are multiple
levels of this happening or so... however, I chased this one down:
After using my preferred debuggung strategy (print Beatles songs word by
word on STDERR), I noticed that the perl script dpkg-source hangs on a
rename() command. Further testing showed that this bug is triggered by this
simple C command:
#include <unistd.h>
int main (int argc, char argv[])
{
return rename("testdir", "testdir");
}
You need a (empty) directory "testdir" in the current directory of course.
This made me look at glibc, sysdeps/mach/hurd/rename.c, which in turn (I
assume) calls libdiskfs/dir-rename.c, I assume the error is there
(I tried to understand what's happening there, but I did only grasp parts
of it, so you have to check yourself, sorry, no patch this time).
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org finger brinkmd@
Marcus Brinkmann GNU http://www.gnu.org master.debian.org
Marcus.Brinkmann@ruhr-uni-bochum.de for public PGP Key
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/ PGP Key ID 36E7CD09
Reply to: