Re: [PATCH] cheap lookup of symbol names on oops()

From: Stevie O (stevie@qrpff.net)
Date: Fri Jul 26 2002 - 21:34:11 EST


At 07:41 PM 7/25/2002 -0300, Rik van Riel wrote:

>> valuable for what? you need the system.map or the .o disassembly of the
>> module anyways to take advantage of such symbol. I don't find it useful.
>
>If you're willing to teach all our users how to use ksymoops ... ;)

A story:

        I'm not an experienced kernel hacker -- most of my questions probably belong on the kernelnewbies list. I am also, however, not afraid to muck around, which is why I run Slackware and a completely self-configured kernel. It just so happens that I run Linux on my laptop, and thus my kernel is reiserfs-only (I didn't even build ext2 as a module, and I'm not going to count iso9660fs).

        About four months ago, I decided to try my very first 2.5 kernel ever, 2.5.7. [As many of you know -- just as I do now -- Al Viro did some cleanups which caused an oops when your rootfs was reiserfs.] I downloaded, I configured, I built, and I lilo'ed. And when I booted 2.5.7 for the first time, I got my very first kernel oops -- woo!

        First thing I noted was that, since my rootfs didn't even get mounted at all, let alone read-write, I had no logfiles to work with. So I painstakingly copied the large pile of hex values down on paper and booted back to 2.5.7. Lucky for me, the oops happened at boot time, so there were no modules to be mucked with :) Having been on lkml for several months thus far, I knew exactly what to do -- run ksymoops. So I went to /usr/src/linux-2.5.7/scripts/ksymoops/, and the only file there was a README telling me that ksymoops was no longer distributed as part of the kernel, and that I needed to download it.

Great.

        I downloaded ksymoops, and it wouldn't compile. I got some bizarre errors about undefined symbols (relating to libbfd), and googling for those errors gave people having those same problems, yet no responses.
After much grief I somehow finally determined that I needed new copies of libiberty and libbfd installed.
I downloaded and installed the new versions of libiberty and libbfd and was finally able to build ksymoops.

        Once ksymoops was built, I carefully reproduced the oops I had transcribed to paper into a file and ran
ksymoops against it. At long last, I was rewarded with my decoded oops output, informing me that the crash had occurred in reiserfs code. I posted an e-mail to the list and was immediatly replied to that this was a known problem and that a patch was already available :P

The Moral Of The Story

It took me several hours to get my oops decoded. Most people don't have several hours to waste tracking down subtle bugs in userspace libraries and programs. Requiring users to run ksymoops, if a working alternative (such as this patch) exists, is NOT a good idea.

--
Stevie-O

Real programmers use COPY CON PROGRAM.EXE

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 30 2002 - 14:00:26 EST