[GH-ISSUE #617] Bug: crash and restart after updating to 2.0 #460

Closed
opened 2026-05-07 00:24:24 +02:00 by BreizhHardware · 1 comment

Originally created by @ksurl on GitHub (Feb 17, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/617

updated to 2.0 yesterday and getting random crashes. log posted below. I am running in docker with compose file:

services:
  ntfy:
    image: binwiederhier/ntfy
    user: 1001:1001
    command: serve
    volumes:
      - ./config:/etc/ntfy
      - ./config/ntfy.log:/var/log/ntfy.log
log
Logs are written to /var/log/ntfy.log
02/17/2023 10:21:19 AM
panic: runtime error: invalid memory address or nil pointer dereference
02/17/2023 10:21:19 AM
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb61cff]
02/17/2023 10:21:19 AM
02/17/2023 10:21:19 AM
goroutine 66 [running]:
02/17/2023 10:21:19 AM
heckel.io/ntfy/server.(*fileCache).Remove(0x0, {0xc0005ea040?, 0x4, 0x415008?})
02/17/2023 10:21:19 AM
	/home/runner/work/ntfy/ntfy/server/file_cache.go:80 +0x25f
02/17/2023 10:21:19 AM
heckel.io/ntfy/server.(*Server).pruneMessages.func1()
02/17/2023 10:21:19 AM
	/home/runner/work/ntfy/ntfy/server/server_manager.go:152 +0x7b
02/17/2023 10:21:19 AM
heckel.io/ntfy/log.(*Event).Timing(0xc000681320, 0xc000741b98)
02/17/2023 10:21:19 AM
	/home/runner/work/ntfy/ntfy/log/event.go:87 +0x42
02/17/2023 10:21:19 AM
heckel.io/ntfy/server.(*Server).pruneMessages(0xc0004873f0)
02/17/2023 10:21:19 AM
	/home/runner/work/ntfy/ntfy/server/server_manager.go:147 +0x50
02/17/2023 10:21:19 AM
heckel.io/ntfy/server.(*Server).execManager(0xc0004873f0)
02/17/2023 10:21:19 AM
	/home/runner/work/ntfy/ntfy/server/server_manager.go:16 +0x5f
02/17/2023 10:21:19 AM
heckel.io/ntfy/log.(*Event).Timing(0xc000681200, 0xc000051788)
02/17/2023 10:21:19 AM
	/home/runner/work/ntfy/ntfy/log/event.go:87 +0x42
02/17/2023 10:21:19 AM
heckel.io/ntfy/server.(*Server).runManager(0xc0004873f0)
02/17/2023 10:21:19 AM
	/home/runner/work/ntfy/ntfy/server/server.go:1289 +0x5c
02/17/2023 10:21:19 AM
created by heckel.io/ntfy/server.(*Server).Run
02/17/2023 10:21:19 AM
	/home/runner/work/ntfy/ntfy/server/server.go:257 +0x938
Originally created by @ksurl on GitHub (Feb 17, 2023). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/617 updated to 2.0 yesterday and getting random crashes. log posted below. I am running in docker with compose file: ``` services: ntfy: image: binwiederhier/ntfy user: 1001:1001 command: serve volumes: - ./config:/etc/ntfy - ./config/ntfy.log:/var/log/ntfy.log ``` <details> <summary>log</summary> ``` Logs are written to /var/log/ntfy.log 02/17/2023 10:21:19 AM panic: runtime error: invalid memory address or nil pointer dereference 02/17/2023 10:21:19 AM [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb61cff] 02/17/2023 10:21:19 AM 02/17/2023 10:21:19 AM goroutine 66 [running]: 02/17/2023 10:21:19 AM heckel.io/ntfy/server.(*fileCache).Remove(0x0, {0xc0005ea040?, 0x4, 0x415008?}) 02/17/2023 10:21:19 AM /home/runner/work/ntfy/ntfy/server/file_cache.go:80 +0x25f 02/17/2023 10:21:19 AM heckel.io/ntfy/server.(*Server).pruneMessages.func1() 02/17/2023 10:21:19 AM /home/runner/work/ntfy/ntfy/server/server_manager.go:152 +0x7b 02/17/2023 10:21:19 AM heckel.io/ntfy/log.(*Event).Timing(0xc000681320, 0xc000741b98) 02/17/2023 10:21:19 AM /home/runner/work/ntfy/ntfy/log/event.go:87 +0x42 02/17/2023 10:21:19 AM heckel.io/ntfy/server.(*Server).pruneMessages(0xc0004873f0) 02/17/2023 10:21:19 AM /home/runner/work/ntfy/ntfy/server/server_manager.go:147 +0x50 02/17/2023 10:21:19 AM heckel.io/ntfy/server.(*Server).execManager(0xc0004873f0) 02/17/2023 10:21:19 AM /home/runner/work/ntfy/ntfy/server/server_manager.go:16 +0x5f 02/17/2023 10:21:19 AM heckel.io/ntfy/log.(*Event).Timing(0xc000681200, 0xc000051788) 02/17/2023 10:21:19 AM /home/runner/work/ntfy/ntfy/log/event.go:87 +0x42 02/17/2023 10:21:19 AM heckel.io/ntfy/server.(*Server).runManager(0xc0004873f0) 02/17/2023 10:21:19 AM /home/runner/work/ntfy/ntfy/server/server.go:1289 +0x5c 02/17/2023 10:21:19 AM created by heckel.io/ntfy/server.(*Server).Run 02/17/2023 10:21:19 AM /home/runner/work/ntfy/ntfy/server/server.go:257 +0x938 ``` </details>
BreizhHardware 2026-05-07 00:24:24 +02:00
Author
Owner

@binwiederhier commented on GitHub (Feb 17, 2023):

Done in github.com/binwiederhier/ntfy@38e7801b41

Will likely release tonight.

<!-- gh-comment-id:1435259296 --> @binwiederhier commented on GitHub (Feb 17, 2023): Done in https://github.com/binwiederhier/ntfy/commit/38e7801b419b868347e0904cc8d1cd5ed65c5233 Will likely release tonight.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#460
No description provided.