Hi,

On Cobalts giving the error
>> dnscache: fatal: unable to read servers: out of memory
when running dnscache...


Thank you Dan and Clemens for your replies:

(Dan's message)
>Perhaps there's some new bloat in the latest libc. What does
>
>   size /usr/local/bin/dnscache
>
>report? What if you recompile dnscache statically? What memory
>allocations do you see in a syscall trace?

# size /usr/local/bin/dnscache
text    data    bss     dec     hex     filename
83747   1232    230200  315179  4cf2b   /usr/local/bin/dnscache

(and after -static added to conf-ld and recompilation)
# size /usr/local/bin/dnscache
text    data    bss     dec     hex     filename
221132  9784    232412  463328  711e0   /usr/local/bin/dnscache

I'm afraid I don't have time (partly, I haven't used a debugger for years)
to run a debugger on the program at the moment - assuming that's
where I'll find the necessary syscall trace - I'll try and make some
time for this when other projects cool down, but that's probably January.

(Clemens' message)
><dnscache-inst>/root/servers/@ is a small file (13 text lines).  if
>dnscache initialisation can't allocate these tiny strings, memory
>consumption/allocation is the issue.  what's the -d switch in the run-
>file?  what other influences are there upon resident set size?  did
>you specify very small hard-limits in /etc/login.conf for the dnscache
>user-id?

I certainly dug around after receiving this message - the fact that it
appears not to even *try* allocating memory suggests something
duff (your message pinpointed this for me). The machine does
have the memory available,
# vmstat 5
 procs                  memory    swap        io    system         cpu
 r b w  swpd  free  buff cache  si  so   bi   bo   in   cs  us  sy  id
 2 0 0    92 53588 149720 23516   0   0    1    3  103   30  58  41   2
 2 0 0    92 53596 149656 23516   0   0    0    4  105   33  52  48   0
 3 0 0    92 53728 149624 23516   0   0    0    5  106   34  55  45   0

There is no /etc/login.conf on the box; "-d switch in the run-file";
not sure what you mean here. For RSS I used ps (I've split these
lines to fit) (Note this is the static linked version),
  USER       PID %CPU %MEM  SIZE   RSS TTY STAT START   TIME 
COMMAND
  root     15502  0.0  0.1  1260   388  ?  R   12:02   0:00 
envuidgid dnscache softlimit -o250 -d 3000000 /usr/local/bin/dnscache

I've had to leave this problem for a few weeks - lots of other
things are more urgent - but I hope to get back to this one,
since I like Cobalt machines (despite their warts). Since the
time of writing my original post, I have tried installing djbdns
on another, non-Cobalt, Linux box - a PC - which compiled
and ran just fine (SuSE Linux 6.3) - so I don't think I've done
anything really dumb on the Cobalt.

I thought the problem might be related to rights, but they look
the same as the ones on the Linux PC I got the program working
on (ls -lR output reproduced below this message if interested).

I think it could be something screwy about Cobalt defaults.
Unfortunately I don't know these machines terribly well, but
I did come across a very interesting message about getting
*qmail* running on Cobalts in the qmail archive, entitled,

  "unable to exec qq" and Cobalt RAQs

- this pointed out that /var is mounted nosuid by default (fixing
that was, as that message pointed out, enough to get qmail working
on the machine, that being the other service I need to setup on
the Cobalts. It didn't help dnscache though).

cheers,

Andrew.

# ls -lR
total 6
drwxr-sr-x   2 root     root         1024 Nov 29 11:58 env
drwxr-sr-x   4 root     root         1024 Nov 29 11:59 log
drwxr-sr-x   4 root     root         1024 Nov 29 11:58 root
-rwxr-xr-x   1 root     root          141 Nov 29 11:58 run
-rw-------   1 root     root          128 Nov 29 11:58 seed
drwx--S---   2 root     root         1024 Nov 29 12:13 supervise

env:
total 5
-rw-r--r--   1 root     root            8 Nov 29 11:58 CACHESIZE
-rw-r--r--   1 root     root            8 Nov 29 11:58 DATALIMIT
-rw-r--r--   1 root     root           10 Nov 29 11:58 IP
-rw-r--r--   1 root     root            8 Nov 29 11:58 IPSEND
-rw-r--r--   1 root     root           14 Nov 29 11:58 ROOT

log:
total 3
drwxr-sr-x   2 dnslog   djbusers     1024 Nov 29 12:07 main
-rwxr-xr-x   1 root     root           50 Nov 29 11:58 run
-rw-r--r--   1 dnslog   djbusers        0 Nov 29 11:58 status
drwx--S---   2 root     root         1024 Nov 29 11:59 supervise

log/main:
total 159
-rwxr--r--   1 dnslog   djbusers    98010 Nov 29 12:07 @400000003a24e396221e2f2c.s
-rw-r--r--   1 dnslog   djbusers    62289 Nov 29 12:13 current
-rw-------   1 dnslog   djbusers        0 Nov 29 11:59 lock
-rw-r--r--   1 dnslog   djbusers        0 Nov 29 11:59 state

log/supervise:
total 1
prw-------   1 root     root            0 Nov 29 11:59 control
-rw-------   1 root     root            0 Nov 29 11:59 lock
prw-------   1 root     root            0 Nov 29 11:59 ok
-rw-r--r--   1 root     root           18 Nov 29 11:59 status

root:
total 2
drwxr-sr-x   2 root     root         1024 Nov 29 11:58 ip
drwxr-sr-x   2 root     root         1024 Nov 29 11:58 servers

root/ip:
total 0
-rw-------   1 root     root            0 Nov 29 11:58 127.0.0.1

root/servers:
total 1
-rw-r--r--   1 root     root          164 Nov 29 11:58 @

supervise:
total 1
prw-------   1 root     root            0 Nov 29 11:59 control
-rw-------   1 root     root            0 Nov 29 11:59 lock
prw-------   1 root     root            0 Nov 29 11:59 ok
-rw-r--r--   1 root     root           18 Nov 29 12:13 status
[root /dnstest]# 



Reply via email to