No matching activity found.
|Once the crash dump has been recovered , get a stack trace as follows:|
<prompt>%</prompt> <userinput>kgdb /usr/obj/usr/src/sys/MYKERNEL/kernel.debug /var/crash/vmcore.0</userinput>
|Note that there may be several screens worth of information. Ideally, use <citerefentry><refentrytitle>script</refentrytitle><manvolnum>1</manvolnum></citerefentry> to capture all of them. Using the unstripped kernel image with all the debug symbols should show the exact line of kernel source code where the panic occurred. The stack trace is usually read from the bottom up to trace the exact sequence of events that lead to the crash. <citerefentry><refentrytitle>kgdb</refentrytitle><manvolnum>1</manvolnum></citerefentry> can also be used to print out the contents of various variables or structures to examine the system state at the time of the crash.|
|If a second computer is available, <citerefentry><refentrytitle>kgdb</refentrytitle><manvolnum>1</manvolnum></citerefentry> can be configured to do remote debugging, including setting breakpoints and single-stepping through the kernel code.|
|If <literal>DDB</literal> is enabled and the kernel drops into the debugger, a panic and a crash dump can be forced by typing <literal>panic</literal> at the <literal>ddb</literal> prompt. It may stop in the debugger again during the panic phase. If it does, type <literal>continue</literal> and it will finish the crash dump.|
|Why has <function>dlsym()</function> stopped working for ELF executables?|
|The ELF toolchain does not, by default, make the symbols defined in an executable visible to the dynamic linker. Consequently <function>dlsym()</function> searches on handles obtained from calls to <function>dlopen(NULL, flags)</function> will fail to find such symbols.|
|To search, using <function>dlsym()</function>, for symbols present in the main executable of a process, link the executable using the <option>--export-dynamic</option> option to the ELF linker (<citerefentry><refentrytitle>ld</refentrytitle><manvolnum>1</manvolnum></citerefentry>).|
|How can I increase or reduce the kernel address space on i386?|
|By default, the kernel address space is 1 GB (2 GB for PAE) for i386. When running a network-intensive server or using ZFS, this will probably not be enough.|
|Add the following line to the kernel configuration file to increase available space and rebuild the kernel:|
|To find the correct value of <replaceable>N</replaceable>, divide the desired address space size (in megabytes) by four. (For example, it is <literal>512</literal> for 2 GB.)|
|This innocent little Frequently Asked Questions document has been written, rewritten, edited, folded, spindled, mutilated, eviscerated, contemplated, discombobulated, cogitated, regurgitated, rebuilt, castigated, and reinvigorated over the last decade, by a cast of hundreds if not thousands. Repeatedly.|
|We wish to thank every one of the people responsible, and we encourage you to <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/articles/contributing/article.html">join them</link> in making this <acronym>FAQ</acronym> even better.|
No matching activity found.