[lxc-devel] [lxc/lxc] 36ea44: fix fd leak in test-concurrent

GitHub noreply at github.com
Sat Mar 8 00:13:40 UTC 2014


  Branch: refs/heads/stable-1.0
  Home:   https://github.com/lxc/lxc
  Commit: 36ea44bbe02496a161b81b8413ed7da14f104cd1
      https://github.com/lxc/lxc/commit/36ea44bbe02496a161b81b8413ed7da14f104cd1
  Author: Dwight Engen <dwight.engen at oracle.com>
  Date:   2014-03-07 (Fri, 07 Mar 2014)

  Changed paths:
    M src/lxc/log.c
    M src/lxc/lxccontainer.h
    M src/tests/concurrent.c

  Log Message:
  -----------
  fix fd leak in test-concurrent

Opening a debug log for every thread at every iteration of test-concurrent
causes it to quickly run out of fd's because this fd is leaked. Fix this
by adding a new api: lxc_log_close().

As Caglar noted, the log handling is in general a bit "interesting" because
a logfile can be opened through the per-container api
c->set_config_item("lxc.logfile") but lxc_log_fd is now per-thread data. It
just so happens in test-concurrent that there is a 1:1 mapping of threads
to logfiles.

Split out getting debug logs from quiet since I think they are useful
separately. If debug is specified, get a log of any mode, not just during
start.

Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>


  Commit: 8fd5b5d95a85122984b1ce8f77671fcce121c52e
      https://github.com/lxc/lxc/commit/8fd5b5d95a85122984b1ce8f77671fcce121c52e
  Author: Stéphane Graber <stgraber at ubuntu.com>
  Date:   2014-03-07 (Fri, 07 Mar 2014)

  Changed paths:
    M src/lxc/conf.c

  Log Message:
  -----------
  Don't trigger SYSERROR for optional mounts

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


Compare: https://github.com/lxc/lxc/compare/c9bd1357e964...8fd5b5d95a85


More information about the lxc-devel mailing list