Skip to content
New issue

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

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

Already on GitHub? # to your account

Crash when trying to unlock Mutex while stopping service #20

Closed
perk11 opened this issue Oct 7, 2024 · 1 comment
Closed

Crash when trying to unlock Mutex while stopping service #20

perk11 opened this issue Oct 7, 2024 · 1 comment

Comments

@perk11
Copy link
Owner

perk11 commented Oct 7, 2024

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x50b30d]

goroutine 207 [running]:
sync.(*Mutex).Unlock(...)
        /usr/lib/go-1.18/src/sync/mutex.go:210
main.stopService({0xc00001e690, 0x21})
        /opt/src/large-model-proxy/main.go:595 +0x62d
main.reserveResources(0xc00001e390?, {0xc00001e390, 0x22})
        /opt/src/large-model-proxy/main.go:419 +0x457
main.startService({{0xc00001e390, 0x22}, {0xc0000186b4, 0x4}, {0xc0000186c0, 0x9}, {0xc0000186b8, 0x5}, {0xc00001e3c0, 0x29}, ...})
        /opt/src/large-model-proxy/main.go:277 +0x225
main.startServiceIfNotAlreadyRunningAndConnect({{0xc00001e390, 0x22}, {0xc0000186b4, 0x4}, {0xc0000186c0, 0x9}, {0xc0000186b8, 0x5}, {0xc00001e3c0, 0x29}, ...})
        /opt/src/large-model-proxy/main.go:234 +0x258
main.handleConnection({0x56e2b0, 0xc0004ba138}, {{0xc00001e390, 0x22}, {0xc0000186b4, 0x4}, {0xc0000186c0, 0x9}, {0xc0000186b8, 0x5}, ...})
        /opt/src/large-model-proxy/main.go:209 +0x1d8
created by main.startProxy
        /opt/src/large-model-proxy/main.go:187 +0x3b8

image

@perk11
Copy link
Owner Author

perk11 commented Jan 21, 2025

Another similar crash:

2025/01/21 02:02:51 [service_name] (service (127.0.0.1:36952->127.0.0.1:18080) to client ([::1]:8080->[::1]:36514)) error during data transfer: writeto tcp [::1]:8080->[::1]:36514: readfrom tcp 127.0.0.1:36952->127.0.0.1:18080: use of closed network connection
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x51fafb]

goroutine 382 [running]:
sync.(*Mutex).TryLock(...)
        /usr/lib/go/src/sync/mutex.go:99
main.canBeStopped({0xc00014a280?, 0xc0003b3e80?})
        /cloud/Dropbox/Projects/large-model-proxy/main.go:487 +0x5b
main.startService.func1()
        /cloud/Dropbox/Projects/large-model-proxy/main.go:306 +0xd5
created by time.goFunc
        /usr/lib/go/src/time/sleep.go:177 +0x2d

@perk11 perk11 closed this as completed in 3655c9b Feb 3, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant