segfaults are not logging into /var/log/messages

I'm using Red Hat Enterprise Linux Server release 5. In this whenever a user process crashes due to segmentaion faults, it was not logged in /var/log/messages. Even dmesg is also not showing any messages related to this.

Where as in another distributions (Cent OS 5), I've seen segfaults messages in /var/log/messages whenever my user process crashed.dmesg also showing the segfaults.

Is there any settings that to enabled so that it logs segfaults into /var/log/messages.

I cross checked /etc/syslog.conf of both the systems. Both are same and even /etc/sysconfig/syslog files.


Now I check kernel source code, arch/x86/mm/fault.c, and found print error message of segfault to /var/log/messages only in 2.6.23 and after. Because RHEL5.4 using 2.6.18 kernel, so that it can't log the info into system log.


Solution 1:

At least we can set kernel's control kernel.print-fatal-signals to 1 and get quite verbose log reports then:

[1157230.882024] Process m (pid: 1042531, veid: 0, threadinfo ffff8804dac20000, task ffff880667b6f070)
[1157230.882137]
[1157230.882190] Call Trace:
[1157812.633292] hostname.here/1045982: potentially unexpected fatal signal 11.
…