apache / pekko-http

The Streaming-first HTTP server/module of Apache Pekko
https://pekko.apache.org/
Apache License 2.0
148 stars 34 forks source link

http2 tests broken when pekko 1.1.0-M1-RC1 is used #549

Closed pjfanning closed 2 months ago

pjfanning commented 2 months ago

4 tests fail. See #548

One sample issue:

[info]   - should GET request in one HEADERS and two CONTINUATION frames *** FAILED *** (136 milliseconds)
[info]     http:/// was not equal to http://www.example.com/ (Http2ServerSpec.scala:186)
[info]     org.scalatest.exceptions.TestFailedException:
[info]     at org.scalatest.matchers.MatchersHelper$.indicateFailure(MatchersHelper.scala:392)
[info]     at org.scalatest.matchers.should.Matchers$AnyShouldWrapper.shouldBe(Matchers.scala:7539)
[info]     at org.apache.pekko.http.impl.engine.http2.Http2ServerSpec$$anon$6.<init>(Http2ServerSpec.scala:186)
[info]     at org.apache.pekko.http.impl.engine.http2.Http2ServerSpec.$anonfun$new$8(Http2ServerSpec.scala:171)
[info]     at org.apache.pekko.http.impl.engine.http2.Http2SpecWithMaterializer$InWithStoppedStages.$anonfun$inAssertAllStagesStopped$2(Http2SpecWithMaterializer.scala:42)
[info]     at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[info]     at org.apache.pekko.stream.testkit.scaladsl.StreamTestKit$.assertAllStagesStopped(StreamTestKit.scala:42)
[info]     at org.apache.pekko.http.impl.engine.http2.Http2SpecWithMaterializer$InWithStoppedStages.$anonfun$inAssertAllStagesStopped$1(Http2SpecWithMaterializer.scala:41)
[info]     at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[info]     at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
[info]     at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
[info]     at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
[info]     at org.scalatest.Transformer.apply(Transformer.scala:22)
[info]     at org.scalatest.Transformer.apply(Transformer.scala:20)
[info]     at org.scalatest.wordspec.AnyWordSpecLike$$anon$3.apply(AnyWordSpecLike.scala:1240)
[info]     at org.apache.pekko.http.impl.util.WithLogCapturing.$anonfun$withFixture$1(WithLogCapturing.scala:65)
[info]     at org.apache.pekko.testkit.EventFilter.intercept(TestEventListener.scala:129)
[info]     at org.apache.pekko.http.impl.util.WithLogCapturing.withFixture(WithLogCapturing.scala:63)
[info]     at org.apache.pekko.http.impl.util.WithLogCapturing.withFixture$(WithLogCapturing.scala:50)
[info]     at org.apache.pekko.http.impl.util.PekkoSpecWithMaterializer.withFixture(PekkoSpecWithMaterializer.scala:24)
[info]     at org.scalatest.wordspec.AnyWordSpecLike.invokeWithFixture$1(AnyWordSpecLike.scala:1238)
[info]     at org.scalatest.wordspec.AnyWordSpecLike.$anonfun$runTest$1(AnyWordSpecLike.scala:1250)
[info]     at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306)
[info]     at org.scalatest.wordspec.AnyWordSpecLike.runTest(AnyWordSpecLike.scala:1250)
[info]     at org.scalatest.wordspec.AnyWordSpecLike.runTest$(AnyWordSpecLike.scala:1232)
[info]     at org.apache.pekko.testkit.PekkoSpec.runTest(PekkoSpec.scala:70)
[info]     at org.scalatest.wordspec.AnyWordSpecLike.$anonfun$runTests$1(AnyWordSpecLike.scala:1309)
[info]     at org.scalatest.SuperEngine.$anonfun$runTestsInBranch$1(Engine.scala:413)
[info]     at scala.collection.immutable.List.foreach(List.scala:334)
[info]     at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401)
[info]     at org.scalatest.SuperEngine.runTestsInBranch(Engine.scala:390)
[info]     at org.scalatest.SuperEngine.$anonfun$runTestsInBranch$1(Engine.scala:427)
[info]     at scala.collection.immutable.List.foreach(List.scala:334)
[info]     at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401)
[info]     at org.scalatest.SuperEngine.runTestsInBranch(Engine.scala:390)
[info]     at org.scalatest.SuperEngine.$anonfun$runTestsInBranch$1(Engine.scala:427)
[info]     at scala.collection.immutable.List.foreach(List.scala:334)
[info]     at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401)
[info]     at org.scalatest.SuperEngine.runTestsInBranch(Engine.scala:396)
[info]     at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:475)
[info]     at org.scalatest.wordspec.AnyWordSpecLike.runTests(AnyWordSpecLike.scala:1309)
[info]     at org.scalatest.wordspec.AnyWordSpecLike.runTests$(AnyWordSpecLike.scala:1308)
[info]     at org.apache.pekko.testkit.PekkoSpec.runTests(PekkoSpec.scala:70)
[info]     at org.scalatest.Suite.run(Suite.scala:1114)
[info]     at org.scalatest.Suite.run$(Suite.scala:1096)
[info]     at org.apache.pekko.testkit.PekkoSpec.org$scalatest$wordspec$AnyWordSpecLike$$super$run(PekkoSpec.scala:70)
[info]     at org.scalatest.wordspec.AnyWordSpecLike.$anonfun$run$1(AnyWordSpecLike.scala:1354)
[info]     at org.scalatest.SuperEngine.runImpl(Engine.scala:535)
[info]     at org.scalatest.wordspec.AnyWordSpecLike.run(AnyWordSpecLike.scala:1354)
[info]     at org.scalatest.wordspec.AnyWordSpecLike.run$(AnyWordSpecLike.scala:1352)
[info]     at org.apache.pekko.testkit.PekkoSpec.org$scalatest$BeforeAndAfterAll$$super$run(PekkoSpec.scala:70)
[info]     at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
[info]     at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:210)
[info]     at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:208)
[info]     at org.apache.pekko.testkit.PekkoSpec.run(PekkoSpec.scala:70)
[info]     at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
[info]     at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:517)
[info]     at sbt.ForkMain$Run.lambda$runTest$1(ForkMain.java:414)
[info]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[info]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[info]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[info]     at java.lang.Thread.run(Thread.java:750)
pjfanning commented 2 months ago

Pekko 1.1.0-M0+428-25fcfc96-SNAPSHOT is the approximately the snapshot where the http2-tests started failing.

About 2 weeks ago. That snapshot happened on April 26.

pjfanning commented 2 months ago

also fails with 1.1.0-M0+424-263ef3cc-SNAPSHOT today (https://github.com/apache/pekko-http/actions/runs/9032140005/job/24819752299?pr=548)

but passed with 1.1.0-M0+424-263ef3cc-SNAPSHOT when it was used in the nightly build 2 weeks ago (https://github.com/apache/pekko-http/actions/runs/8825783050/job/24230512009)

So I am now beginning to suspect that it may not be a pekko-core change and possibly a pekko-http one

pjfanning commented 2 months ago

https://github.com/apache/pekko-http/pull/539 is the cause

I will revert that.

Still need to investigate if we have a bug in the new ByteString.asInputStream though.

pjfanning commented 2 months ago

raised https://github.com/apache/pekko-http/issues/553