{"action":"created","issue":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/914","labels_url":"https://api.github.com/repos/raspberrypi/linux/issues/914/labels{/name}","comments_url":"https://api.github.com/repos/raspberrypi/linux/issues/914/comments","events_url":"https://api.github.com/repos/raspberrypi/linux/issues/914/events","html_url":"https://github.com/raspberrypi/linux/issues/914","id":65332998,"number":914,"title":"Kernel panic on Pi 1 B+ when using an initramfs","user":{"login":"diederikdehaas","id":2184351,"avatar_url":"https://avatars.githubusercontent.com/u/2184351?v=3","gravatar_id":"","url":"https://api.github.com/users/diederikdehaas","html_url":"https://github.com/diederikdehaas","followers_url":"https://api.github.com/users/diederikdehaas/followers","following_url":"https://api.github.com/users/diederikdehaas/following{/other_user}","gists_url":"https://api.github.com/users/diederikdehaas/gists{/gist_id}","starred_url":"https://api.github.com/users/diederikdehaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diederikdehaas/subscriptions","organizations_url":"https://api.github.com/users/diederikdehaas/orgs","repos_url":"https://api.github.com/users/diederikdehaas/repos","events_url":"https://api.github.com/users/diederikdehaas/events{/privacy}","received_events_url":"https://api.github.com/users/diederikdehaas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-31T00:19:28Z","updated_at":"2015-04-04T15:40:15Z","closed_at":null,"body":"I'm the maintainer of [raspbian-ua-netinst](https://github.com/debian-pi/raspbian-ua-netinst) and we've had several reports about kernel panics on the Pi 1 B/B+ (see https://github.com/debian-pi/raspbian-ua-netinst/issues/199 and https://github.com/debian-pi/raspbian-ua-netinst/issues/201).\r\nBy default it's using the raspbian.org kernel and an initramfs and I have multiple times 'fixed' the issue by disabling the initramfs (which is generated/used by default with the raspbian.org kernel).\r\n\r\nBut that kernel is not (exactly) the same as the kernel build from this repo.\r\nPlugwash told me on IRC that he was able to get a kernel panic by using an initramfs with a rpf kernel (this repo), so I tried whether I could accomplish the same ... and I have.\r\n\r\nProcedure: \r\n- install a basic system using the raspbian-ua-netinst and reboot\r\n- this may or may not result in a kernel panic right away\r\n- assuming it boots correctly, log in to the system with user `root` and password `raspbian` (the default)\r\n- install the `raspberrypi-bootloader` package to get the rpf kernel (it will uninstall some other packages)\r\n- reboot into the new kernel\r\n- generate an initramfs by executing `/etc/kernel/postinst.d/initramfs-tools $(uname -r)`\r\n- modify `/boot/config.txt` so it contains the line `initramfs initrd.img-3.18.7+ followkernel` (I have it under a [pi1] header)\r\n- reboot and see it has a kernel panic with the rpf kernel/initramfs too\r\n\r\nIf it doesn't give a kernel panic, re-generating the initramfs with the earlier mentioned command often/sometimes gives a kernel panic on reboot. The 'problem' is that it doesn't consistently fail.\r\n\r\nLog from start to kernel panic (which is also [stored here](https://gist.github.com/diederikdehaas/9a67b6afd902ce75788e), more dumps in https://github.com/debian-pi/raspbian-ua-netinst/issues/199):\r\n```\r\nUncompressing Linux... done, booting the kernel.\r\n[    0.000000] Booting Linux on physical CPU 0x0\r\n[    0.000000] Initializing cgroup subsys cpu\r\n[    0.000000] Initializing cgroup subsys cpuacct\r\n[    0.000000] Linux version 3.18.7+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #755 PREEMPT Thu Feb 12 17:14:31 GMT 2015\r\n[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d\r\n[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache\r\n[    0.000000] Machine model: Raspberry Pi Model B+\r\n[    0.000000] cma: Reserved 8 MiB at 0x1b400000\r\n[    0.000000] Memory policy: Data cache writeback\r\n[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 113792\r\n[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x10 bcm2708.serial=0x9dee0f68 smsc95xx.macaddr=B8:27:EB:EE:0F:68 bcm2708_fb.fbswap=1 bcm2708.disk_led_gpio=47 bcm2708.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 elevator=deadline root=/dev/mmcblk0p2 rootfstype=ext4 rootwait\r\n[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)\r\n[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)\r\n[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)\r\n[    0.000000] Memory: 433896K/458752K available (5926K kernel code, 358K rwdata, 1876K rodata, 340K init, 734K bss, 24856K reserved)\r\n[    0.000000] Virtual kernel memory layout:\r\n[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)\r\n[    0.000000]     fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)\r\n[    0.000000]     vmalloc : 0xdc800000 - 0xff000000   ( 552 MB)\r\n[    0.000000]     lowmem  : 0xc0000000 - 0xdc000000   ( 448 MB)\r\n[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)\r\n[    0.000000]       .text : 0xc0008000 - 0xc07a6ad8   (7803 kB)\r\n[    0.000000]       .init : 0xc07a7000 - 0xc07fc000   ( 340 kB)\r\n[    0.000000]       .data : 0xc07fc000 - 0xc085588c   ( 359 kB)\r\n[    0.000000]        .bss : 0xc085588c - 0xc090d128   ( 735 kB)\r\n[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1\r\n[    0.000000] Preemptible hierarchical RCU implementation.\r\n[    0.000000] NR_IRQS:522\r\n[    0.000026] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483648000ns\r\n[    0.000076] Switching to timer-based delay loop, resolution 1000ns\r\n[    0.000356] Console: colour dummy device 80x30\r\n[    0.001441] console [tty1] enabled\r\n[    0.001487] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)\r\n[    0.001560] pid_max: default: 32768 minimum: 301\r\n[    0.001941] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)\r\n[    0.002008] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)\r\n[    0.003018] Initializing cgroup subsys memory\r\n[    0.003112] Initializing cgroup subsys devices\r\n[    0.003173] Initializing cgroup subsys freezer\r\n[    0.003227] Initializing cgroup subsys net_cls\r\n[    0.003277] Initializing cgroup subsys blkio\r\n[    0.003402] CPU: Testing write buffer coherency: ok\r\n[    0.003516] ftrace: allocating 19479 entries in 58 pages\r\n[    0.111593] Setting up static identity map for 0x55d058 - 0x55d0b4\r\n[    0.114413] devtmpfs: initialized\r\n[    0.131909] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5\r\n[    0.135104] pinctrl core: initialized pinctrl subsystem\r\n[    0.137859] NET: Registered protocol family 16\r\n[    0.143394] DMA: preallocated 4096 KiB pool for atomic coherent allocations\r\n[    0.171363] cpuidle: using governor ladder\r\n[    0.201423] cpuidle: using governor menu\r\n[    0.201970] bcm2708.uart_clock = 3000000\r\n[    0.205068] No ATAGs?\r\n[    0.205134] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.\r\n[    0.205196] hw-breakpoint: maximum watchpoint size is 4 bytes.\r\n[    0.205263] mailbox: Broadcom VideoCore Mailbox driver\r\n[    0.205426] bcm2708_vcio: mailbox at f200b880\r\n[    0.205912] bcm_power: Broadcom power driver\r\n[    0.205969] bcm_power_open() -> 0\r\n[    0.205999] bcm_power_request(0, 8)\r\n[    0.706737] bcm_mailbox_read -> 00000080, 0\r\n[    0.706785] bcm_power_request -> 0\r\n[    0.706983] Serial: AMBA PL011 UART driver\r\n[    0.707218] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83, base_baud = 0) is a PL011 rev3\r\n[    1.103493] console [ttyAMA0] enabled\r\n[    1.176537] SCSI subsystem initialized\r\n[    1.180693] usbcore: registered new interface driver usbfs\r\n[    1.186483] usbcore: registered new interface driver hub\r\n[    1.191983] usbcore: registered new device driver usb\r\n[    1.199199] Switched to clocksource stc\r\n[    1.233655] FS-Cache: Loaded\r\n[    1.236988] CacheFiles: Loaded\r\n[    1.257144] NET: Registered protocol family 2\r\n[    1.263103] TCP established hash table entries: 4096 (order: 2, 16384 bytes)\r\n[    1.270518] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)\r\n[    1.277078] TCP: Hash tables configured (established 4096 bind 4096)\r\n[    1.283588] TCP: reno registered\r\n[    1.286855] UDP hash table entries: 256 (order: 0, 4096 bytes)\r\n[    1.292779] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)\r\n[    1.299518] NET: Registered protocol family 1\r\n[    1.304526] RPC: Registered named UNIX socket transport module.\r\n[    1.310613] RPC: Registered udp transport module.\r\n[    1.315343] RPC: Registered tcp transport module.\r\n[    1.320108] RPC: Registered tcp NFSv4.1 backchannel transport module.\r\n[    1.327010] Trying to unpack rootfs image as initramfs...\r\n[    1.757137] Freeing initrd memory: 3316K (dbcb3000 - dbff0000)\r\n[    1.775919] bcm2708_dma: DMA manager at f2007000\r\n[    1.781020] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)\r\n[    1.791016] futex hash table entries: 256 (order: -1, 3072 bytes)\r\n[    1.797287] audit: initializing netlink subsys (disabled)\r\n[    1.802972] audit: type=2000 audit(1.550:1): initialized\r\n[    1.824051] VFS: Disk quotas dquot_6.5.2\r\n[    1.828410] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)\r\n[    1.837977] FS-Cache: Netfs 'nfs' registered for caching\r\n[    1.845172] NFS: Registering the id_resolver key type\r\n[    1.850497] Key type id_resolver registered\r\n[    1.854711] Key type id_legacy registered\r\n[    1.860292] msgmni has been set to 869\r\n[    1.866554] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)\r\n[    1.874562] io scheduler noop registered\r\n[    1.878546] io scheduler deadline registered (default)\r\n[    1.884282] io scheduler cfq registered\r\n[    1.888387] Unable to handle kernel NULL pointer dereference at virtual address 00000004\r\n[    1.896724] pgd = c0004000\r\n[    1.899576] [00000004] *pgd=00000000\r\n[    1.903197] Internal error: Oops: 5 [#1] PREEMPT ARM\r\n[    1.908179] Modules linked in:\r\n[    1.911260] CPU: 0 PID: 1 Comm: swapper Not tainted 3.18.7+ #755\r\n[    1.917284] task: dac88000 ti: dac4c000 task.ti: dac4c000\r\n[    1.922711] PC is at strcmp+0x18/0x40\r\n[    1.926400] LR is at of_bus_isa_match+0x20/0x30\r\n[    1.930949] pc : [<c02f9954>]    lr : [<c045af54>]    psr: a0000013\r\n[    1.930949] sp : dac4dc48  ip : dac4dc58  fp : dac4dc54\r\n[    1.942450] r10: c08469b8  r9 : 00000000  r8 : dbff06f0\r\n[    1.947687] r7 : 00000200  r6 : c00007a0  r5 : dbfef468  r4 : c084699c\r\n[    1.954228] r3 : c045af34  r2 : dbfef468  r1 : c06f04a8  r0 : 00000004\r\n[    1.960768] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel\r\n[    1.968095] Control: 00c5387d  Table: 1ade8008  DAC: 00000015\r\n[    1.973854] Process swapper (pid: 1, stack limit = 0xdac4c1b0)\r\n[    1.979714] Stack: (0xdac4dc48 to 0xdac4e000)\r\n[    1.984092] dc40:                   dac4dc64 dac4dc58 c045af54 c02f9948 dac4dc7c dac4dc68\r\n[    1.992298] dc60: c045ad94 c045af40 dbff0328 dbff06f0 dac4dcfc dac4dc80 c045b310 c045ad74\r\n[    2.000503] dc80: dac4dcac dac4dc90 c0456c44 c02f9948 dac4c000 dac4c030 a0000013 c06f050c\r\n[    2.008708] dca0: dbfef468 dac4dcb0 c0456d18 00000001 00000001 00000000 c00007a0 dac4dd0c\r\n[    2.016912] dcc0: 0000207e 00000000 dac4dcfc dac4dcd8 c045797c 00000000 c00007a0 dac4dd6c\r\n[    2.025117] dce0: 00000200 dbff06f0 00000000 000000b4 dac4dd44 dac4dd00 c045ba14 c045b27c\r\n[    2.033322] dd00: 00000000 c00c46bc 00000200 00000000 000000b4 00000000 dac4dd44 da225010\r\n[    2.041527] dd20: dad1ae00 c0837650 c0837650 00000000 da21e420 dad1ae10 dac4ddb4 dac4dd48\r\n[    2.049733] dd40: c0315d84 c045b9a4 da224050 dad1b870 dac4dd7c da224050 da2240f0 dad1b870\r\n[    2.057939] dd60: dbff06f0 00000001 da21e420 00000000 dac4dda4 dac4dd80 c01ad9b4 c01a9fc4\r\n[    2.066143] dd80: 00000001 dad1ae10 dad1ae18 dad1ae10 fffffdfb c0837650 c0837650 00000000\r\n[    2.074348] dda0: da21e420 00000000 dac4ddd4 dac4ddb8 c0367698 c0315d38 c08e4d88 dad1ae10\r\n[    2.082554] ddc0: 00000000 c0837650 dac4ddfc dac4ddd8 c03656e8 c0367650 00000007 dad1ae10\r\n[    2.090760] dde0: c0837650 dad1ae44 00000000 c07df1f4 dac4de1c dac4de00 c0365988 c036566c\r\n[    2.098965] de00: c03658e0 00000000 c0837650 c03658e0 dac4de44 dac4de20 c0363a84 c03658ec\r\n[    2.107170] de20: dac2370c dad07c90 da21c5d4 c0837650 da21c5a0 c083c310 dac4de54 dac4de48\r\n[    2.115376] de40: c0365274 c0363a20 dac4de7c dac4de58 c0364ef8 c0365258 c06cd688 dac4de68\r\n[    2.123599] de60: c0837650 c08077f0 c07ce10c dac4c038 dac4de94 dac4de80 c0366328 c0364db0\r\n[    2.131804] de80: c08077f0 c08077f0 dac4dea4 dac4de98 c03675b8 c03662ac dac4deb4 dac4dea8\r\n[    2.140010] dea0: c07ce124 c036756c dac4df4c dac4deb8 c0008760 c07ce118 dad076c0 c05608a4\r\n[    2.148214] dec0: 00000189 00000000 00000000 00000000 dac4defc c004f670 dac4df04 dac4dee8\r\n[    2.156419] dee0: dac4df00 dac4def0 c07a75e8 dbfffbe5 c05a26b8 000000e8 dac4df4c dac4df08\r\n[    2.164623] df00: c003e650 c07a75f4 00000000 00000006 00000006 dbfffbed c07312c4 00000000\r\n[    2.172828] df20: 00000000 c07fb248 00000006 c08558a0 c08558a0 c07df1f4 000000e8 c07df200\r\n[    2.181034] df40: dac4df94 dac4df50 c07a7e08 c00086dc 00000006 00000006 c07a75e8 c08295f0\r\n[    2.189239] df60: dac4c038 dac88d80 dac4df94 00000000 c05513b8 00000000 00000000 00000000\r\n[    2.197444] df80: 00000000 00000000 dac4dfac dac4df98 c05513d0 c07a7d1c dac4c000 00000000\r\n[    2.205648] dfa0: 00000000 dac4dfb0 c000e988 c05513c4 00000000 00000000 00000000 00000000\r\n[    2.213852] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000\r\n[    2.222055] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000\r\n[    2.230284] [<c02f9954>] (strcmp) from [<c045af54>] (of_bus_isa_match+0x20/0x30)\r\n[    2.237719] [<c045af54>] (of_bus_isa_match) from [<c045ad94>] (of_match_bus+0x2c/0x70)\r\n[    2.245675] [<c045ad94>] (of_match_bus) from [<c045b310>] (__of_translate_address+0xa0/0x294)\r\n[    2.254239] [<c045b310>] (__of_translate_address) from [<c045ba14>] (of_address_to_resource+0x7c/0x100)\r\n[    2.263683] [<c045ba14>] (of_address_to_resource) from [<c0315d84>] (bcm2835_pinctrl_probe+0x58/0x400)\r\n[    2.273049] [<c0315d84>] (bcm2835_pinctrl_probe) from [<c0367698>] (platform_drv_probe+0x54/0xb4)\r\n[    2.281969] [<c0367698>] (platform_drv_probe) from [<c03656e8>] (really_probe+0x88/0x21c)\r\n[    2.290187] [<c03656e8>] (really_probe) from [<c0365988>] (__driver_attach+0xa8/0xac)\r\n[    2.298056] [<c0365988>] (__driver_attach) from [<c0363a84>] (bus_for_each_dev+0x70/0xa4)\r\n[    2.306270] [<c0363a84>] (bus_for_each_dev) from [<c0365274>] (driver_attach+0x28/0x30)\r\n[    2.314311] [<c0365274>] (driver_attach) from [<c0364ef8>] (bus_add_driver+0x154/0x200)\r\n[    2.322354] [<c0364ef8>] (bus_add_driver) from [<c0366328>] (driver_register+0x88/0x108)\r\n[    2.330484] [<c0366328>] (driver_register) from [<c03675b8>] (__platform_driver_register+0x58/0x6c)\r\n[    2.339573] [<c03675b8>] (__platform_driver_register) from [<c07ce124>] (bcm2835_pinctrl_driver_init+0x18/0x20)\r\n[    2.349703] [<c07ce124>] (bcm2835_pinctrl_driver_init) from [<c0008760>] (do_one_initcall+0x90/0x1e4)\r\n[    2.358979] [<c0008760>] (do_one_initcall) from [<c07a7e08>] (kernel_init_freeable+0xf8/0x1b8)\r\n[    2.367636] [<c07a7e08>] (kernel_init_freeable) from [<c05513d0>] (kernel_init+0x18/0xfc)\r\n[    2.375860] [<c05513d0>] (kernel_init) from [<c000e988>] (ret_from_fork+0x14/0x20)\r\n[    2.383462] Code: e24cb004 ea000001 e3530000 0a000007 (e4d03001)\r\n[    2.389809] ---[ end trace 4c6abb27342ccfdb ]---\r\n[    2.394525] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b\r\n[    2.394525]\r\n[    2.403702] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b\r\n[    2.403702]\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/comments/89600677","html_url":"https://github.com/raspberrypi/linux/issues/914#issuecomment-89600677","issue_url":"https://api.github.com/repos/raspberrypi/linux/issues/914","id":89600677,"user":{"login":"diederikdehaas","id":2184351,"avatar_url":"https://avatars.githubusercontent.com/u/2184351?v=3","gravatar_id":"","url":"https://api.github.com/users/diederikdehaas","html_url":"https://github.com/diederikdehaas","followers_url":"https://api.github.com/users/diederikdehaas/followers","following_url":"https://api.github.com/users/diederikdehaas/following{/other_user}","gists_url":"https://api.github.com/users/diederikdehaas/gists{/gist_id}","starred_url":"https://api.github.com/users/diederikdehaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diederikdehaas/subscriptions","organizations_url":"https://api.github.com/users/diederikdehaas/orgs","repos_url":"https://api.github.com/users/diederikdehaas/repos","events_url":"https://api.github.com/users/diederikdehaas/events{/privacy}","received_events_url":"https://api.github.com/users/diederikdehaas/received_events","type":"User","site_admin":false},"created_at":"2015-04-04T15:40:14Z","updated_at":"2015-04-04T15:40:14Z","body":"Shiftplusone/@XECDesign asked for an image which would have the crashing kernel and I have just uploaded one: http://cknow.org/rpi/raspbian-wheezy-rpi1b-kernel-panic.img.tar.gz\r\n\r\nI have shrunk the image so it should fit on any 8GB card. You can log into the image with user `root` and password `raspbian`. The output defaults to the serial console and if you don't like that just change the config in `/boot/cmdline.txt`.\r\nThe most interesting thing can be found in `/boot/config.txt` with the following contents:\r\n```sh\r\n[pi1]\r\n#kernel=vmlinuz-3.18.0-trunk-rpi\r\n#initramfs initrd.img-3.18.0-trunk-rpi followkernel\r\nkernel=vmlinuz-3.18.10+\r\ninitramfs initrd.img-3.18.10+ followkernel\r\n#initramfs initrd.img-3.18.10+-crash followkernel\r\n```\r\nThe 3.18.10+ kernel is installed from `rpi-update` which ran around 2015-04-04T13:19:00.\r\nAs you can see there's also a commented out initramfs line for the 3.18.10+ kernel and as the name suggests, that is the initramfs which crashed. So if you want to see it crash, remove the '#' in front of that line and put a '#' in front of the other. That way you can toggle between a working and a crashing system. Both initramfs files are present in `/boot/` so that can be inspected as well.\r\n\r\nIf you have any further questions, just let me know and I'll answer them as best as I can.\r\n"}}