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-01-24 failed #19524

Closed
github-actions bot opened this issue Jan 24, 2024 · 2 comments
Closed

Nightly Dotty workflow of 2024-01-24 failed #19524

github-actions bot opened this issue Jan 24, 2024 · 2 comments

Comments

@github-actions
Copy link
Contributor

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

@nicolasstucki
Copy link
Contributor

There was an NPE in while generating the doc

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at xsbt.DottydocRunner.run(DottydocRunner.java:65)
	at xsbt.ScaladocInterface.run(ScaladocInterface.java:11)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sbt.internal.inc.AnalyzingCompiler.invoke(AnalyzingCompiler.scala:329)
	at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:175)
	at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:133)
	at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:53)
	at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:41)
	at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:80)
	at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:73)
	at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:64)
	at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:62)
	at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:220)
	at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:69)
	at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:53)
	at sbt.Defaults$.$anonfun$docTaskSettings$4(Defaults.scala:2162)
	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at xsbt.DottydocRunner.run(DottydocRunner.java:61)
	at xsbt.ScaladocInterface.run(ScaladocInterface.java:11)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sbt.internal.inc.AnalyzingCompiler.invoke(AnalyzingCompiler.scala:329)
	at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:175)
	at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:133)
	at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:53)
	at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:41)
	at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:80)
	at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:73)
	at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:64)
	at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:62)
	at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:220)
	at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:69)
	at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:53)
	at sbt.Defaults$.$anonfun$docTaskSettings$4(Defaults.scala:2162)
	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
	at com.vladsch.flexmark.html.renderer.HeaderIdGenerator.generateId(HeaderIdGenerator.java:124)
	at com.vladsch.flexmark.html.renderer.HeaderIdGenerator.getId(HeaderIdGenerator.java:148)
	at dotty.tools.scaladoc.tasty.comments.markdown.SectionRenderingExtension$SectionHandler$.render(SectionRenderingExtension.scala:38)
	at dotty.tools.scaladoc.tasty.comments.markdown.SectionRenderingExtension$SectionHandler$.render(SectionRenderingExtension.scala:32)
	at com.vladsch.flexmark.html.renderer.NodeRenderingHandler.render(NodeRenderingHandler.java:16)
	at com.vladsch.flexmark.html.HtmlRenderer$MainNodeRenderer.renderNode(HtmlRenderer.java:779)
	at com.vladsch.flexmark.html.HtmlRenderer$MainNodeRenderer.renderChildrenNode(HtmlRenderer.java:798)
	at com.vladsch.flexmark.html.HtmlRenderer$MainNodeRenderer.renderChildren(HtmlRenderer.java:790)
	at com.vladsch.flexmark.html.renderer.CoreNodeRenderer.render(CoreNodeRenderer.java:113)
	at com.vladsch.flexmark.html.renderer.NodeRenderingHandler.render(NodeRenderingHandler.java:16)
	at com.vladsch.flexmark.html.HtmlRenderer$MainNodeRenderer.renderNode(HtmlRenderer.java:761)
	at com.vladsch.flexmark.html.HtmlRenderer$MainNodeRenderer.render(HtmlRenderer.java:683)
	at com.vladsch.flexmark.html.HtmlRenderer.render(HtmlRenderer.java:213)
	at com.vladsch.flexmark.html.HtmlRenderer.render(HtmlRenderer.java:197)
	at com.vladsch.flexmark.html.HtmlRenderer.render(HtmlRenderer.java:230)
	at dotty.tools.scaladoc.site.TemplateFile.resolveInner(templates.scala:128)
	at dotty.tools.scaladoc.site.LoadedTemplate.resolveToHtml(LoadedTemplate.scala:54)
	at dotty.tools.scaladoc.renderers.ResolvedTemplate.<init>(SiteRenderer.scala:18)
	at dotty.tools.scaladoc.renderers.ResolvedTemplate$.apply(SiteRenderer.scala:17)
	at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage(SiteRenderer.scala:25)
	at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage$(SiteRenderer.scala:21)
	at dotty.tools.scaladoc.renderers.Renderer.templateToPage(Renderer.scala:20)
	at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage$$anonfun$1(SiteRenderer.scala:26)
	at scala.collection.immutable.List.map(List.scala:250)
	at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage(SiteRenderer.scala:26)
	at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage$(SiteRenderer.scala:21)
	at dotty.tools.scaladoc.renderers.Renderer.templateToPage(Renderer.scala:20)
	at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage$$anonfun$1(SiteRenderer.scala:26)
	at scala.collection.immutable.List.map(List.scala:246)
	at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage(SiteRenderer.scala:26)
	at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage$(SiteRenderer.scala:21)
	at dotty.tools.scaladoc.renderers.Renderer.templateToPage(Renderer.scala:20)
	at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage$$anonfun$1(SiteRenderer.scala:26)
	at scala.collection.immutable.List.map(List.scala:246)
	at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage(SiteRenderer.scala:26)
	at dotty.tools.scaladoc.renderers.SiteRenderer.templateToPage$(SiteRenderer.scala:21)
	at dotty.tools.scaladoc.renderers.Renderer.templateToPage(Renderer.scala:20)
	at dotty.tools.scaladoc.renderers.Renderer.$anonfun$5(Renderer.scala:92)
	at scala.collection.immutable.List.map(List.scala:246)
	at dotty.tools.scaladoc.renderers.Renderer.<init>(Renderer.scala:92)
	at dotty.tools.scaladoc.renderers.HtmlRenderer.<init>(HtmlRenderer.scala:10)
	at dotty.tools.scaladoc.Scaladoc$.run(Scaladoc.scala:241)
	at dotty.tools.scaladoc.Scaladoc$.run$$anonfun$1(Scaladoc.scala:70)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
	at scala.Option.map(Option.scala:242)
	at dotty.tools.scaladoc.Scaladoc$.run(Scaladoc.scala:74)
	at dotty.tools.dottydoc.Main$.process(Main.scala:25)
	at dotty.tools.dottydoc.Main.process(Main.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at xsbt.DottydocRunner.run(DottydocRunner.java:61)
	at xsbt.ScaladocInterface.run(ScaladocInterface.java:11)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sbt.internal.inc.AnalyzingCompiler.invoke(AnalyzingCompiler.scala:329)
	at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:175)
	at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:133)
	at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:53)
	at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:41)
	at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:80)
	at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:73)
	at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:64)
	at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:62)
	at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:220)
	at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:69)
	at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:53)
	at sbt.Defaults$.$anonfun$docTaskSettings$4(Defaults.scala:2162)
	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

@Florian3k
Copy link
Contributor

Look the same as #18344

This exception is thrown by generateId in HeaderIdGenerator class in flexmark:

int index = headerBaseIds.get(baseRefId);

headerBaseIds is initialized as:

HashMap<String, Integer> headerBaseIds = new HashMap<>();

and only overridden by dispose method:

public void dispose() {
    headerBaseIds = null;
}

In scaladoc, we create HeaderIdGenerator like this:

val idGenerator = new HeaderIdGenerator.Factory().create()

and we only call getId on it:

val id = idGenerator.getId(headerText + ifSuffixStr)

We do not call dispose anywhere. getId also doesn't. I've looked inside flexmark and the object isn't registered anywhere for future disposal.
So, I have no idea how this is happening 🤷‍♂️

@sjrd sjrd closed this as completed in dc6b3cd Mar 5, 2024
sjrd added a commit that referenced this issue Mar 5, 2024
…19884)

Hopefully this is the only source of the race condition that we have
been observing.
WojciechMazur pushed a commit that referenced this issue Jul 2, 2024
Hopefully this is the only source of the race condition that we
have been observing.

[Cherry-picked dc6b3cd]
WojciechMazur added a commit that referenced this issue Jul 3, 2024
…onized`." to LTS (#20978)

Backports #19884 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
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

2 participants