apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject FW: svn_io_run_cmd running out of file handles, APR bug?
Date Sun, 13 Jan 2002 11:45:41 GMT
Hi,

Anyone a direct idea of what is going on and if it is
correct or not?

Sander

-----Original Message-----
From: Philip Martin [mailto:philip@codematters.co.uk]
Sent: 13 January 2002 05:26
To: dev@subversion.tigris.org
Subject: svn_io_run_cmd running out of file handles, APR bug?


Hi

Writing a new test I have been calling svn_io_run_cmd() in a loop,
after a few hundred calls it fails with

apr_error: #24, src_err 0 : <Too many open files>
  run_cmd_in_directory: error setting /usr/bin/cmp process io attributes

Looking in /proc/nnn/fd I see hundreds of pipes.

As far as I can see:

- svn_io_run_cmd() calls apr_procattr_io_set()

  This calls apr_file_pipe_create() to creates three pipes in the
  apr_procattr_t structure.


- svn_io_run_cmd() calls apr_procattr_child_in_set(),
  apr_procattr_child_out_set() and apr_procattr_child_err_set()

  These call apr_file_dup() and overwrite the pipe descriptors.


The result is that the pipe descriptors don't get closed and so
accumulate until the process runs out of resources.

Now even if svn_io_run_cmd() doesn't call apr_procattr_io_set() to
create the pipes, the problem will still occur because the three
functions apr_procattr_child_err_set() et.al. each start by calling
apr_file_pipe_create() themselves if the pipe doesn't exist.

What are these pipes for? It seems silly to create them simply to
close them again. Is this an APR bug?

-- 
Philip

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org




Mime
View raw message