# Suspect system reboot



## getopt (Oct 11, 2015)

The system rebooted without user interaction. This has been found afterwards with `dmesg`:

```
spin lock 0xffffffff80bb3f98 (cnputs_mtx) held by 0xfffff80002b49000 (tid 100060) too long
panic: spin lock held too long
cpuid = 0
KDB: stack backtrace:
#0 0xffffffff8055c180 at kdb_backtrace+0x60
#1 0xffffffff80520f76 at vpanic+0x126
#2 0xffffffff80520e43 at panic+0x43
#3 0xffffffff8050cb37 at _mtx_lock_spin_cookie+0x287
#4 0xffffffff804d83c6 at cnputs+0x86
#5 0xffffffff80561541 at putchar+0x151
#6 0xffffffff80560166 at kvprintf+0xf6
#7 0xffffffff80561a6d at _vprintf+0x8d
#8 0xffffffff80561c83 at printf+0x53
#9 0xffffffff807bd201 at lapic_setup+0x201
#10 0xffffffff807ba761 at intr_resume+0xa1
#11 0xffffffff807a3807 at acpi_wakeup_machdep+0x247
#12 0xffffffff802eff9b at acpi_EnterSleepState+0x81b
#13 0xffffffff802f106c at acpi_pm_func+0x8c
#14 0xffffffff8056a755 at taskqueue_run_locked+0xe5
#15 0xffffffff8056b1e8 at taskqueue_thread_loop+0xa8
#16 0xffffffff804f20ba at fork_exit+0x9a
Copyright (c) 1992-2015 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.2-RELEASE-p2 #0 r287148: Wed Aug 26 01:58:09 CEST 2015
```
I cannot interpret what happened. Does someone know what that means?


----------



## protocelt (Oct 11, 2015)

It looks like the system panicked on resume to me however I could certainly be wrong here. I can't help here, but maybe consider posting this to the mailing lists so more developers can see and interpret the backtrace and give you some guidance.


----------



## SirDice (Oct 13, 2015)

Yeah, it looks like it's being caused by power-saving, while entering sleep mode or waking up.


----------



## SirDice (Oct 13, 2015)

Some of the functions hint at ACPI. You could try and see if there's a BIOS update for the machine, that might help.


----------



## protocelt (Oct 13, 2015)

getopt said:


> ```
> kernel: /etc/rc: WARNING: failed to start powerd
> kernel: Starting powerd.
> [b]kernel: powerd: no cpufreq(4) support -- aborting: No such file or directory[/b]
> ```


That CPU doesn't support Enhanced Intel SpeedStep® Technology(frequency control) hence the error message regarding cpufreq(4) and possibly the problem. You could try using the -m flag with powerd(8) instead to set the minimum frequency to whatever the CPU is supposed to run at.

Having said that, in my opinion, I still don't think the machine should panic with powerd(8) activated even with those flags set. Possibly a bug report is in order here.


----------



## kpa (Oct 13, 2015)

You can make powerd(8) work again by using these loader.conf(5) entries:


```
hint.acpi_throttle.0.disabled="0"
hint.p4tcc.0.disabled="0"
```

However, the advice I got on freebsd-stable is that those settings are not helping much with actual power consumtion on Intel Atoms. This document explains it in detail:

https://wiki.freebsd.org/TuningPowerConsumption


----------

