Kernel/Compiler bug
Larry Baird
lab at gta.com
Wed Oct 1 13:40:46 UTC 2014
Ryan,
On Wed, Oct 01, 2014 at 12:46:35AM -0400, Ryan Stone wrote:
> This may not be a compiler bug. A quick look at the esp values
> provided in that backtrace shows that at least 7KB has been used on
> the stack. The stack for kernel threads is only 8KB, and a stack
> overflow can cause a double fault like that.
>
> My suspicion would be that without optimizations on clang uses a lot
> more stack space and you push over the limit. There's a kernel build
> option for the stack size that you could change to confirm. I believe
> that it's called KSTACK_PAGES. Try increasing it to 4.
Good catch. Increasing KSTACK_PAGES does fix the issue. I wonder with
optimization, how close to stack overflow does the kernel get during boot?
Thank you,
Larry
--
------------------------------------------------------------------------
Larry Baird
Global Technology Associates, Inc. 1992-2012 | http://www.gta.com
Celebrating Twenty Years of Software Innovation | Orlando, FL
Email: lab at gta.com | TEL 407-380-0220
More information about the freebsd-hackers
mailing list