Bug 8166 - Oops with RSDL at boot
Summary: Oops with RSDL at boot
Status: CLOSED CODE_FIX
Alias: None
Product: Alternate Trees
Classification: Unclassified
Component: mm (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Con Kolivas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-10 03:16 UTC by Nicolas Mailhot
Modified: 2007-03-11 08:26 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.21-rc3-mm2 + RSDL
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
Screenshot (439.06 KB, image/jpeg)
2007-03-10 03:19 UTC, Nicolas Mailhot
Details
2.6.21-rc3-mm2 config (43.07 KB, text/plain)
2007-03-10 03:21 UTC, Nicolas Mailhot
Details
lspci (117.65 KB, text/plain)
2007-03-10 03:22 UTC, Nicolas Mailhot
Details
2.6.21-rc3-mm1 dmesg with same config (26.40 KB, text/plain)
2007-03-10 03:23 UTC, Nicolas Mailhot
Details
Screeshot with http://ck.kolivas.org/patches/crap/sched-rsdl-0.28-stuff.patch (433.81 KB, image/jpeg)
2007-03-10 07:15 UTC, Nicolas Mailhot
Details
Screenshot 1 with http://marc.theaimsgroup.com/?l=linux-kernel&m=117357003505656&w=2 (439.66 KB, image/jpeg)
2007-03-11 01:13 UTC, Nicolas Mailhot
Details
Screenshot 2 with http://marc.theaimsgroup.com/?l=linux-kernel&m=117357003505656&w=2 (460.42 KB, image/jpeg)
2007-03-11 01:14 UTC, Nicolas Mailhot
Details
Screenshot 3 with http://marc.theaimsgroup.com/?l=linux-kernel&m=117357003505656&w=2 (457.05 KB, image/jpeg)
2007-03-11 01:15 UTC, Nicolas Mailhot
Details
2.6.21-rc3-mm2 + RSDL 0.29 dmesg (26.45 KB, text/plain)
2007-03-11 04:04 UTC, Nicolas Mailhot
Details
2.6.21-rc3-mm2 (no RSDL) dmesg (26.99 KB, text/plain)
2007-03-11 07:18 UTC, Nicolas Mailhot
Details
2.6.21-rc3-mm2 (no RSDL) v4l2-ctl output (2.73 KB, text/plain)
2007-03-11 07:21 UTC, Nicolas Mailhot
Details
2.6.21-rc3-mm2 + RSDL 0.29 v4l2-ctl output (2.71 KB, text/plain)
2007-03-11 07:54 UTC, Nicolas Mailhot
Details

Description Nicolas Mailhot 2007-03-10 03:16:27 UTC
Most recent kernel where this bug did *NOT* occur: 2.6.21-rc3-mm1
Distribution: Fedora Devel
Hardware Environment: AMD64 X2 on CK804
Software Environment: boot scripts
Problem Description: 

On 2.6.21-rc3-mm2 + hot-fixes +
http://ck.kolivas.org/patches/staircase-deadline/2.6.21-rc3-mm2-rsdl.patch

Oops at boot time

Steps to reproduce:

Try to boot
Comment 1 Nicolas Mailhot 2007-03-10 03:19:27 UTC
Created attachment 10676 [details]
Screenshot
Comment 2 Nicolas Mailhot 2007-03-10 03:21:13 UTC
Created attachment 10677 [details]
2.6.21-rc3-mm2 config
Comment 3 Nicolas Mailhot 2007-03-10 03:22:14 UTC
Created attachment 10678 [details]
lspci
Comment 4 Nicolas Mailhot 2007-03-10 03:23:53 UTC
Created attachment 10679 [details]
2.6.21-rc3-mm1 dmesg with same config
Comment 5 Nicolas Mailhot 2007-03-10 07:15:16 UTC
Created attachment 10681 [details]
Screeshot with http://ck.kolivas.org/patches/crap/sched-rsdl-0.28-stuff.patch
Comment 6 Nicolas Mailhot 2007-03-10 07:17:47 UTC
(also even with 2.6.21-rc3-mm1 rsdl seems to cause problems in ivtv initialisation)
Comment 7 Nicolas Mailhot 2007-03-11 01:13:24 UTC
Created attachment 10686 [details]
Screenshot 1  with http://marc.theaimsgroup.com/?l=linux-kernel&m=117357003505656&w=2

Failure mode #1
Comment 8 Nicolas Mailhot 2007-03-11 01:14:36 UTC
Created attachment 10687 [details]
Screenshot 2 with http://marc.theaimsgroup.com/?l=linux-kernel&m=117357003505656&w=2

Failure mode #2
Comment 9 Nicolas Mailhot 2007-03-11 01:15:48 UTC
Created attachment 10688 [details]
Screenshot 3 with http://marc.theaimsgroup.com/?l=linux-kernel&m=117357003505656&w=2

Failure mode #3
Comment 10 Con Kolivas 2007-03-11 03:19:34 UTC
Just to keep the noise level down on lkml I'll repeat the requests here.
Please test v0.29 as it has some other minor changes on top of that one bugfix.
If it still oopses on rc3mm2, please try v0.29 on 2.6.20.2 with the patch
available here:
http://ck.kolivas.org/patches/staircase-deadline/2.6.20.2-rsdl-0.29.patch

I'm currently trying to reproduce this on qemu but have not reproduced the oops.
However the userspace is different and it seems to happen on init in yours.
Comment 11 Nicolas Mailhot 2007-03-11 03:57:28 UTC
2.6.21-rc3-mm2 +
http://ck.kolivas.org/patches/staircase-deadline/2.6.20.2-rsdl-0.29.patch boots
Comment 12 Con Kolivas 2007-03-11 04:00:37 UTC
Oooh that sounds very good. Can you please clarify? You said a kernel and a
patch booted.

2.6.21-rc3-mm2 +
http://ck.kolivas.org/patches/staircase-deadline/2.6.20.2-rsdl-0.29.patch boots

Did you mean both 2.6.21-rc3-mm2 with rsdl 0.29, and 2.6.20.2 with rsdl 0.29
booted fine?
Comment 13 Nicolas Mailhot 2007-03-11 04:02:49 UTC
as with all the other RSDL kernels there are funnies with ivtv initialisation
(long firmware loading module + udev magic channel tuning). Needs several
rmmod/modprobe tries before working (or at least I hope so, that's how I got it
to work on previous rsdl kernels)
Comment 14 Nicolas Mailhot 2007-03-11 04:04:34 UTC
Created attachment 10690 [details]
2.6.21-rc3-mm2 + RSDL 0.29 dmesg
Comment 15 Nicolas Mailhot 2007-03-11 04:06:43 UTC
didn't try 2.6.20.2 and do not intend to until I have no alternative since :
Comment 16 Con Kolivas 2007-03-11 04:09:37 UTC
Excellent. Thank you very much for your bug report and testing. I will close
this bug report now, and better yet that means there are no known outstanding
bugs for RSDL :D
Comment 17 Nicolas Mailhot 2007-03-11 04:52:47 UTC
I suspect there will be other reports if the ivtv bit is not fixed (no idea if
the problem is driver-side or scheduler-side though) ivtv is scheduled for
inclusion in 2.6.22 and has a huge userbase (the hardware is #1 on all Linux
HTPC sites)
Comment 18 Con Kolivas 2007-03-11 05:09:23 UTC
Hard to see how the scheduler is directly responsible for this. If something
wants cpu time it gets it from the scheduler. Possibly some timeout related
phenomenon from the driver? Might be worth pinging the maintainer of said code
about it.
Comment 19 Nicolas Mailhot 2007-03-11 05:32:09 UTC
The same kernel without RSDL (aka 2.6.21-rc3-mm2) does not seem to exhibit the
problem
Comment 20 Con Kolivas 2007-03-11 05:40:11 UTC
I understood that from your earlier comment. I'm trying to say a different cpu
scheduler should have no influence on this code unless they have timeout
settings that are failing being too sensitive to an expected behaviour which
would need to be addressed in the driver code.
Comment 21 Nicolas Mailhot 2007-03-11 06:09:49 UTC
The driver author is Hans Verkuil. Let's see what he thinks about it (before
ivtv & rsdl collide in the next kernel)
Comment 22 Hans Verkuil 2007-03-11 06:29:58 UTC
This is all a bit confusing: several of the screenshots show oopses before 
ivtv is even loaded (as far as I can see), so those are definitely not caused 
by ivtv.

If you DO get an oops when loading ivtv, can you tell from the kernel logging 
when the oops occurs during the load process? During a firmware load of either 
the mpeg encoder firmware or the i2c cx25840 audio firmware? Elsewhere?
Comment 23 Nicolas Mailhot 2007-03-11 06:42:54 UTC
Hans: the Oops part has been fixed

*however* ivtv seems to have a problem loading on a RSDL kernel. You have to
load/unload ivtv several times before getting something other than snow on video0

There are no errors/warnings in the kernel logs, as attachment #10690 [details] shows
Comment 24 Hans Verkuil 2007-03-11 06:49:06 UTC
And without the RDSL patches it is working OK?

I mean, if you get snow, then that means that everything is working, except 
for the tuner. Can you give the output of v4l2-ctl --log-status? Once when you 
get snow, and once when it is working?

What happens when you repeatedly set the frequency when you get snow the first 
time? Does that fix things?
Comment 25 Nicolas Mailhot 2007-03-11 07:17:41 UTC
without RSDL it's working fine (same system, same kernel except for the rsdl patch)
Comment 26 Nicolas Mailhot 2007-03-11 07:18:43 UTC
Created attachment 10692 [details]
2.6.21-rc3-mm2 (no RSDL) dmesg
Comment 27 Nicolas Mailhot 2007-03-11 07:19:34 UTC
Also I use ivtv in svideo-input mode so there should be no tuning involved
Comment 28 Nicolas Mailhot 2007-03-11 07:21:42 UTC
Created attachment 10693 [details]
2.6.21-rc3-mm2 (no RSDL) v4l2-ctl output
Comment 29 Nicolas Mailhot 2007-03-11 07:54:30 UTC
Created attachment 10695 [details]
2.6.21-rc3-mm2 + RSDL 0.29 v4l2-ctl output

Here you have a badly initialised ivtv on an RSDL kernel

I have the following in my local udev rules, so everything should be automatic
(and is on non RSDL kernels)

# Use S-VIDEO input by default for ivtv cards
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", SYSFS{name}=="ivtv[0-9]*
encode
r MPEG", RUN+="/usr/bin/v4l2-ctl -d /dev/%k -i 1"

Also the failure does not happen on every boot, but most of them esp. if
booting from another non-RSDL kernel. Never seen it on a plain kernel yet
Comment 30 Hans Verkuil 2007-03-11 07:58:08 UTC
The input it set to tuner instead of the S-Video. How (and when) do you select 
the input? If you manually set the input to S-Video, does it work again?
Comment 31 Nicolas Mailhot 2007-03-11 08:01:23 UTC
Manual set worked this time

Switch to S-Video is normally automated with the udev rule listed before
Comment 32 Hans Verkuil 2007-03-11 08:26:38 UTC
Con: your scheduler is too fast :-)

The ivtv problem occurs because Nicolas' udev rule kicks in after ivtv has 
created the video devices, but before ivtv has fully initialized the video 
input. The udev rule selects S-Video as input, but right after that the 
tail-end of the ivtv initialization selects the tuner as input.

I'll have to investigate how to solve this properly in ivtv.

Note You need to log in before you can comment on or make changes to this bug.