# Fatal trap 18 - integer divide fault while in kernel mode



## boris_net (Jan 25, 2012)

Hi all,

While building the world (to add some jails) based on latest sources from FreeBSD 9.0-RELEASE, I got the following:


```
kernel: Fatal trap 18: integer divide fault while in kernel mode
 kernel: cpuid = 0; apic id = 00
 kernel: instruction pointer     = 0x20:0xffffffff8129a834
 kernel: stack pointer           = 0x28:0xffffff82377221d0
 kernel: frame pointer           = 0x28:0xffffff82377221f0
 kernel: code segment            = base 0x0, limit 0xfffff, type 0x1b
 kernel: = DPL 0, pres 1, long 1, def32 0, gran 1
 kernel: processor eflags        = interrupt enabled, resume, IOPL = 0
```

I did a bit of search and found things related to multi-cpu but I am not sure how to troubleshoot that one.
This is the first time I got a fatal trap 18 (I got 9 and 12 before).

I would appreciate if anybody can recommend what to do to make sure I can catch more information before launching another attempt at building the world again.

The system did not reboot on its own. It hung and I had to manually reboot it.

Thanks in advance,

Boris


----------



## plamaiziere (Jan 25, 2012)

boris_net said:
			
		

> While building the world (to add some jails) based on latest sources from FreeBSD 9.0-RELEASE, I got the following:
> [...]
> I would appreciate if anybody can recommend what to do to make sure I can catch more information before launching another attempt at building the world again.



See 
http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug.html
to produce a kernel coredump and a backtrace with gdb. Then fill a bug report or ask on the FreeBSD mailing lists (freebsd-stable@freebsd.org for 9.0).

Thanks and good luck!
Regards.


----------



## boris_net (Jan 25, 2012)

Thanks for your pointer.

I think this post can be ignored as I lost my system due to a bad memory module (thanks ever so much to memtest86+) which triggered enough kernel panics to damage the system. I had 3/4 in a row before identifying the bad module :-(

*zpool status -v* on my ZFS root reported an error on zroot:/usr - I let you conclude how the system looked after booting with a damage /usr.

As I do not think it can be recovered as zfs cannot recover it, I am re-installing the system without the naughty memory module.

Thanks again for your help!

Boris


----------

