Systemd services crashes with error: "Main process exited, code=killed, status=11/SEGV"

maltarled

New Member
Joined
Jul 31, 2024
Messages
2
Reaction score
0
Credits
23
Hello,

I have a custom made application built in net6.0 that I run on my Raspberry Pi Compute Module 4S Rev 1.0 controllers with Raspbian GNU/Linux 10 (buster) using systemd.

Every now and then, the service crashes with error "Main process exited, code=killed, status=11/SEGV". The crash appears to be random and is not related to any event happening in the application, nor the controller.

I try to Google the problem but I didn't find much explanation to what does the error message means, nor why does the error appear.

I was wondering if somebody else had the similar problem? Where can I find more information about the error? What should be checked to determine the cause of the problem?

Best regards.
 

Attachments

  • CPS1-K.png
    CPS1-K.png
    32.5 KB · Views: 200


"SEGV" sounds like segmentation fault, which is reading or writing to memory it didn't allocate.
Since you wrote this program yourself you should revisit your code and debug it.
 
Thanks for the answers. Since the error happens rarely and on random. Is there any idea how to debug it. Also, as it is Linux specific error, I can't debug it on my development machine with Windows on it.
 
Is there any idea how to debug it. Also, as it is Linux specific error, I can't debug it on my development machine with Windows on it.
Is it C# program? then you can install VSCode in Linux and install C# extension and debugger.
From there set breakpoints on every function in your main source file, then run it with debugger and see on which function it segfaults.
Next step is to look at call stack and go upwards until you find the bug.

The only difficult problem is that setting up environment in VSCode is going to be PITA.
If the project is not big I suggest you simply revisit your code and spot the error without debugger.

Segfault is not Linux specific bug btw. so you should be able to reproduce the problem on Windows as well, all it takes is to write some test units, either that or fight with VSCode on Linux.
 


Members online


Top