Re: BUG: scheduling while atomic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mulayadi,

On Thu, Mar 4, 2010 at 8:25 AM, Mulyadi Santosa
<mulyadi.santosa@xxxxxxxxx> wrote:
> Hi Vikash...
>
> On Tue, Mar 2, 2010 at 1:14 PM, Vikash Kumar <vikashskumar@xxxxxxxxx> wrote:
>> Hi all,
>>
>> I am developing a raid system and I am getting following BUG when I
>> issue lots of parallel IO.
>> I am not able to figure out how to go about debugging this dump. It's
>> evident here that RAID_LAZY_WRITE thread is trying to
>> schedule while it has locked the CPU but I am not able to trace it
>> exactly how and why it's happening.
>> As I don't acquire any lock to issue IO to block layer.
>>
>> I enabled spin lock debugging and lock dependency checking so that I
>> could get detailed debug info.
>> Here is the whole dump which I got, please provide me tips, ideas on
>> how to analyze and debug using
>> this dump.
>
> IMHO there are many possibilities here. The best thing to do here is
> to check the related functions mentioned in the stack frames.
>
> Are they really don't schedule while holding any locks on any
> situations? Are they somekind of callbacks that must satisfy certain
> kind of rules? Maybe it's like signal handler in user space which must
> avoid reentrancy etc.
>
> Sorry, this tip might sounds blurry for now, but this is the best idea
> I can offer right now.
>


Thanks for your reply. The issue with my code was that at times I was
issuing IO from callbacks of IO or XOR operation. The callbacks were
in interrupt context and operation to issue IO can sleep which is
prohibited in an interrupt context. Hence the bug. Problem goes away
if I offload the task of issuing IO from the callback to some other
thread.


> PS: When you mention "developing RAID system", do you mean "developing
> RAID handling code"? Or simply implementing RAID
> 0/1/5/01/10/1+5/5+1/etc disk array?
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>


PS: I am working towards developing the whole raid system i.e.
handling code for a DAS box.

Regards,
Vikash Kumar
http://VikashKumar.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux