7

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.

Scy
  • 171
  • 1
  • 1
  • 3

3 Answers3

2

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.
…
poige
  • 9,171
  • 2
  • 24
  • 50
0

kern.info in syslog.conf should match as far as I can see.

I have *.info -/var/log/messages in my syslog.conf, and it definitely prints segfaults to messages on rhel5.6 (still 2.6.18):

Jun 27 09:25:00 rhel5-x86-64 kernel: a.out[7527]: segfault at 0000000000000000 rip 0000000000400444 rsp 00007fff1d417460 error 6

espenfjo
  • 1,676
  • 2
  • 13
  • 15
  • Hi, in x86_64 arch, fault.c contains sentence which will output error message to /var/log/messages. – Scy Jun 27 '13 at 08:04
0

I think you want abrt. This will generate logs, send emails, ureports for crashes/aborts from cpp, python and kernel panic.

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-abrt.html

cristi
  • 565
  • 4
  • 18