2006-03-28 15:33:25

by Shayne O'Connor

[permalink] [raw]
Subject: realtime-preempt 2.6.16-rt7-10 bug?

i've compiled the 2.6.16 kernel with the realtime-preempt patches, but
have run into some problems while using Ardour for realtime audio.
Ardour crashes whenever i stop recording, and after running dmesg i'm
suspecting a bug in the realtime patch (i've tried rt7 and rt10, both
have the same problem):

ardour:2843 userspace BUG: scheduling in user-atomic context!
[<c03731d8>] schedule+0x108/0x130 (8)
[<c037320e>] io_schedule+0xe/0x20 (36)
[<c016518b>] sync_buffer+0x3b/0x50 (8)
[<c0373795>] __wait_on_bit+0x45/0x70 (12)
[<c0165150>] sync_buffer+0x0/0x50 (8)
[<c0165150>] sync_buffer+0x0/0x50 (12)
[<c037383d>] out_of_line_wait_on_bit+0x7d/0x90 (8)
[<c012eaf0>] wake_bit_function+0x0/0x60 (24)
[<c016804d>] __bread+0x8d/0xc0 (24)
[<c01d6c56>] ext3_free_branches+0x96/0x250 (20)
[<c01d936a>] ext3_truncate+0x97a/0xa20 (60)
[<c011556c>] __wake_up+0x3c/0x70 (20)
[<c01e7d79>] journal_start+0x109/0x140 (64)
[<c0135ef7>] rt_up+0x27/0x40 (20)
[<c01d60d4>] start_transaction+0x24/0x60 (24)
[<c01d9506>] ext3_delete_inode+0xf6/0x130 (24)
[<c01d9410>] ext3_delete_inode+0x0/0x130 (16)
[<c017ea69>] generic_delete_inode+0x69/0x110 (8)
[<c0174586>] do_unlinkat+0x116/0x140 (24)
[<c0163972>] sys_write+0x72/0x80 (56)
[<c0102eff>] sysenter_past_esp+0x54/0x75 (40)


please CC any comments or requests for more info to me ...

thanx

shayne


2006-03-28 20:57:30

by Steven Rostedt

[permalink] [raw]
Subject: Re: realtime-preempt 2.6.16-rt7-10 bug?

On Wed, 2006-03-29 at 02:33 +1100, Shayne O'Connor wrote:
> i've compiled the 2.6.16 kernel with the realtime-preempt patches, but
> have run into some problems while using Ardour for realtime audio.
> Ardour crashes whenever i stop recording, and after running dmesg i'm
> suspecting a bug in the realtime patch (i've tried rt7 and rt10, both
> have the same problem):
>

Hmm, this may be a bug in Ardour. Since it's for realtime audio, I
assume that it knows about the timeofday hack, which is the only way to
get this bug. The user application set itself to be uninterruptible by
calling gettimeofday with the two pointers and the integer 1. This sets
the task's flag to be uninterruptible (PF_NOSCHED). But then it did a
write to the file system (ext3) which did a schedule. Thus you got a
BUG.

I've CC'd Ingo and Thomas and added the ardour mailing list to take a
look too.

-- Steve

> ardour:2843 userspace BUG: scheduling in user-atomic context!
> [<c03731d8>] schedule+0x108/0x130 (8)
> [<c037320e>] io_schedule+0xe/0x20 (36)
> [<c016518b>] sync_buffer+0x3b/0x50 (8)
> [<c0373795>] __wait_on_bit+0x45/0x70 (12)
> [<c0165150>] sync_buffer+0x0/0x50 (8)
> [<c0165150>] sync_buffer+0x0/0x50 (12)
> [<c037383d>] out_of_line_wait_on_bit+0x7d/0x90 (8)
> [<c012eaf0>] wake_bit_function+0x0/0x60 (24)
> [<c016804d>] __bread+0x8d/0xc0 (24)
> [<c01d6c56>] ext3_free_branches+0x96/0x250 (20)
> [<c01d936a>] ext3_truncate+0x97a/0xa20 (60)
> [<c011556c>] __wake_up+0x3c/0x70 (20)
> [<c01e7d79>] journal_start+0x109/0x140 (64)
> [<c0135ef7>] rt_up+0x27/0x40 (20)
> [<c01d60d4>] start_transaction+0x24/0x60 (24)
> [<c01d9506>] ext3_delete_inode+0xf6/0x130 (24)
> [<c01d9410>] ext3_delete_inode+0x0/0x130 (16)
> [<c017ea69>] generic_delete_inode+0x69/0x110 (8)
> [<c0174586>] do_unlinkat+0x116/0x140 (24)
> [<c0163972>] sys_write+0x72/0x80 (56)
> [<c0102eff>] sysenter_past_esp+0x54/0x75 (40)
>
>
> please CC any comments or requests for more info to me ...


2006-03-28 22:41:03

by Lee Revell

[permalink] [raw]
Subject: Re: realtime-preempt 2.6.16-rt7-10 bug?

On Tue, 2006-03-28 at 15:57 -0500, Steven Rostedt wrote:
> On Wed, 2006-03-29 at 02:33 +1100, Shayne O'Connor wrote:
> > i've compiled the 2.6.16 kernel with the realtime-preempt patches, but
> > have run into some problems while using Ardour for realtime audio.
> > Ardour crashes whenever i stop recording, and after running dmesg i'm
> > suspecting a bug in the realtime patch (i've tried rt7 and rt10, both
> > have the same problem):
> >
>
> Hmm, this may be a bug in Ardour. Since it's for realtime audio, I
> assume that it knows about the timeofday hack, which is the only way to
> get this bug. The user application set itself to be uninterruptible by
> calling gettimeofday with the two pointers and the integer 1. This sets
> the task's flag to be uninterruptible (PF_NOSCHED). But then it did a
> write to the file system (ext3) which did a schedule. Thus you got a
> BUG.

Specifically it unlinked a file.

Shayne, is your /tmp a tmpfs or ext3?

Lee

2006-03-29 00:31:12

by Paul Davis

[permalink] [raw]
Subject: Re: realtime-preempt 2.6.16-rt7-10 bug?

On Tue, 2006-03-28 at 17:40 -0500, Lee Revell wrote:
> On Tue, 2006-03-28 at 15:57 -0500, Steven Rostedt wrote:
> > On Wed, 2006-03-29 at 02:33 +1100, Shayne O'Connor wrote:
> > > i've compiled the 2.6.16 kernel with the realtime-preempt patches, but
> > > have run into some problems while using Ardour for realtime audio.
> > > Ardour crashes whenever i stop recording, and after running dmesg i'm
> > > suspecting a bug in the realtime patch (i've tried rt7 and rt10, both
> > > have the same problem):
> > >
> >
> > Hmm, this may be a bug in Ardour. Since it's for realtime audio, I
> > assume that it knows about the timeofday hack, which is the only way to
> > get this bug.

Ardour does not use this hack. Only if you were using a JACK built to do
this could you see this.

> Specifically it unlinked a file.
>
> Shayne, is your /tmp a tmpfs or ext3?