-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Config Support]: Frigate V0.12 crashes and freezes the compleate server! #6477
Comments
Can you run without your hwaccel args to see if it still crashes? |
Thank you! |
It probably will increase significantly. You could try setting |
ok good to know i will report back when I have the results. :) |
There is an updated driver in 0.12, so I would like to see if we can eliminate that as the source of the problem. |
Going to add in that I recently migrated my HA install from my windows box using vmware to a dell sff with an i5 6500t, enabled hwaccell to get the cpu usage down a bit and it has hard locked the machine on me twice over the past 4 days. After some googling I found this and I will turn off hwaccell and see if it fixes mine as well. Just wanted to chime in that you're not the only one with this issue! |
@monsieurlatte if it does not exhibit this behavior without hwaccel, you may try updating the host driver and host kernel as that has fixed this for some users |
Thanks for the info! I'm just now getting into some of this linux/docker stuff so I'm a bit of a noob at it, if you know of a link that gives step by step instructions on how to do that, I'd be grateful and happily send you a coffee :D |
I have tested it now for some time without hwaccel. no crash since then happend! (seems to be the issue.) |
it is going to be on the host so it depends what host you have, #5799 has the related discussion |
Gonna be tough for me since I use HAOS and frigate runs as an add on there. I'll just not use hwaccell I think for now, cpu runs about 65% on my i5 6600T. |
If you are running the latest HA OS it should not be a problem, I've not heard of HA OS users having this issue |
Well I'm keeping an eye on it and so far it's been over 24 hours and no hard lockup as of yet. I was using the intel qsv version of hwacell if that matters and not vaapi. |
I'd definitely recommend using vaapi not qsv |
I got better results for cpu usage with the qsv, but I'll give vaapi a go and see what happens! |
{"return_code":0,"stderr":"","stdout":"vainfo:VA-APIversion:1.17(libva2.10.0)nvainfo:Driverversion:InteliHDdriverforIntel(R)GenGraphics-23.1.1()nvainfo:SupportedprofileandentrypointsnVAProfileNone:tVAEntrypointVideoProcnVAProfileNone:tVAEntrypointStatsnVAProfileMPEG2Simple:tVAEntrypointVLDnVAProfileMPEG2Simple:tVAEntrypointEncSlicenVAProfileMPEG2Main:tVAEntrypointVLDnVAProfileMPEG2Main:tVAEntrypointEncSlicenVAProfileH264Main:tVAEntrypointVLDnVAProfileH264Main:tVAEntrypointEncSlicenVAProfileH264Main:tVAEntrypointFEInVAProfileH264Main:tVAEntrypointEncSliceLPnVAProfileH264High:tVAEntrypointVLDnVAProfileH264High:tVAEntrypointEncSlicenVAProfileH264High:tVAEntrypointFEInVAProfileH264High:tVAEntrypointEncSliceLPnVAProfileVC1Simple:tVAEntrypointVLDnVAProfileVC1Main:tVAEntrypointVLDnVAProfileVC1Advanced:tVAEntrypointVLDnVAProfileJPEGBaseline:tVAEntrypointVLDnVAProfileJPEGBaseline:tVAEntrypointEncPicturenVAProfileH264ConstrainedBaseline:tVAEntrypointVLDnVAProfileH264ConstrainedBaseline:tVAEntrypointEncSlicenVAProfileH264ConstrainedBaseline:tVAEntrypointFEInVAProfileH264ConstrainedBaseline:tVAEntrypointEncSliceLPnVAProfileVP8Version0_3:tVAEntrypointVLDnVAProfileVP8Version0_3:tVAEntrypointEncSlicenVAProfileHEVCMain:tVAEntrypointVLDnVAProfileHEVCMain:tVAEntrypointEncSlicenVAProfileHEVCMain:tVAEntrypointFEI"} |
They use the same hardware and qsv is a wrapper on vaapi, in my experience they have always been identical or very similar |
I'd have to disagree with that #6485 |
Fair enough, forgot about that. That's the only case I've seen that HA OS has been associated with this type of issue. |
I have the same hardware (i5-6500T), same library and driver versions (1.17 and 23.1.1), and also experiencing freezes. I use OpenVino detectors. |
Adding myself to this (and the various other posts) running on a Gigabyte Brix, i7-3537U, Debian 11, kernel 5.10.0-23-amd64, Supervised install. I have just disabled/hashed hwaccel this morning from the frigate config. Last line of the log before the hard crash/lockup was the 'api/stats' line |
I have found that vaapi is stable for using hwacell on my i5 6500t and i5-8500t, using qsv is not, also can't use OV detectors either as it does the same thing assuming it's using the same driver model. However it works with TPU. Not sure if anyone else read but it clearly states in the documents that to use qsv it says intel gen 10 or greater so maybe that's the reason why? |
In general vaapi is recommended over qsv for any generation. Some older CPUs do support qsv but it provides no benefit over vaapi |
I saw no difference in hwaccel between qsv and vaapi however it appears openvino uses the same driver as qsv or something because with vaapi and openvino I got the same hardlocks. Tpu is fine. |
So, after couple of weeks running without any -vaapi accell on my i5-6500T 6th gen, on a supervised install, I have not faced any freeze, so unless it is a surprising coincidence, I would say the hwaccell was the problem. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I have the same problem that happens to us after 3 days. i5-4590T ,Proxmox , lxc , hardware acceleration , coral m2 mini pcie |
Seems to be fixed in my case by upgrading machine libva to 2.19 (from 2.18) and setting max memory in the docker container |
Sorry, how did you manage to update, and what was the value you increased in docker? |
@ithesk Identical machine, exactly after 3 days it crashes, now I'll try to deactivate "hwaccel_args" and let's see... the machine actually crashed for me, I had to restart it from the button, same thing for you? |
Also having similar issues with my i5-6500T on 0.12. Running frigate with docker in a Linux VM on proxmox. Currently shifted Home Assistant off the machine so it's just Frigate and still having hard machine lockups every other day. Considering ditching proxmox to try without that. |
I will say there is a trend that these types of issues have occurred for proxmox users (though not exclusively) and some users have found without proxmox it did not occur. |
Thanks Nick, maybe I can be a test dummy. What are your thoughts on ESXI? I'd like to run HASSOS and Frigate on the same hardware. Or am I better off ditching that virtualisation layer and running HA in a docker container too? |
I can only speak from personal experience which is that it's simpler and easier running everything in docker. Esxi has had some frustrating limitations for other users. |
Guys, after 15 days of testing I understood that the only way to avoid crashing proxmox due to frigate is to not use the GPU, but I don't like this as the load is on the shoulders of the CPU, with which you have found a solution? |
My Unraid server is using a J6413 and a PCI Coral. Frigate is running in Docker with recording enabled and detectors enabled. Two week ago when I started running Frigate, it would crash daily due to OOM. After turning off the GPU, the OOM crashes stopped but I still wanted hardware acceleration. I started tweaking the server a couple days ago.
Memory usage has been stable now. It hasn't crash for 5 days now. The last setting I have changed was the qsv preset. I think there is a memory leak with ffmpeg or the Intel media drivers but I haven't had the time to open up Valgrind and ffmpeg to reproduce the issue. I also had a 6600k running in another server but I couldn't figure out a setting besides turning off the hardware acceleration to prevent OOM. |
Anyone running a supervised install that has upgraded to Debian 12 - if so, any improvement/change? EDIT: Updated to Debian 12 this morning, also installed the latest libva2 from Debian testing on the host:
.... however obviously the Frigate add-on uses its own version/package, so I'm a little sceptical that this will make any difference:
Re-enabled hw_accel, now we wait....
Is it possible to increase SHM_SIZE on the HA Frigate add-on yet? I seem to recall previously, at one point, it wasn't. |
I have this issue and am just adding another data point in case it's helpful. Using a Dell 7050 micro, with i5-6500T CPU, OpenVino detector, vaapi hardware accelerator. Initially I had HAOS installed on bare metal with Frigate add-on and was seeing a complete host reboot at least once every 24 hours. Switched to proxmox with Frigate docker in an LXC (Debian 12). Continued seeing the issue (except that the host would completely hang and require a power cycle). I am new to docker and proxmox, so may have not been looking in the right place, but couldn't find anything relevant in logs (in frigate, proxmox host syslog, HAOS via journalctl).
In an effort to try anything to see what would help, I switched to the yolov8n model as per these instructions. I don't understand the significance of using this model, but it seems to be stable now (at seemingly higher CPU usage reported by the proxmox host). I am expecting delivery of a Coral TPU (M.2) soon, so will try that as well... |
Still crashed the entire box for me - back to hw_accel disabled. |
Updated to 0.13 this morning and have subsequently re-enabled hw_accel as a test. Still seems to be using the same libva version in the Home Assistant addon:
To answer my previous query about SHM size when using the Home Assistant add-on:
Box has 16GB of RAM, so we assume the SHM size is 8GB - with plenty for Frigate. |
Is this working with Frigate 0.13? or does it cause the usual blocking of proxmox? |
Here's my update, I have seen significant improvement. I believe my server was overheating, causing the lockups. I previously had my miniPC in a cupboard and drew a correlation between hot (heat) windy (lots of motion) days and lockups. Doing this I dropped from sometimes daily lockups to weeks without lockups. I've since added a USB Coral in the last few weeks to remove some of the processing load from my poor 6500T. This is with 2 cameras, one at 2k and one at 4k. 12-15fps. Unfortunately my cameras don't support good substream options so decoding and processing those at full res. Hope this helps someone out! |
Updating the Kernel from 6.1 to 6.5 solved the issue for me on Debian. Complete server freezes as soon hardware acceleration is enabled through |
so after debugging for whole 3 days found this. I have ubuntu 22.04 with i5-6500. Kernel: ffmpeg:
hwaccel_args: preset-vaapi causes it to freeze after 2-3 hours of uptime. @wiredolphin please help. |
Seems the same symptoms I've faced on Debian 12 Bookworn and its official kernel, 6.1, with only a difference: in my case the host used to freeze immediateley when the Frigate container restarted. If your host Is able to run for 2/3 hours before freezing, search the Frigate logs for any useful hint regarding the VAAPI, the Intel graphics driver (iHD or i965) or ffmpeg malfunctioning. Search instruction to update the kernel version of your distro or, if possibile, update to a newer distro version. |
Thanks for that bit of information! I think your mention about upgrading the kernel is what finally solved my stability issue that was introduced 2+ years ago. It used to be worse when I was using USB 3.0. For whatever reason, with the sunny days lately it was crashing much faster even when I slowed it down on USB 2.0 speeds. But I do think that the I've upgraded the kernel and it might actually be working now. |
Hi, Did everybody resolve their crashing issue already? I have same HW (core I5 Intel cpu with 8 gig ram) https://www.reddit.com/r/debian/comments/1fi2ye6/nvr_minipc_with_debian_freezing_constantly/ and tried to update kernel to 6.10 and increase docker shm-size to 1GB.. I think increasing SHM size actually extended period without crashing by one day, up to 3-4 days! But still doing it. Anybody knows if the memory leaks with frigate/ffmpeg are resolved by now? Thanks! Edit: 6 HD-cameras with following config ffmpeg:
# hwaccel_args: -c:v h264_qsv
hwaccel_args: preset-vaapi
detectors:
ov:
type: openvino
device: GPU
model:
width: 300
height: 300
input_tensor: nhwc
input_pixel_format: bgr
path: /openvino-model/ssdlite_mobilenet_v2.xml
labelmap_path: /openvino-model/coco_91cl_bkgr.txt |
At least for me @nacree, I've not had any issues under v14.x with h/w acceleration enabled. Been running now for 3+ weeks. |
@nacree , I know it's kinda late now, but we've experienced a similar issue with v0.14.0 running in a docker environment. After a few minutes (sometimes 5 min, sometimes 1 hour), frigate would crash, meaning the container would be freeze without any error messages. Neither frigate nor Linux logs contains any information which would have helped to identify the root cause. We've monitored memory consumption, increased size of tmpfs etc. but none of that helped. I don't know how complex your configuration is but in our case, it didn't take a lot of effort to give 0.11.0 a try. We basically only had to manually add an MQTT broker (we decided to go with another container to run mosquitto) and change a few parameters. That's all. The downgrade was supposed to:
We could in fact rule out a hardware defect and it seems less likely that the problem was caused by some configuration issue on our side (we're really not relying on any special setup, it's basically identical to what can be found in the documentation). We decided not to make any move towards an upgrade until there's a clear reason for us to do that, like a bug fix or any new feature we would miss in 0.11.0. @ALL: Is there any thread describing a similar issue which hasn't been closed? We've not been able to fix our freeze/crash by adjusting hwaccel configuration and we could rule out a memory leak. It required the downgrade to 0.11.0 to "fix" the issue. |
@luzidchris Thanks for sharing the tip. I have experienced constant crashes every 1-3 days, so I was actually a bit confusing when I came back from the work trip and now my system uptime is over 14 days. And this is again - without doing anything. I hope just that some component (kernel?) would have been updated before the last crash and now it just works. But I cannot say what would have fixed my setup. I will keep monitoring and hope that it keeps running. Currently running 0.14.0-da913d8 |
I got exacty the same problem since 0.14. Frigate is running in docker in LXC on proxmox. I've tested different hardware, different kernels : same. I've increased shm_size to 1Gb, to see the difference. |
Mine has been actually now finally working. I noticed while ago huge peaks in CPU usage of one camera detection. It wasn't constant, but happened daily. Whatever happened, apparently core did not recover from that every time and ended up just freezing. Now I actually disabled detection from all the other cameras except 2 of 6 cameras I have, and now the system has been running perfectly for two weeks already! |
Describe the problem you are having
Frigate v0.12 crashes the whole server every 1-2 days!
I have not eben able to record anything, because the homeassistant server dies compleatly.
Right before the crash no memory or ram problems can be observed. The only thing is that the crashes seem to be occouring in the early morning every time, baut maybe this is just bad luck!
PC is a core I5 Intel cpu with 8 gig ram.
Version
v0.12
Frigate config file
Relevant log output
Frigate stats
No response
Operating system
Debian with Homeassistant Supervised / Docker
Install method
HassOS Addon
Coral version
CPU (no coral)
Any other information that may be helpful
v0.11 does work with on problem.
The text was updated successfully, but these errors were encountered: