On Jul 05 13:51:06, Otto Moerbeek wrote: > On Wed, Jul 04, 2012 at 09:00:27PM +0200, Jan Stary wrote: > > > On Jul 04 10:57:45, Otto Moerbeek wrote: > > > On Tue, Jul 03, 2012 at 07:06:37PM +0200, Jan Stary wrote: > > > > > > > > this is another problem. configure > > > > > swap to be double the RAM size, or if you insist on loading the > > > > > machine about 4 times the RAM size. you obviously forgot to or didn't > > > > > want to configure swap. > > > > > > > > is the "twice the RAM" mantra still valid today? > > > > > > No, that only makes sense for relatively small systems. The disklabel > > > auto allocation policy uses a max size if 2x physmem for physmem < > > > 256M. Otherwise it allocates a bit more than physical mem size. > > > > Well, this machine has 128M - does that mean that having 256M of swap > > would make my system generally better? > > Depends how much memory is actually used by the processes on it. If > you never will hit swap having it or not should not make a difference. >
I unloaded some of the work from the machine a few days ago, leaving just pf, named, dhcpd and postfix. I am pretty sure I am not hitting the (nonexistent) swap now. The segfaults have not appeared since. On Jul 05 14:50:02, Philip Guenther wrote: > On Tue, Jul 3, 2012 at 8:16 AM, Jan Stary <h...@stare.cz> wrote: > > This is 5.1-beta/i386 on an ALIX about five years old, > > running as my home server. > > > > Recently, processes started to die for reasons unknown, as in > > > > pid 20260 (postgres): user write of 118784@0x28052000 at 159088 failed: 14 > > pid 1872 (cron): user write of 118784@0x2b1e3000 at 30224 failed: 14 > > > > 14 is EFAULT as per sys/errno,h > > - what can be causing it? > > Having briefly looked at this, I suspect there are (at least) two > cases where that can occur: > 1) a race in the code that prevents writing to a file that is mapped > for execution, and > 2) system runs out of memory when trying to do copy-on-write; the > process is killed because of > that and then the coredump logic hits the missing page when trying > to write out the process's > memory and logs that failure. > > I think (1) is what sthen@ described; I think you're hitting (2). Yes, I believe that was the case. Thanks to all for the insight. Jan