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

Random panic with caddy plugin #246

Closed
ueffel opened this issue Aug 26, 2022 · 19 comments · Fixed by #245
Closed

Random panic with caddy plugin #246

ueffel opened this issue Aug 26, 2022 · 19 comments · Fixed by #245
Labels
bug Something isn't working

Comments

@ueffel
Copy link

ueffel commented Aug 26, 2022

I see the following panic randomly on my raspberry pi. I don't see a pattern yet. Any ideas?

panic: Header called after Handler finished
goroutine 79751 [running]:
net/http.(*http2responseWriter).Header(0xbaa2070)
        net/http/h2_bundle.go:6359 +0x80
github.com/darkweak/souin/plugins.(*CustomWriter).Header(...)
        github.com/darkweak/souin@v1.6.18/plugins/base.go:39
github.com/darkweak/souin/plugins/caddy.(*SouinCaddyPlugin).ServeHTTP.func1({0x1d7d938, 0xc4ae130}, 0x69e1f00)
        github.com/darkweak/souin/plugins/caddy@v0.0.0-20220802191641-cb8865f626c1/httpcache.go:129 +0xec
github.com/darkweak/souin/plugins.DefaultSouinPluginCallback.func3()
        github.com/darkweak/souin@v1.6.18/plugins/base.go:187 +0xa0
created by github.com/darkweak/souin/plugins.DefaultSouinPluginCallback
        github.com/darkweak/souin@v1.6.18/plugins/base.go:183 +0x7b0
@darkweak
Copy link
Owner

Hello @ueffel I saw that and already worked on a potential fix about the multiple headers sent. Can you try using the hash 3bb68a5508713857f9ecc67308b6f1e621945b28 ?
e.g. xcaddy build --with github.com/darkweak/souin/plugins/caddy@3bb68a5508713857f9ecc67308b6f1e621945b28 --with github.com/darkweak/souin@3bb68a5508713857f9ecc67308b6f1e621945b28

@ueffel
Copy link
Author

ueffel commented Aug 27, 2022

I will try it out and keep an eye on it. As I said I have no way to consistently reproduce the error, so a definitive answer if its fixed is hard.

@ueffel
Copy link
Author

ueffel commented Aug 27, 2022

Hmpf it's not even building on my raspberry pi...

# github.com/xujiajun/nutsdb/ds/list
/home/pi/go/pkg/mod/github.com/xujiajun/nutsdb@v0.10.0/ds/list/list.go:267:15: math.MinInt64 (untyped int constant -9223372036854775808) overflows int

@darkweak
Copy link
Owner

I can downgrade to v0.9.0 if you want to fix that.

@darkweak
Copy link
Owner

The hash 275879f4a3d51207820be32d2a5b77b975f29e1a contains the revert bump for nutsdb. Can you try to build with xcaddy using this one? xcaddy build --with github.com/darkweak/souin/plugins/caddy@275879f4a3d51207820be32d2a5b77b975f29e1a --with github.com/darkweak/souin@275879f4a3d51207820be32d2a5b77b975f29e1a

@darkweak darkweak added the bug Something isn't working label Aug 27, 2022
@darkweak darkweak linked a pull request Aug 27, 2022 that will close this issue
4 tasks
@ueffel
Copy link
Author

ueffel commented Aug 28, 2022

xcaddy still tries to build nutsdb v0.10.0. Possibly because of this line:

github.com/xujiajun/nutsdb v0.10.0 // indirect

@darkweak
Copy link
Owner

You're right, I'll check the root cause it doesn't use the v0.9.0 only

@darkweak
Copy link
Owner

This one includes the downgrade to v0.9.0 for caddy: fdcaf4e74d63d03fbf025487816a181e00809305

xcaddy build --with github.com/darkweak/souin/plugins/caddy@fdcaf4e74d63d03fbf025487816a181e00809305 --with github.com/darkweak/souin@fdcaf4e74d63d03fbf025487816a181e00809305

@ueffel
Copy link
Author

ueffel commented Aug 29, 2022

No panics yet, but I noticed that cache-hits are not compressed anymore.

@darkweak
Copy link
Owner

I don't override the Transfer-Encoding header so I can't explain that behavior. Does your backend returns a gzip HTTP response?

@ueffel
Copy link
Author

ueffel commented Aug 30, 2022

I think the Content-Encoding is set from the cache hit and the encode module sees that and does nothing.
Meaning Content-Encoding: gzip is set, but the response is plain.

Edit: Oh I didn't answer your question: the backend response is plain, no encoding. Gzip-Encoding is done by caddy.

@ueffel
Copy link
Author

ueffel commented Aug 30, 2022

panic: Header called after Handler finished
goroutine 7844 [running]:
net/http.(*http2responseWriter).Header(0x4ea84a0)
        net/http/h2_bundle.go:6359 +0x80
github.com/darkweak/souin/plugins.(*CustomWriter).Header(...)
        github.com/darkweak/souin@v1.6.19-0.20220828120415-fdcaf4e74d63/plugins/base.go:64
github.com/darkweak/souin/plugins/caddy.(*SouinCaddyPlugin).ServeHTTP.func1({0x1ddf1a0, 0x49fd3e0}, 0x64fe780)
        github.com/darkweak/souin/plugins/caddy@v0.0.0-20220828120415-fdcaf4e74d63/httpcache.go:130 +0x14c
github.com/darkweak/souin/plugins.DefaultSouinPluginCallback.func3({0x1ddf1a0, 0x49fd3e0}, 0x64fe780)
        github.com/darkweak/souin@v1.6.19-0.20220828120415-fdcaf4e74d63/plugins/base.go:231 +0x90
created by github.com/darkweak/souin/plugins.DefaultSouinPluginCallback
        github.com/darkweak/souin@v1.6.19-0.20220828120415-fdcaf4e74d63/plugins/base.go:227 +0x96c

Still getting a panic...

@darkweak
Copy link
Owner

I'll rewrite the response streaming implementation then

@darkweak
Copy link
Owner

I reverted everything that could cause the panic in the last commit 698dae89e5eb2c3c726431eeecbeb6f418f3f8b6

@RomanHotsiy
Copy link

We've seen a lot of similar errors recently in our set up with caddy, it happened under the load, maybe relevant.

Do you have some ideas of where we should look in?

We use pretty much default configuration (badger).
One suspicion is that we use rate limit which may respond before the souin? Do you think it may be possible?

Attaching the stacktrace (stacktrace includes HobMartin/souin, it's our fork which is already merged into main, no other changes).

Thanks in advance 🙏

panic: Header called after Handler finished
--
  | 2024-08-25T18:15:21.606+08:00 | runtime/debug.Stack()
  | 2024-08-25T18:15:21.606+08:00 | runtime/debug/stack.go:24 +0x5e
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync/singleflight.newPanicError({0x21c5300, 0x2d0c540})
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync@v0.7.0/singleflight/singleflight.go:44 +0x25
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync/singleflight.(*Group).doCall.func2.1()
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync@v0.7.0/singleflight/singleflight.go:193 +0x34
  | 2024-08-25T18:15:21.606+08:00 | panic({0x21c5300?, 0x2d0c540?})
  | 2024-08-25T18:15:21.606+08:00 | runtime/panic.go:770 +0x132
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/net/http2.(*responseWriter).Header(0x1d?)
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/net@v0.25.0/http2/server.go:2866 +0x6d
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin/pkg/middleware.(*CustomWriter).Header(0x2724dce?)
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/writer.go:49 +0xb8
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin/pkg/middleware.(*SouinBaseHandler).Store(0xc000002780, 0xc000378e00, 0xc00044e360, 0xc00d492720, {0xc0006500e0, 0x49})
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/middleware.go:219 +0xdfc
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin/pkg/middleware.(*SouinBaseHandler).Upstream.func2()
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/middleware.go:389 +0x545
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync/singleflight.(*Group).doCall.func2(0xc0008a5b9e, 0xc0090622d0, 0xc000745008?)
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync@v0.7.0/singleflight/singleflight.go:198 +0x64
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync/singleflight.(*Group).doCall(0x22e3440?, 0xc01abac330?, {0xc0006500e0?, 0x49?}, 0x6cbc8f?)
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync@v0.7.0/singleflight/singleflight.go:200 +0x96
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync/singleflight.(*Group).Do(0xc0000028c8, {0xc0006500e0, 0x49}, 0xc00ea13ef0)
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync@v0.7.0/singleflight/singleflight.go:113 +0x15a
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin/pkg/middleware.(*SouinBaseHandler).Upstream(0xc000002780, 0xc000378e00, 0xc00044e360, 0xc01cd82740, 0xc00d492720, {0xc0006500e0, 0x49})
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/middleware.go:365 +0x287
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin/pkg/middleware.(*SouinBaseHandler).ServeHTTP.func4(0x7a76c5?, 0xc01a1775f0?)
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/middleware.go:734 +0x36
  | 2024-08-25T18:15:21.606+08:00 | created by github.com/HobMartin/souin/pkg/middleware.(*SouinBaseHandler).ServeHTTP in goroutine 713536
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/middleware.go:733 +0x1490
  | 2024-08-25T18:15:21.606+08:00 | [recovered]
  | 2024-08-25T18:15:21.606+08:00 | panic: Header called after Handler finished
  | 2024-08-25T18:15:21.606+08:00 | runtime/debug.Stack()
  | 2024-08-25T18:15:21.606+08:00 | runtime/debug/stack.go:24 +0x5e
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync/singleflight.newPanicError({0x21c5300, 0x2d0c540})
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync@v0.7.0/singleflight/singleflight.go:44 +0x25
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync/singleflight.(*Group).doCall.func2.1()
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync@v0.7.0/singleflight/singleflight.go:193 +0x34
  | 2024-08-25T18:15:21.606+08:00 | panic({0x21c5300?, 0x2d0c540?})
  | 2024-08-25T18:15:21.606+08:00 | runtime/panic.go:770 +0x132
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/net/http2.(*responseWriter).Header(0x1d?)
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/net@v0.25.0/http2/server.go:2866 +0x6d
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin/pkg/middleware.(*CustomWriter).Header(0x2724dce?)
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/writer.go:49 +0xb8
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin/pkg/middleware.(*SouinBaseHandler).Store(0xc000002780, 0xc000378e00, 0xc00044e360, 0xc00d492720, {0xc0006500e0, 0x49})
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/middleware.go:219 +0xdfc
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin/pkg/middleware.(*SouinBaseHandler).Upstream.func2()
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/middleware.go:389 +0x545
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync/singleflight.(*Group).doCall.func2(0xc0008a5b9e, 0xc0090622d0, 0xc000745008?)
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync@v0.7.0/singleflight/singleflight.go:198 +0x64
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync/singleflight.(*Group).doCall(0x22e3440?, 0xc01abac330?, {0xc0006500e0?, 0x49?}, 0x6cbc8f?)
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync@v0.7.0/singleflight/singleflight.go:200 +0x96
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync/singleflight.(*Group).Do(0xc0000028c8, {0xc0006500e0, 0x49}, 0xc00ea13ef0)
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync@v0.7.0/singleflight/singleflight.go:113 +0x15a
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin/pkg/middleware.(*SouinBaseHandler).Upstream(0xc000002780, 0xc000378e00, 0xc00044e360, 0xc01cd82740, 0xc00d492720, {0xc0006500e0, 0x49})
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/middleware.go:365 +0x287
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin/pkg/middleware.(*SouinBaseHandler).ServeHTTP.func4(0x7a76c5?, 0xc01a1775f0?)
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/middleware.go:734 +0x36
  | 2024-08-25T18:15:21.606+08:00 | created by github.com/HobMartin/souin/pkg/middleware.(*SouinBaseHandler).ServeHTTP in goroutine 713536
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/middleware.go:733 +0x1490
  | 2024-08-25T18:15:21.606+08:00 | goroutine 713569 [running]:
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin/pkg/middleware.(*SouinBaseHandler).Upstream.func1()
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/middleware.go:361 +0xf3
  | 2024-08-25T18:15:21.606+08:00 | panic({0x2331f00?, 0xc007964180?})
  | 2024-08-25T18:15:21.606+08:00 | runtime/panic.go:770 +0x132
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync/singleflight.(*Group).doCall.func1()
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync@v0.7.0/singleflight/singleflight.go:170 +0x2b3
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync/singleflight.(*Group).doCall(0x22e3440?, 0xc01abac330?, {0xc0006500e0?, 0x49?}, 0x6cbc8f?)
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync@v0.7.0/singleflight/singleflight.go:205 +0xb1
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync/singleflight.(*Group).Do(0xc0000028c8, {0xc0006500e0, 0x49}, 0xc00ea13ef0)
  | 2024-08-25T18:15:21.606+08:00 | golang.org/x/sync@v0.7.0/singleflight/singleflight.go:113 +0x15a
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin/pkg/middleware.(*SouinBaseHandler).Upstream(0xc000002780, 0xc000378e00, 0xc00044e360, 0xc01cd82740, 0xc00d492720, {0xc0006500e0, 0x49})
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/middleware.go:365 +0x287
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin/pkg/middleware.(*SouinBaseHandler).ServeHTTP.func4(0x7a76c5?, 0xc01a1775f0?)
  | 2024-08-25T18:15:21.606+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/middleware.go:734 +0x36
  | 2024-08-25T18:15:21.606+08:00 | created by github.com/HobMartin/souin/pkg/middleware.(*SouinBaseHandler).ServeHTTP in goroutine 713536
  | 2024-08-25T18:15:21.607+08:00 | github.com/HobMartin/souin@v0.0.0-20240619095936-9fbc323d41e9/pkg/middleware/middleware.go:733 +0x1490

@darkweak
Copy link
Owner

@RomanHotsiy can you try with the latest release? (v1.6.50)

@RomanHotsiy
Copy link

Hey @darkweak. We switched to the latest version and we still can see those random errors.

We use it via caddy cache-handler 0.13.0: https://github.com/caddyserver/cache-handler/releases/tag/v0.13.0

We also verified our order:

order cache before rewrite
order rate_limit before redir

Looks valid:

rate_limit -> redir -> method -> cache -> rewrite

Stack trace attached:
panic: Header called after Handler finished
runtime/debug.Stack()
runtime/debug/stack.go:24 +0x5e
golang.org/x/sync/singleflight.newPanicError({0x21c6360, 0x2d0d8e0})
golang.org/x/sync@v0.7.0/singleflight/singleflight.go:44 +0x25
golang.org/x/sync/singleflight.(*Group).doCall.func2.1()
golang.org/x/sync@v0.7.0/singleflight/singleflight.go:193 +0x34
panic({0x21c6360?, 0x2d0d8e0?})
runtime/panic.go:770 +0x132
golang.org/x/net/http2.(*responseWriter).Header(0xc00083e808?)
golang.org/x/net@v0.25.0/http2/server.go:2866 +0x6d
github.com/darkweak/souin/pkg/middleware.(*CustomWriter).Header(0x26fcb51?)
github.com/darkweak/souin@v1.6.49/pkg/middleware/writer.go:49 +0xb8
github.com/darkweak/souin/pkg/middleware.(*SouinBaseHandler).Store(0xc0006c2480, 0xc002d7cbc0, 0xc003528b40, 0xc000b3a660, {0xc003d924b0, 0x3f})
github.com/darkweak/souin@v1.6.49/pkg/middleware/middleware.go:232 +0x109f
github.com/darkweak/souin/pkg/middleware.(*SouinBaseHandler).Upstream.func2()
github.com/darkweak/souin@v1.6.49/pkg/middleware/middleware.go:389 +0x545
golang.org/x/sync/singleflight.(*Group).doCall.func2(0xc001587b6e, 0xc0032ec2d0, 0xc00083e808?)
golang.org/x/sync@v0.7.0/singleflight/singleflight.go:198 +0x64
golang.org/x/sync/singleflight.(*Group).doCall(0x22e4580?, 0xc00149ae10?, {0xc003d924b0?, 0x3f?}, 0x1000?)
golang.org/x/sync@v0.7.0/singleflight/singleflight.go:200 +0x96
golang.org/x/sync/singleflight.(*Group).Do(0xc0006c25c8, {0xc003d924b0, 0x3f}, 0xc0017eeec0)
golang.org/x/sync@v0.7.0/singleflight/singleflight.go:113 +0x15a
github.com/darkweak/souin/pkg/middleware.(*SouinBaseHandler).Upstream(0xc0006c2480, 0xc002d7cbc0, 0xc003528b40, 0xc0003d67c0, 0xc000b3a660, {0xc003d924b0, 0x3f})
github.com/darkweak/souin@v1.6.49/pkg/middleware/middleware.go:365 +0x287
github.com/darkweak/souin/pkg/middleware.(*SouinBaseHandler).ServeHTTP.func4(0xc003528b40, 0xc002d7cbc0)
github.com/darkweak/souin@v1.6.49/pkg/middleware/middleware.go:733 +0xf5
created by github.com/darkweak/souin/pkg/middleware.(*SouinBaseHandler).ServeHTTP in goroutine 1529998
github.com/darkweak/souin@v1.6.49/pkg/middleware/middleware.go:731 +0x1410
[recovered]
panic: Header called after Handler finished
runtime/debug.Stack()
runtime/debug/stack.go:24 +0x5e
golang.org/x/sync/singleflight.newPanicError({0x21c6360, 0x2d0d8e0})
golang.org/x/sync@v0.7.0/singleflight/singleflight.go:44 +0x25
golang.org/x/sync/singleflight.(*Group).doCall.func2.1()
golang.org/x/sync@v0.7.0/singleflight/singleflight.go:193 +0x34
panic({0x21c6360?, 0x2d0d8e0?})
runtime/panic.go:770 +0x132
golang.org/x/net/http2.(*responseWriter).Header(0xc00083e808?)
golang.org/x/net@v0.25.0/http2/server.go:2866 +0x6d
github.com/darkweak/souin/pkg/middleware.(*CustomWriter).Header(0x26fcb51?)
github.com/darkweak/souin@v1.6.49/pkg/middleware/writer.go:49 +0xb8
github.com/darkweak/souin/pkg/middleware.(*SouinBaseHandler).Store(0xc0006c2480, 0xc002d7cbc0, 0xc003528b40, 0xc000b3a660, {0xc003d924b0, 0x3f})
github.com/darkweak/souin@v1.6.49/pkg/middleware/middleware.go:232 +0x109f
github.com/darkweak/souin/pkg/middleware.(*SouinBaseHandler).Upstream.func2()
github.com/darkweak/souin@v1.6.49/pkg/middleware/middleware.go:389 +0x545
golang.org/x/sync/singleflight.(*Group).doCall.func2(0xc001587b6e, 0xc0032ec2d0, 0xc00083e808?)
golang.org/x/sync@v0.7.0/singleflight/singleflight.go:198 +0x64
golang.org/x/sync/singleflight.(*Group).doCall(0x22e4580?, 0xc00149ae10?, {0xc003d924b0?, 0x3f?}, 0x1000?)
golang.org/x/sync@v0.7.0/singleflight/singleflight.go:200 +0x96
golang.org/x/sync/singleflight.(*Group).Do(0xc0006c25c8, {0xc003d924b0, 0x3f}, 0xc0017eeec0)
golang.org/x/sync@v0.7.0/singleflight/singleflight.go:113 +0x15a
github.com/darkweak/souin/pkg/middleware.(*SouinBaseHandler).Upstream(0xc0006c2480, 0xc002d7cbc0, 0xc003528b40, 0xc0003d67c0, 0xc000b3a660, {0xc003d924b0, 0x3f})
github.com/darkweak/souin@v1.6.49/pkg/middleware/middleware.go:365 +0x287
github.com/darkweak/souin/pkg/middleware.(*SouinBaseHandler).ServeHTTP.func4(0xc003528b40, 0xc002d7cbc0)
github.com/darkweak/souin@v1.6.49/pkg/middleware/middleware.go:733 +0xf5
created by github.com/darkweak/souin/pkg/middleware.(*SouinBaseHandler).ServeHTTP in goroutine 1529998
github.com/darkweak/souin@v1.6.49/pkg/middleware/middleware.go:731 +0x1410
goroutine 1529959 [running]:
github.com/darkweak/souin/pkg/middleware.(*SouinBaseHandler).Upstream.func1()
github.com/darkweak/souin@v1.6.49/pkg/middleware/middleware.go:361 +0xf3
panic({0x23330c0?, 0xc000b3b920?})
runtime/panic.go:770 +0x132
golang.org/x/sync/singleflight.(*Group).doCall.func1()
golang.org/x/sync@v0.7.0/singleflight/singleflight.go:170 +0x2b3
golang.org/x/sync/singleflight.(*Group).doCall(0x22e4580?, 0xc00149ae10?, {0xc003d924b0?, 0x3f?}, 0x1000?)
golang.org/x/sync@v0.7.0/singleflight/singleflight.go:205 +0xb1
golang.org/x/sync/singleflight.(*Group).Do(0xc0006c25c8, {0xc003d924b0, 0x3f}, 0xc0017eeec0)
golang.org/x/sync@v0.7.0/singleflight/singleflight.go:113 +0x15a
github.com/darkweak/souin/pkg/middleware.(*SouinBaseHandler).Upstream(0xc0006c2480, 0xc002d7cbc0, 0xc003528b40, 0xc0003d67c0, 0xc000b3a660, {0xc003d924b0, 0x3f})
github.com/darkweak/souin@v1.6.49/pkg/middleware/middleware.go:365 +0x287
github.com/darkweak/souin/pkg/middleware.(*SouinBaseHandler).ServeHTTP.func4(0xc003528b40, 0xc002d7cbc0)
github.com/darkweak/souin@v1.6.49/pkg/middleware/middleware.go:733 +0xf5
created by github.com/darkweak/souin/pkg/middleware.(*SouinBaseHandler).ServeHTTP in goroutine 1529998
github.com/darkweak/souin@v1.6.49/pkg/middleware/middleware.go:731 +0x1410

@darkweak
Copy link
Owner

darkweak commented Sep 6, 2024

Did you try with souin v1.6.50 instead? There are lot of improvements in the dev repository that are not used in the cache-handler.

@RomanHotsiy
Copy link

RomanHotsiy commented Sep 23, 2024

it seems to be fixed on the 1.6.50! 🎉

Thanks for your prompt replies!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants