[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hurd and UFS
From: |
Michael Teichgraeber |
Subject: |
Re: Hurd and UFS |
Date: |
06 Dec 2001 03:12:38 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
Roland McGrath <roland@gnu.org> writes:
> [...] As to the SIGLOST crash, that is kind of strange. That error
> is supposed to indicate that the RPC server appeared to die, in this
> case the storeio or filesystem.
Storeio keeps running, but ...
> First you can try "trap '' SIGLOST" to ignore the signal [...]
... `mkfs.ufs' tells me about a `(ipc/send) invalid destination port',
when SIGLOST is trapped.
I have looked into __libc_lseek(), which is called from rdfs() in
mkfs.c. The interesting part of this quite short function is the macro
HURD_DPORT_USE that expands to about 40 lines. In one of the first
lines a hurd_critical_section is being entered, then the program steps
into an `else' path with the following commands:
,-------------------------------------------------------------------
| ctty = _hurd_port_get (&__d->ctty, &__ctty_ulink );
| port = _hurd_port_locked_get (&__d->port, &__ulink); /* port.h */
|
| _hurd_critical_section_unlock (crit);
| __result = ((__io_seek (port, offset, whence, &offset)));
| _hurd_port_free (&__d-> port, &__ulink, port);
|
| if (ctty != MACH_PORT_NULL)
| _hurd_port_free (&__d-> ctty, &__ctty_ulink, ctty);
`-------------------------------------------------------------------
In __io_seek(), which is implemented in glibc/hurd/RPC_io_seek.c,
there's a __mach_msg() call, that returns EMACH_SEND_INVALID_DEST, if
mkfs.ufs is run as root, otherwise `success'; __io_seek() then returns
with this value, so that __result (above, in lseek.c) contains
EMACH_...
Finally hurd_dfail() will be called and the SIGLOST signal be raised.
The input of __mach_msg(), i.e. Mess.In, looks ok in both (root and
non-root) cases (local and remote port numbers differ slightly).
Maybe in _hurd_port_locked_get() something happens, that makes the
port invalid.
I don't know wheather this strange behaviour applies to other Hurd
systems too. My system contains Debian packages of: Hurd (Nov 5),
Gnumach (Oct 13) and glibc[-dbg]_2.2.4-3 (Oct 11).
Perhaps you could test whether `mkfs.ufs' fails for `root' on your
system too, with running
dd if=/dev/zero of=./testfs bs=1024 count=1024
mkfs.ufs --track=1 --sectors=63 ./testfs
Michael