Re: size of supervise/ !

Daryl Tester <[email protected]> Wed, 05 Nov 2008 06:13:51 +1030
Newsgroups gmane.comp.djb.syslog
Message-ID <[email protected]>
Otavio Exel wrote:

> I'm using 0.70 and it did create supervise/ with drwx--S---
> 
> # svc -dx .; mv supervise supervise.old
> # sleep 5
> # ls -l
> -rwxr-xr-x 1 root root   110 Sep 18 14:26 run
> drwx--S--- 2 root root    56 Nov  4 13:08 supervise
> drwx--S--- 2 root root 32768 Nov  4 13:08 supervise.old
> # _

Ah, my bad - there is a scenario where this is valid, and that's
if the parent directory has the set group ID bit set.  To whit:

$ mkdir t
$ chmod g=s,o= t
$ ls -ld t
drwx--S--- 2 dt dt 4096 2008-11-05 05:53 t
$ mkdir -p 0700 t/u
$ ls -ld t/u
drwx--S--- 2 dt dt 4096 2008-11-05 05:55 t/u

Note that t/u was created with set group id set, because its parent
directory had that set (it's typically used to inherit group ownership,
but don't quote me as I haven't had my first cup of coffee yet).  It
just looks extremely suspect because the directory had inherited the
group's owner, but the permission was set to deny access (it's an odd
combination, and the sysadmin in me screamed corruption).

So ignore the permission stuff.

> IIRC the only patching I did was related to the errno thing;

Which is valid (otherwise it wouldn't compile).

> a lot of */supervise/ has this same permissions:
> 
> # ls -ldG $(find /service/*/ -type d -name supervise)
> drwx--S--- 2 root    126976 Nov  4 13:06 /service/axfrdns-ajato/log/supervise
> drwx--S--- 2 root 191082496 Nov  4 13:06 /service/axfrdns-ajato/supervise
> drwx--S--- 2 root    126976 Nov  4 13:06 /service/axfrdns/log/supervise
> drwx--S--- 2 root   2994176 Nov  4 13:06 /service/axfrdns/supervise
> drwx------ 2 root    147456 Nov  4 13:06 /service/clockspeed/supervise
> drwx------ 2 root    143360 Nov  4 13:06 /service/cvm-unix/supervise
> drwx--S--- 2 root    126976 Nov  4 13:06 /service/dnscache/log/supervise
> drwx--S--- 2 root   2994176 Nov  4 13:06 /service/dnscache/supervise
> drwx------ 2 root    110592 Nov  4 13:06 /service/ftpd/log/supervise
> drwx------ 2 root    110592 Nov  4 13:06 /service/ftpd/supervise
> drwx------ 2 root    143360 Nov  4 13:06 /service/mini_httpd/log/supervise
> drwx------ 2 root    143360 Nov  4 13:06 /service/mini_httpd/supervise
> drwx------ 2 root    147456 Nov  4 13:06 /service/qmail-pop3d/log/supervise
> drwx------ 2 root    147456 Nov  4 13:06 /service/qmail-pop3d/supervise
> drwx------ 2 root    147456 Nov  4 13:06 /service/qmail-send/log/supervise
> drwx------ 2 root    147456 Nov  4 13:06 /service/qmail-send/supervise
> drwx------ 2 root    147456 Nov  4 13:06 /service/qmail-smtpd/log/supervise
> drwx------ 2 root    151552 Nov  4 13:06 /service/qmail-smtpd/supervise
> drwx--S--- 3 root        72 Nov  4 13:08 /service/sqlproxy/supervise
> drwx------ 2 root    126976 Nov  4 13:06 /service/taiclockd/supervise
> drwx--S--- 2 root    126976 Nov  4 13:06 /service/tinydns-ajato/log/supervise
> drwx--S--- 2 root 156975104 Nov  4 13:14 /service/tinydns-ajato/supervise
> drwx--S--- 2 root    143360 Nov  4 13:06 /service/tinydns/log/supervise
> drwx--S--- 2 root   2965504 Nov  4 13:06 /service/tinydns/supervise
> drwx------ 3 root      4096 Nov  4 13:04 /service/user-robo/supervise

And honking large directory sizes.  supervise/ contains at most 4 files,
so any directory over a block size (say, 4K) is suspect, which is nearly
all of these.  Also, it looks like sqlproxy/supervise and
user-robo/supervise have subdirectories in them?

>> It would also explain the extra size.

> why? (unix/linux moron here);

No longer applicable, but fsck sometimes doesn't recover files gracefully.

Later, that same thread:

> but forgot to "down" the tinydns-ajato service; the dir size is still
> growing! it looks like it grows at each atempt;

  drwx--S--- 2 root 156975104 Nov  4 13:14 /service/tinydns-ajato/supervise
  drwx--S--- 2 root 157519872 Nov  4 16:22 /service/tinydns-ajato/supervise

Oooookay.  That's disturbing, especially as your other box doesn't exhibit
this condition.  Are you running jfs on both servers for the partition that
/service lives in?


-- 
Regards,
  Daryl Tester

"I'm beginning to wonder about Cap'n Snooze's military credentials."