“Unexplainable” core dump

前端 未结 2 1594
囚心锁ツ
囚心锁ツ 2021-02-01 16:51

I\'ve seen many core dumps in my life, but this one has me stumped.

Context:

  • multi-threaded Linux/x86_64 program running on a cluster of AMD Barcelona CPUs
2条回答
  •  离开以前
    2021-02-01 17:32

    I've once seen an "illegal opcode" crash right in the middle of an instruction. I was working on a Linux port. Long story short, Linux subtracts from the instruction pointer in order to restart a syscall, and in my case this was happening twice (if two signals arrived at the same time).

    So that's one possible culprit: the kernel fiddling with your instruction pointer. There may be some other cause in your case.

    Bear in mind that sometimes the processor will understand the data it's processing as an instruction, even when it's not supposed to be. So the processor may have executed the "instruction" at 0x17bd9fa and then moved on to 0x17bd9fd and then generated an illegal opcode exception. (I just made that number up, but experimenting with a disassembler can show you where the processor might have "entered" the instruction stream.)

    Happy debugging!

提交回复
热议问题