[Bugs] [Bug 1227996] New: Objects are not signed upon truncate()

bugzilla at redhat.com bugzilla at redhat.com
Thu Jun 4 03:40:57 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1227996

            Bug ID: 1227996
           Summary: Objects are not signed upon truncate()
           Product: GlusterFS
           Version: mainline
         Component: bitrot
          Assignee: bugs at gluster.org
          Reporter: vshankar at redhat.com
                CC: bugs at gluster.org
      Docs Contact: bugs at gluster.org



Description of problem:
truncate() [note _not_ ftruncate()] on an object does not trigger signing.
Furthermore, the file is _never_ signed upon subsequent modifications.

Version-Release number of selected component (if applicable):
mainline

How reproducible:
always

Steps to Reproduce:
1. Create and start a Gluster volume
2. Enable bitrot
3. Mount the volume and follow the steps below

  # echo "ZZZ" > f0

-> wait for the object to get signed

  # echo "ZZZ" > f0  <-- truncate()

-> "f0" is never signed unless the brick(s) restarted.

Cause: fd leak in the truncate() code path in stub() never release()'es the fd,
resulting in the object never getting signed.

Additional info:


# ls -l /proc/2658/fd
total 0
lr-x------ 1 root root 64 Jun  4 09:02 0 -> /dev/null
l-wx------ 1 root root 64 Jun  4 09:02 1 -> /dev/null
lrwx------ 1 root root 64 Jun  4 09:02 10 -> socket:[63116]
lrwx------ 1 root root 64 Jun  4 09:02 11 -> socket:[63094]
lr-x------ 1 root root 64 Jun  4 09:02 12 -> /dev/urandom
lrwx------ 1 root root 64 Jun  4 09:02 13 -> socket:[63105]
lr-x------ 1 root root 64 Jun  4 09:02 14 -> /export2/reznor
lrwx------ 1 root root 64 Jun  4 09:02 15 -> socket:[130558]
lrwx------ 1 root root 64 Jun  4 09:02 16 -> socket:[130559]
lrwx------ 1 root root 64 Jun  4 09:03 17 ->
/export2/reznor/.glusterfs/65/33/6533c392-e0e5-43e6-857f-31620ce0c2a4
lrwx------ 1 root root 64 Jun  4 09:02 18 -> socket:[130561]
l-wx------ 1 root root 64 Jun  4 09:02 2 -> /dev/null
lrwx------ 1 root root 64 Jun  4 09:02 20 -> socket:[64160]
lrwx------ 1 root root 64 Jun  4 09:02 3 -> anon_inode:[eventpoll]
lrwx------ 1 root root 64 Jun  4 09:02 4 -> socket:[130463]
l-wx------ 1 root root 64 Jun  4 09:02 5 ->
/var/log/glusterfs/bricks/export2-reznor.log
lrwx------ 1 root root 64 Jun  4 09:02 6 ->
/var/lib/glusterd/vols/reznor/run/h3ckers-pride-export2-reznor.pid
lrwx------ 1 root root 64 Jun  4 09:02 7 -> socket:[130465]
lrwx------ 1 root root 64 Jun  4 09:02 8 -> socket:[63112]
lrwx------ 1 root root 64 Jun  4 09:02 9 -> socket:[130474]

fd number 17 is the leaked fd.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are the Docs Contact for the bug.


More information about the Bugs mailing list