Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: close of closed channel when cleanup #7401

Open
4 tasks done
azureqaq opened this issue Nov 3, 2024 · 0 comments
Open
4 tasks done

panic: close of closed channel when cleanup #7401

azureqaq opened this issue Nov 3, 2024 · 0 comments

Comments

@azureqaq
Copy link

azureqaq commented Nov 3, 2024

Prerequisites

Platform (OS and CPU architecture)

FreeBSD, AMD64 (aka x86_64)

Installation

GitHub releases or script from README

Setup

Other (please mention in the description)

AdGuard Home version

AdGuard Home, version v0.107.53

Action

  1. Install AdguardHome via script from README.
  2. Just RUN.
  3. AdguardHome works well.
  4. Press Crtl+C, get a stopped info, but freeze.
  5. Press Ctrl+C again, get a panic.
xigmanas: AdGuardHome# ls
AdGuardHome      AdGuardHome.yaml data             README.md
AdGuardHome.sig  CHANGELOG.md     LICENSE.txt

xigmanas: AdGuardHome# ./AdGuardHome 
2024/11/03 13:16:48.668458 [info] AdGuard Home, version v0.107.53
2024/11/03 13:16:48.669733 [info] tls: using default ciphers
2024/11/03 13:16:48.672171 [info] safesearch default: disabled
2024/11/03 13:16:49.282924 [info] Initializing auth module: /mnt/pool/downloads/opt/AdGuardHome/data/sessions.db
^C2024/11/03 13:16:51.625911 [info] Received signal "interrupt"
2024/11/03 13:16:51.625926 [info] stopping AdGuard Home
2024/11/03 13:16:51.625968 [info] stopped
^C2024/11/03 13:16:54.688728 [info] Received signal "interrupt"
2024/11/03 13:16:54.688749 [info] stopping AdGuard Home
panic: close of closed channel

goroutine 33 [running]:
github.com/AdguardTeam/AdGuardHome/internal/aghnet.(*HostsContainer).Close(0x86c31e000)
	github.com/AdguardTeam/AdGuardHome/internal/aghnet/hostscontainer.go:108 +0x128
github.com/AdguardTeam/AdGuardHome/internal/home.cleanup({0x1a5c010?, 0x26586e0?})
	github.com/AdguardTeam/AdGuardHome/internal/home/home.go:862 +0x1bc
github.com/AdguardTeam/AdGuardHome/internal/home.Main.func1()
	github.com/AdguardTeam/AdGuardHome/internal/home/home.go:126 +0x112
created by github.com/AdguardTeam/AdGuardHome/internal/home.Main in goroutine 1
	github.com/AdguardTeam/AdGuardHome/internal/home/home.go:117 +0x298
xigmanas: AdGuardHome# 
  1. Run AdguardHome as service.
xigmanas: AdGuardHome# ./AdGuardHome -s start
2024/11/03 13:22:57 [info] AdGuard Home, version v0.107.53
2024/11/03 13:22:57 [info] service: control action: start
2024/11/03 13:22:57 [fatal] service: executing action "start": Failed to start AdGuard Home service: exit status 1

Expected result

no panic

Actual result

panic

Additional information and/or screenshots

Previously, running it as a service worked fine, but recently, after a power outage, I tried to manually restart AdguardHome and encountered these issues. Of course, it could be due to my lack of familiarity with FreeBSD, but the panic is undoubtedly a BUG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant