Opened 15 years ago
Closed 15 years ago
#4281 closed bug (fixed)
[acpi_battery] vm_soft_fault + vm_page_fault in ReadBatteryStatus()
Reported by: | michael.weirauch | Owned by: | czeidler |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Drivers | Version: | R1/pre-alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | x86 |
Attachments (4)
Change History (17)
by , 15 years ago
Attachment: | haiku-r32497-acpi_battery-vm_page_fault.jpg added |
---|
follow-up: 2 comment:1 by , 15 years ago
comment:2 by , 15 years ago
comment:3 by , 15 years ago
Yeah, I'm wondering if they're different symptoms of the same underlying problems or not...
comment:4 by , 15 years ago
Luckily, I was just able to reproduce this with the TextSearch add-on. Happened on a second search after a longer lasting first search through the trunk/headers.
Backtrace looks exactly the same.
Suspiciously an issued reboot freezes the system immedeately, which might be just a coincidence, but I do experience complete freezes described in #3772.
comment:5 by , 15 years ago
And another KDL. Just right out of the blue. This time, the KDL showed up, and the system was in a frozen state immedeately.
Really wondering if this might indeed point to some underlying ACPI issues which just show up more "aggressively" on my system.
comment:6 by , 15 years ago
At least, acpi_battery::ReadBatteryStatus doesn't do much check before assuming the ACPI object returned is
- a package
- have indeed 4 sub-objects packaged in it
- all are of integer type.
Last but not least, there is no user_memcpy() to return data to userland. AFAIK and unlike BeOS, Haiku don't lock automatically the memory handed to a driver by the userland caller. Under massive activity, maybe it's logical the userland page is not there...
comment:7 by , 15 years ago
Owner: | changed from | to
---|
by , 15 years ago
Attachment: | acpi_battery.cpp.patch added |
---|
Patch to add missing user_memcpy and some safety checks.
comment:8 by , 15 years ago
Again, I'm not at home to check this patch, so it's untested. But missing user_memcpy and frequent calls doesn't match great...
comment:9 by , 15 years ago
Hi Philippe,
I have issues applying the patch:
michael@think:/store/data/devel/haiku/svn/trunk> patch -i ../../_patches/acpi_battery.cpp.patch --verbose --verbose -p5 --dry-run Hmm... Looks like a unified diff to me... (Stripping trailing CRs from patch.) The text leading up to this was: -------------------------- |--- /Data/projects/haiku/trunk/src/add-ons/kernel/drivers/power/acpi_battery/acpi_battery.cpp (revision 31481) |+++ /Data/projects/haiku/trunk/src/add-ons/kernel/drivers/power/acpi_battery/acpi_battery.cpp (working copy) -------------------------- Patching file src/add-ons/kernel/drivers/power/acpi_battery/acpi_battery.cpp using Plan A... Hunk #1 succeeded at 49. Hunk #2 succeeded at 94. patch: **** malformed patch at line 165:
comment:10 by , 15 years ago
Thanks to Philippe,
the segfault is apparently fixed with hrev32584. Would consider this one closeable.
I now for the first time saw a lot of ACPI erros in the syslog before the system froze. Is probably a candidate for another bug report.
Michael
comment:11 by , 15 years ago
Please ignore the previous message...
Attached two shots. One with a freeze and some syslog output full of ACPI errors, the other with a KDL where the last lines of syslog are shown with ACPI erros. The backtrace for the KDL one was ommited because it resembled the ones already given in the ticket.
What is new for me is the ACPI output in the syslogs. Not seen any ACPI related stuff ever before IIRC.
by , 15 years ago
Attachment: | haiku-gcc4-trunk-r32667-acpi_battery-freeze.jpg added |
---|
by , 15 years ago
Attachment: | haiku-gcc4-trunk-r32667-acpi_battery-kdl.jpg added |
---|
comment:12 by , 15 years ago
hrev33299-trunk-gcc4;
I've now grepped (TextSearch) the trunk/src for stdio and trunk/headers for l2cap several times with PowerStatus and acpi_battery installed. No syslog errors, no KDL, no freeze. Would consider this one fixed for real with the recent acpi changes.
comment:13 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Possibly related to #4152?