Subject: Re: Problems with postfix on NetBSD 4 RC1
To: Michael van Elst <firstname.lastname@example.org>
From: Jan Danielsson <email@example.com>
Date: 09/16/2007 17:27:07
-----BEGIN PGP SIGNED MESSAGE-----
Michael van Elst wrote:
>> But this is actually pretty uninteresting. The *interesting* part is
>> that if I reboot, I'll probably be able to get the directory listing
>> when I've su:ed to pkgsrc and run "ls -l". Then, if I go out for a walk,
>> or if I use my normal user "jan" to startx, and browse around using
>> Firefox for a while, then "ls -l" with the su:ed pkgsrc user *won't* work.
> Ok. This is interesting and smells like a cache consistency problem.
Hmm.. I would think that would pretty likely cause file system
corruptions? I haven't seen any such issues (Ugh.. That I know of...).
IMHO, it feels like it fails when trying to enumerate
files/directories in a directory. It behaves just like if opendir(".")
returns a permission error in su:ed sessions. I could try to write an
application to test this theory. I can "cd" around, and run "pwd", and
"cat" files I know exist without any problems while the permission
problem is ruining my "ls" experience.
This is fun:
$ user info pkgsrc
$ ls -l
ls: .: Permission denied
$ ls -l u*
ls: u*: No such file or directory
$ cat update_pkgsrc
date > /var/log/pkgsrc.log
/usr/bin/nice -n 20 /usr/bin/cvs update -APd >> /var/log/pkgsrc.log 2>&1
date >> /var/log/pkgsrc.log
mount: getmntinfo: Permission denied
> I see that you don't use the GENERIC kernel. What did you change?
I commented out lots of drivers to hardware I don't have. Apart from
commenting out SCSI controllers, ethernet controllers, USB stuff, I have
done the following changes (based on GENERIC):
# Enable the hooks used for initializing the root memory-disk.
options MEMORY_DISK_IS_ROOT # force root on memory disk
options MEMORY_DISK_SERVER=0 # no userspace memory
options MEMORY_DISK_ROOT_SIZE=6000 # size of memory disk,
options MEMORY_RBFLAGS=0 # do not force
options SHMMAXPGS=65536 # 2048 pages is the default
#file-system EXT2FS # second extended file system (linux)
lm0 at isa? port 0x290 # other common ports: 0x280, 0x310
pseudo-device cgd 8 # cryptographic disk devices
pseudo-device pf # PF packet filter
pseudo-device pflog # PF log if
I may have missed something; but I'm pretty sure I haven't.
> Do you apply any tunings (sysctl)?
My /etc/sysctl.conf contains:
More importantly, my boot image uses the sysctl init.root to switch
from a root on a ramdisk to root cgd0a (on top of wd0a). (The use of
init.root is documented in the PR).
Apart from that, no changes have been made with regards to sysctl.
> How much memory does your system have?
2GB physical memory. I have no other instabilities, and the problems
occured when I switched to netbsd-4, so I doubt there's a hardware
problem (even though the flakyness of it suggests it is).
> The behaviour could be
> triggered by a memory shortage. Do you have swap configured?
Yes, I have 1GB swap, but I almost never use up my 2GB RAM. (I have
never done so on NetBSD 4). The swap space is reported in "top", so I
assume that it's activated properly.
> What filesystem do you use? I wouldn't trust LFS for this,
> especially under low memory conditions.
ffs on cgd.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)
-----END PGP SIGNATURE-----