Bug 496811

Summary: acpidump segmentation fault (only on i386-pae with a lot memory?)
Product: [openSUSE] openSUSE 11.1 Reporter: andrea florio <andrea>
Component: BasesystemAssignee: Thomas Renninger <trenn>
Status: RESOLVED WORKSFORME QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P3 - Medium CC: rommie
Version: Final   
Target Milestone: ---   
Hardware: i386   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: /var/log/boot.msg log file
Only dump RSDT if XSDT must not be used or is not available or if --rsdt param is provided
my /proc/iomem

Description andrea florio 2009-04-21 10:29:25 UTC
Created attachment 287053 [details]
/var/log/boot.msg log file

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.0.8) Gecko/2009032600 SUSE/3.0.8-1.1.1 Firefox/3.0.8

i see an error similar to that one :

sh: line 1:  4556 Segmentation fault      /usr/sbin/acpidump 2> /dev/null

lot's of times

example.. if i run "sax2 -r"

suse-laptop:/home/anubis # sax2 -r
SaX: initializing please wait...
SaX: your current configuration will not be read in

SaX: access to your display has been granted
sh: line 1:  4556 Segmentation fault      /usr/sbin/acpidump 2> /dev/null
sh: line 1:  4570 Segmentation fault      /usr/sbin/acpidump 2> /dev/null
sh: line 1:  4590 Segmentation fault      /usr/sbin/acpidump 2> /dev/null
sh: line 1:  4594 Segmentation fault      /usr/sbin/acpidump 2> /dev/null
sh: line 1:  4598 Segmentation fault      /usr/sbin/acpidump 2> /dev/null
sh: line 1:  4602 Segmentation fault      /usr/sbin/acpidump 2> /dev/null
SPP: prepare device [0] profile: Depth24
SPP: prepare device [0] profile: NVidia
SPP: calling device [0] profile script: NVidia
SPP: prepare device [0] profile: NoModelines
SPP: prepare device [0] profile: Composite
SPP: prepare device [1] profile: synaptics
SPP: including prepared profile(s)...
SPP: prepare device [0] profile: nobus
SPP: including prepared profile(s)...

SaX: startup
SaX: X-Server: :0.0 -> grant
SaX: using cache data...



same error on boot (attachet /var/log/boot.msg (the shortest output is the following)

anubis@suse-laptop:~> cat /var/log/boot.msg | grep fault
<6>Using APIC driver default
<6>io scheduler cfq registered (default)
<6>perfmon: added sampling format default
net.ipv4.conf.default.promote_secondaries = 1
donesh: line 1:  2536 Segmentation fault      /usr/sbin/acpidump 2> /dev/null


my hardware : hp pavilion dv6855el --> http://en.opensuse.org/HCL/Laptops/HP/HP_Pavilion_dv6855el#Hardware

Reproducible: Always

Steps to Reproduce:
just boot and/or lunch sax2 -r
Actual Results:  
segmentation fault

Expected Results:  
should not crasch
Comment 1 andrea florio 2009-04-26 09:38:14 UTC
nobody care?
Comment 2 Roman Varenik 2009-04-27 14:24:28 UTC
I have the same crash every time I run acpidump. gdb says:

(gdb) r
Starting program: /usr/sbin/acpidump 
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0xb7ed8fb7 in memcmp () from /lib/libc.so.6
(gdb) bt
#0  0xb7ed8fb7 in memcmp () from /lib/libc.so.6
#1  0x08048c63 in acpi_map_table (where=3488600120, sig=0x8049e3a "RSDT") at acpidump.c:108
#2  0x080496dd in main (argc=Cannot access memory at address 0x4
) at acpidump.c:304

There's no need to reboot. acpidump crashes when started in console (sudoed).
Comment 3 andrea florio 2009-04-28 08:48:53 UTC
similar output here:

(gdb) r /usr/sbin/acpidump
Starting program: /usr/sbin/acpidump /usr/sbin/acpidump
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0xb7ecdfb7 in memcmp () from /lib/libc.so.6
(gdb)
Comment 4 Jeff Mahoney 2009-05-15 22:57:17 UTC
Assigning to pmtools maintainer.
Comment 5 Thomas Renninger 2009-05-19 11:08:00 UTC
I expect this system does not provide an RSDT table, only an XSDT one.
It also seem to have a random/invalid pointer to a RSDT table.
We know that older Microsoft OSes did use RSDT table, even they shouldn't.
At least Vista seem to make use of XSDT more spec conform. What Microsoft OSes are supported by this machine?

The address pointing to RSDT: 0x3488600120 is probably invalid but mmap does not return an error and when trying to access it, acpidump segfaults.

Some ideas:
   - provide a --rsdt param. Only dump RSDT if no XSDT gets dumped or --rsdt
     param is explicitly provided -> will attach patch.
   - check against e820 table, whether the tables all lie in reserved ACPI data
     regions -> a lot to do. It could be checked through /proc/iomem:
             cffc0000-cffcdfff : ACPI Tables
             cffce000-cffeffff : ACPI Non-volatile Storage
     All tables must lie in these regions.

There already is --skip option, but I do not understand it. Trying out a bit with it I always get an empty dump with --skip 1 -t ANY_TABLE or a full dump with only --skip 1. IMO this param can be reverted.

Alexey, what do you think?

Can you try acpidump from pmtools package provided here, please:
ftp.suse.com/pub/people/trenn/acpidump

It now should work without any param (Also try -a param). If you add --rsdt param you should get the same segfault?
Comment 6 Thomas Renninger 2009-05-19 11:10:40 UTC
Created attachment 292990 [details]
Only dump RSDT if XSDT must not be used or is not available or if --rsdt param is provided

Please attach acpidump -a of your tests.
Comment 7 Roman Varenik 2009-05-19 13:26:03 UTC
I suppose 3488600120 is decimal which is 0xCFEFD038. It is valid 32bit value though I understand nothing in acpi and can't say is it valid for acpi.
acpidump with -a failed with message "Unknown option!". The same is for --rsdt.
--skip 1, --skip 2, --skip -t ANY_TABLE segfaults.
I have 4 gigabytes RAM and use PAE:
Linux pc6 2.6.27.21-0.1-pae #1 SMP 2009-03-31 14:50:44 +0200 i686 i686 i386 GNU/Linux
May it cause acpidump crash?
Comment 8 Roman Varenik 2009-05-19 13:27:44 UTC
Created attachment 293024 [details]
my /proc/iomem
Comment 9 Roman Varenik 2009-05-19 13:34:48 UTC
Installed pmtools from the ftp. It is still segfaults. But now --rsdt option is valid and it segfaults too. -a is invalid.
Comment 10 Thomas Renninger 2009-05-19 13:53:28 UTC
> I have 4 gigabytes RAM and use PAE
Hmm, maybe this is related to -pae/i386 + 4 or more GB of memory...
Do you both have a -pae kernel running?
Maybe mem=1G helps?
Guessing..., you may want to give it a try, but someone else with more memory knowledge should have a look at this. Maybe this even is not acpidump related.
Comment 11 andrea florio 2009-05-19 15:24:41 UTC
i don't know what is happened but now it segfault no more... Oo only official updates...

anubis@suse-laptop:~> rpm -qf /usr/sbin/acpidump
pmtools-20071116-44.3
anubis@suse-laptop:~> rpm -qi pmtools
Name        : pmtools                      Relocations: (not relocatable)
Version     : 20071116                          Vendor: openSUSE
Release     : 44.3                          Build Date: mer 03 dic 2008 06:57:02 CET
Install Date: mar 09 dic 2008 23:11:48 CET      Build Host: build15
Group       : Development/Tools/Other       Source RPM: pmtools-20071116-44.3.src.rpm
Size        : 1138062                          License: GPL v2 or later
Signature   : RSA/8, mer 03 dic 2008 06:57:13 CET, Key ID b88b2fd43dbdc284
Packager    : http://bugs.opensuse.org
URL         : http://acpica.org/downloads
Summary     : ACPI Debugging Tools
Description :
This is a set of tools to display your BIOS ACPI tables.
Distribution: openSUSE 11.1


anyway i have 32bit kernel pae 4GB ram
Comment 12 Roman Varenik 2009-05-25 06:44:52 UTC
Tried mem=1G but it crashed anyway.
Comment 13 Thomas Renninger 2009-06-08 09:20:32 UTC
I tried to reproduce this here on a i386 and 4GB machine without success.
Not sure how to go on, I could imagine this bug is hard to resolve, especially remotely.
It even looks like a HW/BIOS related issue. Acpidump generally works.
I keep the bug open for a while, please update it if you find out more (e.g. an easy way to reproduce, a BIOS/boot option that helps, etc).
Comment 14 Roman Varenik 2009-06-29 15:36:11 UTC
Hmmm. It is strange but acpidump turned to work. Two weeks earlier it won't but version of acpidump from OpenSUSE 11.0 bootable CD worked well. The bootable CD contains default (not pae) kernel (which is older then my current version) and predefined boot configuration.
I suppose the problem could be caused by kernel (I think it have been updated) or conflict with some other application that is fixed now. Unfortunately, Yast update logs are missed and I can not surely say that packages have been updated since acpidump fixed.
Anyway, it works for me now.
Comment 15 andrea florio 2009-06-29 15:56:22 UTC
exactly same thing happen to me (comment #11)
Comment 16 Thomas Renninger 2010-02-16 12:12:57 UTC
Due to last comments and this potentially was an underlying problem we might never find out what caused it and as the bug is rather old -> resolved, eh say "works for me".