Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: ------------------------ Unlinking the file with open fd is leading to the unxpected failure Version-Release number of selected component (if applicable): --------------------------------------------------------------- RHGS 3.5.0 ( glusterfs-6.0-24.el7rhgs ) How reproducible: ------------------ always Steps to Reproduce: ------------------- 1. Run the script ( attached ), that open fd, unlinks file, tries to use that same fd Actual results: --------------- Failure Expected results: ------------------ All should work successfully
Satheesaran, Could you attach the script to the bz? -Krutika
(In reply to Krutika Dhananjay from comment #1) > Satheesaran, > Could you attach the script to the bz? > > -Krutika import mmap import os import stat #import time path = "/rhev/data-center/mnt/glusterSD/rhsqa-grafton10.lab.eng.blr.redhat.com:_engine/.probe_test" <<< This is the fuse mount path f = os.open(path, os.O_WRONLY | os.O_DIRECT | os.O_DSYNC | os.O_CREAT | os.O_EXCL, stat.S_IRUSR | stat.S_IWUSR) #time.sleep(20) os.unlink(path) #time.sleep(20) m = mmap.mmap(-1, 1024) s = b' ' * 1024 m.write(s) os.write(f, m) os.close(f)
Verified with glusterfs-6.0-59.el8rhgs with the following steps: 1. Created a c program ( process1) that opens the fd on the file and waits indefinitely 2. Created yet another C program that unlinks the file 3. There are no errors seen with process1 and completes successfully 4. Also the python script as per comment2 also worked without any error
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (RHGS 3.5.z Batch Update 5 glusterfs bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:3729