Skip to content
This repository has been archived by the owner on May 31, 2022. It is now read-only.

[BUG] [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xd7d84e] #155

Closed
brzuchal opened this issue Dec 7, 2021 · 18 comments
Closed
Assignees
Labels
B-bug Bug: bug, exception F-need-verification
Milestone

Comments

@brzuchal
Copy link

brzuchal commented Dec 7, 2021

Not much to say, it happens on reloading workers.

The version of RR used: version: 2.6.3, buildtime: 2021-12-03T11:37:00+0000

My .rr.yaml configuration is:

server:
    command: "php bin/console baldinof:roadrunner:worker"
    env:
        - APP_RUNTIME: Baldinof\RoadRunnerBundle\Runtime\Runtime
http:
    address: 0.0.0.0:3000
    uploads:
        forbid: [ ".php", ".exe", ".bat" ]
    headers:
        cors:
            allowed_origin: "*"
            allowed_headers: "*"
            allowed_methods: "GET,POST,PUT,DELETE"
            allow_credentials: false
            exposed_headers: "Cache-Control,Content-Type"
logs:
    mode: development
    channels:
        http:
            level: info
        server:
            level: info
            mode: raw
reload:
    enabled: true
    interval: 1s
    patterns: [".php", ".yaml"]
    services:
        http:
            dirs: ["."]
            recursive: true
status:
    address: localhost:3001
rpc:
    listen: tcp://127.0.0.1:6001

Errortrace, Backtrace or Panictrace

app_1  | 2021-12-07T08:38:20.105Z       DEBUG   reload          file was updated        {"path": "/app/var/cache/prod/App_KernelProdDebugContainer.php.lock", "name": "App_KernelProdDebugContainer.php.lock", "size": 0}
app_1  | 2021-12-07T08:38:21.106Z       INFO    http            HTTP plugin got restart request. Restarting...
app_1  | panic: runtime error: invalid memory address or nil pointer dereference
app_1  | [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xd7d84e]
app_1  | 
app_1  | goroutine 65 [running]:
app_1  | github.com/spiral/roadrunner-plugins/v2/http.(*Plugin).Reset(0xc00012ed10)
app_1  |        github.com/spiral/roadrunner-plugins/v2@v2.6.3/http/plugin.go:358 +0xee
app_1  | github.com/spiral/roadrunner-plugins/v2/resetter.(*Plugin).Reset(0xc000ae0e30, {0xc000221bf0, 0x4})
app_1  |        github.com/spiral/roadrunner-plugins/v2@v2.6.3/resetter/plugin.go:27 +0x142
app_1  | github.com/spiral/roadrunner-plugins/v2/reload.(*Plugin).Serve.func2()
app_1  |        github.com/spiral/roadrunner-plugins/v2@v2.6.3/reload/plugin.go:129 +0x2ee
app_1  | created by github.com/spiral/roadrunner-plugins/v2/reload.(*Plugin).Serve
app_1  |        github.com/spiral/roadrunner-plugins/v2@v2.6.3/reload/plugin.go:113 +0x27d

@rustatian
Copy link
Member

Hey @brzuchal. Does it happen on every reload?

@brzuchal
Copy link
Author

brzuchal commented Dec 7, 2021

@rustatian no, it is really hard to spot the right preconditions. Tried replacing dependency version using composer, tried, warming up Symfony cache, tried with some Symfony config file changes to trigger the reload and no success in reproducing it.
I fear that the above-mentioned segfault will be hard to spot.

@rustatian
Copy link
Member

Did you restart RR between tries?

@brzuchal
Copy link
Author

brzuchal commented Dec 7, 2021

It's containerized so no. Unless you're asking to restart workers but I guess it has nothing to do.

@rustatian
Copy link
Member

Got u, I'll try to reproduce, thanks.

@rustatian rustatian moved this to Todo in RoadRunner Dec 7, 2021
@rustatian
Copy link
Member

@brzuchal So, the RR fails on the first file change, am I right? I mean, it's not like for example working for an hour and then on random Reset fails.

@rustatian rustatian moved this from Todo to In Progress in RoadRunner Dec 7, 2021
@brzuchal
Copy link
Author

brzuchal commented Dec 7, 2021

Yes it was the only one file reload after lunch preceding line was actually RR version log entry

@rustatian
Copy link
Member

Last week I found a bug in our container, but I haven't released a version. I'll try to reproduce this issue on the 2.6.3 and release the new one.

@rustatian
Copy link
Member

rustatian commented Dec 7, 2021

@brzuchal Just curious, do you use reload plugin for the local development or in the production?

@brzuchal
Copy link
Author

brzuchal commented Dec 7, 2021

@rustatian no worries, development only, you just see the prod in container name cause I have default prod environment in Symfony app

@rustatian
Copy link
Member

@brzuchal try the new version please: https://github.com/spiral/roadrunner-binary/releases/tag/v2.6.4 (wait few minutes till GitHub generates binaries and docker image)

@rustatian
Copy link
Member

Hey @brzuchal, have you been faced this issue after RR updated to v2.6.4?

@brzuchal
Copy link
Author

brzuchal commented Dec 8, 2021

@rustatian no, but TBH didn't manage to test it well on local since had to switch projects. BTW in the meantime, the fixed version works with production settings on our staging environment for 6h with no issues (ofc without reloader, but 🤷 ) This is all I can say.

@rustatian
Copy link
Member

It's ok, thanks for the feedback, let's wait more time to be sure 🧑‍🏭

@rustatian
Copy link
Member

Hey @brzuchal , any updates on this? 😃

@rustatian
Copy link
Member

Friendly ping @brzuchal, any updates on this?

@brzuchal
Copy link
Author

Sorry, @rustatian but am on another project for the next 3w, this version runs on production settings without the watcher for 2w now. That's the max I can give you.

@rustatian
Copy link
Member

Ok, np. I'll close this issue since we haven't seen it on our envs as well. Feel free to reopen it if it still exists. Thanks.

Repository owner moved this from In Progress to Done in RoadRunner Dec 22, 2021
@rustatian rustatian added this to the v2.6.6 milestone Dec 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
B-bug Bug: bug, exception F-need-verification
Projects
None yet
Development

No branches or pull requests

2 participants