wireguard-ui icon indicating copy to clipboard operation
wireguard-ui copied to clipboard

Status page crashes with more than 1 client (OpenBSD)

Open ptidom opened this issue 1 year ago • 0 comments

Hi,

I noticed the webpage "Status" crashes when more than 1 client are created. See the log below. The server is running on : OpenBSD 7.4 release + patches. Go 1.21.1

Any idea ? Thanks

Tom

Here's the log :

echo: http: panic serving 10.252.1.1:52406: runtime error: makeslice: cap out of range goroutine 32 [running]: net/http.(*conn).serve.func1() /usr/local/go/src/net/http/server.go:1868 +0xb9 panic({0x8e6be0?, 0x119ee20?}) /usr/local/go/src/runtime/panic.go:920 +0x270 golang.zx2c4.com/wireguard/wgctrl/internal/wgopenbsd.parseDevice({0xc000257d47, 0x3}, 0xc000365680) /home/jqr/go/pkg/mod/golang.zx2c4.com/wireguard/[email protected]/internal/wgopenbsd/client_openbsd.go:204 +0x233 golang.zx2c4.com/wireguard/wgctrl/internal/wgopenbsd.(*Client).Device(0xc0004aa858, {0xc000257d47, 0x3}) /home/jqr/go/pkg/mod/golang.zx2c4.com/wireguard/[email protected]/internal/wgopenbsd/client_openbsd.go:157 +0x1da golang.zx2c4.com/wireguard/wgctrl/internal/wgopenbsd.(*Client).Devices(0xc0004aa858) /home/jqr/go/pkg/mod/golang.zx2c4.com/wireguard/[email protected]/internal/wgopenbsd/client_openbsd.go:98 +0x231 golang.zx2c4.com/wireguard/wgctrl.(*Client).Devices(0x44fe00?) /home/jqr/go/pkg/mod/golang.zx2c4.com/wireguard/[email protected]/client.go:48 +0xbe main.main.Status.func28({0x11aab18, 0xc0001eafa0}) /home/jqr/wireguard-ui/handler/routes.go:943 +0x285 github.com/ngoduykhanh/wireguard-ui/handler.ValidSession.func1({0x11aab18, 0xc0001eafa0}) /home/jqr/wireguard-ui/handler/session.go:22 +0x16d github.com/labstack/echo/v4.(*Echo).add.func1({0x11aab18, 0xc0001eafa0}) /home/jqr/go/pkg/mod/github.com/labstack/echo/[email protected]/echo.go:582 +0x4b github.com/labstack/echo/v4/middleware.LoggerWithConfig.func2.1({0x11aab18, 0xc0001eafa0}) /home/jqr/go/pkg/mod/github.com/labstack/echo/[email protected]/middleware/logger.go:120 +0x45c github.com/ngoduykhanh/wireguard-ui/router.New.Middleware.MiddlewareWithConfig.func2.1({0x11aab18, 0xc0001eafa0}) /home/jqr/go/pkg/mod/github.com/labstack/[email protected]/session/session.go:70 +0x103 github.com/labstack/echo/v4.(*Echo).ServeHTTP.func1({0x11aab18, 0xc0001eafa0}) /home/jqr/go/pkg/mod/github.com/labstack/echo/[email protected]/echo.go:663 +0x127 github.com/ngoduykhanh/wireguard-ui/router.New.RemoveTrailingSlash.RemoveTrailingSlashWithConfig.func3.1({0x11aab18, 0xc0001eafa0}) /home/jqr/go/pkg/mod/github.com/labstack/echo/[email protected]/middleware/slash.go:118 +0x205 github.com/labstack/echo/v4.(*Echo).ServeHTTP(0xc0000b1d40, {0x11a3f40?, 0xc0003dc2a0}, 0xc0003a6e00) /home/jqr/go/pkg/mod/github.com/labstack/echo/[email protected]/echo.go:669 +0x399 net/http.serverHandler.ServeHTTP({0xc000472210?}, {0x11a3f40?, 0xc0003dc2a0?}, 0x6?) /usr/local/go/src/net/http/server.go:2938 +0x8e net/http.(*conn).serve(0xc00055a7e0, {0x11a4b20, 0xc0003d66f0}) /usr/local/go/src/net/http/server.go:2009 +0x5f4 created by net/http.(*Server).Serve in goroutine 1 /usr/local/go/src/net/http/server.go:3086 +0x5cb

ptidom avatar Jan 31 '24 21:01 ptidom