Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Sep 2004 19:14:17 -0700 (PDT)
From:      Doug White <dwhite@gumbysoft.com>
To:        Robert Blayzor <rblayzor@inoc.net>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Problem with fclose() returning error (EBADF)
Message-ID:  <20040922191114.F36124@carver.gumbysoft.com>
In-Reply-To: <415184AA.90604@inoc.net>
References:  <415184AA.90604@inoc.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wed, 22 Sep 2004, Robert Blayzor wrote:

> I have a multithreaded application running on FreeBSD 4.9, .10 and
> -STABLE that I'm having an issue with.
>
> The application writes large amounts of small files over an NFS mount
> and randomly we're seeing fclose() return a failure code, -1 and
> errorno, EBADF.
>
> We have no idea what may be causing the problem.  The NFS server appears
>   to be functioning fine, no errors at all, it runs perfectly over tons
> of other clients.

Ethereal is really nice for doing NFS protocol traces.  If you can
reproduce it and run ethereal (or tcpdump writing to a file) on the the
output, and filter down to the transaction stream you're interested in.

See if you can make a test app that implmenets the minumum functionality
required to reproduce the problem.

EBADF sounds more like a program bug, though ... file descriptor getting
closed by one thread and not accounting for it, or a race, or data
corruption...

-- 
Doug White                    |  FreeBSD: The Power to Serve
dwhite@gumbysoft.com          |  www.FreeBSD.org



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