# DAHDI: spin lock (dahdi_timer_lock) too long; kernel panic



## ogogon (Dec 3, 2021)

Colleagues, tell me how to solve my problem - periodically the system reboots and the following messages appear in /var/log/messages:

```
kernel: spin lock 0xffffffff82b85d60    (dahdi_timer_lock) held by 0xfffff80045905000 (tid 100750) too long
kernel: panic: spin lock held too long
```

I use:

```
FreeBSD 12.2-RELEASE r366954 GENERIC  amd64
dahdi-2.4.0rc5_7
dahdi-kmod26-2.6.1.r10747_1
asterisk18-18.8.0_1
```
My hardware: 
Digium Wildcard TE121 as "wcte12xp".
Here is file /usr/local/etc/dahdi/system.conf:

```
#
# DAHDI Configuration File
#
# This file is parsed by the DAHDI Configurator, dahdi_cfg
#
span=1,0,0,CCS,HDB3,CRC4
bchan=1-15,17-31
dchan=16
loadzone=us
defaultzone=us
echocanceller=mg2,1-15,17-31
```

Here is the initialization message:

```
dahdi: Version:
kernel: te12xp0: vendor=d161 device=8000 subvendor=ffffffff
kernel: te12xp0: <Wildcard TE121> port 0xd000-0xd0ff mem 0xf7520000-0xf75203ff irq 35 at device 8.0 on pci7
kernel: te12xp0: <6>Setting up global serial parameters for E1
kernel: te12xp0: <6>Found a Wildcard TE121
kernel: dahdi_echocan_mg2: Registered echo canceler 'MG2'
kernel: te12xp0: <6>Span configured for CCS/HDB3/CRC4
kernel: te12xp0: <6>Missed interrupt. Increasing latency to 5 ms in order to compensate.
```

Why am I getting this error and how can I fix it?

I would be grateful for your advice,
Ogogon.


----------



## T-Daemon (Dec 3, 2021)

ogogon said:


> ... periodically the system reboots and the following messages appear in /var/log/messages:
> 
> kernel: spin lock 0xffffffff82b85d60 (dahdi_timer_lock) held by 0xfffff80045905000 (tid 100750) too long
> kernel: panic: spin lock held too long



There is a closed but unresolved bug report:





						176984 – misc/dahdi-kmod: FreeBSD crashes periodically with RedFone FB2 and dahdi_dynamic_ethmf driver
					






					bugs.freebsd.org
				



.
It looks like the bug is present since 9.1-RELEASE.

There seems to be a workaround in comment 2, not sure if it's a feasible solution for your hardware setup or valid for 12.2-RELEASE, and it doesn't resolve the problem, it decreases the appearance. See comment 4.

You might want to report the problem in the PR, so it can be reopened.


----------

