Comments (16)
I have tried on my machine sbt test
with the current HEAD b33f85110c75130661156bf6a4099342c5febcdf
, with the following setup:
- sbt 1.9.2
- OpenJDK Runtime Environment Temurin-20.0.1+9 (build 20.0.1+9)
- Apple M1 with Ventura 13.4.1 (c)
I got a few failed tests:
[info] *** 12 TESTS FAILED ***
[error] Failed tests:
[error] org.apache.pekko.http.impl.engine.http2.H2SpecIntegrationSpec
[...]
[info] *** 3 TESTS FAILED ***
[error] Failed tests:
[error] org.apache.pekko.http.scaladsl.ClientServerHttp2EnabledSpec
[error] org.apache.pekko.http.scaladsl.ClientServerSpec
A couple examples of such failed tests:
[info] - should report failure if bind fails *** FAILED *** (29 milliseconds)
[info] org.apache.pekko.stream.impl.io.ConnectionSourceStage$$anon$1$$anon$2: Bind failed because of java.net.BindException: [localhost/127.0.0.1:1025] Address already in use
[info] Cause: java.net.BindException: [localhost/127.0.0.1:1025] Address already in use
[info] - should complete a request/response when the request side immediately closes the connection after sending the request *** FAILED *** (7 seconds, 68 milliseconds)
[info] java.lang.AssertionError: assertion failed: expected no StreamSupervisor children, but got [Actor[pekko://PekkoSpecWithMaterializer_/system/Materializers/StreamSupervisor-73/flow-124-0-headSink#-84814694]]
[info] H2Spec
--> [H2Spec must pass rule: 3.5. HTTP/2 Connection Preface] Start of log messages of test that [Failed(org.scalatest.exceptions.TestFailedException: 139 was not equal to 0)]
| [DEBUG] [07/22/2023 12:26:16.074] [pool-1-thread-1-ScalaTest-running-H2SpecIntegrationSpec] [WithLogCapturing(pekko://PekkoSpec_)] Logging started for test [H2Spec must pass rule: 3.5. HTTP/2 Connection Preface]
| [DEBUG] [07/22/2023 12:26:16.075] [pool-1-thread-1-ScalaTest-running-H2SpecIntegrationSpec] [H2SpecIntegrationSpec(pekko://PekkoSpec_)] Executing h2spec: List(/Users/lomig/programmation/github/incubator-pekko-http/http2-tests/target/h2spec_darwin_amd64/h2spec, -k, -t, -p, 55864, -j, target/test-reports/h2spec-junit-3.5.xml, -s, 3.5)
| [DEBUG] [07/22/2023 12:26:16.659] [pool-1-thread-1-ScalaTest-running-H2SpecIntegrationSpec] [WithLogCapturing(pekko://PekkoSpec_)] Logging finished for test [H2Spec must pass rule: 3.5. HTTP/2 Connection Preface]
<-- [H2Spec must pass rule: 3.5. HTTP/2 Connection Preface] End of log messages of test that [Failed(org.scalatest.exceptions.TestFailedException: 139 was not equal to 0)]
[info] - must pass rule: 3.5. HTTP/2 Connection Preface *** FAILED *** (591 milliseconds)
[info] 139 was not equal to 0 (H2SpecIntegrationSpec.scala:194)
--> [H2Spec must pass rule: 6.7. PING] Start of log messages of test that [Failed(org.scalatest.exceptions.TestFailedException: 139 was not equal to 0)]
| [DEBUG] [07/22/2023 12:26:16.825] [pool-1-thread-1-ScalaTest-running-H2SpecIntegrationSpec] [WithLogCapturing(pekko://PekkoSpec_)] Logging started for test [H2Spec must pass rule: 6.7. PING]
| [DEBUG] [07/22/2023 12:26:16.825] [pool-1-thread-1-ScalaTest-running-H2SpecIntegrationSpec] [H2SpecIntegrationSpec(pekko://PekkoSpec_)] Executing h2spec: List(/Users/lomig/programmation/github/incubator-pekko-http/http2-tests/target/h2spec_darwin_amd64/h2spec, -k, -t, -p, 55864, -j, target/test-reports/h2spec-junit-6.7.xml, -s, 6.7)
| [DEBUG] [07/22/2023 12:26:16.839] [pool-1-thread-1-ScalaTest-running-H2SpecIntegrationSpec] [WithLogCapturing(pekko://PekkoSpec_)] Logging finished for test [H2Spec must pass rule: 6.7. PING]
<-- [H2Spec must pass rule: 6.7. PING] End of log messages of test that [Failed(org.scalatest.exceptions.TestFailedException: 139 was not equal to 0)]
[info] - must pass rule: 6.7. PING *** FAILED *** (16 milliseconds)
[info] 139 was not equal to 0 (H2SpecIntegrationSpec.scala:194)
And more of those must pass rule: [...]
from pekko-http.
I have tried to run sbt test
for this module multiple times and they always succeeded. I have tried on the following configurations:
sbt 1.9.1
andUbuntu Java 11.0.19
on Ubuntu 20.04.6 LTSsbt 1.9.2
andMicrosoft Java 11.0.14.1
on Ubuntu 20.04.6 LTS (Newly created devbox)
Is there anything I can help with for this issue?
from pekko-http.
Thanks @samueleresca - we can leave this open to see if anyone else has time to try out a build but it's good to get independent runs to see if the build is stable.
from pekko-http.
If these tests are flaky then I think what I wrote in apache/pekko-connectors#198 (comment) can apply here.
from pekko-http.
The tests are not flaky, I tried 4 times.
However I checked and the port 1025 was indeed already bound on my machine because it's the default one for Proton Mail Bridge (cmd: sudo lsof -nP -i4TCP:1025 | grep LISTEN
). Killing that process fixed the failed tests in ClientServerHttp2EnabledSpec
.
The tests consistently fail in org.apache.pekko.http.scaladsl.ClientServerSpec
(1) and org.apache.pekko.http.impl.engine.http2.H2SpecIntegrationSpec
(12).
from pekko-http.
from pekko-http.
With OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10)
the tests don't finish and blow up with a java.lang.OutOfMemoryError: Java heap space
.
I increased the heap to 4GB
sbt -v --java-home /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home -J-Xmx4g
More errors now:
[info] *** 6 SUITES ABORTED ***
[error] Error during tests:
[error] org.apache.pekko.http.impl.engine.http2.TelemetrySpiPlaintextSpec
[error] org.apache.pekko.http.impl.engine.http2.H2SpecIntegrationSpec
[error] org.apache.pekko.http.impl.engine.http2.Http2PersistentClientPlaintextSpec
[error] org.apache.pekko.http.impl.engine.http2.Http2PersistentClientTlsSpec
[error] org.apache.pekko.http.impl.engine.http2.TelemetrySpiCypherSpec
[error] org.apache.pekko.http.impl.engine.http2.Http2ClientServerSpec
A few of those NoClassDefFoundError
:
[info] org.apache.pekko.http.scaladsl.GracefulTerminationSpec *** ABORTED *** (17 milliseconds)
[info] java.lang.NoClassDefFoundError: Could not initialize class org.apache.pekko.http.impl.util.ExampleHttpContexts$
And a new one:
[info] Support for telemetry
[info] org.apache.pekko.http.impl.engine.http2.TelemetrySpiPlaintextSpec *** ABORTED *** (603 milliseconds)
[info] java.lang.ExceptionInInitializerError:
[info] at org.apache.pekko.http.impl.engine.http2.TelemetrySpiSpec.bindAndConnect(TelemetrySpiSpec.scala:105)
[...]
[info] Cause: java.io.IOException: parseAlgParameters failed: ObjectIdentifier() -- data isn't an object ID (tag = 48)
[info] at sun.security.pkcs12.PKCS12KeyStore.parseAlgParameters(PKCS12KeyStore.java:819)
EDIT: Looking deeper those errors all stem from line 44 of ExampleHttpContexts
. Somehow my JDK 8 doesn't like the example keystore in keys/server.p12
.
from pekko-http.
Using JDK 11 OpenJDK Runtime Environment Homebrew (build 11.0.20+0)
I get again the same failures as with JDK 20:
[info] *** 12 TESTS FAILED ***
[error] Failed tests:
[info] Passed: Total 2, Failed 0, Errors 0, Passed 2
[error] org.apache.pekko.http.impl.engine.http2.H2SpecIntegrationSpec
[info] - must pass rule: 8.2. Server Push *** FAILED *** (18 milliseconds)
[info] 139 was not equal to 0 (H2SpecIntegrationSpec.scala:194)
from pekko-http.
I have no issues running these tests on my old Mac with Java 8 or Java 11. We haven't made much attempt to test Java 20 yet.
@lomigmegard The tests that fail for you rely on opening ports. Is there something on your machine blocking these tests from opening ports?
from pekko-http.
Just to be sure I disabled LittleSnitch and macOS firewall, still the same. The binding of the HTTP/2 server appears be working, a random port is taken.
Let me know if you have other ideas I can try, but we can also ignore my problems as it seems I am the only one have them. Note the files target/test-reports/h2spec-junit-$sectionNr.xml
don't exist, combined with the error code 139
– usually a Seg Fault – might indicate some problem with the h2spec
binary.
Ah and indeed, running it manually directly seg fault:
./http2-tests/target/h2spec_darwin_amd64/h2spec --dryrun
[1] 3295 segmentation fault --dryrun
Looking at the build definition, we are at version 1.5.0
which is from 2016. Latest version is 2.6.0
, replacing doesn't work as the download URL is then incorrect. I will open an issue to track this, and let you prioritize it (edit: #262)
from pekko-http.
Can you check again after the h2spec
fix, @lomigmegard ?
from pekko-http.
@jrudolph the h2spec releases don't include one for Mac Silicon. https://github.com/summerwind/h2spec/releases
We might need eventually to support building h2spec from source or allowing users to provide their own h2spec runtime.
from pekko-http.
Ah, forgot that even the newest version does not support Arm yet.
from pekko-http.
Java 20 build is now part of nightly build. The one thing that I know of that doesn't work with Java 20 is building the Paradox HTML (doc build). This is because of Java reflection usage in the Paradox code and we will require to set --add-opens
settings in our sbt build to allow this to run.
lightbend/paradox#491 (comment) might also work but we appear to already use paradox-java 1.4.1.
[error] Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.findLoadedClass(java.lang.String) accessible: module java.base does not "opens java.lang" to unnamed module @76951454
[error] at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:387)
[error] at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:363)
[error] at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:311)
[error] at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:201)
[error] at java.base/java.lang.reflect.Method.setAccessible(Method.java:195)
[error] at org.parboiled.transform.AsmUtils.findLoadedClass(AsmUtils.java:210)
[error] at org.parboiled.transform.ParserTransformer.transformParser(ParserTransformer.java:35)
[error] at org.parboiled.Parboiled.createParser(Parboiled.java:54)
[error] at com.lightbend.paradox.markdown.Reader.<init>(Reader.scala:40)
[error] at com.lightbend.paradox.sbt.ParadoxPlugin$.$anonfun$baseParadoxSettings$2(ParadoxPlugin.scala:83)
from pekko-http.
No, we are forcing older paradox versions in our plugins.sbt
to stay compatible with Java 8. There's currently no version of paradox that works for both Java 8 and all later versions. After 1.0, we should drop Java 8 support (or at least build with Java 11 by default), so that we can update to a more recent paradox/parboiled version.
from pekko-http.
Surprisingly the new version of h2spec
is working fine on my Apple Silicon, all the tests are green 🎉 Rosetta is probably running automatically on it (why not on the previous version is not clear to me).
@pjfanning the note added in #264 could be removed or tweaked to say it works transparently if Rosetta is installed (which most developer machine would have already).
from pekko-http.
Related Issues (20)
- failed: Http2ServerSpec
- reproducible builds: scala 3 tasty differences in pekko-http-core `HttpEntity.tasty` HOT 3
- Feature request: Provide an API to get file descriptor of the Socket connection HOT 2
- [docs] the link to the incubator svg in our footer is broken on some pages HOT 7
- support HTTP/1.1 vs HTTP/2 protocol negotiation for client connections
- support making HTTP client requests using HTTP/2 HOT 8
- Invalid session value in Tls-Session-Info header HOT 4
- API doc links broken HOT 2
- Add doc generation check to CI HOT 1
- Remove links to spray.io HOT 1
- http2 tests broken when pekko 1.1.0-M1-RC1 is used HOT 4
- Twitter Decoder cannot handle all InputStream implementations HOT 1
- fix compiler warnings about using Java `@Deprecated` annotation
- FileAndResourceDirectivesSpec fails when scala 2.12 used HOT 2
- reproducible builds: inner functions are not consistently generated on Scala 3
- reproducible builds: TASTY differences HOT 1
- Uncaught NPE when parsing a header value HOT 8
- upgrade pekko and possibly other dependencies
- Accept-Charset throws exception instead of defaulting on bad charset header values HOT 1
- handle invalid charsets in accept-charset header (XML case)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pekko-http.