-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
500 error on organization page: error calling DescriptionHTML #17297
Comments
I think the problem may be caused by a special description of the repo. Can you share your repo description? Repo |
Which database are you using? |
I don't see any obvious problems in the |
Do you have a external trackers? Could you apply the following patch: diff --git a/modules/markup/html.go b/modules/markup/html.go
index d6a2571e2..0dd24ced3 100644
--- a/modules/markup/html.go
+++ b/modules/markup/html.go
@@ -6,6 +6,7 @@ package markup
import (
"bytes"
+ "fmt"
"io"
"io/ioutil"
"net/url"
@@ -252,9 +253,18 @@ func RenderIssueTitle(
}, title)
}
-func renderProcessString(ctx *RenderContext, procs []processor, content string) (string, error) {
+func renderProcessString(ctx *RenderContext, procs []processor, content string) (processed string, err error) {
var buf strings.Builder
- if err := postProcess(ctx, procs, strings.NewReader(content), &buf); err != nil {
+
+ defer func() {
+ if panicked := recover(); panicked != nil {
+ stack := string(log.Stack(2))
+ log.Error("PANIC: %v whilst rendering %q\n%s", panicked, content, stack)
+ err = fmt.Errorf("PANIC: %v whilst rendering %q", panicked, content)
+ }
+ }()
+
+ if err = postProcess(ctx, procs, strings.NewReader(content), &buf); err != nil {
return "", err
}
return buf.String(), nil This would give us a bit more information and prevent the 500 at the same time. |
@zeripath thanks for the patch... unfortunately the crash still happens and the logs are the same. I started trying some other links and it appears that several of the repositories under this organization simply crash when I surf to them, for example when I hit the
ping @kolaente in case this is somehow a crazy distro thing (I'm not a |
Panic looks like it is coming from |
Have you restored from a dump made by 1.14.3-1.14.6? |
I don't believe I have ever done a restore on this instance of |
Please upgrade to 1.15.4 - there is a fix to prevent an NPE at that line that was added in #17137 but you will need to reapply the patch I've provided if you still get problems so we can get more logging. |
Upgrading fixes the issue. Thanks to all for your help! |
Marking as fixed by #17137. |
Gitea Version
1.15.3
Operating System
Linux (NixOS)
Browser Version
Firefox 92.0
Can you reproduce the bug on the Gitea demo site?
No
Description
A user on my
gitea
instance reported that whenever they hit the "org" page for one organization they get a 500 error. I'm able to reproduce this. The error only occurs on 1 organization - all other organizations are viewable without any errors.I imagine a
select
statement in one of the tables in the associated database could provide more relevant information, but I'm not sure which table(s) toselect
from.Any help would be greatly appreciated.
Thank you.
Screenshots
The text was updated successfully, but these errors were encountered: