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

ifort lseek returns wrong position on lustre 2.10.3

    XMLWordPrintable

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

            People

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

              Dates

                Created:
                Updated:
                Resolved: