beyondcode / herd-community

89 stars 1 forks source link

[Bug]: Services and Herd crashes very often #1094

Closed mchev closed 3 weeks ago

mchev commented 1 month ago

Platform

macOS

Operating system version

macOS Somona 14.6.1

System architecture

ARM64 (M1, M2, etc)

Herd Version

1.11.1 (Build: 34)

PHP Version

PHP 8.3

Bug description

I have a Laravel Reverb service activated and it keep stopping with no reason (port 8080, not secured). There is only this service.

I don't know if it's related but Herd crashes a lot too. Sometimes with an alert and sometimes i just see it because i got a Bad Gateway. (similar to #1083 so it maybe related to M1 M2 architecture)

Herd never crashed before. What changed ? Latest update and also subscription to pro.

Steps to reproduce

No response

Relevant log output

Capture d’écran 2024-10-16 à 12 55 18

Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000cc529cf54490 -> 0x00004c529cf54490 (possible pointer authentication failure) Exception Codes: 0x0000000000000001, 0x0000cc529cf54490

Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [25900]

sschlein commented 1 month ago

Can you please check if the profiler is constantly enabled and writing lots and lots of data?

CleanShot 2024-10-16 at 12 55 40

mchev commented 1 month ago

Can you please check if the profiler is constantly enabled and writing lots and lots of data?

Detect breakpoints automatically is checked. I have 0 entries in Profiler Data

sschlein commented 1 month ago

Can you update your macOS to the latest version? There was a bug on macOS 15.0.0 that had the same problems and it was fixed on 15.0.1, so it may also got fixed from 14.6.1 to 14.7 if you're not going to Sequoia yet.

mchev commented 1 month ago

Can you update your macOS to the latest version?

Thanks, I'll give this a try and test it throughout the day to see if the issue is resolved. I'll come back here to close the ticket or provide an update.

mchev commented 1 month ago

@sschlein after update to 15.0.1 (24A348) the service keep stopping. I'm wondering if this is when i try my apps with multiple browsers open (to test websockets)

sschlein commented 1 month ago

Do you also have Herd crashes? The macOS update should fix Herd crashes but it likely unrelated to Reverb.

My guess on Reverb is a memory issue on PHP for Reverb. What's your PHP memorylimit?

mchev commented 1 month ago

Herd seems to be ok now. But just one hour testing. Memory limit is 128

sschlein commented 1 month ago

Yeah, definitely increase that by a lot for Reverb, maybe start with 1024 and do a Reverb restart after the change.

mchev commented 1 month ago

Yeah, definitely increase that by a lot for Reverb, maybe start with 1024 and do a Reverb restart after the change.

Sorry but it still crashes after increasing to 1024. Il check later if there is another issue, memory leak or something else.

mpociot commented 3 weeks ago

I'll close this issue as this seems to be related to Reverb crashing and not Herd itself. If possible and open an issue on the reverb repository - maybe the Herd service logs give any insight into why Reverb is crashing.

mchev commented 3 weeks ago

I'm using it without Herd locally and in production with Forge, and I haven't encountered any issues. This seems to be specifically related to Herd.

The services "auto stops / crash" specifically on M2. I tried it on an Intel machine and had no issues.

Please don't be the team that closes issues just to look good without actually investigating the problem.

mpociot commented 3 weeks ago

@mchev can you open a new issue in this case so we can figure out what might cause this specific to Reverb? If possible with something reproducible? :)