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

[🐛 BUG]: RoadRunner segfaults if you try to use the Jobs API before the plugin is fully loaded #2085

Closed
1 task done
l-x opened this issue Dec 6, 2024 · 2 comments · Fixed by roadrunner-server/jobs#136
Assignees
Labels
B-bug Bug: bug, exception
Milestone

Comments

@l-x
Copy link

l-x commented Dec 6, 2024

No duplicates 🥲.

  • I have searched for a similar issue in our bug tracker and didn't find any solutions.

What happened?

RoadRunner segfaults if you try to use the Jobs API before the plugin is fully loaded.

I'm quite sure this is not on purpose. :D

Version (rr --version)

rr version 2024.2.1 (build time: 2024-09-12T16:25:04+0000, go1.23.1), OS: linux, arch: amd64

How to reproduce the issue?

Simply put this code in a file thats called via server.on_init.command configuration. RoadRunner will crash on startup.

$jobs = new Jobs(
    RPC::create(
        Environment::fromGlobals()->getRPCAddress(),
    ),
);

$jobs->count();

If you put a sleep(5); before $jobs->count(); RoadRunner succeeds to start.

Relevant log output

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xb2538d]

goroutine 85 [running]:
go.opentelemetry.io/otel/sdk/trace.(*TracerProvider).Tracer(0x20007?, {0x20e4488?, 0xc00017e900?}, {0x0?, 0x0?, 0xc00017e8d0?})
        go.opentelemetry.io/otel/sdk@v1.30.0/trace/provider.go:134 +0x2d
github.com/roadrunner-server/jobs/v5.(*rpc).List(0xc00094a058, 0x1?, 0xc000a8b480)
        github.com/roadrunner-server/jobs/v5@v5.0.5/rpc.go:105 +0x65
reflect.Value.call({0xc000bce600?, 0xc00094a0b8?, 0x13?}, {0x20e4520, 0x4}, {0xc000c8eef8, 0x3, 0x3?})
        reflect/value.go:581 +0xca6
reflect.Value.Call({0xc000bce600?, 0xc00094a0b8?, 0xc000a8d180?}, {0xc000ba56f8?, 0x4093be?, 0x47c632?})
        reflect/value.go:365 +0xb9
net/rpc.(*service).call(0xc000b71d80, 0xc000b71c00, 0xc000013d60, 0xc000013d70, 0xc000bc9480, 0xc0000b1ae0, {0x1e5b280?, 0xc00017e8a0?, 0xc000874070?}, {0x1e8ebc0, ...}, ...)
        net/rpc/server.go:381 +0x209
created by net/rpc.(*Server).ServeCodec in goroutine 84
        net/rpc/server.go:478 +0x3d7
@l-x l-x added B-bug Bug: bug, exception F-need-verification labels Dec 6, 2024
@rustatian
Copy link
Member

Hey @l-x 👋🏻
Thank you for the report, will double check and release fix.

@rustatian
Copy link
Member

@l-x Yep, confirmed.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: bug, exception
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants