Bug 832497 - powertop crashes on launch due to /sys differences for BAT0
Summary: powertop crashes on launch due to /sys differences for BAT0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: powertop
Version: 17
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 835682 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-15 14:43 UTC by Alex Chernyakhovsky
Modified: 2012-07-14 22:00 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-14 21:50:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Alex Chernyakhovsky 2012-06-15 14:43:11 UTC
Description of problem:
powertop crashes with the following message:
terminate called after throwing an instance of 'std::ios_base::failure'
what():  basic_filebuf::underflow error reading the file
Aborted (core dumped)

strace shows
open("/sys/class/power_supply/BAT0/power_now", O_RDONLY) = -1 ENOENT (No such file or directory)                                           open("/sys/class/power_supply/BAT0/energy_now", O_RDONLY) = -1 ENOENT (No such file or directory)

right before the crash, neither of these exist in /sys on my system, but instead there are charge_now, current_now, voltage_now.

Version-Release number of selected component (if applicable):
powertop-2.0-2.fc17.x86_64
kernel-3.4.0-1.fc17.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. Run powertop on a laptop
2.
3.
  
Actual results:
powertop crashes and dumps core

Expected results:
powertop launches

Additional info:

Comment 1 Lukas Vrabec 2012-06-19 14:50:20 UTC
I have the same problem but on my laptop powertop works fine when it's on AC power. So I think powertop crashes only when laptop is on battery power. I'm using the same version of powertop but my kernel is kernel-3.4.2-4.fc17.x86_64.

Comment 2 Jaroslav Škarvada 2012-07-03 13:18:40 UTC
Could you try the following experimental build?
http://koji.fedoraproject.org/koji/taskinfo?taskID=4216033

Please let me know whether it helps.

Comment 3 Lukas Vrabec 2012-07-03 18:50:16 UTC
So, I have tried it on my laptop and it works fine. Calibracion has also ended successfully and powertop is running without errors. thank you

Comment 4 Jaroslav Škarvada 2012-07-04 08:04:20 UTC
*** Bug 835682 has been marked as a duplicate of this bug. ***

Comment 5 Jaroslav Škarvada 2012-07-04 08:12:22 UTC
Thanks for testing, pushing the update.

Comment 6 Fedora Update System 2012-07-04 08:29:05 UTC
powertop-2.0-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/powertop-2.0-3.fc17

Comment 7 Fedora Update System 2012-07-04 08:29:20 UTC
powertop-2.0-3.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/powertop-2.0-3.fc16

Comment 8 Fedora Update System 2012-07-05 23:34:22 UTC
Package powertop-2.0-3.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing powertop-2.0-3.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-10273/powertop-2.0-3.fc17
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2012-07-14 21:50:12 UTC
powertop-2.0-3.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2012-07-14 22:00:15 UTC
powertop-2.0-3.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


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