What is the "core" file in the config directory?

Does anyone know what the “core” file is inside the config directory? It’s about 151 MB.

2 Likes

I don’t have this file.

Hm, interesting. I don’t think I had this file when I first started using HA over a year ago. I just assumed it was in some update. I guess I could try removing it and restarting HA to see what happens.

Edit: Well, I removed the file and restarted HA. Everything appears to be working fine. Not sure where the file came from but for what it’s worth, I went from running HA via Hassio, then to Hassbian and now finally I’m running HA inside a container (Docker) on DietPi.

A ‘core’ file is a file saved by a program that stopped unexpectedly, due to a programming error. It is generally used for debugging.

If it appeared in your config directory, it was most likely started by a program that was started from that directory, such as an editor.

You can sometimes tell which program created the core file by doing

$ file core
1 Like

Good to know! Appreciate the info. I use Atom to modify my configuration files so I’m assuming that’s what caused it. Using file core, I’m seeing this:

core: ELF 32-bit LSB core file ARM, version 1 (SYSV), SVR4-style, from '/usr/local/bin/python3 -m homeassistant --config /config', real uid: 0, effective uid: 0, real gid: 0, effective gid: 0, execfn: '/usr/local/bin/python3', platform: 'v7l'

This actually looks like a core file from HA running in a docker container. Something in your setup or configuration is causing HA to stop unexpectedly.

Getting more information out of a core file requires specialist tools and knowledge, so I suggest you try undoing your last few changes, to see if they stop appearing.

1 Like

It’s not showing up again and the creation date was 16 Sept. I think it’s when I was upgrading HA. I had some errors and had to recreate the container a few times. Probably somewhere in that process it was created. Well, good to know what’s causing it and what it is. Thanks again for the help.

1 Like

I’m facing the same issue all of a sudden.

I even restored my config from a backup from 2 weeks ago. The core files get created and the system reboots randomly. I haven’t made any major changes recently.

Guess I’ll try a fresh install on a new SD card. Is there anyway to debug the core further to find the actual issue?

Yes, but only with the right expertise.

i am also seeing now .core files, never had this before
running 87
on next occure, i will do file core command

I’m also seeing this issue just recently, and my HA seems a bit ‘laggy’ as result

Did you figure out what was causing the core dumps?

No, didn’t see them anymore now

I have noticed these appearing in the last 2 weeks of so. Initially it was just the odd one that was created every now and again, but over the last 2 days, it has started happening a lot.

Yesterday I noticed about 12 of them. I got home from work tonight, and between 8:42am and 3:54pm, I have 36 core files with different numbers on them, totalling nearly 5GB of data! When I run a “file” on them, I got all of them responding with the same information:-

ELF 32-bit LSB core file ARM, version 1 (SYSV), SVR4-style, from '/usr/local/bin/python3 -m homeassistant --config /config', real uid: 0, effective uid: 0, real gid: 0, effective gid: 0, execfn: '/usr/local/bin/python3', platform: 'v7l'

I have tried to correlate the time of the creation of the core files to anything in the HA log, and there is nothing in do far as I can tell.

I do run 4 custom components:




I know that the Custom Updater component has recently gone through some fairly significant changes. I guess the next thing to do is disable the custom components one-by-one and start monitoring.

I notice that there was one at 10:24 this morning that looks like it caused hass.io to restart. Other than the restart, I haven’t noticed any sluggishness or any other ill effects of these core files being created.

I still keep gettng these core files too. Shows the same details as you when I run a file command on them. Is there a way to disable core dumps? or automate deleting them? Getting sick of having to manually delete these as they take up so much space.

Yes, they do take up a lot of space, but the other thing it is doing is creating unnecasary wear on the SD card with the size and the frequency it is happening.

I cleaned up some sensors last night, mainly around CCTV cameras using FFMPEG component, and I have had no core files created in the last 24 hours - monitoring continues.

Looks like I spoke too soon … 4 core files created today alone. Back to the theory of disabling some of the custom components to see if things settle down :slightly_frowning_face:

I was having this issue running virtual env. I believe this stemmed from restoring from a back-up. to test my theory i started another server up and instead of restoring from backup and i just copied the relevant files I needed. *knock on wood, but i have not had a .core file created in 2 weeks.

I’m also seeing core files lately. I think this is HomeAssistant (hassio installation here). I think it started about a month or so ago. Unfortunately, I removed all the core files a couple weeks ago (figuring “it would e fixed soon enough”), so I don’t have date stamps to offer.

If you run “strings | less” you will see all the strings contained in side the core file. It should give a good clue as to what died. In my case, it’s definitely a Python process. I think this may actually be HA itself. One of the first strings listed in the files is:

/usr/local/bin/python3 -m homeassistant --config /config

I’m seeing them at least once a day. It could be related to me telling HA to restart. I’ve also been trying to figure out why my history data (possibly displayed sensor data) seems to get stuck. I have to restart Hassio to get it to resume (gap remains)… yet automations still seem to trigger. Probably unrelated to the cores, but did also start around the same time, so maybe not.

Slight correction… I don’t have a core for EVERY day. Doesn’t seem to have generated one in the last two days (my data history data continues… almost every 12 hours ish).

Some more details on mine… from the logs…

2:38 AM /usr/local/lib/python3.7/site-packages/homeassistant/core.py (ERROR)
Sat Apr 06 2019 02:38:33 GMT-0700 (PDT)
Error doing job: Fatal error on transport TCPTransport (error status in uv_stream_t.write callback)
TimeoutError: [Errno 110] Operation timed out

Although, this doesn’t correlate to any core files. :frowning: But something called “core.py” erroring out seemed like a good candidate.