Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 596626 - Create reliable implementation of cancel_(delayed)_work_sync() in RHEL5
Create reliable implementation of cancel_(delayed)_work_sync() in RHEL5
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Oleg Nesterov
Zhouping Liu
Depends On:
Blocks: 582191
  Show dependency treegraph
Reported: 2010-05-27 03:19 EDT by Stanislaw Gruszka
Modified: 2014-01-12 19:00 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-01-13 16:34:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
test_workq kernel module (2.24 KB, text/plain)
2010-12-15 02:33 EST, Stanislaw Gruszka
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0017 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.6 kernel security and bug fix update 2011-01-13 05:37:42 EST

  None (edit)
Description Stanislaw Gruszka 2010-05-27 03:19:37 EDT
Description of problem:

(quote from Oleg)
"cancel_rearming_delayed_work + flush_workqueue has the following problems:

	- it hangs forever if the work doesn't rearm itsels (or if
	  it was never queued)

	- in fact it can't cancel the auto-rearming work too, if this
	  work is queued on >1 CPUs. But probably we can ignore this
	  very exotic case.

	- it can hang if called under any LOCK which could be used
	  by any other work which may be queued on the same wq.

We have some driver backported from upstream (like wireless stack) which have workqueue handlers like that 

   if (some_condition)
   queue_delayed_work(my->workqueue, my->work, delay);

We can stop that such work reliable in current RHEL5. We need cancel_delayed_work_sync and cancel_delayed_work with upstream semantics.
Comment 1 RHEL Product and Program Management 2010-05-27 03:41:19 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 2 Oleg Nesterov 2010-05-30 12:25:10 EDT
[RHEL5 PATCH 0/7] bz#596626: implement cancel_work_sync() and cancel_delayed_work_sync()
Comment 12 Jarod Wilson 2010-06-14 14:23:47 EDT
in kernel-2.6.18-203.el5
You can download this test kernel from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.
Comment 16 Stanislaw Gruszka 2010-12-15 02:33:26 EST
Created attachment 468781 [details]
test_workq kernel module

I used this module to test workqueues, old kernel hangs within minutes, with patch kernel survive a night and I terminate the test.
Comment 22 errata-xmlrpc 2011-01-13 16:34:50 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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