Skip to content

Jester crashes with SIGSEGV on "Hello, world!" example (Nim 2.2.2, Linux) #333

@pubnoconst

Description

@pubnoconst

I'm encountering a crash when running a basic "Hello World" application using the Jester framework. Below is the minimal code that reproduces the issue:

Steps to Reproduce

  1. Create a file main.nim with the following content:
import jester

routes:
  get "/":
    resp "Hello, world!"
  1. Run the app:
$ nimble run --threads:on

When I run the application with the following command, it builds successfully but crashes immediately after starting the server:

$ nimble run --threads:on
   Building jesterbed/jesterbed using c backend
      Info: compiling nim package using /home/u1/.nimble/bin/nim
INFO Jester is making jokes at http://0.0.0.0:5000
Starting 24 threads
Listening on port 5000
Traceback (most recent call last)
/home/u1/.nimble/pkgs2/httpbeast-0.4.1-b23e57a401057dcb9b7fae1fb8279a6a2ce1d0b8/httpbeast.nim(83) eventLoop
/home/u1/.choosenim/toolchains/nim-2.2.2/lib/system/orc.nim(46) nimIncRefCyclic
SIGSEGV: Illegal storage access. (Attempt to read from nil?)

Environment

$ nim --version
Nim Compiler Version 2.2.2 [Linux: amd64]
Compiled at 2025-02-06
Copyright (c) 2006-2025 by Andreas Rumpf
git hash: 6c34f62785263ad412f3e4e4bf8d8751d113

However if I choose --mm:markAndSweep it runs perfectly fine.

Has anyone else encountered this issue with Jester and Nim 2.2.2? Could this be related to the httpbeast backend or the threading option? Any guidance on troubleshooting or resolving this crash would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions