NTP daemon and Y2K issues

1999-08-23 Thread John Saunders

I noticed that -stable is running xntpd 3.4e and possible -current is the
same (although I can't check at the moment). The following was sent to a
sysadmin mailing list (SAGE-AU).

--++
.     | John Saunders  - mailto:[EMAIL PROTECTED](EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 04-1822-3814  (Phone) |
   \_,--\_/   | NORTHLINK COMMUNICATIONS P/L - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++

Just when you thought it was safe ...

For those of you feeling quite happy running XNTP version 3.x, you might
want to upgrade to the latest NTP (currently 4.0.97) to be squeaky clean
with your Y2K team. There have been changes made to the source after the
AT&T Labs "Freeware Y2K Certification Project" had been at it.

>From the file NOTES.y2kfixes in the top level source directory:
1) Errors were found in improper use of tm_year within struct tm,
calculations that did not support year 2000 as a leap year (it truly is,
despite any unchanged comments remaining in the NTP source), and some
incorrect date calculations, while not traditional Y2K errors, would
break in the year 2000.

2) include/ntpd.h
Added some definitions and documentation about the right way of doing
things. Definitions used by most, if not all, of the Y2K repairs.

Not huge changes, but there probably will be a problem. For those that
just want to check the relevant files, you can check the online CVS
repository at http://maccarony.ntp.org/cgi-bin/cvsweb.cgi/ntp/

Please note that the SAGE-AU mirror only has XNTP 3.x, so you will need
to go further afield until NTP 4 is being mirrored.

John Warburton




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Automating filesystem check at boot time

1999-09-23 Thread John Saunders

I administer a number of remote FreeBSD boxes and starting with 3.x
they have been unreliable at rebooting. We all know FreeBSD wants to
keep running forever, however it seems to be at the expense of
reboot stability. I have found the following problems occuring.

1)  After a power failure the filesystem is inconsistent such that
a manual fsck is required. Actually this can also occur following
a crash or failed shutdown. However I must admit that FreeBSD does
this less than Linux, but it still does it.

2)  After running "shutdown -r now" FreeBSD will kill off all processes
but complain that is unable to kill everything. It then says Syncing
disks...done. Then hangs until the reset button is pressed. I think
that amd is causing this. The time this happened was following a
reboot to clear an amd problem when the NFS server was isolated from
from the network for some time.

My previous hacks at Linux has led me to the following patch to /etc/rc
which I have been using for a while on FreeBSD to solve point 1. It has
saved me a lot of driving on 2 occasions. The program "waitkey" is one
I wrote that sleeps for the specicifed and returns TRUE (0), unless a
key is pressed in which case it returns the ASCII code for the key.

+++ rc  Wed Aug 18 13:59:59 1999
@@ -69,6 +69,12 @@
;;
8)
echo "Automatic file system check failed... help!"
+   if waitkey 30; then
+   exit 1
+   fi
+   fsck -y
+   reboot
+   echo "reboot failed... help!"
exit 1
;;
12)

Anyway I am proposing a method where FreeBSD can be configured though an
rc.conf knob to be more friendly in an unattended situation. I propose
as a first step that a knob called "unattended_operation" be added with
a default value of "NO". Enabling this knob can be used to allow code
like the above to be executed. It can also be used to force the sysctl
variable "debug.debugger_on_panic" to 0 in the rc file.

I can also contribute the waitkey.c program. It may even be useful for
other stuff with some changes to the command syntax.

Does anybody have any strong opinions on this, either way? I have this
running on my machine at present so I'm not too fussed either way, just
thought it might be useful for other people as well. I can supply code
and patches, but I would like somebody with commit privs to look over
the code, make suggestions and eventually commit the work.

Cheers.
--+----+
. | John Saunders  - mailto:[EMAIL PROTECTED](EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 041-822-3814  (Phone) |
   \_,--\_/   | NORTHLINK COMMUNICATIONS P/L - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Automating filesystem check at boot time

1999-09-25 Thread John Saunders

Bill Fumerola <[EMAIL PROTECTED]> wrote:
> On Thu, 23 Sep 1999, Rodney W. Grimes wrote:
>
> > You need to find and fix what ever it is that is not dieing when being
> > told to die.  Your work around is a bandaid that only hides the real
> > problem, which is probably a bug some place in something.  amd and NFS
> > are good first conidates.  Just what process does it complain that it
> > is unable to kill, or does it just say could not kill?
>
> Vinum is usually the culprit for me, though I haven't built a world
> on most of these machines for a while, so this may be fixed.

I would have to agree with that. I had a machine with a vinum striped
volume and went back to ccd because a remote reboot had a 0% chance
of correctly rebooting. Needless to say my chances now are not 100%
but considerably higher than 0%.

--+----+
. | John Saunders  - mailto:[EMAIL PROTECTED](EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 04-1822-3814  (Phone) |
   \_,--\_/   | NORTHLINK COMMUNICATIONS P/L - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: System crash on "vinum start"

1999-09-28 Thread John Saunders

In freebsd-current you wrote:
>> Being in the hardware RAID business myself I cannot help asking: why do you
>> want to loose the hardware RAID in favor of a software solution? Flexibility
>> (just guessing) or price maybe?

> Because DPT has screwed this customer over for the last time...

I suspect that back porting the ida (Compaq SMART RAID) driver from
-current to 3.x would be both quicker and cheaper that the software
development you propose. At least that way you don't have to deal
with DPT.

Any software additions to support hot swap and auto-rebuild would need
to interoperate with vinum. From my understanding, vinum will survive
a failed disk and continue to run. However no mechanism is yet available
to automatically rebuild a new disk.

--+----+
    . | John Saunders  - mailto:[EMAIL PROTECTED](EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 04-1822-3814  (Phone) |
   \_,--\_/   | NORTHLINK COMMUNICATIONS P/L - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: ESS1869 logical ID

1999-09-28 Thread John Saunders

> 
> unknown0:  on isa0
> pcm0:  at port 0x220-0x22f,0x388-0x38b,0x330-0x331 irq 5 drq 1,0 on isa0
> unknown1:  at port 0x201 on isa0
> unknown2:  at port 0x168-0x16f,0x36e-0x36f irq 
>9 on isa0
> 

Interestingly, that last device "unknown2:" looks to be an IDE interface
for a CDROM drive. Any plans, ideas, thoughts on the PnP system assigning
the ATA driver to this device?

The middle device could possibly be a game port, although the port looks
strange as game ports are normally port 0x200.

--+----+
. | John Saunders  - mailto:[EMAIL PROTECTED](EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 04-1822-3814  (Phone) |
   \_,--\_/   | NORTHLINK COMMUNICATIONS P/L - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: PATCH for testing

1999-11-16 Thread John Saunders

> >And, also, we need to get rid of the 'e' option to ps entirely.  It's a
> >major security hole.
> 
>I agree that we need to get rid of 'e' and any other options that allow
> reading another process's environment.

How about protecting the -e option by a test for setuid() == 0 instead
of removing it entirely. That would remove the security concern, but
still retain the function for root. Removing the function for root is
useless from a security point of view, as anybody with root access
can simply compile an alternative version of ps(1) with -e back in it.

Cheers.
--   
+----+
. | John Saunders  - mailto:[EMAIL PROTECTED]   
(EMail) |
,--_|\|- http://www.nlc.net.au/ 
(WWW) |
   /  Oz  \   |- 02-9489-4932 or 04-1822-3814 
(Phone) |
   \_,--\_/   | NORTHLINK COMMUNICATIONS P/L - Supplying a
professional,   |
 v| and above all friendly, internet connection
service.   |
 
++


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Latest kernel quirks

1999-11-25 Thread John Saunders

I have just cvsupped and built the latest -current kernel and have noticed
a new quirk plus an old quirk or 2. uname -a output is:

FreeBSD  4.0-CURRENT FreeBSD 4.0-CURRENT #0: Fri Nov 26 02:06:45 EST
1999 [EMAIL PROTECTED]:/usr/src/sys/compile/PACER  i386

1) CMOS clock problem, dmesg output:

  "Invalid time in real time clock.
  Check and reset the date immediately!"

   The system goes to Jan 27 1999 until ntpdate kicks in and fixes it.
   However each time I boot the time is bad again. This could be a
   hardware glitch although it was perfectly timed to start happening
   just as I booted into a newly built kernel...very suspicious.

2) ISA unexpected tag problem, dmesg output:

  "pci0: unknown card (vendor=0x121a, dev=0x0001) at 11.0"
  "isa0: unexpected tag 14"

The PCI device is a Diamond Monster 3D (3Dfx Voodoo 1). I don't know
if there is a relationship or if it is pue chance that they are
located next to each other. This has been long standing and is not
a recent gremlin, it doesn't seem to affect anything.

3) The new ATA drivers have a display formatting bug that results in the
   following output if a CDROM doesn't doesn't supply speed info:

  ", 512KB buffer, PIO"

   Patch is attached with MIME to save tabs and formatting. I think I
   sent this to Soren a while ago, although the latest commits from him
   didn't fix the problem. Maybe they got lost, as he was very responsive
   to a previous patch.

4) My Pioneer DVD drive causes the following:

  "atapi: MODE_SENSE_BIG - UNIT ATTENTION skey=6 asc=29 ascq=00 error=00
  acd0:  CDROM drive at
ata1 as slave"

   Is the MODE_SENSE_BIG a problem report or a diagnostic output.

Thanks.
--+----+
. | John Saunders  - mailto:[EMAIL PROTECTED](EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 041-822-3814  (Phone) |
   \_,--\_/   | NORTHLINK COMMUNICATIONS P/L - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++


 atapi-cd.patch


gcc 2.95.2 breaks imake

1999-11-28 Thread John Saunders

I have just noticed that the new gcc breaks imake because
/usr/libexec/cpp doesn't define __FreeBSD__. What is the plan to
fix everything in this area? The 2 options I can see is to revert
the behaviour of cpp, or find everything that uses cpp and change
them to use cc -E.

My current "fix" involes #define'ing __FreeBSD_ in imake's file.

--+----+
. | John Saunders  - mailto:[EMAIL PROTECTED](EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 041-822-3814  (Phone) |
   \_,--\_/   | NORTHLINK COMMUNICATIONS P/L - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Booting -current with new loader

1999-01-19 Thread John Saunders
Hi,

I have had no success in booting -current with the new loader. I can boot
the kernel directly by entering 1:wd(2,a)/kernel at the boot prompt. 
However if I enter either 1:wd(1,a)/boot/loader (the default) or
1:wd(2,a)/boot/loader I get the loader started but the kernel won't boot. 
The the second case commands like source and ls don't work unless I set
currdev=disk2s1a: and then it works. I have tried setting rootdev to lots
of things but the kernel _always_ tried to mount wd1s1a as the root
filesystem. It seems to ignore the rootdev flag. The kernel has been built
with "config kernel root on wd2" but even this is ignored. 

The only solution I have is bypass the loader all-together, but I really
wanted a splash screen :( Or possibly use config to make my second disk
appear as wd1 instead of wd2 (not tried yet because I consider it an ugly
hack). 

Cheers.
--+----+
    . | John Saunders  - mailto:j...@nlc.net.au(EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 041-822-3814  (Phone) |
   \_,--\_/   | NHJ NORTHLINK COMMUNICATIONS - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message


Re: Booting -current with new loader

1999-01-19 Thread John Saunders
On Wed, 20 Jan 1999, Daniel C. Sobral wrote:

> John Saunders wrote:
> > I have had no success in booting -current with the new loader. I can boot
> > the kernel directly by entering 1:wd(2,a)/kernel at the boot prompt.
> > However if I enter either 1:wd(1,a)/boot/loader (the default) or
> > 1:wd(2,a)/boot/loader I get the loader started but the kernel won't boot.
> > The the second case commands like source and ls don't work unless I set
> > currdev=disk2s1a: and then it works. I have tried setting rootdev to lots
> > of things but the kernel _always_ tried to mount wd1s1a as the root
> > filesystem. It seems to ignore the rootdev flag. The kernel has been built
> > with "config kernel root on wd2" but even this is ignored.
> 
> You failed to mention your disk configuration...

Opps, 2 drives, both as IDE master, one on primary and one on secondary.
Also a CDROM as secondary slave. Also to make matters worse 2 SCSI drives.
The complete mapping is...
BIOS number FreeBSD name
0x80wd0
0x81wd2
0x82da0
0x83da1
For the moment I am not trying to do anything with the SCSI drives,
although da1 has a FreeBSD slice. Both wd0 and da0 re FAT32 Winblows.

New information...

I have been able to get the kernel into single user mode, where mount /
barfs about not being able to mount /dev/wd2s1a on / because the
filesystem is different. However an ls shows it _did_ get the right one,
it just thinks it's wrong. Also curiously the normal boot-time message
"changing root device to wd2s1a" doesn't appear. I can get this far using
2 methods...

Booting using 1:wd(1,a)/boot/loader
Then at the loader type
load kernel
set currdev=disk3s1a:
boot
With this both currdev and loaddev are initially set to disk2s1a:

Or boot using 1:wd(2,a)/boot/loader
Then at the loader type
set currdev=disk2s1a:
load kernel
set currdev=disk3s1a:
boot
With this both currdev and loaddev are initially set to disk3s1a: The
loader is also unable to access files (ls, source, help, load, etc) until
I set currdev to disk2s1a:

It seems that I need currdev=disk2s1a: so that the loader can load files,
and I need currdev=disk3s1a: so that the kernel will mount root. Two
conflicting requirements.

I'm off now to play now with rootdev and boot_askname.

Cheers.
--++
. | John Saunders  - mailto:j...@nlc.net.au(EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 041-822-3814  (Phone) |
   \_,--\_/   | NHJ NORTHLINK COMMUNICATIONS - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message


Re: Booting -current with new loader

1999-01-19 Thread John Saunders
I wrote:
> I'm off now to play now with rootdev and boot_askname.

Well, if I let the standard boot process occur, then I stop the loader and
set rootdev=disk3s1a: I can get the kernel running in single user mode
but mount refuses to remount / as rw. It's curious that the message about
changing the root device doesn't occur, time for debug output in the
kernel.

BTW boot_askname doesn't :-) I read some comments in the kernel source
to the effect "maybe we should prompt for a boot device here" so I
didn't expect it to work.

The next option is configuring my master drive on the secondary interface
as wd1 instead of wd2.

I'm not sure about anybody else here, but to my mind a "Winblows on C:
drive and let's try out FreeBSD on the second disk" configuration should
really be supported seamlessly. The option of putting the second drive
as slave on the primary interface would work, however anybody that knows
anything about IDE (read somebdy interested in trying FreeBSD) would put
it on the second interface for speed reasons.

Cheers.
--+----+
. | John Saunders  - mailto:j...@nlc.net.au(EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 041-822-3814  (Phone) |
   \_,--\_/   | NHJ NORTHLINK COMMUNICATIONS - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++

To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message


Re: Booting -current with new loader

1999-01-20 Thread John Saunders
> The next option is configuring my master drive on the secondary interface
> as wd1 instead of wd2.

This works fine. I guess the real solution is to make the IDE disk scan
the same as we do for SCSI, which also happens to be the same as the
BIOS does. We possible need a config syntax like

controler wdc0 ...
controler wdc1 ...
devicewd? ay wdc?

This will automatically assign numbers to drives as it finds them.
Actually I tried this syntax which config accepted OK, however no
drives got detected.

Anyway for me at least a kernel config file tweak got me booting with
spash screens. If you want my system to be a test bed for any mods,
please let me know.

Cheers.
--++
. | John Saunders  - mailto:j...@nlc.net.au(EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 041-822-3814  (Phone) |
   \_,--\_/   | NHJ NORTHLINK COMMUNICATIONS - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++

To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message


Re: Booting -current with new loader

1999-01-20 Thread John Saunders
On Wed, 20 Jan 1999, Mike Smith wrote:

> > The option of putting the second drive
> > as slave on the primary interface would work, however anybody that knows
> > anything about IDE (read somebdy interested in trying FreeBSD) would put
> > it on the second interface for speed reasons.
> 
> Er, you want to stop and think about that for a second?  If you have 
> Windows on one disk and FreeBSD on the other, where is the opportiunity 
> for drive conflicts (the source of performance loss)?

In the context of one disk totally Windows and the other totally FreeBSD
then yes you are correct. However I have a 1 Gig partition at the end of
both disks that I have a CCD mirror on. Read performance won't suffer by
moving the drive but write performance halves. Actually I have intended to
modify CCD so that is distributes reads over all devices in the mirror, I
noticed that it simply hammers the first drive. I'm not sure if core would
be interested in such a patch since I think vinum is taking over.

That's why I shy away from moving my hardware around. Also I would have to
break out the screw driver, when all I need is some finger work.

> > I'm not sure about anybody else here, but to my mind a "Winblows on C:
> > drive and let's try out FreeBSD on the second disk" configuration should
> > really be supported seamlessly. 
> 
> You're more than welcome to propose a technical solution that solves 
> the problem.

OK, the technical solution that I propose is an alternative (optional
because I want to retain the current semantics) config semantics. 

controller  wdc0at isa? port "IO_WD1" bio irq 14 flags 0xa0ffa0ff
controller  wdc1at isa? port "IO_WD2" bio irq 15 flags 0xa0ffa0ff
diskwd? at wdc?

This would act identical to the way the SCSI system works by assigning
names to disks as they get probed. It would also have the advantage of
assigning disk names in the same order as the BIOS (and thereby the boot
loader), hence there would be a 1 to 1 mapping between what the boot
loader uses and what the FreeBSD kernel detects. 

I believe the current problem stems from the BIOS (and thereby the boot
loader) and the FreeBSD kernel assigning names using a different algorithm
and then getting out of step when the kernel skips a name.

If anybody knows how to do this quickly then I am happy to help test it. 

Cheers.
--++
. | John Saunders  - mailto:j...@nlc.net.au(EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 041-822-3814  (Phone) |
   \_,--\_/   | NHJ NORTHLINK COMMUNICATIONS - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message


Re: btokup().. patch to STYLE(9) (fwd)

1999-02-01 Thread John Saunders
In nlc.lists.freebsd-current you wrote:
> At 12:09 PM 2/1/99 +1100, Gregory Bond wrote:
>>> "You are not supposed to understand this."

"You are not expected to understand this."

>>It was (IIRC) the process switching magic at the heart of fork() in V7 (and
>>earlier, I assume).

> If I remember right, it referred to the non-local goto juju where if the
> forked processed was swapped out, the label jumped was changed to yet
> another place.  Unfortunately, my annotated V6 listing is not accessible
> right now...

It's inside the swtch() function call. Just having a quick look now.

Inside expand(), where core is allocated for a process, if no core is
available the process is swapped out with a call to xswap(), then
switched out with a call to swtch(). When core becomes available and
the process image is read in from swap, the process will be selected
by swtch() to become runnable. However with the current context, swtch()
would return and the tail end of the expand() function would execute.
So inside expand() a call is made to save the stack state so that when
swtch() restores this state, the return skips over the expand() function
entirely.

Cheers.
--+----+
. | John Saunders  - mailto:j...@nlc.net.au(EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 041-822-3814  (Phone) |
   \_,--\_/   | NHJ NORTHLINK COMMUNICATIONS - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++

To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message


Re: swapper BIG problems

1999-02-04 Thread John Saunders
In nlc.lists.freebsd-current you wrote:
> It succeeds as per allocating the memory until the swap is full. But, when

Malloc's don't cause swap space allocation. Theoretically a process can
malloc all of it's virtual address space so long as it doesn't touch
the pages.

> it starts the reading/freeing, the swapins cause hundreds of
> swap_pager_getswapspace: failed   
>   
Once you actually start touching the pages does swap space (or real
memory) get allocated. However by now you have malloc'ed more data
than exists in physical swap space, and the swapper can't do anything
about it except throw away your dirty pages without saving them.

> This will put the system in a deadlock if, for instance, this program is run
> in an xterm and an X server is running locally, and it's too swapped out to
> be used, but the memory program displays things to the term (catch-22).

This is a problem. Possibly the print commands should be rate limited.
If they go to the console how do they end up in an xterm? Possibly your
syslog.conf, or you run xconsole.

Cheers.
--+----+
. | John Saunders  - mailto:j...@nlc.net.au(EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 041-822-3814  (Phone) |
   \_,--\_/   | NHJ NORTHLINK COMMUNICATIONS - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++

To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message


Re: swapper BIG problems

1999-02-05 Thread John Saunders
In nlc.lists.freebsd-current you wrote:
> If you looked at the "prgram" (term used loosely) it touches every bit of
> memory it allocates.

I seemed to have overlooked the bit where you wrote deadbeef. I took a
closer look.

What I think is happening is that as the blocks are allocated and then
touched, physical RAM is allocated. As you continue the oldest touched
blocks get allocated to swap to make RAM available for touching new pages.
You will reach a stage where you fill all of swap _and_ all of the free
RAM pages.

It's very likely that some part of your code hasn't been paged into RAM
yet. But when it does need to there are no free RAM pages. When the
swapper tries to make some free RAM pages by swapping out, guess what no
swap available.

> The pages were already touched and in swap. After each page was read in by
> the pager, the printf() tried to malloc but generated the error (as it seems
> to me).

Maybe not tried to malloc, but simply for the shared library or some part
of your code to be paged in for execution.

This is a hard problem to fix reliably. However try limiting the max
memory size (ulimit -m xxx). I believe this should limit the resident
set size (RSS) for the process, therefore it will fail to allocate more
memory before all of available RAM is allocated.

Cheers.
--+----+
. | John Saunders  - mailto:j...@nlc.net.au(EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 041-822-3814  (Phone) |
   \_,--\_/   | NHJ NORTHLINK COMMUNICATIONS - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++

To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message


Re: Silo overflow messages with 3.0 Release

1999-02-07 Thread John Saunders
Try the following patch. Look for a line in /sys/i386/isa/sio.c that
looks like:

com->fifo_image = t->c_ospeed <= 4800
? FIFO_ENABLE : FIFO_ENABLE | FIFO_RX_HIGH;

Replace FIFO_RX_HIGH with FIFO_RX_MEDH, and if that doesn't work try
FIFO_RX_MEDL instead.

This patch changes the RX FIFO trigger point from 12 down to 8 (or 4).
With it set to 12 the system only has 4 character periods to respond
to the IRQ. Normally a Pentium or higher should be able to handle
this, however things like SMP or non-DMA mode for your harddisk may
hold off interrupts for longer than normal. With it set to 8 there is
twice as long to process the IRQ before an overflow occurs.

Actually the sio driver should really detect silo overflows and drop
the FIFO level a notch automatically. Hmm, if I have some free time
I might look into it.

The bad side is that this patch increases the IRQ load on the box.
Although for a Pentium the serial processing load is a fraction of
a percent so double that is still negligable.

Cheers.

In nlc.lists.freebsd-current you wrote:
> I didn't get a response from the questions list, so let's try here.

> I've been getting my server ready to switch from FreeBSD 2.2.2 to 3.0
> Release.  Everything was going well until I tried to bring my kernel ppp
> link up to my isp.  I get many silo overflow messages when there's any
> activity on the line.  The connection doesn't seem very responsive either.  
> This machine is a dual pentium pro.  I've built an smp kernel which seems
> to work fine otherwise.  I've arranged to build the new system on another
> disk so I can easily switch between the 2.2.2 system and the 3.0 system.  
> Everything works fine with 2.2.2.  I've seen many messages in the archive
> about silo overflows, but there doesn't seem to be a real solution in
> them.  Is this ever likely to work or should I just wait for 3.1?

> Steve Rose




> To Unsubscribe: send mail to majord...@freebsd.org
> with "unsubscribe freebsd-current" in the body of the message

-- 
--++
. | John Saunders  - mailto:j...@nlc.net.au(EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 041-822-3814  (Phone) |
   \_,--\_/   | NHJ NORTHLINK COMMUNICATIONS - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++

To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message


Newconfig has silenced smb support

1999-05-05 Thread John Saunders
In a recent cvsup I got the newconfig updates. These are generally
working well and have solved a number of "inelegancies" in my setup.

However since this update the kernel isn't recognising the SMB device.
I have tried things like adding "at pci?" to the end of the controller
config lines to no available. I've got an Intel chipset MB so I'm
using the Intel SMB controller.

Can somebody point me to the correct config to make it come back?

P.S. My old config used to have an "device ed0 at isa? disable port
blah blah" config line so my PCI ethernet card would work. I've now
changed this to "device ed0 at pci?" and it works like a charm.

Cheers.
--+----+
. | John Saunders  - mailto:j...@nlc.net.au(EMail) |
,--_|\|- http://www.nlc.net.au/  (WWW) |
   /  Oz  \   |- 02-9489-4932 or 041-822-3814  (Phone) |
   \_,--\_/   | NORTHLINK COMMUNICATIONS P/L - Supplying a professional,   |
 v| and above all friendly, internet connection service.   |
  ++




To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message