1

I run a program in production under Ubuntu and it crashes from time to time. I don't think I have any core dumps. I have now set up Apport, so hopefully, I'll get one next time.

Apr 11 00:50:30 server56405 kernel: [119017131.569930] traps: aped_2[5845] general protection ip:418dce sp:7fff4580f300 error:0 in aped_2[400000+2a000]
Jun 15 02:41:15 server56405 kernel: [124641240.680827] traps: aped_2[22266] general protection ip:418dce sp:7fff32d294c0 error:0 in aped_2[400000+2a000]

I have looked everywhere to understand what ip, sp and error mean but could not find any answer. Can you let me know what these are?

I suppose the program always crashes in the same place (is that the ip which is the same in both cases?) but how do I find out where it is?

Finally, I have looked inside the executable with hexedit but could not find a way to relate what I saw with the general protection error info.

Can you help?

Daniel Trugman
  • 8,186
  • 20
  • 41
Mark
  • 61
  • 2
  • 8
  • For X86_64: %rip - instruction pointer, %rsp - stack pointer. After a crash there should be some info in `/var/log/messages`; if found, post the content similar to [this example](https://stackoverflow.com/questions/61864767/how-to-handle-general-protection-fault-in-linux-kernel) -- where it starts with _general protection fault:_ – Milag Jun 15 '20 at 12:38
  • Unfortunately, I don't have anything. Is there something I can do to get something in /var/log/messages next time? – Mark Jun 15 '20 at 13:18
  • A few possibilities: check the file soon after a crash+reboot; check for renamed files with a trailing digit like `messages.1`, possibly compressed `messages.2.gz`, others; also you could load a debugger like `kdb`, system should drop to an interactive session on panic, then run commands like `help`, `dmesg` or `bt` – Milag Jun 15 '20 at 14:32
  • OK. Thanks. I will look into that now. Could you reply to my original question about ip, sp and error code. What do they mean? – Mark Jun 15 '20 at 15:22
  • No messages...gz files at all. kdb is for next time I believe and I am not sure it is even an option as the file is in production. What is sp and ip in the error messages? Addresses? – Mark Jun 16 '20 at 13:16

0 Answers0