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

bugzilla at redhat.com bugzilla at redhat.com
Tue Jun 16 08:58:51 UTC 2015


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

            Bug ID: 1232179
           Summary: Objects are not signed upon truncate()
           Product: GlusterFS
           Version: 3.7.0
         Component: bitrot
          Assignee: bugs at gluster.org
          Reporter: vshankar at redhat.com
                CC: aloganat at redhat.com, bugs at gluster.org,
                    nsathyan at redhat.com, rabhat at redhat.com,
                    rmekala at redhat.com
        Depends On: 1227996
            Blocks: 1227900
      Docs Contact: bugs at gluster.org



+++ This bug was initially created as a clone of Bug #1227996 +++

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.

--- Additional comment from Venky Shankar on 2015-06-03 23:42:56 EDT ---

This was observed by Arthy (aloganat@) in the test setup.

--- Additional comment from Venky Shankar on 2015-06-04 00:35:32 EDT ---

In comment #1, the truncate() call [second "echo" command] needs to be timed
with bitrot daemon sending a "reopn" call (internal bitd logic) for things to
get tripped. What happens behind the scenes in this timing is not met is a
memory leak (as a side effect of fd leak).

--- Additional comment from Anand Avati on 2015-06-04 00:52:10 EDT ---

REVIEW: http://review.gluster.org/11077 (features/bitrot: fix fd leak in
truncate (stub)) posted (#1) for review on master by Venky Shankar
(vshankar at redhat.com)

--- Additional comment from Anand Avati on 2015-06-04 09:00:19 EDT ---

REVIEW: http://review.gluster.org/11077 (features/bitrot: fix fd leak in
truncate (stub)) posted (#2) for review on master by Venky Shankar
(vshankar at redhat.com)

--- Additional comment from Anand Avati on 2015-06-15 11:48:43 EDT ---

REVIEW: http://review.gluster.org/11077 (features/bitrot: fix fd leak in
truncate (stub)) posted (#3) for review on master by Venky Shankar
(vshankar at redhat.com)


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1227996
[Bug 1227996] Objects are not signed upon truncate()
-- 
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