Home Assistant is creating .core Files in the config Folder

Hi guys,

i am checking my config folder and i have a lot of .core files in my directory.
i deleted all “rm core*”.
I restarted HA but the system is creating again .core files.
Does anyone know how i can figure out what is the problem?

-rw------- 1 root root 123719680 Mar 12 08:09 core.82
-rw------- 1 root root 66531328 Mar 12 08:14 core.96
-rw------- 1 root root 66531328 Mar 12 08:14 core.97

Usually a core file indicates something did not shutdown properly. The core file is the memory contents at the time of the issue.

Are you running Hassio? If so, perhaps the docker container is not properly shutting down. That would be a bug.

Yes, i am running hassio.
Anyone else has this problem also?

I need to check. Are you running the HassOS image or Hassio on Linux / Raspian?

I have HassOS in a VM & Hassio Raspbian Lite on my RPi.

Hassio on Linux -> Raspian 3.
Today i am getting more files:

-rw------- 1 root root 66531328 Mar 12 10:38 core.1010
-rw------- 1 root root 66531328 Mar 12 10:39 core.1024
-rw------- 1 root root 66600960 Mar 12 11:17 core.1335
-rw------- 1 root root 66531328 Mar 12 08:49 core.135
-rw------- 1 root root 66600960 Mar 12 11:33 core.1424
-rw------- 1 root root 123867136 Mar 12 11:33 core.1438
-rw------- 1 root root 66531328 Mar 12 08:19 core.149
-rw------- 1 root root 66531328 Mar 12 08:54 core.174
-rw------- 1 root root 68694016 Mar 12 08:54 core.188
-rw------- 1 root root 66531328 Mar 12 08:24 core.202
-rw------- 1 root root 123805696 Mar 12 15:00 core.2815
-rw------- 1 root root 123813888 Mar 12 15:00 core.2829
-rw------- 1 root root 123805696 Mar 12 15:01 core.2843
-rw------- 1 root root 66531328 Mar 12 08:37 core.291
-rw------- 1 root root 66576384 Mar 12 15:14 core.2932
-rw------- 1 root root 123801600 Mar 12 16:31 core.3418
-rw------- 1 root root 66531328 Mar 12 09:05 core.349
-rw------- 1 root root 123600896 Mar 12 17:27 core.3779
-rw------- 1 root root 123600896 Mar 12 17:31 core.3818
-rw------- 1 root root 123703296 Mar 12 17:53 core.3932
-rw------- 1 root root 66531328 Mar 12 09:11 core.413
-rw------- 1 root root 123703296 Mar 12 18:09 core.4143
-rw------- 1 root root 123703296 Mar 12 18:20 core.4207
-rw------- 1 root root 66531328 Mar 12 09:14 core.427
-rw------- 1 root root 123703296 Mar 12 19:03 core.4518
-rw------- 1 root root 66531328 Mar 12 09:32 core.541
-rw------- 1 root root 66531328 Mar 12 09:39 core.582
-rw------- 1 root root 66531328 Mar 12 09:45 core.621
-rw------- 1 root root 66531328 Mar 12 08:39 core.82
-rw------- 1 root root 66531328 Mar 12 10:16 core.882
-rw------- 1 root root 66531328 Mar 12 10:23 core.921
-rw------- 1 root root 123650048 Mar 13 07:45 core.9321
-rw------- 1 root root 66531328 Mar 12 08:39 core.96
-rw------- 1 root root 66531328 Mar 12 08:14 core.97

It is usually a sign of a crash. If you google .core files you will find out how to use the .core file to do some troubleshooting, but that may be more of a developer task.

Your log files may show what is crashing.

I’ve been plagued with these core files since around release 0.86. I’m running Hassio on a Rpi3. Nothing in the logs that point to what could have caused them. No real easy way to find the cause using the core files.

I am running Home Assistant 0.87.1.
Maybe a bug ?!

If a program crashes, yes it is a bug.

Without being able to use gdb (which is not included with hassio) it is hard to tell. Try using cat (or strings) on the .core files to see if any info is revealed.

As far as i know, this is a debug file thrown out by a program that crashed. You can also delete them safely.

you can check what program crashed to see if you can troubleshoot further, use the below command on a cli.

$ file core

I am running ssh with the following addon -> https://www.home-assistant.io/addons/ssh/

core-ssh:/config# file core.413
-bash: file: command not found

apt-get is also not possible.
how can i figure that out?

I just verified no core files on my Raspian Lite Hassio install.

have you tried strings?

Yes, i tried strings now and i figured out what is / was the problem.

I have a ring doorbell and want to have the camera picture including video.
i commented the following section in my configuration file and it looks like that no .core file is creating anymore.
I think the problem is the ffmpeg_arguments for hassio.

#camera:
# - platform: ring
# ffmpeg_arguments: '-pred 1 -q:v 2’

1 Like

I completely agree with @unglazedswansea - problem is with the ffmpeg_arguments.

I had the following camera setup and it worked for months before 0.88 without creating any core files.

- platform: ffmpeg
  name: Pool Controller
  input: !secret camera_pool_controller_url
  extra_arguments: -pred 1 -q:v 2 -filter:v "crop=158:67:627:482"

I removed the -pred 1 -q:v 2 and still got core files being generated.

- platform: ffmpeg
  name: Pool Controller
  input: !secret camera_pool_controller_url
  extra_arguments: -filter:v "crop=158:67:627:482"

I am now trying no extra_arguments.

- platform: ffmpeg
  name: Pool Controller
  input: !secret camera_pool_controller_url

Unfortunately, longer term, I want to crop the camera image, but there is a bug report on github at https://github.com/home-assistant/home-assistant/issues/21132

You might get some useful feedback running ffmpeg from the commandline.

Still getting core files … two more in the last 15 minutes.

@nickrout - I can’t run FFMPEG from the command line as I am running Hassio, and it is not available from the command line. I have run FFMPEG from a Mac to the same cameras, and it is working as expected, then so is the FFMPEG component in Hassio, just every now and again (multiple times daily) it dumps a core file. Sometimes it restarts Hassio but most times not. It has created 5 core files in the last 45 minutes. It seems to be a lot worse if I leave a browser window with the camera on it.

Next is going to be disable the all the cameras and monitor.

Where does ffmpeg come from. Is it a hassio addon?

@nickrout - FFMEPG is an official component.

Updated HassOS version to 2.11. Been monitoring for 2 hours and no core dumps. To be expected though when you look at the release notes in Github (https://github.com/home-assistant/hassos/releases). Suspect disabling coredumps is just masking the problem, but I guess if no one can understand them there is little point in creating them in the first place.

HassOS Release 2 build 11 (Stable)

@pvizeli pvizeli released this 4 days ago

changed

  • OS: Enable systemd-coredump
  • OS: Add support for privileged supervisor
  • OS: Fix boot problem
  • OS: Disable coredump

I will continue monitoring over the next little while (automation that pushes an alert when core.* files appear in the /config folder).