linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Schwarz" <mschwarz@multitool.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Bill Davidsen <davidsen@tmr.com>, Neil Brown <neilb@suse.de>,
	linux-raid@vger.kernel.org,
	linux-usb-users@lists.sourceforge.net
Subject: Re: [Linux-usb-users] Failed reads from RAID-0 array (from newbie   who has read the FAQ)
Date: Mon, 19 Mar 2007 10:58:50 -0600 (CST)	[thread overview]
Message-ID: <24685.64.122.229.18.1174323530.squirrel@www.multitool.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0703191112400.14222-100000@iolanthe.rowland.org>

Comments below.

-- 
Michael Schwarz

> On Mon, 19 Mar 2007, Michael Schwarz wrote:
>
>> I'm going to hang on to the hardware. This is a pilot/demo that may lead
>> to development of a new device, and, if so, I'll be getting back into
>> device driver writing. Working this problem would be great practice for
>> that. So I will do it. The only problem is I don't know when!
>>
>> I believe I can replicate the problem, so I'll find time (perhaps next
>> weekend) to capture the data of interest.
>
> Michael, you don't seem to appreciate the basic principles for tracking
> down problems.

I want to bristle at this. I've been a professional software developer for
nearly 20 years. But I can't because all of your points below are, of
course, dead on for tracking down a device-level problem.

>
> 	First: Simplify.  Get rid of everything that isn't relevant
> 	to the problem and could serve to distract you.  In particular,
> 	don't run X.  That will eliminate around half of your running
> 	processes and shrink the stack dump down so that it might fit
> 	in the kernel buffer without overflowing.

Right on. And I know this; I should have had two boxes where I was
working; one where I could do browsy-emaily things separate from the
problem I was working.

>
> 	Second: Simplify.  Don't run kernels that have been modified by
> 	Fedora or anybody else.  Use a plain vanilla kernel from
> 	kernel.org.

Yeah; But here was where I lacked confidence. I used to know every inch of
my kernel and my hardware, but, as previously stated, that was back in the
2.2.x days. I wasn't confident that I could run my hardware with a
plain-vanilla kernel or that I could successfully roll my own working
2.6.x kernel in a timely manner. But, of course, I understand why this is
a good idea.

>
> 	Third: Simplify.  Try not to collect the same data over and over
> 	again (take a look at the starts of all those dmesg files you
> 	compressed and emailed).  You can clear the kernel's log buffer
> 	after dumping it by doing "dmesg -c >/dev/null".

Thanks, I actually didn't know that flag. Makes me feel pretty stupid...

>
> 	Fourth: Be prepared to make changes.  This means making changes
> 	to the kernel configuration or source code, another reason for
> 	using a stock kernel.

I agree -- I just lacked confidence doing so with newer kernels. I used to
ALWAYS build my own kernel right up through the 2.2.x series, building the
kernel to exactly match my hardware. I just haven't kept up. And if you
compare the 2.2.x kernel's configuration parameter list to the 2.6.x,
well, you can maybe understand why I was reluctant to launch on that when
under time pressure. But you point (I gather) is that if I had, it might
well have taken less time than it did...

>
> To get some really useful data, you need to build a kernel with
> CONFIG_USB_DEBUG turned on.  Without that setting there won't be any
> helpful debugging information in the log.

Before I send any more info on this problem, I will do this and all of the
above.

>
> Then you should run a minimal system.  Single-user mode would be best,
> but that can be _too_ bare-bones.  No GUI will suffice.

Will do.

>
> Then you should clear the kernel log before before starting the big file
> copy.  Basically nothing that happens before then is important, because
> nothing has gone wrong.
>
> Then after the hang occurs, see what shows up in the dmesg log.  And get a
> stack dump.
>
>> Mr. Stern: Where might I go for low level programming information on USB
>> devices? I'm interested in registers/DMA/packet formats, etc.
>
> Are you interested in USB devices (i.e., flash drives, webcams, and so on
> -- the things you plug in to a USB connection) or USB controllers (the
> hardware in your computer that manages the USB bus)?

Firstly the controllers, then specific devices.

>
>> I've found info on the USB protocol itself, but I haven't found info on
>> devices. Obviously I can dig through kernel source, but documents would
>> be
>> nice! Again, if this is an unreasonable request for you to "do my
>> homework," just say so! I won't be offended. I'm sure I can find it
>> myself
>> given time, but if you happen to have some URLs handy, they'd be
>> appreciated.
>
> There are three types of USB controllers used in personal computers: UHCI,
> OHCI, and EHCI.  Links to their specifications are available here:
>
> 	http://www.usb.org/developers/resources/

Thanks. This is just what I wanted.

>
> Specifications for various classes of USB devices are available here:
>
> 	http://www.usb.org/developers/devclass_docs

And this. Thank you much. I won't post on this issue again until I've
"cleared the decks" of the items you mention above. Thanks again.

>
> Alan Stern
>
>


  reply	other threads:[~2007-03-19 16:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-17  2:20 Failed reads from RAID-0 array (from newbie who has read the FAQ) Michael Schwarz
2007-03-17  5:31 ` Neil Brown
2007-03-17 18:01   ` Michael Schwarz
2007-03-17 20:49     ` Alan Stern
2007-03-17 21:35       ` Michael Schwarz
2007-03-18  2:06         ` [Linux-usb-users] " Alan Stern
2007-03-18  2:12         ` Alan Stern
2007-03-18  4:42           ` Michael Schwarz
2007-03-18 16:56             ` [Linux-usb-users] " Michael Schwarz
2007-03-18 17:44               ` Michael Schwarz
2007-03-18 21:55               ` Michael Schwarz
2007-03-18 21:57               ` Neil Brown
2007-03-19  3:27                 ` Michael Schwarz
2007-03-19 14:29                   ` Bill Davidsen
2007-03-19 14:54                     ` [Linux-usb-users] " Michael Schwarz
2007-03-19 15:31                       ` Alan Stern
2007-03-19 16:58                         ` Michael Schwarz [this message]
2007-03-19 18:17                           ` Alan Stern
     [not found]   ` <45FC33A4.2090408@tmr.com>
2007-03-17 19:13     ` Failed reads from RAID-0 array; still no joy in Mudville Michael Schwarz
2007-03-17 19:21       ` Michael Schwarz
2007-03-18 17:22         ` Bill Davidsen
2007-03-18 17:39           ` Michael Schwarz
2007-03-18 18:21             ` Bill Davidsen

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=24685.64.122.229.18.1174323530.squirrel@www.multitool.net \
    --to=mschwarz@multitool.net \
    --cc=davidsen@tmr.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux-usb-users@lists.sourceforge.net \
    --cc=neilb@suse.de \
    --cc=stern@rowland.harvard.edu \
    /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;
as well as URLs for NNTP newsgroup(s).