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

ifort lseek returns wrong position on lustre 2.10.3

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.12.0, Lustre 2.10.5
    • Lustre 2.12.0, Lustre 2.10.3
    • None
    • sles12 lustre 2.10.3
    • 2
    • 9223372036854775807

    Description

      On lustre2.10.3 ifort lseek will return the wrong position when using append ">>" operation.

      This can be reproduced on

      client: sles12 lustre2.103 <–> server: lustre2.7.3

      client: sles12 lustre2.103 <–> server: lustre2.10.3

      hello.f

            write(6,*) "hello world"
            end 

      Working on sles11 and lustre2.7.3

      > date > tt
      > date >> tt
      > cat tt
      Wed May 30 13:32:58 PDT 2018
      Wed May 30 13:33:04 PDT 2018
      > strace ./a.out >> tt  
      .....
      ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffffffbf80) = -1 ENOTTY (Inappropriate ioctl for device)
      fstat(1, {st_mode=S_IFREG|0600, st_size=58, ...}) = 0
      ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffffffbf80) = -1 ENOTTY (Inappropriate ioctl for device)
      write(1, " hello world\n", 13)          = 13
      lseek(1, 0, SEEK_CUR)                   = 71
      ftruncate(1, 71)
                              = 0
      > cat tt
      Wed May 30 13:32:58 PDT 2018
      Wed May 30 13:33:04 PDT 2018
       hello world 
       
        • Note lseek(1,0,SEEK_CUR) set at 71.

      Not working on lustre2.10.3.

      > rm tt
      > date > tt
      > date >> tt
      > cat tt
      Wed May 30 13:41:39 PDT 2018
      Wed May 30 13:41:44 PDT 2018
      
      > strace ./a.out >> tt   
      ....
      fstat(1, {st_mode=S_IFREG|0600, st_size=58, ...}) = 0
      ioctl(1, TCGETS, 0x7fffffffbf80)        = -1 ENOTTY (Inappropriate ioctl for device)
      write(1, " hello world\n", 13)          = 13
      lseek(1, 0, SEEK_CUR)                   = 13
      ftruncate(1, 13)                        = 0
      
      pfe27:/nobackup/jchang> cat tt
      Wed May 30 13pfe27:/nobackup/jchang> 
       

      *Note that it's lseek that is getting the **wrong* information about current position after the append. 

      Attachments

        Issue Links

          Activity

            [LU-11069] ifort lseek returns wrong position on lustre 2.10.3
            pjones Peter Jones made changes -
            Link New: This issue is related to DDN-743 [ DDN-743 ]
            pjones Peter Jones made changes -
            Link New: This issue is related to DDN-705 [ DDN-705 ]
            pjones Peter Jones made changes -
            Link New: This issue is related to DDN-694 [ DDN-694 ]
            pjones Peter Jones made changes -
            Link New: This issue is duplicated by DDN-580 [ DDN-580 ]
            pjones Peter Jones made changes -
            Link Original: This issue is related to JFC-26 [ JFC-26 ]
            pjones Peter Jones made changes -
            Labels Original: LTS nasa

            John L. Hammond (jhammond@whamcloud.com) merged in patch https://review.whamcloud.com/32661/
            Subject: LU-11069 llite: correct file position after appending writes
            Project: fs/lustre-release
            Branch: b2_10
            Current Patch Set:
            Commit: 7bc18a0083b27292dd912dba0ae1aa5010568fb4

            gerrit Gerrit Updater added a comment - John L. Hammond (jhammond@whamcloud.com) merged in patch https://review.whamcloud.com/32661/ Subject: LU-11069 llite: correct file position after appending writes Project: fs/lustre-release Branch: b2_10 Current Patch Set: Commit: 7bc18a0083b27292dd912dba0ae1aa5010568fb4
            pjones Peter Jones made changes -
            Link New: This issue is related to JFC-26 [ JFC-26 ]
            pjones Peter Jones made changes -
            Link New: This issue is related to HP-188 [ HP-188 ]
            pjones Peter Jones made changes -
            Link Original: This issue is related to JFC-19 [ JFC-19 ]

            People

              jhammond John Hammond
              mhanafi Mahmoud Hanafi
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: