[httperf] Bad file descriptor in select

Martin Arlitt arlitt at granite.hpl.hp.com
Thu Feb 15 07:26:55 PST 2007


hi Jordi

if it's repeatable, that's good.

are you sure you are not running out of file descriptors? how many file
descriptors does httperf have access to? if you run httperf with the
--verbose option that should print a line like
httperf: maximum number of open descriptors = 1024

since you stated the test runs for 2-3 minutes, I'm not sure this is the
problem (I'd expect it to happen a bit sooner), but it's probably worth
checking.

if you are not sure if it is running out of file descriptors, one way to
check is the following; re-run your experiment with a high request rate
until the error occurs. as soon as the error occurs, check how many
connections are in the TIME_WAIT state.
depending on which OS you are using, you should be able to run the
following command:

netstat -an | grep TIME_WAIT | wc -l

if that returns a number about as large as the number of file descriptors
available to httperf, then that is likely the cause.

what OS are you running on?

thanks

Martin

On Thu, 15 Feb 2007, Jordi Guitart Fernandez wrote:

> Hello,
>
> I'm using httperf to issue secure requests to a Tomcat server. I run
> httperf with these parameters:
>
> httperf --hog --timeout=10 --client=0/1 --server=pcbosch.ac.upc.edu
> --port=8443 --uri=/ --rate=50 --send-buffer=4096 --recv-buffer=16384
> --ssl --wsesslog=100000000,0.000,rubis.txt
>
> I face with the "bad file descriptor" error when using high rates (i.e.
>  >= 40), and it occurs after 2 or 3 minuts of experiment.
>
> Jordi
>
> Martin Arlitt escribió:
>
> >hi Jordi
> >
> >I haven't experienced this error before, so this is just a guess.
> >
> >it's probably the following error (errno.h):
> >#define EBADFD          77      /* File descriptor in bad state */
> >
> >I believe this could happen if httperf tries to read from a file
> >descriptor that has been closed, for example.  if you can provide more
> >details on what you were doing when this error occurred, perhaps it will
> >shed some more light on the cause.
> >
> >thanks
> >
> >Martin
> >
> >On Thu, 15 Feb 2007, Jordi Guitart Fernandez wrote:
> >
> >
> >
> >>Hello,
> >>
> >>What can cause httperf to return the following error?
> >>
> >>"httperf.core_loop: select failed: Bad file descriptor"
> >>
> >>Thx
> >>_______________________________________________
> >>httperf mailing list
> >>httperf at linux.hpl.hp.com
> >>http://www.hpl.hp.com/hosted/linux/mail-archives/httperf/
> >>
> >>
> >>
> >_______________________________________________
> >httperf mailing list
> >httperf at linux.hpl.hp.com
> >http://www.hpl.hp.com/hosted/linux/mail-archives/httperf/
> >
> >
>
> _______________________________________________
> httperf mailing list
> httperf at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/httperf/
>



More information about the httperf mailing list