public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Cort Dougan <cort@fsmlabs.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org, Keith Owens <kaos@ocs.com.au>,
	Lars Marowsky-Bree <lmb@suse.de>
Subject: Re: module oops tracking [Re: [PATCH] cheap lookup of symbol names on oops()]
Date: Sat, 27 Jul 2002 02:10:32 +0200	[thread overview]
Message-ID: <20020727001032.GA1177@dualathlon.random> (raw)
In-Reply-To: <20020726173127.S13656@host110.fsmlabs.com>

On Fri, Jul 26, 2002 at 05:31:27PM -0600, Cort Dougan wrote:
> I haven't found those cases, nope.  Even with them, it is nice to resolve
> to the nearest symbol when we can.  Printing the beginning and end of the
> module that you put in there is useful, though.
> 
> Any names for the stack trace are a mess, since formatting that is hard
> without scrolling off the screen and making the oops useless.  My patch was
> just a first cut to get a symbol name and module name for the EIP.  I think
> that's a good start and it seems your version actually removes some of the
> very simple functionality that I wanted to be able to use.
> 
> Do I follow what you're doing correctly or do I have it confused?

You follow it. The reason I'm dropping functionality is that I want the
functionality in userspace, not because your patch in-kernel was wasting
any resources, but because from userspace the functionality will do the
*right* thing always without me having to check if the symbol happened
to be right because it was exported (and still no idea why you've more
symbols than me in ksyms for modules). Also rarely I can get away with
just the EIP.  So in short the symbol isn't going to help because I'd
need to recheck with ksymoops anyways and I need the stack trace too
potentially part of other modules, so I prefer to provide via the oops
only the numeric information, but *all* of it :) to also reduce the oops
size.  If your main object is to skip the ksymoops step, then I think
even in such case you want to go to a full complete kksymoops instead of
the halfway approch. I think ksymoops + module oops tracking patch is
more than enough for the bugreports (modulo dprobes/lkcd etc...). For
developement using a true debugger to get stack traces and inspect ram
(i.e. uml or kgdb or kdb ) is probably superior to any other oops
functionalty anyways (so if your object is to avoid the ksymoops step
during developement I would suggest a real debugger that will save even
more time).

I like the strict module oops tracking in particular for pre-compiled
kernels where we don't even need to ask the user the system.map/vmlinux
in order to debug it, and so where it would be a total loss of global
ram resources to load in kernel ram of every machine all the symbols of
the whole kernel and modules. Furthmore this adds a critical needed
feature to have a chance to debug module oopses, so it's a must-have.

Nevertheless adding your ksym lookup for the EIP wouldn't hurt and it
wouldn't waste lines (columns doesn't matter near the EIP), so we could
merge the two things together, but as said above I don't feel the need
of it as far as ksymoops learns about resolving the eip through the
module information now included in the oops.

I updated the patch to reduce the number of lines of the oops, this is
incremental with the previous patch.

--- 2.4.19rc3aa2/kernel/module.c.~1~	Sat Jul 27 00:48:38 2002
+++ 2.4.19rc3aa2/kernel/module.c	Sat Jul 27 03:44:16 2002
@@ -1271,26 +1271,29 @@ static void __module_oops_tracking_print
 
 	for (mod = module_list; mod != &kernel_module; mod = mod->next) {
 		if (!nr--)
-			printk("	[(%s:<%p>:<%p>)]\n",
+			printk(" [(%s:<%p>:<%p>)]",
 			       mod->name,
 			       (char *) mod + mod->size_of_struct,
 			       (char *) mod + mod->size);
 	}
-	
 }
 
 void module_oops_tracking_print(void)
 {
 	int nr;
+	int i = 0;
 
-	printk("Module Oops Tracking:\n");
+	printk("Modules:");
 	nr = find_first_bit(module_oops_tracking, MODULE_OOPS_TRACKING_NR_BITS);
 	for (;;) {
 		if (nr == MODULE_OOPS_TRACKING_NR_BITS)
-			return;
+			break;
+		if (i && !(i++ % 2))
+			printk("\n        ");
 		__module_oops_tracking_print(nr);
 		nr = find_next_bit(module_oops_tracking, MODULE_OOPS_TRACKING_NR_BITS, nr+1);
 	}
+	printk("\n");
 }
 
 #else		/* CONFIG_MODULES */


Andrea

  reply	other threads:[~2002-07-27  0:06 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-25 17:00 [PATCH] cheap lookup of symbol names on oops() Cort Dougan
2002-07-25 17:11 ` Christoph Hellwig
2002-07-25 17:21   ` Cort Dougan
2002-07-25 18:49     ` Benjamin LaHaise
2002-07-25 20:16       ` Cort Dougan
2002-07-25 19:04     ` Andrea Arcangeli
2002-07-25 20:27       ` Cort Dougan
2002-07-25 20:59         ` Andrea Arcangeli
2002-07-25 21:05           ` Cort Dougan
2002-07-25 22:06             ` Andrea Arcangeli
2002-07-25 22:05               ` Cort Dougan
2002-07-25 22:56                 ` Andrea Arcangeli
2002-07-25 23:01                   ` Cort Dougan
2002-07-26 22:37                     ` module oops tracking [Re: [PATCH] cheap lookup of symbol names on oops()] Andrea Arcangeli
2002-07-26 22:55                       ` Cort Dougan
2002-07-26 23:28                         ` Andrea Arcangeli
2002-07-26 23:31                           ` Cort Dougan
2002-07-27  0:10                             ` Andrea Arcangeli [this message]
2002-07-27  2:15                               ` cort
2002-07-27  0:19                       ` Keith Owens
2002-07-27  0:31                         ` Andrea Arcangeli
2002-07-27  1:19                           ` Andrea Arcangeli
2002-07-27  1:33                             ` Keith Owens
2002-07-27  1:47                               ` Andrea Arcangeli
2002-07-25 21:12           ` [PATCH] cheap lookup of symbol names on oops() Lars Marowsky-Bree
2002-07-25 22:13             ` Andrea Arcangeli
2002-07-25 22:41           ` Rik van Riel
2002-07-25 23:01             ` Andrea Arcangeli
2002-07-26  7:57             ` Lars Marowsky-Bree
     [not found]           ` <Pine.LNX.4.44L.0207251941120.3086-100000@imladris.surriel. com>
2002-07-27  2:34             ` Stevie O
2002-07-25 22:39         ` Rik van Riel
2002-07-26  1:01   ` Marcin Dalecki
2002-07-25 22:46 ` Alan Cox
2002-07-25 21:44   ` Cort Dougan
2002-07-25 22:18     ` Russell King
2002-07-25 22:23       ` Cort Dougan
2002-07-25 22:44   ` Rik van Riel
  -- strict thread matches above, loose matches on Subject: below --
2003-10-13 21:09 module oops tracking [Re: [PATCH] cheap lookup of symbol names on oops()] Dan Kegel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020727001032.GA1177@dualathlon.random \
    --to=andrea@suse.de \
    --cc=cort@fsmlabs.com \
    --cc=hch@infradead.org \
    --cc=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lmb@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox