Bug 763847 (GLUSTER-2115)

Summary: fd leak in nfs when dd is used
Product: [Community] GlusterFS Reporter: Krishna Srinivas <krishna>
Component: nfsAssignee: Shehjar Tikoo <shehjart>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 3.1.0CC: gluster-bugs, vijay
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTP Mount Type: nfs
Documentation: DNR CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Krishna Srinivas 2010-11-16 07:17:00 EST
13036 is the glusterd

[root@brick1 vm1]# ls -l /proc/13036/fd
total 0
lrwx------ 1 root root 64 Nov 16 04:14 0 -> /dev/null
lrwx------ 1 root root 64 Nov 16 04:14 1 -> /dev/null
lrwx------ 1 root root 64 Nov 16 04:14 2 -> /dev/null
lrwx------ 1 root root 64 Nov 16 04:14 3 -> anon_inode:[eventpoll]
l-wx------ 1 root root 64 Nov 16 04:14 4 -> /usr/local/var/log/glusterfs/bricks/export-export.log
lrwx------ 1 root root 64 Nov 16 04:14 5 -> /etc/glusterd/vols/test/run/brick1-export-export.pid
lrwx------ 1 root root 64 Nov 16 04:14 6 -> socket:[3618165]
lrwx------ 1 root root 64 Nov 16 04:14 7 -> socket:[3618184]
lrwx------ 1 root root 64 Nov 16 04:14 8 -> /tmp/tmpfFg5P3U (deleted)
lrwx------ 1 root root 64 Nov 16 04:14 9 -> socket:[3618176]

create a file using dd:

[root@brick1 vm1]# dd if=/dev/zero of=test bs=1M count=10
10+0 records in
10+0 records out
10485760 bytes (10 MB) copied, 0.107314 seconds, 97.7 MB/s

now you can see that there are 2 fds for test:

[root@brick1 vm1]# ls -l /proc/13036/fd
total 0
lrwx------ 1 root root 64 Nov 16 04:14 0 -> /dev/null
lrwx------ 1 root root 64 Nov 16 04:14 1 -> /dev/null
lrwx------ 1 root root 64 Nov 16 04:14 10 -> /export/export/vm1/test
lrwx------ 1 root root 64 Nov 16 04:14 11 -> /export/export/vm1/test
lrwx------ 1 root root 64 Nov 16 04:14 2 -> /dev/null
lrwx------ 1 root root 64 Nov 16 04:14 3 -> anon_inode:[eventpoll]
l-wx------ 1 root root 64 Nov 16 04:14 4 -> /usr/local/var/log/glusterfs/bricks/export-export.log
lrwx------ 1 root root 64 Nov 16 04:14 5 -> /etc/glusterd/vols/test/run/brick1-export-export.pid
lrwx------ 1 root root 64 Nov 16 04:14 6 -> socket:[3618165]
lrwx------ 1 root root 64 Nov 16 04:14 7 -> socket:[3618184]
lrwx------ 1 root root 64 Nov 16 04:14 8 -> /tmp/tmpfFg5P3U (deleted)
lrwx------ 1 root root 64 Nov 16 04:14 9 -> socket:[3618176]

remove test file:

[root@brick1 vm1]# rm -f test

you can see the following line :lrwx------ 1 root root 64 Nov 16 04:14 10 -> /export/export/vm1/test (deleted)

[root@brick1 vm1]# ls -l /proc/13036/fd
total 0
lrwx------ 1 root root 64 Nov 16 04:14 0 -> /dev/null
lrwx------ 1 root root 64 Nov 16 04:14 1 -> /dev/null
lrwx------ 1 root root 64 Nov 16 04:14 10 -> /export/export/vm1/test (deleted)
lrwx------ 1 root root 64 Nov 16 04:14 2 -> /dev/null
lrwx------ 1 root root 64 Nov 16 04:14 3 -> anon_inode:[eventpoll]
l-wx------ 1 root root 64 Nov 16 04:14 4 -> /usr/local/var/log/glusterfs/bricks/export-export.log
lrwx------ 1 root root 64 Nov 16 04:14 5 -> /etc/glusterd/vols/test/run/brick1-export-export.pid
lrwx------ 1 root root 64 Nov 16 04:14 6 -> socket:[3618165]
lrwx------ 1 root root 64 Nov 16 04:14 7 -> socket:[3618184]
lrwx------ 1 root root 64 Nov 16 04:14 8 -> /tmp/tmpfFg5P3U (deleted)
lrwx------ 1 root root 64 Nov 16 04:14 9 -> socket:[3618176]
[root@brick1 vm1]#
Comment 1 Shehjar Tikoo 2010-12-23 00:25:54 EST
Doc pending but I am not yet sure whats going on. Please ignore documenting this for now.
Comment 2 Shehjar Tikoo 2011-02-21 22:42:25 EST
Not seen on latest git. Closing. Krish, please re-open if the problem surfaces in your test. Thanks.