Bug 1162809 - tuned throws exception on resume from hibernation
Summary: tuned throws exception on resume from hibernation
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: 21
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Matej Stuchlik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1230773
TreeView+ depends on / blocked
 
Reported: 2014-11-11 18:14 UTC by Dimitris
Modified: 2016-02-01 02:16 UTC (History)
16 users (show)

Fixed In Version:
Clone Of:
: 1230773 (view as bug list)
Environment:
Last Closed: 2015-12-02 04:55:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1108921 1 None None None 2021-01-20 06:05:38 UTC

Description Dimitris 2014-11-11 18:14:22 UTC
Description of problem:

I see an exception in tuned's log entries when I resume the laptop from hibernation

Version-Release number of selected component (if applicable):

2.4.1-1.fc20

How reproducible:

Just about every time I resume.

Steps to Reproduce:
1. tuned is active
2. hibernate
3. resume

Actual results:

Nov 11 08:58:47 gaspode tuned[941]: Exception in thread Thread-3:
Nov 11 08:58:47 gaspode tuned[941]: Traceback (most recent call last):
Nov 11 08:58:47 gaspode tuned[941]: File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
Nov 11 08:58:47 gaspode tuned[941]: self.run()
Nov 11 08:58:47 gaspode tuned[941]: File "/usr/lib/python2.7/site-packages/pyudev/monitor.py", line 402, in run
Nov 11 08:58:47 gaspode tuned[941]: for fd, _ in notifier.poll():
Nov 11 08:58:47 gaspode tuned[941]: IOError: [Errno 4] Interrupted system call


Expected results:

no exception.

Additional info:

I looked at tuned status while trying to troubleshoot bug 1161899 - suspecting that tuned somehow leaves/puts the SATA bus in a bad state upon resuming.  Is that possible?

Comment 1 Jaroslav Škarvada 2014-11-21 10:39:45 UTC
This is due to non-consistent behavior of python interpreter where some syscalls are restarted if interrupted and some aren't. I think this is something that we shouldn't try to workaround in libraries. There is already RHEL bug 1108921.

Comment 2 Jaroslav Škarvada 2014-11-21 10:43:24 UTC
(In reply to Dimitris from comment #0)
> I looked at tuned status while trying to troubleshoot bug 1161899 -
> suspecting that tuned somehow leaves/puts the SATA bus in a bad state upon
> resuming.  Is that possible?
>
Tuned uses kernel sysfs interface (and mostly only safe knobs), so it shouldn't be possible to put the SATA bus to bad state through it. I think this is very probably kernel (or firmware?) bug.

Comment 3 Fedora Admin XMLRPC Client 2015-05-12 12:03:45 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora End Of Life 2015-05-29 13:16:52 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Dimitris 2015-05-30 20:29:12 UTC
Same under F21.

Comment 6 Théophane de Logivière 2015-06-01 11:46:30 UTC
Hello,

I get the same exception after every SUSPEND action on Fedora Workstation 22
with last kernel 4.0.4-301.fc22.x86_64 and stock BALANCED profile activated.

Doing 'systemctl restart tuned' get it back on rails.

Comment 7 Jaroslav Škarvada 2015-06-01 12:07:39 UTC
(In reply to Théophane de Logivière from comment #6)
> Hello,
> 
> I get the same exception after every SUSPEND action on Fedora Workstation 22
> with last kernel 4.0.4-301.fc22.x86_64 and stock BALANCED profile activated.
> 
> Doing 'systemctl restart tuned' get it back on rails.

"Interrupted system call" exception? It's Python bug 1108921. I am afraid it may take long to fix the bug in Python, so it could be worth workaround in Tuned.

Comment 8 Théophane de Logivière 2015-06-01 15:08:13 UTC
(In reply to Jaroslav Škarvada from comment #7)
> (In reply to Théophane de Logivière from comment #6)
> > Hello,
> > 
> > I get the same exception after every SUSPEND action on Fedora Workstation 22
> > with last kernel 4.0.4-301.fc22.x86_64 and stock BALANCED profile activated.
> > 
> > Doing 'systemctl restart tuned' get it back on rails.
> 
> "Interrupted system call" exception? It's Python bug 1108921. I am afraid it
> may take long to fix the bug in Python, so it could be worth workaround in
> Tuned.

Exactly. Sadly, I'm not allowed to access to the bug report for my personal information but I effectively set up a workaround using systemd, to prevent the exception to be logged in journalctl. Maybe there is a better way ?

/etc/systemd/system/tuned_resume_workaround.service

[Unit]
Description=tuned sleep hook
Before=sleep.target
StopWhenUnneeded=yes

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/systemctl stop tuned.service
ExecStop=/usr/bin/systemctl start tuned.service

[Install]
WantedBy=sleep.target

Comment 9 Jaroslav Škarvada 2015-06-01 16:49:08 UTC
(In reply to Théophane de Logivière from comment #8)

This is really nice hack :)

But I will probably wrap the syscalls by restart handlers. This is the correct workaround for the underlying problem.

Comment 10 Jaroslav Škarvada 2015-06-11 14:07:11 UTC
I cannot restart the syscall in Tuned, because it's happening in python-pyudev which spawns own thread, so I cannot catch the exception.

It's python 2 interpreter bug which will be hardly fixed upstream, thus I think it would be useful to have harmless workaround in python-pyudev. So cloning there.

Comment 11 Fedora End Of Life 2015-11-04 15:30:26 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Fedora End Of Life 2015-12-02 04:55:14 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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