Bug 1782428 - Unlinking the file with open fd, is leading to unexpected behavior with sharding enabled
Summary: Unlinking the file with open fd, is leading to unexpected behavior with shard...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: sharding
Version: rhgs-3.5
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: RHGS 3.5.z Batch Update 7
Assignee: Vinayak Hariharmath
QA Contact: SATHEESARAN
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-11 15:57 UTC by SATHEESARAN
Modified: 2021-10-05 07:56 UTC (History)
6 users (show)

Fixed In Version: glusterfs-6.0-57
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-05 07:56:26 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:3729 0 None None None 2021-10-05 07:56:39 UTC

Description SATHEESARAN 2019-12-11 15:57:29 UTC
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

Comment 1 Krutika Dhananjay 2019-12-12 06:00:34 UTC
Satheesaran,
Could you attach the script to the bz?

-Krutika

Comment 2 SATHEESARAN 2019-12-17 05:34:00 UTC
(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)

Comment 22 SATHEESARAN 2021-07-21 13:35:30 UTC
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

Comment 24 errata-xmlrpc 2021-10-05 07:56:26 UTC
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


Note You need to log in before you can comment on or make changes to this bug.