[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-hackers
Subject: Re: changing MAKEOBJDIRPREFIX crashes buildworld with read-only src
From: BOUWSMA Beery <freebsd-user () netscum ! dyndns ! dk>
Date: 2001-12-29 2:40:35
[Download RAW message or body]
[replies sent directly to me may timeout and bounce, since I'm not
online as often as I should be, but I'll check the list archives]
I wrote to freebsd-bugs, but perhaps these observations are
better spewed here:
> I've got /usr/src mounted read-only, and I have a buildworld happening
> in /usr/obj, while I've decided to start building world somewhere
> else, like /usr/obj/4.4-STABLE
It isn't quite as simple as that -- /usr/src is a read-only nullfs
mount from /usr/local/system/src which itself is read-write.
It seems that when MAKEOBJDIRPREFIX is set somewhere other than
/usr/obj, the failed `make depend' below tries writing in read-only
/usr/src, and runs into the failure reproduced below as it tries
to do something there instead of where it should.
I could probably verify by making a simple ro mount of /usr,
without the nullfs mount, and seeing if this still fails. But
I'm lazy.
Note the error of the following command in passing (-stable)...
# umount -v -a -t union
-> umount: cd9660: unknown mount type
umount: unmount of /usr/src failed: Device busy
Take a look at the timestamps of `.' here...
Before the failed buildworld...
[02:13:13]root@dastardly .dk:~{508}# ls -ld /usr/src/games/fortune/strfile/
drwxr-xr-x 2 root wheel 512 Dec 22 05:39 /usr/src/games/fortune/strfile/
After buildworld bombs...
[...]
cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj/4.5-PRERELEASE/usr/src/i386 DESTDIR=/usr
/obj/4.5-PRERELEASE/usr/src/i386 INSTALL="sh /usr/src/tools/install.sh" MACHIN
E_ARCH=i386 TOOLS_PREFIX=/usr/obj/4.5-PRERELEASE/usr/src/i386 PATH=/usr/obj/4.
5-PRERELEASE/usr/src/i386/usr/sbin:/usr/obj/4.5-PRERELEASE/usr/src/i386/usr/bin:
/usr/obj/4.5-PRERELEASE/usr/src/i386/usr/games:/sbin:/bin:/usr/sbin:/usr/bin mak
e -f Makefile.inc1 -DBOOTSTRAPPING -DNOHTML -DNOINFO -DNOMAN -DNOPIC -DNOPROFIL
E -DNOSHARED bootstrap-tools
cd /usr/src/games/fortune/strfile; make obj; make depend; make all; make ins
tall
/usr/obj/4.5-PRERELEASE/usr/src/games/fortune/strfile created for /usr/src/games
/fortune/strfile
rm -f .depend
mkdep -f .depend -a strfile.c
/usr/bin/mkdep: cannot create _mkdep342: read-only file system
*** Error code 2
Stop in /usr/src/games/fortune/strfile.
[...]
Stop in /usr/src.
real 0m0.651s
user 0m0.131s
sys 0m0.111s
[02:15:03]root@dastardly .dk:/usr/src{515}#
[02:15:37]root@dastardly .dk:~{512}# ls -larT /usr/src/games/fortune/strfile/
total 23
-rw-r--r-- 1 root wheel 2813 Oct 2 14:33:37 1999 strfile.h
-rw-r--r-- 1 root wheel 11559 Jun 5 07:23:13 2001 strfile.c
-rw-r--r-- 1 root wheel 5062 Oct 31 21:38:20 2001 strfile.8
-rw-r--r-- 1 root wheel 260 Jun 5 07:23:13 2001 Makefile
drwxr-xr-x 7 root wheel 512 Dec 16 09:32:34 2001 ..
drwxr-xr-x 2 root wheel 512 Dec 29 02:15:03 2001 .
mounted filesystems...
[02:22:45]root@dastardly .dk:~{513}# mount | grep usr
/dev/ad0s4e on /usr (ufs, local, soft-updates)
/usr/local/system/src on /usr/src (null, local, read-only)
/dev/ad0s3g on /usr/obj (ufs, local, soft-updates)
head being scratched...
Ah, a test:
[02:15:03]root@dastardly .dk:/usr/src{515}# ls -larT
[...]
drwxr-xr-x 16 root wheel 512 Dec 23 20:41:07 2001 ..
drwxr-xr-x 21 root wheel 512 Dec 28 00:15:57 2001 .
[02:29:49]root@dastardly .dk:/usr/src{516}# touch foo
touch: foo: Read-only file system
[02:30:00]root@dastardly .dk:/usr/src{517}# ls -larT
[...]
drwxr-xr-x 21 root wheel 512 Dec 29 02:30:01 2001 .
[02:30:01]root@dastardly .dk:/usr/src{518}#
Wait, that looks like the directory timestamp changes because
of the `ls' on the nullfs-mounted filesystem. Can that be?
Let's try again, waiting a bit longer, and doing the `ls' on
the original r/w fs that is elsewhere... Yes...
drwxr-xr-x 21 root wheel 512 Dec 29 02:34:01 2001 .
[02:34:31]root@dastardly .dk:/usr/src{523}# touch foo
touch: foo: Read-only file system
[02:34:39]root@dastardly .dk:/usr/src{524}# ls -larT /usr/local/system/src/
[...]
drwxr-xr-x 21 root wheel 512 Dec 29 02:34:51 2001 .
[02:34:51]root@dastardly .dk:/usr/src{525}#
(If it's not clear, the prompt gives the time of completion of
the command immediately above, as is helpful for things like this)
This appears to be a problem with the nullfs mount, for a
traditional read-only filesystem works as expected:
[02:40:57]root@dastardly .dk:/usr/src{529}# touch /NetBSD/foo
touch: /NetBSD/foo: Read-only file system
[02:41:08]root@dastardly .dk:/usr/src{530}# ls -larT /NetBSD
[...]
drwxr-xr-x 19 root wheel 512 Dec 22 22:18:10 2001 .
[02:41:11]root@dastardly .dk:/usr/src{531}#
Curiouser and curiouser.
thanks
barry bouwsma
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic