Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-13296

statfs isn't work properly with MDT statfs proxy

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • Lustre 2.14.0, Lustre 2.12.5
    • Lustre 2.12.0, Lustre 2.12.5
    • None
    • 3
    • 9223372036854775807

    Description

      statfs don't work fine sometimes. It's easy replicate with start a several processes on same time which ask about block size.

      all instances run on same node.

      % aprun -n 8 ./a.out /lus/snx11242
      statfs (/lus/snx11242) f_bsize 0X9003B000
      statfs (/lus/snx11242) f_bsize 0X8C19F000
      statfs (/lus/snx11242) f_bsize 0X82BFD000
      statfs (/lus/snx11242) f_bsize 0X85C31000
      statfs (/lus/snx11242) f_bsize 0X8BED2000
      statfs (/lus/snx11242) f_bsize 0X835B1000
      statfs (/lus/snx11242) f_bsize 0X828E3000
      statfs (/lus/snx11242) f_bsize 0X1000
      

      log for failed application.

      00000080:00200000:0.0:1582645192.532388:0:16422:0:(llite_lib.c:1890:ll_statfs()) VFS Op: at 4296762105 jiffies
      00000080:00000001:0.0:1582645192.532391:0:16422:0:(llite_lib.c:1838:ll_statfs_internal()) Process entered
      00000080:00000001:0.0:1582645192.532392:0:16422:0:(obd_class.h:1051:obd_statfs()) Process entered
      00000080:00000004:0.0:1582645192.532394:0:16422:0:(obd_class.h:1063:obd_statfs()) snx11242-clilmv-ffff881f8b680000: age 7262, max_age 7478
      00000080:00000004:0.0:1582645192.535406:0:16422:0:(obd_class.h:1083:obd_statfs()) snx11242-clilmv-ffff881f8b680000: new ffff881f9cad8228 cache blocks 3366320026/3419988114 objects 630715697
      0/6372092768
      00000080:00000001:0.0:1582645192.535408:0:16422:0:(obd_class.h:1103:obd_statfs()) Process leaving (rc=0 : 0 : 0)
      00000080:00000004:0.0:1582645192.535409:0:16422:0:(llite_lib.c:1848:ll_statfs_internal()) MDC blocks 18446744071580744875/18446744071582034486 objects 0/1
      00000080:00000001:0.0:1582645192.535410:0:16422:0:(llite_lib.c:1851:ll_statfs_internal()) Process leaving via out (rc=0 : 0 : 0x0)
      00000080:00000001:0.0:1582645192.535411:0:16422:0:(llite_lib.c:1881:ll_statfs_internal()) Process leaving (rc=0 : 0 : 0)
      

      regression introduced by

      commit b500d5193360711a6c6b07497f34e61cc590cf19
      Author: Alex Zhuravlev <bzzz@whamcloud.com>
      Date:   Thu Sep 21 18:24:18 2017 +0300
      
          LU-10018 protocol: MDT as a statfs proxy
      
      

      Attachments

        Issue Links

          Activity

            [LU-13296] statfs isn't work properly with MDT statfs proxy

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/37819/
            Subject: LU-13296 obd: make statfs cache working again
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set:
            Commit: 6db1fd1cfc67c639c4817ae00cfe4198882d8e9c

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/37819/ Subject: LU-13296 obd: make statfs cache working again Project: fs/lustre-release Branch: b2_12 Current Patch Set: Commit: 6db1fd1cfc67c639c4817ae00cfe4198882d8e9c

            Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/37819
            Subject: LU-13296 obd: make statfs cache working again
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set: 1
            Commit: 785965b33c9993103a703034d5ee2a32067eeb8a

            gerrit Gerrit Updater added a comment - Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/37819 Subject: LU-13296 obd: make statfs cache working again Project: fs/lustre-release Branch: b2_12 Current Patch Set: 1 Commit: 785965b33c9993103a703034d5ee2a32067eeb8a
            pjones Peter Jones added a comment -

            Landed for 2.14

            pjones Peter Jones added a comment - Landed for 2.14

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/37753/
            Subject: LU-13296 obd: make statfs cache working again
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 7281635521a823548d497bce2f19acfa3318dfe9

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/37753/ Subject: LU-13296 obd: make statfs cache working again Project: fs/lustre-release Branch: master Current Patch Set: Commit: 7281635521a823548d497bce2f19acfa3318dfe9

            Alexey Lyashkov (alexey.lyashkov@hpe.com) uploaded a new patch: https://review.whamcloud.com/37753
            Subject: LU-13296 obd: make statfs cache working again
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 3773a5c542a9d2f5c1c2ba868e5ce8832700e8a5

            gerrit Gerrit Updater added a comment - Alexey Lyashkov (alexey.lyashkov@hpe.com) uploaded a new patch: https://review.whamcloud.com/37753 Subject: LU-13296 obd: make statfs cache working again Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 3773a5c542a9d2f5c1c2ba868e5ce8832700e8a5

            Root cause of this bug - cached copy ins't used in case of race between obtain statfs info and refreshing it.
            I will submit fix in near time

            shadow Alexey Lyashkov added a comment - Root cause of this bug - cached copy ins't used in case of race between obtain statfs info and refreshing it. I will submit fix in near time

            issue replicated easy with several statfs in parallel.

            # cat test
            ./a.out &
            ./a.out &
            ./a.out &
            ./a.out &
            ./a.out &
            ./a.out &
            ./a.out &
            ./a.out &
            
            sleep 1
            
            # cat ttt.c
            #include <stdio.h>
            #include  <sys/statfs.h>
            
            int main() {
                struct statfs buf;
            
                statfs("/mnt/lustre", &buf);
                printf("b_size %llx\n", buf.f_bsize);
                return 0;
            }
            
            # bash test
            b_size 1000
            b_size 1000
            b_size 0
            b_size 0
            b_size 0
            b_size 0
            b_size 0
            b_size 0
            
            shadow Alexey Lyashkov added a comment - issue replicated easy with several statfs in parallel. # cat test ./a.out & ./a.out & ./a.out & ./a.out & ./a.out & ./a.out & ./a.out & ./a.out & sleep 1 # cat ttt.c #include <stdio.h> #include <sys/statfs.h> int main() { struct statfs buf; statfs( "/mnt/lustre" , &buf); printf( "b_size %llx\n" , buf.f_bsize); return 0; } # bash test b_size 1000 b_size 1000 b_size 0 b_size 0 b_size 0 b_size 0 b_size 0 b_size 0

            People

              shadow Alexey Lyashkov
              shadow Alexey Lyashkov
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: