Re: init scripts problems ?

"Peter T. Breuer" <[email protected]> Wed, 7 Dec 2005 15:34:24 +0100 (MET)
Newsgroups gmane.linux.enbd.general
Message-ID <[email protected]>
"Also sprach denis bonnenfant:"
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
> Peter T. Breuer wrote:
> > "Also sprach Peter T. Breuer:"
> >>In a separate patch here I moved the array notifications into a
> >>tasklet, since I was worried about racing or deadlock in a circle.  I
> >>could give you that patch to see if it helps. If it doesn't, it at least
> >>eliminates the array communication as a problem. 
> 
> It doesn't works !  it even worse that with the other patch, as i was able to block everything with just starting 2 clients !

Don't worry - it DOES work because putting stuff in a tasklet does not
change what happens, just how - it just makes everything less able to
block since the work is now done asynchronously in another thread
instead of in the main thread of control.  But the data is interesting
...

> echo 0  kills it, i can restart a client, set up an array, stop the client...
> 
> No changes, client is not killed, md can't be stopped.
> 
> then starting a new client leads to kernel oops :

OK - well that's the problem!

> Process enbd-client (pid: 3617, threadinfo=caed8000 task=caf085a0)
> Stack: cee4244c caed9ef8 caed9efc caed8000 00000000 00000000 cbd0ea80 cbd0ea80
>         cfee0040 00000001 c015ea64 cfee0040 cbd0ea80 cbd0ea80 cbcb4928 cfee4300
>         c015539a cbcb4928 cbd0ea80 42b2c7b8 00008802 00008802 cbc87000 caed8000
> Call Trace:
>   [<c015ea64>] blkdev_open+0x34/0x70
>   [<c015539a>] dentry_open+0x15a/0x240
>   [<c0155238>] filp_open+0x68/0x70
>   [<c01554de>] get_unused_fd+0x5e/0xd0
>   [<c0155619>] sys_open+0x49/0x90
>   [<c0103185>] syscall_call+0x7/0xb

This has not gone through any code of mine. It's half way through
blkdev_open ... I can't see anyting there that it could be. It must be
in bd_acquire or do_open (which are called) .. ah

   EFLAGS: 00010207   (2.6.12.3-fr1)
   EIP is at do_open+0x2ca/0x360

Yerrs. do_open. Near to the end. Hard to see what it could be. I would
guess some indirection like

     bdev->bd_contains->bd_part_count++

So I would guess that bdev has been stepped on or vamooshed. In any
case - this is not an interesting thing because it is already in a
state it should not be in.

> I have many messages from the tasklet (thousands of lines...)

The tasklet doesn't say anything that I can think of ... are you sure?

Here nothing exciting happens. But if your putting this call in a
tasklet does bad things for you take it out again! That's good data! 
Thanks!

(BTW, the patch that I gave you had a typo of enbd_notify_md_devices
instead of enbd_notify - did you correct that?).

Peter