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

HTTP intrinsic broken on macOS #461

Closed
Tracked by #462
sgammon opened this issue Oct 8, 2023 · 1 comment · Fixed by #475
Closed
Tracked by #462

HTTP intrinsic broken on macOS #461

sgammon opened this issue Oct 8, 2023 · 1 comment · Fixed by #475
Assignees
Labels
bug Something isn't working P0

Comments

@sgammon
Copy link
Member

sgammon commented Oct 8, 2023

Expected Behavior

Using Elide's built-in HTTP intrinsic should not break apps.

Actual Behaviour

Using the intrinsic on macOS causes an exception in native mode.

Stacktrace

elide 21:44:05.817 WARN  Failed to initialize a channel. Closing: [id: 0x44f70c86, L:/[0:0:0:0:0:0:0:1]:3000 - R:/[0:0:0:0:0:0:0:1]:59387]
java.lang.NoClassDefFoundError: Could not initialize class io.netty.handler.codec.http.HttpResponseEncoder
    at elide.runtime.intrinsics.server.http.netty.NettyChannelInitializer.createHttpEncoder(NettyChannelInitializer.kt:27)
    at elide.runtime.intrinsics.server.http.netty.NettyChannelInitializer.initChannel(NettyChannelInitializer.kt:39)
    at elide.runtime.intrinsics.server.http.netty.NettyChannelInitializer.initChannel(NettyChannelInitializer.kt:23)
    at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
    at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
    at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1114)
    at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
    at io.netty.channel.DefaultChannelPipeline.access$100(DefaultChannelPipeline.java:46)
    at io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute(DefaultChannelPipeline.java:1463)
    at io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers(DefaultChannelPipeline.java:1115)
    at io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded(DefaultChannelPipeline.java:650)
    at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:514)
    at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:429)
    at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:486)
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base@21/java.lang.Thread.runWith(Thread.java:1596)
    at java.base@21/java.lang.Thread.run(Thread.java:1583)
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:833)
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211)
^CExiting session. Have a great day! 👋
 ELIFECYCLE  Command failed with exit code 130.

Steps To Reproduce

  1. Install Elide on macOS (native)
  2. Run elide serve tools/scripts/server.js (in this codebase)
  3. Observe exception

Environment Information

  • Operating System: macOS Ventura 13.5.1
  • Architecture: M2

Runtime

Native

Language

JavaScript

Example Application

No response

Version

1.0.0-alpha7

@sgammon sgammon added the bug Something isn't working label Oct 8, 2023
@sgammon sgammon added this to the Release R4: Alpha 8 milestone Oct 8, 2023
@sgammon sgammon self-assigned this Oct 8, 2023
@sgammon sgammon added the P0 label Oct 8, 2023
@sgammon sgammon mentioned this issue Oct 8, 2023
@darvld
Copy link
Member

darvld commented Oct 14, 2023

This is one of a group of issues related to build-time initialization of Netty buffer allocators and related classes, it also happens in Linux. See the closing PR for more information.

@sgammon sgammon assigned darvld and unassigned sgammon Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P0
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants