Date: Wed, 1 Oct 2014 09:40:44 -0400 From: Larry Baird <lab@gta.com> To: Ryan Stone <rysto32@gmail.com> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: Kernel/Compiler bug Message-ID: <20141001134044.GA57022@gta.com> In-Reply-To: <CAFMmRNxAYcr8eEY0SJsX3zkRadjT29-mfsGcSTmG_Yx-Hidi6w@mail.gmail.com> References: <20141001031553.GA14360@gta.com> <CAFMmRNxAYcr8eEY0SJsX3zkRadjT29-mfsGcSTmG_Yx-Hidi6w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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@gta.com | TEL 407-380-0220
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141001134044.GA57022>