Uploaded image for project: 'OpenVZ'
  1. OpenVZ
  2. OVZ-5253

Bug#653292: nfs exclusive lock does not work anymore after openvz kernel version : 2.6.32-35squeeze1

    XMLWordPrintable

    Details

      Description

      Package: linux-2.6
      Version: 2.6.32-39
      Severity: critical
      Tags: squeeze

      HOWTO reproduce it (all the time) :
      1- Install squeeze 64 bits with latest openvz kernel (after kernel linux-image-2.6.32-5-openvz-amd64_2.6.32-35squeeze1_amd64.deb
      )
      last kernel with nfs locking working is linux-image-2.6.32-5-openvz-amd64_2.6.32-35squeeze1_amd64.deb )

      2- setup nfs server on physical server OS with /etc/exports as follow :
      /myshare 10.0.0.2(rw,async,no_subtree_check,no_root_squash)
      note : 10.0.0.2 is the nfs client (the openvz guest)

      3- create a GUEST OS with NFS features available and mount the NFS share as follow :
      mount -t nfs -o rw,soft,intr,retry=10 10.0.0.1:/myshare /mnt/nfs
      note : 10.0.0.1 is the nfs server ip (the openvz parent)

      4- request a exclusive lock on the nfs share with the following command :
        strace flock -x -w10 "/mnt/nfs/myfile" -c "sleep 60"
      and the strace show that the command hang on those last lines:

         ...
         open("/mnt/nfs/file", O_RDONLY|O_CREAT|O_NOCTTY, 0666) = 3
         rt_sigaction(SIGALRM, {0x400cf0, [], SA_RESTORER|SA_RESETHAND, 0x7f567e056c20}, {SIG_DFL, [], 0}, 8) = 0
         setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={10, 0}}, {it_interval={0, 0}, it_value={0, 0}}) = 0
         flock(3, LOCK_EX

      The flock command hang here.

      Expected result : the file exlusive lock request should be granted

      To work around the problem , the only solution i got is to reinstall the old version of the kernel :
      linux-image-2.6.32-5-openvz-amd64_2.6.32-35squeeze1_amd64.deb and it work like a charm.


      I tagged this bug report as critical as any people doing NFS server with openvz will never be able to use a NFS server (as
      exlusive locking is so commonly use for any FS access)

      Kind regards, Aurelien

        Attachments

        1. console
          85 kB
        2. diff-lockd-check-grace-carefully
          1 kB
        3. diff-lockd-fix
          4 kB
        4. diff-nfsd-lockd-debug
          1 kB
        5. diff-nfsd-lockd-debug-2
          1 kB
        6. dmesg
          40 kB
        7. dmesg
          95 kB
        8. dmesg.patched
          22 kB
        9. dmesg.patched2
          24 kB

          Activity

            People

            Assignee:
            skinsbursky@openvz.org Kinsbursky Stanislav
            Reporter:
            ola@inguza.com Ola Lundqvist
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: