I don't expect people to know the answer, but I could use some help in puzzling out where to look.
I had a power cut that did leave my network a bit sketchy and it took two reboots on this desktop to get back to normal. This may or may not be relevant.
But my question refers to my Pi Zero W server I am developing.
It came up, ok, but then after a while my relay daemon crashed...
Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Main process exit ed, code=killed, status=6/ABRT Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Failed with resul t 'signal'. Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Consumed
15.074s CPU time.
I rebooted it, and after awhile - about ten minutes, it happened again - that is the above trace.
I restarted it manually, and it hasn't crashed since.
The web is flooded with instances of this messaqe all on different platforms and applications, and it would appear this is a very generic message possibly to do with memory issues.
One person 'fixed' it by changing CPUs... Now *as far as I know* there was nothing special about the data the daemon would be operating on it this point to cause it to crash. I am fairly sure I have no memory leaks in it - in normal operation it strdups() and frees() and opens and closes files... and 'top' shows memory usage is rock steady.
One possibility is that it is opening and reading a file at the precise time another process is writing it...in both cases the read and write operations are atomic and done with C code.
READ ==== fp=fopen(fullname, "r"); len=fread(filbuf,1,255,fp); // read entire file
WRITE ===== fp=fopen(filename, "w"); if (fp) { fprintf(fp,"%s%s\n",filedata,timestamp); fclose(fp); }
Could this cause a problem?
I tend to suspect some sort of asynchronous timing issue because it is such a rare occurrence. I have been utterly unable to make it happen on demand...