Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Cause: the patch for bug 678585 was incomplete. dlm_controld was still passing error results back to the kernel for posix unlock operations flagged with CLOSE.
Consequence: the kernel complains if it receives a posix lock result that it is not expecting: "dev_write no op ...". Many of these can appear, especially when using flocks (not posix locks).
Fix: dlm_controld is fixed to not pass error results to the kernel for posix unlock operations flagged with CLOSE.
Result: No "dev_write no op" messages should appear.
Description of problem:
When running tests with use flocks and multiple processes the console can be flooded with messages like this:
dlm: dev_write no op 2cb1031c a593
dlm: dev_write no op 2cb1031c a593
dlm: dev_write no op 2cb1031c a593
This message was added to catch problems with posix locks (fcntl).
Version-Release number of selected component (if applicable):
kernel-2.6.32-188.el6.x86_64
cman-3.0.12.1-10.el6.x86_64
How reproducible:
Easily
Steps to Reproduce:
PATH=$PATH:/usr/tests/sts-rhel6.2/bin; xiogen -S 13481 -m random -o -t 1b -T 1000b -F 1000b:/mnt/gfs2/flockfile | xdoio -v -i 50 -K -n 2
Actual results:
kernel messages are generated
Expected results:
no kernel messages are generated
Additional info:
Created attachment 518927[details]
the fix
dlm_controld: fix plock dev_write no op
When a plock unlock is received due to the file
being closed (the CLOSE flag is set), we should
not write an unlock result back to the kernel.
If we do, the kernel, which does not expect a
reply, will report the error "dev_write no op".
In cases where dlm_controld encounters and error
handling the unlock operation, it was writing
the error result back to the kernel, even though
the unlock was flagged with CLOSE. The fix is
to check for the CLOSE flag and skip writing
the error result, as we do with normal results.
This problem is especially visible when using
flocks (not plocks). This is because the kernel
generates extraneous plock unlock requests
when files are closed with flocks. Because
dlm_controld finds no plocks on the files,
it replies to the kernel with an error, rather
than skipping the reply to do CLOSE.
There are two ways reproduce this problem and likewise verify it is fixed:
(here using people.redhat.com/teigland/doflock.c)
1. close a file with an flock on it
# touch /gfs/a
# ./doflock /gfs/a 1 1 0 2000000 1
there should be no dev_write error
2. run two processes both opening/locking/unlocking/closing the same file
# touch /gfs/a
# ./doflock /gfs/a 1 1 1 10000 1000 & ./doflock /gfs/a 1 1 1 10000 1000
there should be no dev_write errors
Both tests create the error message prior to the fix, and don't after the fix.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
Cause: the patch for bug 678585 was incomplete. dlm_controld was still passing error results back to the kernel for posix unlock operations flagged with CLOSE.
Consequence: the kernel complains if it receives a posix lock result that it is not expecting: "dev_write no op ...". Many of these can appear, especially when using flocks (not posix locks).
Fix: dlm_controld is fixed to not pass error results to the kernel for posix unlock operations flagged with CLOSE.
Result: No "dev_write no op" messages should appear.
Verified fixed using tests from Description comment, as well as both tests in comment #5.
# uname -r; rpm -q cman
2.6.32-203.el6.x86_64
cman-3.0.12.1-23.el6.x86_64
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, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2011-1516.html