Bug 550014

Summary: khungtaskd not stopped during suspend
Product: Red Hat Enterprise Linux 5 Reporter: Cong Wang <amwang>
Component: kernelAssignee: Cong Wang <amwang>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: high    
Version: 5.5CC: anton, dag, dwa, jfeeney, jkachuck, khong, qzhang, rdoty, rkhan, tao, toshaan, tpelka, vbenes, yzhou
Target Milestone: rcKeywords: Regression
Target Release: 5.5   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 07:10:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 506059, 512013    

Description Cong Wang 2009-12-23 09:51:03 UTC
Description of problem:

Matthew Garrett reported this problem:

I'm seeing suspend hang at the process freezer stage since this went in. 
The symptoms are:

 stopping tasks timed out after 120 seconds (1 tasks remaining):
  khungtaskd
Restarting tasks...<6> Strange, khungtaskd not stopped

Test machine is an XW9400, where I expect suspend to fail for half a 
dozen other reasons anyway, but this one is new.



Expected results:
Shoud not get that error message.

Additional info:

Comment 1 Cong Wang 2009-12-23 09:57:39 UTC
See also the discussion here:
http://post-office.corp.redhat.com/archives/rhkernel-list/2009-December/thread.html#01796

Comment 2 Anton Arapov 2010-01-04 14:06:55 UTC
*** Bug 550236 has been marked as a duplicate of this bug. ***

Comment 3 Anton Arapov 2010-01-04 14:07:50 UTC
*** Bug 549958 has been marked as a duplicate of this bug. ***

Comment 4 Anton Arapov 2010-01-04 14:08:00 UTC
*** Bug 549265 has been marked as a duplicate of this bug. ***

Comment 5 Anton Arapov 2010-01-04 14:09:26 UTC
Dupe of the bug 513203 ?

Comment 6 Anton Arapov 2010-01-04 14:13:04 UTC
*** Bug 548784 has been marked as a duplicate of this bug. ***

Comment 7 Jarod Wilson 2010-01-18 23:05:17 UTC
Setting flags to get it on pm's radar...

Comment 8 Matthew Garrett 2010-02-02 15:45:16 UTC
*** Bug 553153 has been marked as a duplicate of this bug. ***

Comment 9 Matthew Garrett 2010-02-02 15:45:26 UTC
*** Bug 561047 has been marked as a duplicate of this bug. ***

Comment 10 Matthew Garrett 2010-02-02 15:46:29 UTC
Shouldn't this be against 5.5?

Comment 13 Issue Tracker 2010-02-03 15:50:00 UTC
Event posted on 02-03-2010 03:20am EST by arindam.nath

File uploaded: fix_khungtaskd_cannot_freeze_during_S4.patch

This event sent from IssueTracker by jkachuck 
 issue 463493
it_file 358903

Comment 14 Issue Tracker 2010-02-03 15:50:02 UTC
Event posted on 02-03-2010 03:20am EST by arindam.nath

The attached patch fixes this issue.

Root Cause:
When system prepares to enter S3 (or S4), it tries to freeze all user
processes
and kernel threads. It sets the PF_FREEZE flag in the struct task_struct
before
sending a wake up signal to the kernel thread. The kernel thread should
in-turn
check the value of this flag after being woken up to confirm whether it is
a
request to freeze and take appropriate action.

Status set to: Waiting on Tech

This event sent from IssueTracker by jkachuck 
 issue 463493

Comment 15 Cong Wang 2010-02-04 01:35:28 UTC
(In reply to comment #13)
> Event posted on 02-03-2010 03:20am EST by arindam.nath
> 
> File uploaded: fix_khungtaskd_cannot_freeze_during_S4.patch
> 
> This event sent from IssueTracker by jkachuck 
>  issue 463493
> it_file 358903    

Thanks but we already fixed this, see:

http://post-office.corp.redhat.com/archives/rhkernel-list/2009-December/msg01859.html

Comment 16 RHEL Program Management 2010-02-04 23:22:15 UTC
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
release.

Comment 18 Matthew Garrett 2010-02-09 16:25:54 UTC
*** Bug 560826 has been marked as a duplicate of this bug. ***

Comment 19 Vladimir Benes 2010-02-15 13:25:00 UTC
Can also reproduce using HP Compaq 6510b laptop

Comment 20 Dag Wieers 2010-02-15 23:01:14 UTC
Still not fixed with post 5.5-beta kernel 2.6.18-187.el5.

Comment 21 Cong Wang 2010-02-16 02:26:51 UTC
Hey, I think it is still not in beta, but it will be in 5.5, from next build.

Thanks.

Comment 24 Vladimir Benes 2010-02-18 16:42:19 UTC
verified on HP 6510b x86_64 kernel -189 ..

can suspend/resume

Comment 25 Toshaan Bharvani 2010-02-20 09:06:26 UTC
kernel-2.6.18-189.el5
verified on ThinkPad T60/Z60/T43/T41/SL500
32bit (normal and PAE) and 64bit kernels

Comment 30 errata-xmlrpc 2010-03-30 07:10:14 UTC
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.

http://rhn.redhat.com/errata/RHSA-2010-0178.html