-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
Uncomplete strange panic message #47138
Comments
This is the stack trace. It shows which function panics, at which line. What other additional information would you expect? Thanks. |
When my app crash previously, or if i just panic in some function manually, i will see which function and where exactly crash, i mean my functions, for example, if i put nil value to function which are not allow nil in middle logic of our script, i will see something like that: Here i can see all what i need for debug. The first function which calling when request income, the second, etc... runtime error: invalid memory address or nil pointer dereference goroutine 46 [running]: runtime/debug.Stack(0xe55f00, 0xc000010018, 0xc000b47428) /usr/local/go/src/runtime/debug/stack.go:24 +0x9f test_api/helpers.SentryRecover.func1() /var/www/test_api/helpers/helpers.go:20 +0xd9 panic(0xc6c740, 0x1349400) /usr/local/go/src/runtime/panic.go:965 +0x1b9 test_api/rules.(*Request).processResponse(0xc00010e780, 0xc000df2000, 0x2cfc4, 0x0, 0x0, 0x0) /var/www/test_api/rules/request.go:193 +0x245 test_api/rules.(*Request).processResponseStatus(0xc00010e780, 0xc000df2000, 0x2cfc4, 0xc00042a500, 0xc000b13300, 0xc0004d8990, 0x0) /var/www/test_api/rules/request.go:209 +0x11b test_api/rules.(*Rule).HTMLRequest(0xc00042a500, 0xc000b13300, 0xc0005300e0) /var/www/test_api/rules/request.go:421 +0xa6e test_api/rules.(*Rule).Process(0xc00042a500, 0xc000b13300, 0xc0005300e0) /var/www/test_api/rules/rule.go:109 +0x4df test_api/rules.Rule.Start(...) /var/www/test_api/rules/rule.go:229 test_api/app.(*App).Tracking.func1(0xc000b0b500, 0x1378c80, 0xc000ae84c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xc0003b6c20, ...) /var/www/test_api/app/app.go:137 +0x233 created by test_api/app.(*App).Tracking /var/www/test_api/app/app.go:118 +0x1b8 but in the stack trace that I gave as an example ( net/http/httptrace.ContextClientTrace(...)) initially-there is no useful information for me, where, from, who calls these functions - I can't understand where. At the beginning of the script, somewhere inside the GRPC server, or somewhere in my logic. If I manually simulate a panic , everything is fine. I can see where and from where and why it occurs, and sentry and my custom recover functions works well, as you see in normal strack trace. Thanks |
Sorry I still don't really understand. The stack trace is clear that the function |
I think the issue that @koteesy is having is that none of the application code is in the backtrace. The backtrace is all inside And of course fixing the nil pointer exception in |
@randall77, yes, thank you, that's what i trying to say via my poor english. But for now, i open for myself -race flag, and see some errors when debug with that flag, and now i can't reproduce this error. @cherrymui please, don't close this issues at least few days, I will try to fix all the errors in Data race(-race), and will try reproduce this error one more time. Thanks you for replies. |
If you get random panics it's very likely that the data races are the culprit, and you won't be able to reproduce the issue after you fix them. Leaving this as waiting for info for now, feel free to report back when you've fixed the data-races. |
Guys, i think this can be closed, i'll fix all what i see with -race flag, and now looks like it work like a charm. But I still think that this is not normal - when an application crashes with an error like mine without the context of my application, maybe this is a problem for me personally - since I didn't know about Data Race, but in any case, I would like to thank everyone. Thanks! |
Sometimes, randomly, our go GRPC application crash, and at this point we not understand why.
Full error
That's all...No stack trace, no any additional information from where it was called, nothing,
application can work hour, 30 minutes, or 10 minutes and then just got panic and crash
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?go env
What did you do?
Our api work as grpc microservice, which accept incoming request and parse some websites by passed rules.
Main code, which do http requests, I left only the main piece of code, because the other methods like AddHeadersToRequest, AddPreviousHeaders, do not carry any serious logic and only add headers to the request.
request.go
Almost everywhere i put defer with recover function for get all info what i can, but in panic log's i newer seen what he executed, and didn't see panic messages in sentry, i call it like that:
SentryRecover
What did you expect to see?
At least more information log, with stack trace, so that I could understand where this error starts from
What did you see instead?
Panic, and strange error without any additional information
The text was updated successfully, but these errors were encountered: