Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Aug 2005 16:56:42 -0700
From:      Danny Howard <dannyman@toldme.com>
To:        freebsd-questions@freebsd.org
Subject:   limits puzzle - different limits on similar machines
Message-ID:  <20050823235642.GP51748@ratchet.nebcorp.com>

next in thread | raw e-mail | index | archive | help
Hello,

We have a process that runs fine on one machine but then dies on
another, spitting an out-of-memory error.

Interestingly, the limits for the user are higher on the working machine
and lower on the other.

So, I try to puzzle out why, reading all about login.conf, but
login.conf is the same on every machine I visit, and it sets
datasize=unlimited ...

1-16:35 djh@mito ~> uname -a && grep datasize /etc/login.conf && limits 
FreeBSD mito.sr._________.com 5.4-STABLE FreeBSD 5.4-STABLE #3: Fri Jul 29 16:05:16 PDT 2005     root@mito.sr._________.com:/usr/obj/usr/src/sys/MITO  i386
        :datasize=unlimited:\
#       :datasize-cur=22M:\
#       :datasize=8M:\
#       :datasize=12M:\
#       :datasize=infinity:\
#       :datasize=infinity:\
#       :datasize-cur@:\
#       :datasize-cur=64M:\
#       :datasize=2M:\
Resource limits (current):
  cputime          infinity secs
  filesize         infinity kb
  datasize           524288 kb
  stacksize           65536 kb
  coredumpsize     infinity kb
  memoryuse        infinity kb
  memorylocked     infinity kb
  maxprocesses         3632
  openfiles            7264
  sbsize           infinity bytes
  vmemoryuse       infinity kb

Okay, but on a different machine, the machine that runs the tricky process:

1-16:36 djh@bali ~> uname -a && grep datasize /etc/login.conf && limits
FreeBSD bali.web.sr._________.com 4.8-STABLE FreeBSD 4.8-STABLE #1: Mon Apr 21 1
3:36:32 PDT 2003     josh@bali.web.sr._________.com:/local0/world/obj/local0/wor
ld/src/sys/BALI  i386
        :datasize=unlimited:\
#       :datasize-cur=22M:\
#       :datasize=8M:\
#       :datasize=12M:\
#       :datasize=infinity:\
#       :datasize=infinity:\
#       :datasize-cur@:\
#       :datasize-cur=64M:\
#       :datasize=2M:\
Resource limits (current):
  cputime          infinity secs
  filesize         infinity kb
  datasize          1048576 kb
  stacksize         1048576 kb
  coredumpsize     infinity kb
  memoryuse        infinity kb
  memorylocked     infinity kb
  maxprocesses         5547
  openfiles           11095
  sbsize           infinity bytes
  vmemoryuse       infinity kb

Others?

0-19:37 djh@web3 ~> uname -a && grep datasize /etc/login.conf && limits
FreeBSD web3.web._________.com 4.10-RELEASE-p2 FreeBSD 4.10-RELEASE-p2 #1: Thu O
ct 21 18:39:52 EDT 2004     root@web3.web._________.com:/local0/world/obj/local0
/world/src/sys/WEB3  i386
        :datasize=unlimited:\
#       :datasize-cur=22M:\
#       :datasize=8M:\
#       :datasize=12M:\
#       :datasize=infinity:\
#       :datasize=infinity:\
#       :datasize-cur@:\
#       :datasize-cur=64M:\
#       :datasize=2M:\
Resource limits (current):
  cputime          infinity secs
  filesize         infinity kb
  datasize           524288 kb
  stacksize           65536 kb
  coredumpsize     infinity kb
  memoryuse        infinity kb
  memorylocked     infinity kb
  maxprocesses         5547
  openfiles           11095
  sbsize           infinity bytes
  vmemoryuse       infinity kb

0-16:21 djh@rahu ~> uname -a && grep datasize /etc/login.conf && limits
FreeBSD rahu.web.sr._________.com 4.9-STABLE FreeBSD 4.9-STABLE #1: Mon Mar 22 1
3:38:20 PST 2004     root@rahu.web.sr._________.com:/local0/world/obj/local0/wor
ld/src/sys/RAHU  i386
        :datasize=unlimited:\
#       :datasize-cur=22M:\
#       :datasize=8M:\
#       :datasize=12M:\
#       :datasize=infinity:\
#       :datasize=infinity:\
#       :datasize-cur@:\
#       :datasize-cur=64M:\
#       :datasize=2M:\
Resource limits (current):
  cputime          infinity secs
  filesize         infinity kb
  datasize           524288 kb
  stacksize           65536 kb
  coredumpsize     infinity kb
  memoryuse        infinity kb
  memorylocked     infinity kb
  maxprocesses         5547
  openfiles           11095
  sbsize           infinity bytes
  vmemoryuse       infinity kb


I originally suspected that the login class was being set differently on
different systems based on whether the system was a NIS client or if the
user was in master.passwd ... in neither case have I bothered setting a
login class ... but in the above output, rahu and bali are NIS clients,
web3 and mito are not ...and mito has differing maxprocesses and
openfiles from other 5.x hosts .. why?  Could it be the kernel build?

0-16:46 djh@mito ~> diff /usr/src/sys/i386/conf/GENERIC /usr/src/sys/i386/conf/MITO
2c2
< # GENERIC -- Generic kernel configuration file for FreeBSD/i386
---
> # MITO -- Generic kernel configuration file for FreeBSD/i386
19c19
< # $FreeBSD: src/sys/i386/conf/GENERIC,v 1.413.2.13 2005/04/02 16:37:58 scottl Exp $
---
> # $FreeBSD: src/sys/i386/conf/MITO,v 1.413.2.8 2004/10/24 17:42:08 scottl Exp $
25c25
< ident         GENERIC
---
> ident         MITO
28c28
< #hints                "GENERIC.hints"         # Default places to look for devices.
---
> #hints                "MITO.hints"            # Default places to look for devices.
61c61
< device                apic                    # I/O APIC
---
> device                apic            # I/O APIC
78a79,81
> # Enable SCSI access to IDE DVD drive
> # http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/creating-cds.html#ATAPICAM
> device atapicam
112d114
< device                arcmsr          # Areca SATA II RAID
248d249
< # Note that 'bpf' is required for DHCP.
254d254
< #device               ehci            # EHCI PCI->USB interface (USB 2.0)
268d267
< device                cdce            # Generic USB over Ethernet
276a276,284
> 
> # dummynet
> options IPFIREWALL
> options IPFIREWALL_DEFAULT_TO_ACCEPT
> options DUMMYNET
> options HZ=1000
> 
> # CARP
> device                carp

I doubt that could be it ... and yet I have a 4.x machine that gets
limits similar to mito!?

1-16:51 djh@ratchet ~> uname -a && grep datasize /etc/login.conf &&
limits      FreeBSD ratchet._______.com 4.10-RELEASE-p3 FreeBSD
4.10-RELEASE-p3 #1: Thu Nov  4 22:42:42 PST 2004
root@ratchet._______.com:/usr/obj/usr/src/sys/RATCHET  i386
        :datasize=unlimited:\
#       :datasize-cur=22M:\
#       :datasize=8M:\
#       :datasize=12M:\
#       :datasize=infinity:\
#       :datasize=infinity:\
#       :datasize-cur@:\
#       :datasize-cur=64M:\
#       :datasize=2M:\
Resource limits (current):
  cputime          infinity secs
  filesize         infinity kb
  datasize           524288 kb
  stacksize           65536 kb
  coredumpsize     infinity kb
  memoryuse        infinity kb
  memorylocked     infinity kb
  maxprocesses         3675
  openfiles            7351
  sbsize           infinity bytes
  vmemoryuse       infinity kb


... where else are limits set?

To be fair, bali's kernel config contains some exotic bits:

maxusers    0

# bump max datasize
options     MAXDSIZ="(1024*1024*1024)"
options     MAXSSIZ="(1024*1024*1024)"
options     DFLDSIZ="(1024*1024*1024)"

... and to be fair, I tried setting a user to the default login class on
one box just to be sure, but I was still receiving the same limitations,
where the default login class sets everything to unlimited ...

*throws up hands in frustration*

Any advice?  Wisdom?

Thanks in advance!

Sincerely,
-danny

-- 
http://dannyman.toldme.com/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050823235642.GP51748>