PBH-BTN / PeerBanHelper

BT 反吸血工具 - 自动封禁不受欢迎、吸血和异常的 BT 客户端,并支持自定义规则。PeerId黑名单/UserAgent黑名单/IP CIDR/假进度/超量下载/进度回退/多播追猎/连锁封禁/伪装检测 支持 qBittorrent/Transmission/Deluge/BiglyBT/Vuze(Azureus)/BitComet
GNU General Public License v3.0
1.51k stars 36 forks source link

[BUG] PBH 长时间运行后,会没有反应,打不开web页面,封禁功能也失效 #428

Closed TobisLee closed 2 weeks ago

TobisLee commented 4 weeks ago

版本号 - Version

v6.0.0

操作系统平台和系统架构 - OS and CPU Arch

Windows x86

部署方式 - Deploy methods

添加的下载器 - Added Downloaders

问题描述 - Issue Description

PBH运行一段时间(大概5天)后,会出现没有卡死(?)的现象,主要表现为:log文件没有新增的条目,web页面进不去,封禁功能失效。

复现步骤 - Reproduce steps

不清楚是不是必现bug,但是我已经遇到挺多次了,从5.x的版本到6.0,每次运行时间长之后基本都能出现,但是我一般都是选择升级版本,重新启动来规避。

截图/日志文件 - Screenshot / Logs

docker log中全都是这个log, 这是最后一条的时间, 这之后就没有log打印了,之前的貌似都被冲掉了。

2024-09-02 01:04:36 peerbanhelper_v6  | "Ban Wave" daemon prio=5 Id=66791240 TIMED_WAITING on java.util.concurrent.CountDownLatch$Sync@67df7363
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/jdk.internal.misc.Unsafe.park(Native Method)
2024-09-02 01:04:36 peerbanhelper_v6  |         -  waiting on java.util.concurrent.CountDownLatch$Sync@67df7363
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:269)
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:756)
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1126)
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/java.util.concurrent.CountDownLatch.await(CountDownLatch.java:276)
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/java.util.concurrent.ThreadPerTaskExecutor.awaitTermination(ThreadPerTaskExecutor.java:181)
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/java.util.concurrent.ThreadPerTaskExecutor.awaitTermination(ThreadPerTaskExecutor.java:195)
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/java.util.concurrent.ThreadPerTaskExecutor.close(ThreadPerTaskExecutor.java:212)
2024-09-02 01:04:36 peerbanhelper_v6  |         at app//com.ghostchu.peerbanhelper.PeerBanHelperServer.collectPeers(PeerBanHelperServer.java:636)
2024-09-02 01:04:36 peerbanhelper_v6  |         at app//com.ghostchu.peerbanhelper.PeerBanHelperServer.banWave(PeerBanHelperServer.java:405)
2024-09-02 01:04:36 peerbanhelper_v6  |         at app//com.ghostchu.peerbanhelper.PeerBanHelperServer$$Lambda/0x00007f0ca258f610.run(Unknown Source)
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/java.lang.Thread.runWith(Thread.java:1596)
2024-09-02 01:04:36 peerbanhelper_v6  |         at java.base@21.0.4/java.lang.Thread.run(Thread.java:1583)
2024-09-02 01:04:36 peerbanhelper_v6  | 
2024-09-02 01:04:36 peerbanhelper_v6  |         Number of locked synchronizers = 1
2024-09-02 01:04:36 peerbanhelper_v6  |         - java.util.concurrent.ThreadPoolExecutor$Worker@6a4a0c51
2024-09-02 01:04:36 peerbanhelper_v6  | 
2024-09-02 01:04:36 peerbanhelper_v6  | 

额外信息 - Addition Information

No response

检查清单 - Check list

Ghost-chu commented 4 weeks ago

Docker 容器是否自行设置了资源限制(比如内存?)

TobisLee commented 4 weeks ago

我自己没有做过设置,但是我看PBH容器的内存只有4G, 而我的Windows内存是8G的 图片

ooopus commented 2 weeks ago

那就定期重启)

Ghost-chu commented 2 weeks ago

升级到 v6.1.2 看看

TobisLee commented 1 week ago

我升级到6.2.1之后发现还是会挂掉,看日志大概是运行5天之后,内存爆掉了?下面是最后的一些日志信息:

2024-09-19 18:36:37 peerbanhelper_v6  | [10:36:37] [PBH-Watchdog-BanWave Thread/ERROR]: [Error] WatchDog Service callback thread unresponsive, forced exit from callback
2024-09-19 18:36:37 peerbanhelper_v6  | java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) ~[?:?]
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096) ~[?:?]
2024-09-19 18:36:37 peerbanhelper_v6  |         at com.ghostchu.peerbanhelper.util.WatchDog.watchDogCheck(WatchDog.java:62) ~[PeerBanHelper.jar:6.2.1]
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[?:?]
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
2024-09-19 18:36:37 peerbanhelper_v6  | Caused by: java.lang.OutOfMemoryError: Java heap space
2024-09-19 18:37:41 peerbanhelper_v6  | [10:37:41] [pool-3-thread-1/INFO]: [Warning] WatchDog Service BanWave Thread not reset within the specified time 65000ms. Last status Collect peers. Dumping process thread information, please send to PeerBanHelper developers to assist in fixing this issue
2024-09-19 18:37:42 peerbanhelper_v6  | [10:37:42] [PBH-Watchdog-BanWave Thread/ERROR]: [Error] WatchDog Service callback thread unresponsive, forced exit from callback
2024-09-19 18:37:42 peerbanhelper_v6  | java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) ~[?:?]
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096) ~[?:?]
2024-09-19 18:37:42 peerbanhelper_v6  |         at com.ghostchu.peerbanhelper.util.WatchDog.watchDogCheck(WatchDog.java:62) ~[PeerBanHelper.jar:6.2.1]
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[?:?]
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
2024-09-19 18:37:42 peerbanhelper_v6  | Caused by: java.lang.OutOfMemoryError: Java heap space
2024-09-19 18:38:46 peerbanhelper_v6  | [10:38:46] [pool-3-thread-1/INFO]: [Warning] WatchDog Service BanWave Thread not reset within the specified time 65000ms. Last status Collect peers. Dumping process thread information, please send to PeerBanHelper developers to assist in fixing this issue
2024-09-19 18:38:47 peerbanhelper_v6  | [10:38:47] [PBH-Watchdog-BanWave Thread/ERROR]: [Error] WatchDog Service callback thread unresponsive, forced exit from callback
2024-09-19 18:38:47 peerbanhelper_v6  | java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) ~[?:?]
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096) ~[?:?]
2024-09-19 18:38:47 peerbanhelper_v6  |         at com.ghostchu.peerbanhelper.util.WatchDog.watchDogCheck(WatchDog.java:62) ~[PeerBanHelper.jar:6.2.1]
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[?:?]
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
2024-09-19 18:38:47 peerbanhelper_v6  | Caused by: java.lang.OutOfMemoryError: Java heap space
2024-09-24 17:27:51 peerbanhelper_v6  | 
2024-09-24 17:27:51 peerbanhelper_v6  | Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Read-Poller"

如果需要其他信息,请告诉我。

Ghost-chu commented 1 week ago

我升级到6.2.1之后发现还是会挂掉,看日志大概是运行5天之后,内存爆掉了?下面是最后的一些日志信息:

2024-09-19 18:36:37 peerbanhelper_v6  | [10:36:37] [PBH-Watchdog-BanWave Thread/ERROR]: [Error] WatchDog Service callback thread unresponsive, forced exit from callback
2024-09-19 18:36:37 peerbanhelper_v6  | java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) ~[?:?]
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096) ~[?:?]
2024-09-19 18:36:37 peerbanhelper_v6  |         at com.ghostchu.peerbanhelper.util.WatchDog.watchDogCheck(WatchDog.java:62) ~[PeerBanHelper.jar:6.2.1]
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[?:?]
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
2024-09-19 18:36:37 peerbanhelper_v6  |         at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
2024-09-19 18:36:37 peerbanhelper_v6  | Caused by: java.lang.OutOfMemoryError: Java heap space
2024-09-19 18:37:41 peerbanhelper_v6  | [10:37:41] [pool-3-thread-1/INFO]: [Warning] WatchDog Service BanWave Thread not reset within the specified time 65000ms. Last status Collect peers. Dumping process thread information, please send to PeerBanHelper developers to assist in fixing this issue
2024-09-19 18:37:42 peerbanhelper_v6  | [10:37:42] [PBH-Watchdog-BanWave Thread/ERROR]: [Error] WatchDog Service callback thread unresponsive, forced exit from callback
2024-09-19 18:37:42 peerbanhelper_v6  | java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) ~[?:?]
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096) ~[?:?]
2024-09-19 18:37:42 peerbanhelper_v6  |         at com.ghostchu.peerbanhelper.util.WatchDog.watchDogCheck(WatchDog.java:62) ~[PeerBanHelper.jar:6.2.1]
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[?:?]
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
2024-09-19 18:37:42 peerbanhelper_v6  |         at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
2024-09-19 18:37:42 peerbanhelper_v6  | Caused by: java.lang.OutOfMemoryError: Java heap space
2024-09-19 18:38:46 peerbanhelper_v6  | [10:38:46] [pool-3-thread-1/INFO]: [Warning] WatchDog Service BanWave Thread not reset within the specified time 65000ms. Last status Collect peers. Dumping process thread information, please send to PeerBanHelper developers to assist in fixing this issue
2024-09-19 18:38:47 peerbanhelper_v6  | [10:38:47] [PBH-Watchdog-BanWave Thread/ERROR]: [Error] WatchDog Service callback thread unresponsive, forced exit from callback
2024-09-19 18:38:47 peerbanhelper_v6  | java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) ~[?:?]
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096) ~[?:?]
2024-09-19 18:38:47 peerbanhelper_v6  |         at com.ghostchu.peerbanhelper.util.WatchDog.watchDogCheck(WatchDog.java:62) ~[PeerBanHelper.jar:6.2.1]
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[?:?]
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
2024-09-19 18:38:47 peerbanhelper_v6  |         at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
2024-09-19 18:38:47 peerbanhelper_v6  | Caused by: java.lang.OutOfMemoryError: Java heap space
2024-09-24 17:27:51 peerbanhelper_v6  | 
2024-09-24 17:27:51 peerbanhelper_v6  | Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Read-Poller"

如果需要其他信息,请告诉我。

升级到 628