Linux – Is segfault signal always sent to application

dmesglinuxsegmentation-fault

My application usually crashes and prints stack to log if received segfault signal.

But in some environment the 'dmesg' shows segfault messages related to my application, but application uptime is much older.

Can segfault be suppressed and application doesn't receive signal?
Or what errors from dmesg can mean ?

Best Answer

It is possible for an application or to ignore or do some special handling for the segmentation fault signal. The manual page for signal and related pages has details on it.

One possible situation I see could lead to the behaviour described (dmesg reports segfaults but application is running) is that the application forks and the child process segfaults. To know if this is the case, check if the process id reported by dmesg is the same as the one of the currently running process.