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

Nightly Dotty workflow of 2024-03-05 failed #19879

Open
github-actions bot opened this issue Mar 5, 2024 · 9 comments
Open

Nightly Dotty workflow of 2024-03-05 failed #19879

github-actions bot opened this issue Mar 5, 2024 · 9 comments

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2024

See https://github.com/lampepfl/dotty/actions/runs/8150374165

@nicolasstucki
Copy link
Contributor

Error:  Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.HashMap.get(Object)" is null
Error:  	at com.vladsch.flexmark.html.renderer.HeaderIdGenerator.generateId(HeaderIdGenerator.java:124)
Error:  	at com.vladsch.flexmark.html.renderer.HeaderIdGenerator.getId(HeaderIdGenerator.java:148)
Error:  	at dotty.tools.scaladoc.tasty.comments.markdown.SectionRenderingExtension$SectionHandler$.render(SectionRenderingExtension.scala:38)
Error:  	at dotty.tools.scaladoc.tasty.comments.markdown.SectionRenderingExtension$SectionHandler$.render(SectionRenderingExtension.scala:32)
Error:  	at com.vladsch.flexmark.html.renderer.NodeRenderingHandler.render(NodeRenderingHandler.java:16)
Error:  	at com.vladsch.flexmark.html.HtmlRenderer$MainNodeRenderer.renderNode(HtmlRenderer.java:779)
Error:  	at 
...

@sjrd
Copy link
Member

sjrd commented Mar 5, 2024

According to the CI build history for pushes on main, this was broken by #19860

/cc @Linyxus

This needs to be addressed today, as we're moving the repo tomorrow morning and we need the CI to be working at that time. If it's not fixed by 3pm, I will revert the PR.

@sjrd
Copy link
Member

sjrd commented Mar 5, 2024

Reverting #19860 does not fix the issue. Any idea what else could have caused this?

@dwijnand
Copy link
Member

dwijnand commented Mar 5, 2024

Duplicate of #18344

details in #19524 (comment)

cc @Florian3k

@dwijnand dwijnand marked this as a duplicate of #18344 Mar 5, 2024
@sjrd
Copy link
Member

sjrd commented Mar 5, 2024

Huh. It's been quite consistent in the past few builds, though.

@dwijnand
Copy link
Member

dwijnand commented Mar 5, 2024

Yeah, it's a not-too-often flaky failure. But there's a whole bunch of backreferences to the various duplicates

@dwijnand
Copy link
Member

dwijnand commented Mar 5, 2024

I think it's a race-condition:

                if (headerBaseIds.containsKey(baseRefId)) {
                    int index = headerBaseIds.get(baseRefId);

                    index++;
                    headerBaseIds.put(baseRefId, index);
                    baseRefId += "-" + index;
                } else {
                    headerBaseIds.put(baseRefId, 0);
                }

The get is being called concurrently while one of those puts caused the hashmap to rehash its internal table. I'm not sure, though, how we fix that in SectionRenderingExtension.SectionHandler...

@Florian3k
Copy link
Contributor

We may put this as a temporary fix in SectionRenderingExtension.scala:

val id = idGenerator.synchronized:
  idGenerator.getId(headerText + ifSuffixStr)

Not sure how much this will affect performance, but I guess it's better than nothing for now.

@sjrd
Copy link
Member

sjrd commented Mar 5, 2024

Yes, let's do that. Can you send a PR?

@Linyxus Linyxus removed their assignment Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants