1. 04 Mar, 2015 9 commits
  2. 02 Mar, 2015 1 commit
  3. 27 Feb, 2015 1 commit
  4. 25 Feb, 2015 4 commits
  5. 24 Feb, 2015 2 commits
  6. 19 Feb, 2015 4 commits
  7. 16 Feb, 2015 1 commit
    • Saied Kazemi's avatar
      Do not call listen() when SO_REUSEADDR is off · 1b4e9058
      Saied Kazemi authored
      For an established TCP connection, the send queue is restored in two
      steps: in step (1), we retransmit the data that was sent before but not
      yet acknowledged, and in step (2), we transmit the data that was never
      sent outside before.  The TCP_REPAIR option is disabled before step (2)
      and re-enabled after step (2) (without this patch).
      
      If the amount of data to be sent in step (2) is large, the TCP_REPAIR
      flag on the socket can remain off for some time (O(milliseconds)).  If a
      listen() is called on another socket bound to the same port during this
      time window, it fails. This is because -- turning TCP_REPAIR off clears
      the SO_REUSEADDR flag on the socket.
      
      This patch adds a mutex (reuseaddr_lock) per port number, so that a
      listen() on a port number does not happen while SO_REUSEADDR for another
      socket on the same port is off.
      
      Thanks to Amey Deshpande <ameyd@google.com> for debugging.
      Signed-off-by: 's avatarSaied Kazemi <saied@google.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      1b4e9058
  8. 13 Feb, 2015 11 commits
  9. 10 Feb, 2015 4 commits
  10. 09 Feb, 2015 3 commits
    • Ruslan Kuprieiev's avatar
      crit: gather and parse arguments in a proper way · 0b08bcfc
      Ruslan Kuprieiev authored
      This will allow us to easily extend commands that crit
      supports, avoiding "--help" confusion.
      Signed-off-by: 's avatarRuslan Kuprieiev <kupruser@gmail.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      0b08bcfc
    • Saied Kazemi's avatar
      Ignore mnt_id value for AUFS file descriptors. · e3fec5f8
      Saied Kazemi authored
      Starting with version 3.15, the kernel provides a mnt_id field in
      /proc/<pid>/fdinfo/<fd>.  However, the value provided by the kernel for
      AUFS file descriptors obtained by opening a file in /proc/<pid>/map_files
      is incorrect.
      
      Below is an example for a Docker container running Nginx.  The mntid
      program below mimics CRIU by opening a file in /proc/1/map_files and
      using the descriptor to obtain its mnt_id.  As shown below, mnt_id is
      set to 22 by the kernel but it does not exist in the mount namespace of
      the container.  Therefore, CRIU fails with the error:
      
      	"Unable to look up the 22 mount"
      
      In the global namespace, 22 is the root of AUFS (/var/lib/docker/aufs).
      
      This patch sets the mnt_id of these AUFS descriptors to -1, mimicing
      pre-3.15 kernel behavior.
      
      	$ docker ps
      	CONTAINER ID        IMAGE                    ...
      	3850a63ee857        nginx-streaming:latest   ...
      	$ docker exec -it 38 bash -i
      	root@3850a63ee857:/# ps -e
      	  PID TTY          TIME CMD
      	    1 ?        00:00:00 nginx
      	    7 ?        00:00:00 nginx
      	   31 ?        00:00:00 bash
      	   46 ?        00:00:00 ps
      	root@3850a63ee857:/# ./mntid 1
      	open("/proc/1/map_files/400000-4b8000") = 3
      	cat /proc/49/fdinfo/3
      	pos:	0
      	flags:	0100000
      	mnt_id:	22
      	root@3850a63ee857:/# awk '{print $1 " " $2}' /proc/1/mountinfo
      	87 58
      	103 87
      	104 87
      	105 104
      	106 104
      	107 104
      	108 87
      	109 87
      	110 87
      	111 87
      	root@3850a63ee857:/# exit
      	$ grep 22 /proc/self/mountinfo
      	22 21 8:1 /var/lib/docker/aufs /var/lib/docker/aufs ...
      	44 22 0:35 / /var/lib/docker/aufs/mnt/<ID> ...
      	$
      Signed-off-by: 's avatarSaied Kazemi <saied@google.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      e3fec5f8
    • Ruslan Kuprieiev's avatar
      29673d42