svn commit: r298425 - head/sys/dev/acpica

Zbigniew Bodek zbb at semihalf.com
Wed Apr 27 14:57:50 UTC 2016


Hello,

I'm forwarding a message from Michal Stanek who found some problems wit
this commit. Please see below:

-------------------------------------------
I'm getting a lot of ACPI error messages on ThunderX (arm64). The kernel
also panics before it gets to prompt.
Running bisect pointed to this patch as the culprit.

Removing acpi from GENERIC configuration fixes the issue.

Here is the boot log:

FreeBSD/SMP: Multiprocessor System Detected: 48 CPUs
random: entropy device external interface
ACPI: Table initialisation failed: AE_NOT_FOUND
ACPI: Try disabling either ACPI or apic support.
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
(...)
Timecounters tick every 1.000 msec
usbus0: 5.0Gbps Super Speed USB v3.0
usbus1: 5.0Gbps Super Speed USB v3.0
ugen0.1: <0x177d> at usbus0
uhub0: <0x177d XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ugen1.1: <0x177d> at usbus1
uhub1: <0x177d XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus1
ACPI Exception: AE_BAD_PARAMETER, Thread 100112 could not acquire Mutex
[0x1] (20150818/utmutex-320)
ACPI Exception: AE_BAD_PARAMETER, Thread 100112 could not acquire Mutex
[0x1] (20150818/utmutex-320)
ACPI Exception: AE_BAD_PARAMETER, Thread 100112 could not acquire Mutex
[0x1] (20150818/utmutex-320)
ACPI Exception: AE_BAD_PARAMETER, Thread 100112 could not acquire Mutex
[0x1] (20150818/utmutex-320)
ACPI Exception: AE_BAD_PARAMETER, Thread 100112 could not acquire Mutex
[0x1] (20150818/utmutex-320)
ACPI Exception: AE_BAD_PARAMETER, Thread 100112 could not acquire Mutex
[0x1] (20150818/utmutex-320)
ACPI Exception: AE_BAD_PARAMETER, Thread 100112 could not acquire Mutex
[0x1] (20150818/utmutex-320)
ACPI Exception: AE_BAD_PARAMETER, Thread 100112 could not acquire Mutex
[0x1] (20150818/utmutex-320)
ACPI Exception: AE_BAD_PARAMETER, Thread 100112 could not acquire Mutex
[0x1] (20150818/utmutex-320)
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <ST380815AS 3.AAD> ATA-7 SATA 1.x device
ada0: Serial Number 9QZ6QN7K
ada0: 150.000MB/s transfers (SATA 1.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 76319MB (156301488 512 byte sectors)
ACPI Exception: AE_BAD_PARAMETER, nfs_diskless: no NFS handle
Release APs
CPU  0: Cavium Thunder r0p1 affinity:  0  0
 Instruction Set Attributes 0 = <AES+PMULL,SHA1,SHA2,CRC32>
 Instruction Set Attributes 1 = <0>
Thread 100112 could not acquire Mutex [0x1]         Processor Features 0 =
< (20150818/utmutex-320)
GICACPI Exception: AE_BAD_PARAMETER, ,AdvSIMDThread 100112 could not
acquire Mutex [0x1],Float (20150818/utmutex-320)
,EL3ACPI Exception: AE_BAD_PARAMETER, ,EL2Thread 100112 could not acquire
Mutex [0x1],EL1 (20150818/utmutex-320)
,EL0ACPI Exception: AE_BAD_PARAMETER, >
Thread 100112 could not acquire Mutex [0x1]         Processor Features 1 =
<0>
 (20150818/utmutex-320)
      Memory Model Features 0 = <ACPI Exception: AE_BAD_PARAMETER, 4k
GranuleThread 100112 could not acquire Mutex [0x1],16k Granule
(20150818/utmutex-320)
,64k GranuleACPI Exception: AE_BAD_PARAMETER, ,MixedEndianThread 100112
could not acquire Mutex [0x1],S/NS Mem (20150818/utmutex-320)
,16bit ASIDACPI Exception: AE_BAD_PARAMETER, ,256TB PAThread 100112 could
not acquire Mutex [0x1]>
 (20150818/utmutex-320)
      Memory Model Features 1 = <0x20>
ACPI Exception: AE_BAD_PARAMETER,              Debug Features 0 = <Thread
100112 could not acquire Mutex [0x1]6 CTX Breakpoints (20150818/utmutex-320)
,4 WatchpointsACPI Exception: AE_BAD_PARAMETER, ,6 BreakpointsThread 100112
could not acquire Mutex [0x1],PMUv3 (20150818/utmutex-320)
,Debug v8ACPI Exception: AE_BAD_PARAMETER, >
Thread 100112 could not acquire Mutex [0x1]             Debug Features 1 =
<0>
 (20150818/utmutex-320)
         Auxiliary Features 0 = <0>
ACPI Exception: AE_BAD_PARAMETER,          Auxiliary Features 1 = <0>
Thread 100112 could not acquire Mutex [0x1]CPU  1: Cavium Thunder r0p1
(20150818/utmutex-320)
 affinity:ACPI Exception: AE_BAD_PARAMETER,   0Thread 100112 could not
acquire Mutex [0x1]  1 (20150818/utmutex-320)

ACPI Exception: AE_BAD_PARAMETER, CPU  2: Cavium Thunder r0p1Thread 100112
could not acquire Mutex [0x1] affinity: (20150818/utmutex-320)
  0ACPI Exception: AE_BAD_PARAMETER,   2Thread 100112 could not acquire
Mutex [0x1]
 (20150818/utmutex-320)
CPU  3: Cavium Thunder r0p1ACPI Exception: AE_BAD_PARAMETER,
 affinity:Thread 100112 could not acquire Mutex [0x1]  0
(20150818/utmutex-320)
  3ACPI Exception: AE_BAD_PARAMETER,
Thread 100112 could not acquire Mutex [0x1]CPU  4: Cavium Thunder r0p1
(20150818/utmutex-320)
 affinity:ACPI Exception: AE_BAD_PARAMETER,   0Thread 100112 could not
acquire Mutex [0x1]  4 (20150818/utmutex-320)

ACPI Exception: AE_BAD_PARAMETER, CPU  5: Cavium Thunder r0p1Thread 100112
could not acquire Mutex [0x1] affinity: (20150818/utmutex-320)
  0ACPI Exception: AE_BAD_PARAMETER,   5Thread 100112 could not acquire
Mutex [0x1]
 (20150818/utmutex-320)
CPU  6: Cavium Thunder r0p1ACPI Exception: AE_BAD_PARAMETER,
 affinity:Thread 100112 could not acquire Mutex [0x1]  0
(20150818/utmutex-320)
  6ACPI Exception: AE_BAD_PARAMETER,
Thread 100112 could not acquire Mutex [0x1]CPU  7: Cavium Thunder r0p1
(20150818/utmutex-320)
 affinity:ACPI Exception: AE_BAD_PARAMETER,   0Thread 100112 could not
acquire Mutex [0x1]  7 (20150818/utmutex-320)

ACPI Exception: AE_BAD_PARAMETER, CPU  8: Cavium Thunder r0p1Thread 100112
could not acquire Mutex [0x1] affinity: (20150818/utmutex-320)
  0ACPI Exception: AE_BAD_PARAMETER,   8Thread 100112 could not acquire
Mutex [0x1]
 (20150818/utmutex-320)
CPU  9: Cavium Thunder r0p1ACPI Exception: AE_BAD_PARAMETER,
 affinity:Thread 100112 could not acquire Mutex [0x1]  0
(20150818/utmutex-320)
  9ACPI Exception: AE_BAD_PARAMETER,
Thread 100112 could not acquire Mutex [0x1]CPU 10: Cavium Thunder r0p1
(20150818/utmutex-320)
 affinity:ACPI Exception: AE_BAD_PARAMETER,   0Thread 100112 could not
acquire Mutex [0x1] 10 (20150818/utmutex-320)

ACPI Exception: AE_BAD_PARAMETER, CPU 11: Cavium Thunder r0p1Thread 100112
could not acquire Mutex [0x1] affinity: (20150818/utmutex-320)
  0ACPI Exception: AE_BAD_PARAMETER,  11Thread 100112 could not acquire
Mutex [0x1]
 (20150818/utmutex-320)
CPU 12: Cavium Thunder r0p1ACPI Exception: AE_BAD_PARAMETER,
 affinity:Thread 100112 could not acquire Mutex [0x1]  0
(20150818/utmutex-320)
 12ACPI Exception: AE_BAD_PARAMETER,
Thread 100112 could not acquire Mutex [0x1]CPU 13: Cavium Thunder r0p1
(20150818/utmutex-320)
 affinity:ACPI Exception: AE_BAD_PARAMETER,   0Thread 100112 could not
acquire Mutex [0x1] 13 (20150818/utmutex-320)

ACPI Exception: AE_BAD_PARAMETER, CPU 14: Cavium Thunder r0p1Thread 100112
could not acquire Mutex [0x1] affinity: (20150818/utmutex-320)
  0ACPI Exception: AE_BAD_PARAMETER,  14Thread 100112 could not acquire
Mutex [0x1]
 (20150818/utmutex-320)
CPU 15: Cavium Thunder r0p1ACPI Exception: AE_BAD_PARAMETER,
 affinity:Thread 100112 could not acquire Mutex [0x1]  0
(20150818/utmutex-320)
 15ACPI Exception: AE_BAD_PARAMETER,
Thread 100112 could not acquire Mutex [0x1]CPU 16: Cavium Thunder r0p1
(20150818/utmutex-320)
 affinity:ACPI Exception: AE_BAD_PARAMETER,   1Thread 100112 could not
acquire Mutex [0x1]  0 (20150818/utmutex-320)

ACPI Exception: AE_BAD_PARAMETER, CPU 17: Cavium Thunder r0p1Thread 100112
could not acquire Mutex [0x1] affinity: (20150818/utmutex-320)
  1ACPI Exception: AE_BAD_PARAMETER,   1Thread 100112 could not acquire
Mutex [0x1]
 (20150818/utmutex-320)
CPU 18: Cavium Thunder r0p1 affinity:  1  2
CPU 19: Cavium Thunder r0p1 affinity:  1  3
CPU 20: Cavium Thunder r0p1 affinity:  1  4
CPU 21: Cavium Thunder r0p1 affinity:  1  5
CPU 22: Cavium Thunder r0p1 affinity:  1  6
CPU 23: Cavium Thunder r0p1 affinity:  1  7
CPU 24: Cavium Thunder r0p1 affinity:  1  8
CPU 25: Cavium Thunder r0p1 affinity:  1  9
CPU 26: Cavium Thunder r0p1 affinity:  1 10
CPU 27: Cavium Thunder r0p1 affinity:  1 11
CPU 28: Cavium Thunder r0p1 affinity:  1 12
CPU 29: Cavium Thunder r0p1 affinity:  1 13
CPU 30: Cavium Thunder r0p1 affinity:  1 14
CPU 31: Cavium Thunder r0p1 affinity:  1 15
CPU 32: Cavium Thunder r0p1 affinity:  2  0
CPU 33: Cavium Thunder r0p1 affinity:  2  1
CPU 34: Cavium Thunder r0p1 affinity:  2  2
CPU 35: Cavium Thunder r0p1 affinity:  2  3
CPU 36: Cavium Thunder r0p1 affinity:  2  4
CPU 37: Cavium Thunder r0p1 affinity:  2  5
CPU 38: Cavium Thunder r0p1 affinity:  2  6
CPU 39: Cavium Thunder r0p1 affinity:  2  7
CPU 40: Cavium Thunder r0p1 affinity:  2  8
CPU 41: Cavium Thunder r0p1 affinity:  2  9
CPU 42: Cavium Thunder r0p1 affinity:  2 10
CPU 43: Cavium Thunder r0p1 affinity:  2 11
CPU 44: Cavium Thunder r0p1 affinity:  2 12
CPU 45: Cavium Thunder r0p1 affinity:  2 13
CPU 46: Cavium Thunder r0p1 affinity:  2 14
CPU 47: Cavium Thunder r0p1 affinity:  2 15
WARNING: WITNESS option enabled, expect reduced performance.
Root mount waiting for: usbus1 usbus0
uhub1: 2 ports with 2 removable, self powered
uhub0: 2 ports with 2 removable, self powered
ugen1.2: <Realtek> at usbus1
uhub2: <Realtek USB3.0 Hub, class 9/0, rev 2.10/1.11, addr 1> on usbus1
uhub2: MTT could not be enabled
device_attach: uhub2 attach returned 6
Root mount waiting for: usbus1
ugen1.3: <Realtek> at usbus1
uhub2: <Interrupt In Interface> on usbus1
uhub2: 4 ports with 4 removable, self powered

Loader variables:

Manual root filesystem specification:
  <fstype>:<device> [options]
      Mount <device> using filesystem <fstype>
      and with the specified (optional) option list.

    eg. ufs:/dev/da0s1a
        zfs:tank
        cd9660:/dev/cd0 ro
          (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)

  ?               List valid disk boot devices
  .               Yield 1 second (for background tasks)
  <empty line>    Abort manual input

mountroot> ufs:/dev/ada0s2
Trying to mount root from ufs:/dev/ada0s2 []...
usb_dev_suspend_peer: Setting device remote wakeup failed
warning: no time-of-day clock registered, system time will not be set
accurately
usb_dev_resume_peer: Clearing device remote wakeup failed: USB_ERR_STALLED
Setting hostuuid: 701a2acc-d0a0-11e5-8550-001517169365.
Setting hostid: 0x2abffeca.
No suitable dump device was found.
Starting file system checks:
/dev/ada0s2: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ada0s2: clean, 15310288 free (1672 frags, 1913577 blocks, 0.0%
fragmentation)
Mounting local file systems:.
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib
/usr/local/llvm36/lib
random: unblocking device.
Setting hostname: thunder_crb4.
Setting up
harvesting:[UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED
Feeding entropy:.
Starting Network: lo0 em0.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
    inet 127.0.0.1 netmask 0xff000000
    groups: lo
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500

options=4019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN_HWTSO>
    ether 00:15:17:16:93:65
    media: Ethernet autoselect
    status: no carrier
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Starting devd.
panic: Bad link elm 0xfffffd0004972020 next->prev != elm
cpuid = 47
KDB: stack backtrace:
db_trace_self() at db_trace_self_wrapper+0x28
     pc = 0xffff000000532e20  lr = 0xffff0000000770e4
     sp = 0xffff0006535fd510  fp = 0xffff0006535fd720

db_trace_self_wrapper() at vpanic+0x170
     pc = 0xffff0000000770e4  lr = 0xffff0000002a8278
     sp = 0xffff0006535fd730  fp = 0xffff0006535fd7b0

vpanic() at panic+0x4c
     pc = 0xffff0000002a8278  lr = 0xffff0000002a8308
     sp = 0xffff0006535fd7c0  fp = 0xffff0006535fd840

panic() at devread+0x174
     pc = 0xffff0000002a8308  lr = 0xffff0000002dbea4
     sp = 0xffff0006535fd850  fp = 0xffff0006535fd870

devread() at devfs_read_f+0xdc
     pc = 0xffff0000002dbea4  lr = 0xffff00000019981c
     sp = 0xffff0006535fd880  fp = 0xffff0006535fd8d0

devfs_read_f() at dofileread+0x9c
     pc = 0xffff00000019981c  lr = 0xffff000000303ebc
     sp = 0xffff0006535fd8e0  fp = 0xffff0006535fd920

dofileread() at kern_readv+0x6c
     pc = 0xffff000000303ebc  lr = 0xffff000000303ba4
     sp = 0xffff0006535fd930  fp = 0xffff0006535fd970

kern_readv() at sys_read+0x7c
     pc = 0xffff000000303ba4  lr = 0xffff000000303b28
     sp = 0xffff0006535fd980  fp = 0xffff0006535fd9c0

sys_read() at do_el0_sync+0x4d4
     pc = 0xffff000000303b28  lr = 0xffff00000054906c
     sp = 0xffff0006535fd9d0  fp = 0xffff0006535fda80

do_el0_sync() at handle_el0_sync+0x64
     pc = 0xffff00000054906c  lr = 0xffff0000005349d0
     sp = 0xffff0006535fda90  fp = 0xffff0006535fdba0

handle_el0_sync() at 0x403074
     pc = 0xffff0000005349d0  lr = 0x0000000000403074
     sp = 0xffff0006535fdbb0  fp = 0x0000ffffffffed30

KDB: enter: panic
[ thread pid 268 tid 100177 ]
Stopped at      kdb_enter+0x40: undefined       d4200000
db>

2016-04-21 20:27 GMT+02:00 John Baldwin <jhb at freebsd.org>:

> Author: jhb
> Date: Thu Apr 21 18:27:05 2016
> New Revision: 298425
> URL: https://svnweb.freebsd.org/changeset/base/298425
>
> Log:
>   Queue the CPU-probing task after all acpi_cpu devices are attached.
>
>   Eventually with earlier AP startup this code will change to call the
>   startup function synchronously instead of queueing the task.  Moving
>   the time we queue the task should be a no-op since taskqueue threads
>   don't start executing tasks until much later, but this reduces the diff
>   with the earlier AP startup patches.
>
>   Sponsored by: Netflix
>
> Modified:
>   head/sys/dev/acpica/acpi_cpu.c
>
> Modified: head/sys/dev/acpica/acpi_cpu.c
>
> ==============================================================================
> --- head/sys/dev/acpica/acpi_cpu.c      Thu Apr 21 17:45:37 2016
> (r298424)
> +++ head/sys/dev/acpica/acpi_cpu.c      Thu Apr 21 18:27:05 2016
> (r298425)
> @@ -355,9 +355,6 @@ acpi_cpu_attach(device_t dev)
>         cpu_sysctl_tree = SYSCTL_ADD_NODE(&cpu_sysctl_ctx,
>             SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, "cpu",
>             CTLFLAG_RD, 0, "node for CPU children");
> -
> -       /* Queue post cpu-probing task handler */
> -       AcpiOsExecute(OSL_NOTIFY_HANDLER, acpi_cpu_startup, NULL);
>      }
>
>      /*
> @@ -423,17 +420,27 @@ acpi_cpu_postattach(void *unused __unuse
>      device_t *devices;
>      int err;
>      int i, n;
> +    int attached;
>
>      err = devclass_get_devices(acpi_cpu_devclass, &devices, &n);
>      if (err != 0) {
>         printf("devclass_get_devices(acpi_cpu_devclass) failed\n");
>         return;
>      }
> +    attached = 0;
> +    for (i = 0; i < n; i++)
> +       if (device_is_attached(devices[i]))
> +           attached = 1;
>      for (i = 0; i < n; i++)
>         bus_generic_probe(devices[i]);
>      for (i = 0; i < n; i++)
>         bus_generic_attach(devices[i]);
>      free(devices, M_TEMP);
> +
> +    if (attached) {
> +       /* Queue post cpu-probing task handler */
> +       AcpiOsExecute(OSL_NOTIFY_HANDLER, acpi_cpu_startup, NULL);
> +    }
>  }
>
>  SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE,
> _______________________________________________
> svn-src-all at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
>


More information about the svn-src-all mailing list