Repository navigation
Closed
Labels
Waiting for internal commentWaiting for comment from a member of the Raspberry Pi engineering team
Description
After upgrading to 4.4.8, started to see kernel OOPS while trying to load v4l driver. 4.4.7 was ok.
Is it something known ?
[ 67.186322] Linux video capture interface: v2.00
[ 67.303470] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 67.311943] pgd = d556c000
[ 67.314787] [00000000] *pgd=130fd831, *pte=00000000, *ppte=00000000
[ 67.321446] Internal error: Oops: 17 [#1] ARM
[ 67.325901] Modules linked in: bcm2835_v4l2(+) videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core v4l2_common videodev media cfg80211 joydev evdev i2c_bcm2708 spi_bcm2835 bcm2835_gpiomem bcm2835_wdt uio_pdrv_genirq uio sch_fq_codel bcm2835_rng rng_core ip_tables x_tables ipv6
[ 67.352503] CPU: 0 PID: 656 Comm: modprobe Not tainted 4.4.8-2-ARCH #1
[ 67.359151] Hardware name: BCM2708
[ 67.362632] task: d5492820 ti: d31be000 task.ti: d31be000
[ 67.368234] PC is at bm2835_mmal_init+0x78/0x738 [bcm2835_v4l2]
[ 67.374268] LR is at 0x0
[ 67.376870] pc : [<bf1d0078>] lr : [<00000000>] psr: a0000113
sp : d31bfd90 ip : 00000000 fp : 2a9154dc
[ 67.388543] r10: 00000001 r9 : bf1cc394 r8 : 00000000
[ 67.393872] r7 : bf1d0000 r6 : 00000000 r5 : 00000000 r4 : d55ba800
[ 67.400517] r3 : bf1cb644 r2 : 00000000 r1 : 00000000 r0 : d55ba800
[ 67.407163] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 67.414430] Control: 00c5387d Table: 1556c008 DAC: 00000055
[ 67.420285] Process modprobe (pid: 656, stack limit = 0xd31be188)
[ 67.426494] Stack: (0xd31bfd90 to 0xd31c0000)
[ 67.430944] fd80: 00000002 c04bac60 ff0a0005 00000000
[ 67.439271] fda0: 00000020 00000001 d3244000 ffffffff 00000a20 00000798 00000000 00000000
[ 67.447600] fdc0: d31c2b40 00000000 d56eab40 00000001 2a9154dc c04bd8a4 00000000 d31bfe08
[ 67.455932] fde0: 00000000 bf1cc620 00000001 c0a94f10 c0a94f10 d31c2b40 bf1d0000 00000000
[ 67.464264] fe00: d56eab40 00000001 2a9154dc c00094b8 00000001 00000000 00000001 d552b838
[ 67.472590] fe20: 00000000 d5421064 c0984e4c bf1cc668 00000004 d571a018 c0ba3e64 00000000
[ 67.480920] fe40: d7f3d764 d7c8cd00 00000000 bf1cc668 2a9154dc c01145f8 2a9154dc c00d6fd8
[ 67.489246] fe60: bf1cc620 00000001 d31c22c0 bf1cc620 bf1cc668 00000001 2a9154dc c00cf9f4
[ 67.497575] fe80: d31bff44 00000001 d31bff44 00000001 d56eab48 c007c2d8 bf1cc62c 00007fff
[ 67.505901] fea0: bf1cc620 c0079afc c0079578 bf1cc718 00000000 d8eb3304 bf1cc7d4 bf1cc62c
[ 67.514230] fec0: 00000000 c079e4d0 00400000 d56eaf00 006e0288 c0105140 00400000 00000000
[ 67.522558] fee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 67.530884] ff00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000e354
[ 67.539213] ff20: 00000000 b4c6735c d8eb3354 0002bce8 d31be000 00000000 006e0288 c007c8c4
[ 67.547540] ff40: 00001a03 d8ea5000 0000e354 d8eb2c9c d8eb2ad8 d8eaff24 00007814 00008944
[ 67.555870] ff60: 00000000 00000000 00000000 000031dc 00000029 0000002a 0000001f 00000023
[ 67.564199] ff80: 00000018 00000000 00005a03 006e0490 b4c59008 00040000 00000080 c000f0a4
[ 67.572525] ffa0: d31be000 c000ef00 006e0490 b4c59008 b4c59008 0000e354 0002bce8 bf170000
[ 67.580853] ffc0: 006e0490 b4c59008 00040000 00000080 0002bce8 00000000 00000000 006e0288
[ 67.589186] ffe0: 0003e164 beca0930 00020bb4 b6e89140 60000010 b4c59008 17ffa861 17ffac61
[ 67.597612] [<bf1d0078>] (bm2835_mmal_init [bcm2835_v4l2]) from [<c00094b8>] (do_one_initcall+0x80/0x1dc)
[ 67.607402] [<c00094b8>] (do_one_initcall) from [<c00cf9f4>] (do_init_module+0x5c/0x1c0)
[ 67.615678] [<c00cf9f4>] (do_init_module) from [<c007c2d8>] (load_module+0x1ad8/0x1fa0)
[ 67.623848] [<c007c2d8>] (load_module) from [<c007c8c4>] (SyS_init_module+0x124/0x140)
[ 67.631936] [<c007c8c4>] (SyS_init_module) from [<c000ef00>] (ret_fast_syscall+0x0/0x34)
[ 67.640186] Code: 0a000188 e59d200c e59f3634 e082e186 (e792c186)
[ 67.646904] ---[ end trace 5265da98745e43b3 ]---
Metadata
Metadata
Assignees
Labels
Waiting for internal commentWaiting for comment from a member of the Raspberry Pi engineering team
Activity
popcornmix commentedon May 1, 2016
Can you identify the exact update which caused this. See:
https://github.com/Hexxeh/rpi-firmware/commits/master
If you click on each commit the end of the url contains a git hash. Run
sudo rpi-update <hash>to revert back to that version. Report the first version with this error.
6by9 commentedon May 2, 2016
At a guess Hexxeh/rpi-firmware@6d158ad is going to be the first version with the issue - that was the first one to include querying the GPU for max sensor resolution which is done in bm2835_mmal_init.
9dc0b88f1d3b5e9400e4adaadd13a4ef5e7348fa is the one previous to that.
I can't see anything wrong with the handling there so can't currently give any advice. I had tested that fairly thoroughly on Pi2 and CM3, and there's no significant difference in that area for Pi1. Seeing as you're on 4.4.8 I assume you've used rpi-update and updated the firmware as well as kernel. There was a firmware change associated around that request as well.
DeX77 commentedon May 6, 2016
I can confirm modprobing bcm2835-v4l2 crashes kernel here.
Specs:
Running Arch Linux ARM:
popcornmix commentedon May 6, 2016
Not seeing a kernel crash here. What does:
report?
DeX77 commentedon May 7, 2016
kad commentedon May 7, 2016
Tried with fresh 4.4.9 kernel:
kernel build corresponds to commit 68bead2
reference: https://github.com/archlinuxarm/PKGBUILDs/blob/master/core/linux-raspberrypi/PKGBUILD
popcornmix commentedon May 7, 2016
@kad were you running raspbian or arch?
kad commentedon May 7, 2016
Place where I can reproduce this crash is running Arch
popcornmix commentedon May 7, 2016
I don't believe this affects raspbian. Arch builds a custom kernel, so the problem would be better reported there.
kad commentedon May 7, 2016
Issue reported in both places...
Arch uses kernel from this repository, and according to PKGBUILD, I don't see how userspace components or additional patches for aufs4 and BFQ would be able to interfere with V4L, thus reported upstream, meaning to this repo.
popcornmix commentedon May 8, 2016
Arch builds a custom kernel based on the sources here, but with different patches and config options so we can't offer support for issues that affect Arch and not raspbian.
Reproduce the issue with raspbian, and we can help more.
kad commentedon May 8, 2016
Can you point to any raspbian (test) image that has 4.4.8+ kernel ? places where I have raspbian, all running 4.1.19.
popcornmix commentedon May 8, 2016
Just use latest raspbian and run rpi-update.
Or wait about a week for an updated raspbian image.
kad commentedon May 8, 2016
Indeed, with binary kernel from https://github.com/Hexxeh/rpi-firmware I can't reproduce same crash.
There is no code difference between Arch kernel and rpi-firmware in that space, but kernel configs are different.
CC: @kmihelich
At same time, briefly looking at bcm2835-camera.c I can see couple of places where pointers followed without verification that they are not NULL :(
kmihelich commentedon May 8, 2016
This to me looks very much like a bug report for a kernel, which is what this repository is for. Not for a distribution of Debian rebuilt for ARMv6.
A bug in your code is obviously present, given the logs above. If a bug in your kernel has surfaced due to a different configuration, you should investigate why your code is failing. If you aren't checking your pointers adequately and this somehow isn't a problem in your particular configuration and build environment, that does not mean it is not a problem with your code. Attempting to sweep this under the rug by saying, "you aren't using our configuration, therefore it's not our problem," is a rather unprofessional attitude to take to kernel development.
230 remaining items
bcm2835: add v4l2 camera device
bcm2835-v4l2: Fix buffer overflow problem
bcm2835-camera: Fix max/min error when looping over cameras/resolutions
bcm2835-camera: Fix max/min error when looping over cameras/resolutions
bcm2835-camera: Fix max/min error when looping over cameras/resolutions
bcm2835-camera: Fix max/min error when looping over cameras/resolutions
rpi_1049_f2d51efbeac118fa3c386f34cab3d7f2be7d5261
rpi_1196_0798a364c331378ce6b37d6d4c276040505a5417
bcm2835-camera: Fix max/min error when looping over cameras/resolutions
rpi_1049_f2d51efbeac118fa3c386f34cab3d7f2be7d5261
rpi_1196_0798a364c331378ce6b37d6d4c276040505a5417
bcm2835-v4l2: Fix buffer overflow problem
bcm2835-camera: Fix max/min error when looping over cameras/resolutions
bcm2835-v4l2: Fix buffer overflow problem
bcm2835-v4l2: Fix buffer overflow problem