[nycbug-talk] bad file descriptor and fts_read error

Andy Kosela akosela at andykosela.com
Fri May 22 15:35:09 EDT 2009


Matt Juszczak <matt at atopia.net> wrote:

> Hi all,
>
> For some reason, on one of my FreeBSD jump boxes, which has been acting up 
> lately, I'm getting a few errors.  This all caught my attention when I 
> started noticing some setuid errors in my nightly report (files were 
> disappearing as being set as setuid).
>
> First:
>
> bob# cd /usr/ports/packages/All && pkg_delete -f gettext-0.17_1 && 
> pkg_add gettext-0.17_1.tbz
> mtree: bin/snmpbulkwalk: Bad file descriptor
> mtree: bin/snmpcheck: Bad file descriptor
> mtree: bin/snmpconf: Bad file descriptor
> mtree: bin/snmpdelta: Bad file descriptor
> mtree: bin/snmpdf: Bad file descriptor
> mtree: bin/snmpget: Bad file descriptor
> mtree: bin/snmpgetnext: Bad file descriptor
> mtree: bin/snmpinform: Bad file descriptor
> mtree: bin/snmpnetstat: Bad file descriptor
> mtree: bin/snmpset: Bad file descriptor
> mtree: bin/snmpstatus: Bad file descriptor
> mtree: man/man5/slapd-ldbm.5.gz: Bad file descriptor
> mtree: man/man5/slapd-ldif.5.gz: Bad file descriptor
> mtree: man/man5/slapd-meta.5.gz: Bad file descriptor
> mtree: man/man5/slapd-monitor.5.gz: Bad file descriptor
> mtree: man/man5/slapd-ndb.5.gz: Bad file descriptor
> mtree: man/man5/slapd-null.5.gz: Bad file descriptor
> mtree: man/man5/slapd-passwd.5.gz: Bad file descriptor
> mtree: man/man5/slapd-perl.5.gz: Bad file descriptor
> mtree: man/man5/slapd-relay.5.gz: Bad file descriptor
> mtree: man/man5/slapd-shell.5.gz: Bad file descriptor
> mtree: man/man5/slapd-sock.5.gz: Bad file descriptor
>
> This seems to be really weird.  Why I would be getting file descriptor and 
> fts_read errors I'm not sure.  Nothing in dmesg to indicate file system 
> problems, however a running fdisk shows:
>
> ** /dev/amrd0s1a (NO WRITE)
> ** Last Mounted on /
> ** Root file system
> ** Phase 1 - Check Blocks and Sizes
> 70568 DUP I=16768
> 70569 DUP I=16768
> 70570 DUP I=16768
> 70571 DUP I=16768
> 70572 DUP I=16768
> 70573 DUP I=16768
> 70574 DUP I=16768
> 70575 DUP I=16768
> 70576 DUP I=16768
> 70577 DUP I=16768
> 70578 DUP I=16768
> EXCESSIVE DUP BLKS I=16768
> CONTINUE? [yn]

It seems that some of your files are referencing the same data block.
Check those files using fsdb(8) and then fsck(8) the file system from
CD.  Did you have a crash on this box recently?  These type of problems
indicate that your file system is corrupt.

--Andy



More information about the talk mailing list