Re: Mbuf Clusters on 4.8

2003-06-26 Thread Greg Panula
John Bdckstrand wrote:
 
 Ive been googling quite a bit now for problems with
 running out of mbuf
 clusters. Im basically sending a 30k datachunk down
 1000-4000 connections,
 but 1000 is more than enough to quickly fill upp 8192
 mbuf clusters. I also
 tried setting maximum amount of mbuf clusters to 65536,
 but that only made
 the box hard-wire 86MB of 96MB RAM, making it just as
 unsuable as a dead
 machine.

It isn't the amount data you are sending but the overhead required for
each network connection.

I would recommend adding more RAM.  Bump it up to 256MB.  With mbuf set
at 65536 and using 86MB, you should still have plenty left for your
application.

If that doesn't solve your problem or you can't add more memory, then
you'll want to look at controling the number of simultaneous connections
to a number that your box can handle.

 
 Of course, when the machine runs out of mbuf clusters,
 it dies. I also found
 this with google:
 
 Finally, the fact that FreeBSD 3.x panics when it runs
 out of
 mbuf clusters is a well-known problem.  The solution is
 to not
 let it run out of mbuf clusters by configuring a
 sufficient
 number for them.
 
 From this it sounds as it is a problem that should be
 fixed, but it
 obviously isnt in 4.8. Is this behaviour now considered
 acceptable? And if
 so, doesnt this make FreeBSD extremely easy to kill
 using a simple
 DOS-attack? Is this fixed in any way on 5.1?

Yup, that is what DoS attack is... exhaustion of one or more resources
of the victim.

P2P software is an easy way to exhaust mbuf buffers on a box.  P2P
software(e.g. edonkey) can be a useful network stress tool; opens lots
of connections and pushes a lot of data.  My experience with mbuf
exhaustion on a 4-stable boxes has been the box basically loses network
connectivty until it can recover some buffers.  The box is still
responsive from the console and killing the offending application from
the console will free up the mbufs and restore network connectivity.

good luck,
  greg
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mbuf Clusters on 4.8

2003-06-26 Thread John Bäckstrand
 On Thu, Jun 26, 2003 at 03:03:20AM +0200, John
B?ckstrand wrote:
  Ive been googling quite a bit now for problems with
  running out of mbuf
  clusters. Im basically sending a 30k datachunk down
  1000-4000 connections,
  but 1000 is more than enough to quickly fill upp
8192
  mbuf clusters. I also
  tried setting maximum amount of mbuf clusters to
65536,
  but that only made
  the box hard-wire 86MB of 96MB RAM, making it just
as
  unsuable as a dead
  machine.
 
  Of course, when the machine runs out of mbuf
clusters,
  it dies. I also found
  this with google:
 
  Finally, the fact that FreeBSD 3.x panics when it
runs
  out of
  mbuf clusters is a well-known problem.  The
solution is
  to not
  let it run out of mbuf clusters by configuring a
  sufficient
  number for them.
 
  From this it sounds as it is a problem that should
be
  fixed, but it
  obviously isnt in 4.8. Is this behaviour now
considered
  acceptable? And if
  so, doesnt this make FreeBSD extremely easy to kill
  using a simple
  DOS-attack? Is this fixed in any way on 5.1?
 
  ---
  John B?ckstrand

   It's not panicking, it's running out of resources.
Whenever you have
   this sort of problem you need to provide more
information, there is
   absolutely no way I can help you like this.  You
need to, at the very
   minimum, give us 'netstat -m' output and make a
serious attempt at
   figuring out what is consuming so many clusters.
You could be running
   out of clusters but you could also be running out
of memory before you
   run out of clusters, in which case you should
probably _not_ increase
   nmbclusters and instead fix the underlying problem
instead (re-work
   your application).  In such a scenario, blindly
bumping up nmbclusters
   can make the problem worse.  Even if you had
'unlimited' (or
   dynamically growing) nmbclusters, you'd _still_
have the same problem
   and, what's more, it could actually render your
system even more
   unusable as the machine would not be able to
allocate memory for
   other more important uses.

Yes, you are right, I didnt get a panick. Firstly,
heres is /var/log/messages from when the box hung:

Jun 26 02:29:30 sandbsd /kernel: All mbuf clusters
exhausted, please see tuning(7).
Jun 26 02:29:35 sandbsd last message repeated 4 times
Jun 26 02:29:35 sandbsd /kernel: rl0: watchdog timeout
Jun 26 02:29:36 sandbsd /kernel: All mbuf clusters
exhausted, please see tuning(7).
Jun 26 02:29:56 sandbsd last message repeated 17 times
Jun 26 02:29:57 sandbsd /kernel: rl0: watchdog timeout

I cant give netstat -m after it hung, obviously, but
with 8192 max mbuf clusters I can see some time before
the hang that peak is at 8192 clusters, I also saw lots
of requests for memory denied, and requests for memory
delayed, but no calls to drain routines. I also saw
about 20MB allocated to network (60% of mb_map). This
was the last time I tried hanging it, and I somehow
thought it mas managing. After all, denying requests
means it did actually cope with a memory starvation.
The NIC is a realtek 8139. I wonder what significance
those watchdog timeout messages have? I might try with
a 3com later today (any card which doesnt require mbufs
should be finer, if there is any such thing).

---
John Bäckstrand

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mbuf Clusters on 4.8

2003-06-26 Thread John Bäckstrand
  From this it sounds as it is a problem that should
be
  fixed, but it
  obviously isnt in 4.8. Is this behaviour now
considered
  acceptable? And if
  so, doesnt this make FreeBSD extremely easy to kill
  using a simple
  DOS-attack? Is this fixed in any way on 5.1?

 Yup, that is what DoS attack is... exhaustion of one
or more resources
 of the victim.

 P2P software is an easy way to exhaust mbuf buffers
on a box.  P2P
 software(e.g. edonkey) can be a useful network stress
tool; opens lots
 of connections and pushes a lot of data.  My
experience with mbuf
 exhaustion on a 4-stable boxes has been the box
basically loses network
 connectivty until it can recover some buffers.  The
box is still
 responsive from the console and killing the offending
application from
 the console will free up the mbufs and restore
network connectivity.

Ah, unfortunately my box doesnt respond even to
keyboard events (caps lock etc). The behaviour you
describe I find totally acceptable on the other hand.
And the software Im writing happens to be p2p-related,
but its not a edonkey server. :)

---
John Bäckstrand

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Is there something sppecial about pass4 ?

2003-06-26 Thread Pete French
Machine is 4.8-STABLE

smaug# camcontrol devlist
COMPAQ BD009122BA 3B07   at scbus0 target 0 lun 0 (pass0,da0)
COMPAQ BD009122C6 B016   at scbus0 target 1 lun 0 (pass1,da1)
COMPAQ BD009122BA 3B07   at scbus0 target 2 lun 0 (pass2,da2)
COMPAQ BD00962373 BCJE   at scbus0 target 3 lun 0 (pass3,da3)
IBM IC35L018UCPR15-0 S70Hat scbus0 target 5 lun 0 (pass4,da4)

smaug# ls -l /dev/pass*
crw---  1 root  operator   31,   0 Jun 26 15:54 /dev/pass0
crw---  1 root  operator   31,   1 Jun 26 15:54 /dev/pass1
crw---  1 root  operator   31,   2 Jun 26 15:54 /dev/pass2
crw---  1 root  operator   31,   3 Jun 26 15:54 /dev/pass3

No pass4. I cant make pass4 with MAKEDEV either - plus I note that
in the MAKEDEV scrip then 'all' explicitly does 'sh MAKEDEV pass4 xpt2'

using mknod by hand seems to work - but I cant see why MAKEDEV wont do it.

-pcf.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Is there something sppecial about pass4 ?

2003-06-26 Thread Kenneth D. Merry
On Thu, Jun 26, 2003 at 15:59:33 +0100, Pete French wrote:
 Machine is 4.8-STABLE
 
 smaug# camcontrol devlist
 COMPAQ BD009122BA 3B07   at scbus0 target 0 lun 0 (pass0,da0)
 COMPAQ BD009122C6 B016   at scbus0 target 1 lun 0 (pass1,da1)
 COMPAQ BD009122BA 3B07   at scbus0 target 2 lun 0 (pass2,da2)
 COMPAQ BD00962373 BCJE   at scbus0 target 3 lun 0 (pass3,da3)
 IBM IC35L018UCPR15-0 S70Hat scbus0 target 5 lun 0 (pass4,da4)
 
 smaug# ls -l /dev/pass*
 crw---  1 root  operator   31,   0 Jun 26 15:54 /dev/pass0
 crw---  1 root  operator   31,   1 Jun 26 15:54 /dev/pass1
 crw---  1 root  operator   31,   2 Jun 26 15:54 /dev/pass2
 crw---  1 root  operator   31,   3 Jun 26 15:54 /dev/pass3
 
 No pass4. I cant make pass4 with MAKEDEV either - plus I note that
 in the MAKEDEV scrip then 'all' explicitly does 'sh MAKEDEV pass4 xpt2'
 
 using mknod by hand seems to work - but I cant see why MAKEDEV wont do it.

The number for the passthrough device is actually how many to make.  So
when you do a MAKEDEV pass4, you get pass0-3.

So try:

sh MAKEDEV pass8

You should wind up with pass0-pass7.

Ken
-- 
Kenneth Merry
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can I remove lib-elf.so.1?

2003-06-26 Thread Dmitry Morozovsky
On Wed, 25 Jun 2003, Geoffrey T. Falk wrote:

GTF I am cleaning up my 4-STABLE system. After a fresh installworld, I am
GTF looking at files that did not get touched by the install. Is it safe to
GTF remove all such files?
GTF
GTF In particular, I am looking at /usr/libexec/lib-elf.so.1, which has the
GTF schg flag set. I am afraid to remove this for fear of making my system
GTF unbootable. Could somebody please reassure me that it is ok to noschg
GTF and remove this old file?

My 4.8-R and 4.8-S systems do not have this file:

[EMAIL PROTECTED]:~ l -o /usr/libexec/lib-elf.so.1
ls: /usr/libexec/lib-elf.so.1: No such file or directory
[EMAIL PROTECTED]:~ uname -a
FreeBSD woozle.rinet.ru 4.8-STABLE FreeBSD 4.8-STABLE #4: Wed Apr 16 17:28:12
MSD 2003 [EMAIL PROTECTED]:/usr/obj/lh/src/sys/woozle  i386

[EMAIL PROTECTED]:/var# l -o /usr/libexec/lib-elf.so.1
ls: /usr/libexec/lib-elf.so.1: No such file or directory
[EMAIL PROTECTED]:/var# uname -a
FreeBSD kucha.rinet.ru 4.8-RELEASE FreeBSD 4.8-RELEASE #2: Tue Apr  1 21:02:29
MSD 2003 [EMAIL PROTECTED]:/usr/obj/FreeBSD/src.stable-48/sys/kucha
i386

So, I suppose this file can be safely removed.

Sincerely,
D.Marck [DM5020, MCK-RIPE, DM3-RIPN]

*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- [EMAIL PROTECTED] ***

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can I remove lib-elf.so.1?

2003-06-26 Thread Erik Trulsson
On Wed, Jun 25, 2003 at 11:52:55PM -0600, Geoffrey T. Falk wrote:
 I am cleaning up my 4-STABLE system. After a fresh installworld, I am
 looking at files that did not get touched by the install. Is it safe to
 remove all such files?

No, it is not always safe.  Some files are only updated if the new file
is different from the old file.  
The include files are an example of this as to avoid fooling makefiles
into believing that stuff need to be recompiled when it is just the
date of an include file that has changed and not its contents.

 
 In particular, I am looking at /usr/libexec/lib-elf.so.1, which has the
 schg flag set. I am afraid to remove this for fear of making my system
 unbootable. Could somebody please reassure me that it is ok to noschg
 and remove this old file?

There shouldn't be any file named /usr/libexec/lib-elf.so.1 so if you
actually have one it is safe to remove it (and time to start
investigating where it came from), but if you actually meant
/usr/libexec/ld-elf.so.1  then you should *NOT* remove it.

/usr/libexec/ld-elf.so.1 is needed for running any dynamically linked
programs. It is not quite as critical as /sbin/init or /kernel but
nearly so.
It is precisely because this file is so critical that it is not
updated unless it has actually changed.

In general the few files that have the schg flag set has it for good
reasons.


-- 
Insert your favourite quote here.
Erik Trulsson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Virus Alert

2003-06-26 Thread root
*** THIS IS AN AUTOMATED MESSAGE *** A mail message sent from this account to a Cisco 
employee had an attachment called your_details.zip.   The file your_details.zip 
contained a virus.  Please contact your local System Administrator for further 
assistance.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


apache panics on a recent 4.8-STABLE

2003-06-26 Thread Gianmarco Giovannelli
Yesterday I begin a couple of update to the latest 4.8-STABLE.
After that the two boxes continues to go in panics as soon as Apache (1.3 
from the ports, also freshly recompiled, 2.0.x seems NOT to hang) starts.

I don't know if it is related to the other thread : Kernel core dump in 
recent 4.8-STABLE but it is easily reproducible by cvsupping to a today 
-STABLE and then running apache 1.3 ...

Thanks very much for any info you con provide.

Best Regards,
Gianmarco Giovannelli ,  Unix expert since yesterday
http://www.gufi.org/~gmarco
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: garbled top display

2003-06-26 Thread David Landgren
Eric J. Chet wrote:
[...]
Just a sanity check.  I'm seeing a garbled display with top.  I
rebuild kernel and world a couple times, I even rm -rf /usr/include to
make sure I was up to date.  Anybody else seeing this?
Define garbled.

Thanks,
David


Sure 

Script started on Mon Jun 23 10:39:06 2003
bash-2.05a$ top
last pid:  3359;  load averages:  0.06,  0.02,  0.00 up 
1+13:20:4210:39:09
10 processes:  1 running
CPU states: % user, % nice, % system, % interrupt, % idle
Mem: 16M Active, 55M Inact, 26M Wired, 8748K Cache, 22M Buf, 15M Free
Swap: 256M Total, 52K Used, 256M Free
  PID USERNAME PRI NICE  SIZERES STATETIME   WCPUCPU COMMAND
1 '++*00'* -22 -52 0K 0K ? -128???  0.15%  0.15% 
968972 root -22 -52  3083M 0K ?6???  0.00%  0.05% 
[... etc etc ...]

wow.

I've seen garbled top displays before, like the RES going -ve or things 
like that. But never anything like this. I am reminded of the scene in 
Poltergeist, where the couple get a paranormal expert into the house to 
take a look, and he natters on about how he saw a toy car roll across a 
room over the space of six hours... and then they open the door...

It looks to me like your structs are out of whack, and so when top comes 
along to read an element of a struct, it's using the wrong offset from 
base, and hence printf (or whatever) renders garbage. I.e., as if 
different headers are used in compiling the kernel and the rest.

Does ps give reasonable output? Are you sure you really cleaned out 
/usr/src before recompiling? Has the compiler been upgraded recently?

David

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: IBM ServeRaid - ips driver?

2003-06-26 Thread D.Pageau
I have a brand new IBM 335 with IDE controller and I have the same 
keyboard problem.  The keyboard is working at bios/bootloader and stop 
to work when freebsd kernel boot.

I get this error atkbd: unable to set the command byte.

Any clue?

uname -a
FreeBSD  5.1-RELEASE FreeBSD 5.1-RELEASE #0: Thu Jun  5 02:55:42 GMT 
2003 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386

Jun 26 09:46:10  kernel: atkbdc0: Keyboard controller (i8042) port 
0x60,0x64 irq 1 on acpi0
Jun 26 09:46:10  kernel: atkbd0: AT Keyboard flags 0x1 irq 1 on atkbdc0
Jun 26 09:46:10  kernel: atkbd: unable to set the command byte.
Jun 26 09:46:10  kernel: device_probe_and_attach: atkbd0 attach returned 6
Jun 26 09:46:10  kernel: psm0: unable to set the command byte.

On Mon, 2 Jun 2003, Arnvid Karstad wrote:

Hiya all,

Just saw that the 5.1 RC/Beta had finally support ips/serveraid
controllers. (Even tho 4Lx and 5i seem to have LSI chipsets contra the
older ones)  But when trying to boot the 5.1RC1 mini iso it failes
to detect my keyboard...  The server is an IBM xSeries 335 1 u server
with and onboard LSI (mpt0) kontroller for the boot disks and an 4Lx
used for EXP300 external storage.
Try a different keyboard mfr. or a USB keyboard.
--
Dominic Pageau
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: IBM ServeRaid - ips driver?

2003-06-26 Thread D.Pageau
verbose boot

Jun 26 14:50:59  kernel: atkbdc0: Keyboard controller (i8042) port 
0x60,0x64 irq 1 on acpi0
Jun 26 14:50:59  kernel: atkbd0: AT Keyboard flags 0x1 irq 1 on atkbdc0
Jun 26 14:50:59  kernel: atkbd: the current kbd controller command byte 0065
Jun 26 14:50:59  kernel: atkbd: unable to set the command byte.
Jun 26 14:50:59  kernel: device_probe_and_attach: atkbd0 attach returned 6
Jun 26 14:50:59  kernel: psm0: unable to allocate IRQ
Jun 26 14:50:59  kernel: psmcpnp0 irq 12 on acpi0
Jun 26 14:50:59  kernel: psm0: current command byte:0065
Jun 26 14:50:59  kernel: psm0: unable to set the command byte.


On Mon, 2 Jun 2003, Arnvid Karstad wrote:

Hiya all,

Just saw that the 5.1 RC/Beta had finally support ips/serveraid
controllers. (Even tho 4Lx and 5i seem to have LSI chipsets contra the
older ones)  But when trying to boot the 5.1RC1 mini iso it failes
to detect my keyboard...  The server is an IBM xSeries 335 1 u server
with and onboard LSI (mpt0) kontroller for the boot disks and an 4Lx
used for EXP300 external storage.
Try a different keyboard mfr. or a USB keyboard.
--
Dominic Pageau
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]