The message buffer, msgbufWe've talked about the message buffer, msgbuf , and have already seen how to find it by using the UNIX strings command. Now let's use adb and an adb macro to examine it. In this example, we are looking at a Solaris 1 system that trapped. Figure 9-6 Displaying the message buffer via the msgbuf macroHiya... adb -k vmunix.0 vmcore.0 physmem 2fe3 $<msgbuf 0xf8002000: magic size bufx bufr 63062 1ff0 d70 8b7 0xf80028c7: BAD TRAP pid 2211, `my-menu': Memory address alignment pc=0xf811a07c, sp=0xf88c5c10, psr=0x114018c4, context=0xc g1-g7: 0, 8000000, ffffffff, 50, f8153c00, 0, 0 Begin traceback... sp = f88c5c10 Called from f8118f88, fp=f88c5c80, args=ff10c4d0 10a000 f8525a70 10a000 0 f81aaae8 Called from f80c360c, fp=f88c5cf0, args=ff10c4d0 10a000 f8525a70 0 0 10a000 Called from f80c3bfc, fp=f88c5d60, args=ff10c4d0 10a000 32000 fc e60ca0 0 0 Called from f80c60a4, fp=f88c5e10, args=ff10c4d0 1000 0 0 10a000 ff10cb60 Called from f812a450, fp=f88c5e70, args=10a000 ff10c4d0 1000 0 2 10a000 Called from f81284d0, fp=f88c5ee0, args=10a06c 0 2 0 f847241c f8 191400 Called from f8005c88, fp=f88c5f58, args=10009 f88c5fb4 10a06c 80 2 0 Called from 38218, fp=f7ffef40, args=0 382e0 1095ac 109c44 1 1 End traceback... panic: Memory address alignment <3>zs1: silo overflow syncing file systems... done 00000 low-memory static kernel pages 01971 additional static and sysmap kernel pages 00000 dynamic kernel data pages 00341 additional user structure pages 00000 segmap kernel pages 00000 segvn kernel pages 00185 current user process pages 00305 user stack pages 02802 total pages (2802 chunks) dumping to vp fce182c4, offset 42360 $q Hiya... When we later examine the msgbuf macro up close, we will see that the macro doesn't actually display the complete message buffer, only the most recently added messages. These are the messages that will be related to the crash. Again, to see the whole message buffer, you can use the UNIX strings command. Note There are times when the message buffer cannot be accessed via adb because msgbuf is not in the symbol table. Should this occur, simply use the UNIX strings command to view the buffer. |