I am using an embedded board with 4 armv8 cores.(xilinx zynqmp)
I found that using make -j4 to compile software will appear kernel oops.
The stack of oops is almost the same,but the type of oops is different,i have seen three types:
undefined instrction
unable to handle kernel paging request
NULL pointer access
I don't understand why compile will cause kernel oops. Does the make/gcc program interact with the kernel? Please help analyze what causes this problem?
Thanks.
an oops messageļ¼
[ 240.633378] Internal error: undefined instruction: 0 [#1] SMP
[ 240.633383] Unable to handle kernel paging request at virtual address ffffff8016df6480
[ 240.633386] Unable to handle kernel paging request at virtual address ffffff8016df6480
[ 240.633388] Unable to handle kernel paging request at virtual address ffffff8016df6480
[ 240.633394] Mem abort info:
[ 240.633395] Mem abort info:
[ 240.633396] Mem abort info:
[ 240.633398] Exception class = DABT (current EL), IL = 32 bits
[ 240.633399] Exception class = DABT (current EL), IL = 32 bits
[ 240.633401] Exception class = DABT (current EL), IL = 32 bits
[ 240.633402] SET = 0, FnV = 0
[ 240.633403] SET = 0, FnV = 0
[ 240.633405] SET = 0, FnV = 0
[ 240.633406] EA = 0, S1PTW = 0
[ 240.633407] EA = 0, S1PTW = 0
[ 240.633408] EA = 0, S1PTW = 0
[ 240.633409] Data abort info:
[ 240.633409] Data abort info:
[ 240.633410] Data abort info:
[ 240.633411] ISV = 0, ISS = 0x00000046
[ 240.633412] ISV = 0, ISS = 0x00000046
[ 240.633413] ISV = 0, ISS = 0x00000046
[ 240.633414] CM = 0, WnR = 1
[ 240.633415] CM = 0, WnR = 1
[ 240.633416] CM = 0, WnR = 1
[ 240.633419] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff80090b1000
[ 240.633421] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff80090b1000
[ 240.633424] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff80090b1000
[ 240.633425] [ffffff8016df6480] *pgd=000000097fffe003
[ 240.633427] [ffffff8016df6480] *pgd=000000097fffe003
[ 240.633429] [ffffff8016df6480] *pgd=000000097fffe003
[ 240.633430] , *pud=000000097fffe003
[ 240.633431] , *pud=000000097fffe003
[ 240.633432] , *pud=000000097fffe003
[ 240.633433] , *pmd=0000000000000000
[ 240.633434] , *pmd=0000000000000000
[ 240.633435] , *pmd=0000000000000000
[ 240.792167] Modules linked in:
[ 240.795207] CPU: 0 PID: 4831 Comm: cc1plus Not tainted 4.14.0 #10
[ 240.801280] Hardware name: xlnx,zynqmp (DT)
[ 240.805447] task: ffffffc973db2000 task.stack: ffffff800ef88000
[ 240.811355] PC is at calc_global_load+0x1e0/0x1e8
[ 240.816039] LR is at do_timer+0x1c/0x28
[ 240.819856] pc : [<ffffff80080c2d68>] lr : [<ffffff80080f37c4>] pstate: a00001c5
[ 240.827233] sp : ffffff8008003df0
[ 240.830531] x29: ffffff8008003df0 x28: ffffffc973db2000
[ 240.835826] x27: ffffffc97ff6dfc0 x26: ffffffc97ff6dfc0
[ 240.841121] x25: ffffffc97ff6dfd0 x24: 0000003803af96c6
[ 240.846416] x23: 0000000000000001 x22: ffffff8008eac000
[ 240.851711] x21: ffffff8008eac000 x20: 0000003803afa045
[ 240.857006] x19: ffffff8008df6000 x18: 0000000000000001
[ 240.862300] x17: 0000007fb5be73b0 x16: 00000000012aec58
[ 240.867595] x15: 0000000000400000 x14: 0000000000007fff
[ 240.872890] x13: 00000000012c9000 x12: 0000007fb0b2e758
[ 240.878185] x11: ffffff8008df6000 x10: 0000000000000040
[ 240.883480] x9 : ffffff8008e0c8e8 x8 : ffffff8008e96000
[ 240.888775] x7 : ffffffc977800268 x6 : 00000000ffffca7b
[ 240.894069] x5 : 00ffffffffffffff x4 : 000000497718f000
[ 240.899364] x3 : 0000003803af7900 x2 : ffffff8008df6000
[ 240.904659] x1 : fffffffffffffb7f x0 : ffffff8008e96ab8
[ 240.909955] Process cc1plus (pid: 4831, stack limit = 0xffffff800ef88000)
[ 240.916724] Call trace:
[ 240.919157] Exception stack(0xffffff8008003cb0 to 0xffffff8008003df0)
[ 240.925580] 3ca0: ffffff8008e96ab8 fffffffffffffb7f
[ 240.933393] 3cc0: ffffff8008df6000 0000003803af7900 000000497718f000 00ffffffffffffff
[ 240.941205] 3ce0: 00000000ffffca7b ffffffc977800268 ffffff8008e96000 ffffff8008e0c8e8
[ 240.949017] 3d00: 0000000000000040 ffffff8008df6000 0000007fb0b2e758 00000000012c9000
[ 240.956829] 3d20: 0000000000007fff 0000000000400000 00000000012aec58 0000007fb5be73b0
[ 240.964641] 3d40: 0000000000000001 ffffff8008df6000 0000003803afa045 ffffff8008eac000
[ 240.972453] 3d60: ffffff8008eac000 0000000000000001 0000003803af96c6 ffffffc97ff6dfd0
[ 240.980265] 3d80: ffffffc97ff6dfc0 ffffffc97ff6dfc0 ffffffc973db2000 ffffff8008003df0
[ 240.988077] 3da0: ffffff80080f37c4 ffffff8008003df0 ffffff80080c2d68 00000000a00001c5
[ 240.995889] 3dc0: 0000000000000040 ffffffc976f6cd20 0000008000000000 ffffff8008003ec0
[ 241.003700] 3de0: ffffff8008003df0 ffffff80080c2d68
[ 241.008563] [<ffffff80080c2d68>] calc_global_load+0x1e0/0x1e8
[ 241.014293] [<ffffff80081000b4>] tick_do_update_jiffies64.part.2+0x6c/0x118
[ 241.021236] [<ffffff80081001bc>] tick_sched_do_timer+0x5c/0x68
[ 241.027051] [<ffffff8008100248>] tick_sched_timer+0x30/0x90
[ 241.032607] [<ffffff80080f0b3c>] __hrtimer_run_queues+0xec/0x168
[ 241.038595] [<ffffff80080f0db0>] hrtimer_interrupt+0xa0/0x220
[ 241.044327] [<ffffff80087af788>] arch_timer_handler_phys+0x28/0x48
[ 241.050489] [<ffffff80080e0798>] handle_percpu_devid_irq+0x80/0x138
[ 241.056737] [<ffffff80080dafbc>] generic_handle_irq+0x24/0x38
[ 241.062465] [<ffffff80080db66c>] __handle_domain_irq+0x5c/0xb8
[ 241.068281] [<ffffff8008081500>] gic_handle_irq+0x68/0xc0
[ 241.073661] Exception stack(0xffffff800ef8bec0 to 0xffffff800ef8c000)
[ 241.080086] bec0: 00000000000036cf 0000000000000015 0000000000000001 0000000003c71808
[ 241.087898] bee0: 0000000003c717f8 0000000000008000 000000000393b8c8 0000000000008000
[ 241.095710] bf00: 000000000000006d 0000000000007fff ffffffffffffc000 0000000000000000
[ 241.103522] bf20: 0000007fb0b2e758 00000000012c9000 0000000000007fff 0000000000400000
[ 241.111334] bf40: 00000000012aec58 0000007fb5be73b0 0000000000000001 0000000000000001
[ 241.119146] bf60: 00000000000036ce 00000000039f0820 0000000000000000 0000000003b99de8
[ 241.126958] bf80: 0000000000000003 0000000003b9a268 00000000000036ce 00000000012d4000
[ 241.134770] bfa0: 0000000000000042 0000007fc21c9290 0000000000798440 0000007fc21c9290
[ 241.142582] bfc0: 00000000007983ac 0000000060000000 0000000003c95000 00000000ffffffff
[ 241.150394] bfe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 241.158207] [<ffffff8008083614>] el0_irq_naked+0x44/0x4c
[ 241.163503] Code: d27a0003 d2800005 1707ffb4 d503201f (d67c03c0)
[ 241.169578] ---[ end trace 8c598a94062fb1cc ]---
[ 241.174178] Kernel panic - not syncing: Fatal exception in interrupt
[ 241.180514] SMP: stopping secondary CPUs
[ 242.251098] SMP: failed to stop secondary CPUs 0-3
[ 242.255793] Kernel Offset: disabled
[ 242.259266] CPU features: 0x002004
[ 242.262650] Memory Limit: none
[ 242.265690] ---[ end Kernel panic - not syncing: Fatal exception in interrupt
Related
Update: the virtual address is invalid address, not null pointer.
=======================================================
Invalid virtual address problem happened in my project, but I did not modify the code, some information as below:
[ 1150.456387] Unable to handle kernel paging request at virtual address 0000000000010000
[ 1150.456393] Mem abort info:
[ 1150.456395] ESR = 0x96000005
[ 1150.456398] EC = 0x25: DABT (current EL), IL = 32 bits
[ 1150.456400] SET = 0, FnV = 0
[ 1150.456402] EA = 0, S1PTW = 0
[ 1150.456404] FSC = 0x05: level 1 translation fault
[ 1150.456407] Data abort info:
[ 1150.456409] ISV = 0, ISS = 0x00000005
[ 1150.456411] CM = 0, WnR = 0
[ 1150.456413] user pgtable: 4k pages, 39-bit VAs, pgdp=00000008e7572000
[ 1150.456415] [0000000000010000] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
[ 1150.456676] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 1150.456802] Skip md ftrace buffer dump for: 0xa00f50
[ 1150.457154] pc : percpu_ref_get_many+0x2c/0x104
[ 1150.457164] lr : percpu_ref_get_many+0x2c/0x104
[ 1150.457167] sp : ffffffc02e513a20
[ 1150.457168] x29: ffffffc02e513a20 x28: ffffffef9324a000 x27: fffffffe00000008
[ 1150.457171] x26: fffffffe00000000 x25: 0000008000000000 x24: ffffff88661d3800
[ 1150.457175] x23: 0000000000000000 x22: ffffff8970f94408 x21: 0000000000000001
[ 1150.457178] x20: 0000000000010000 x19: 0000000000000001 x18: ffffffc01ce1b078
[ 1150.457181] x17: 430e0000071d4992 x16: 0001400000000000 x15: 000000008e83ddb6
[ 1150.457184] x14: 00000000ab032363 x13: 00000000d860b6cd x12: ffffff88661d4230
[ 1150.457187] x11: ffffffef93f46de8 x10: 0000000000000018 x9 : 0000000000000080
[ 1150.457190] x8 : 00000000000000c0 x7 : 0000000000000000 x6 : ffffffef910a04c0
[ 1150.457192] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000002
[ 1150.457195] x2 : 0000000000000000 x1 : ffffffef92f6e370 x0 : 0000000000000005
[ 1150.457198] Call trace:
[ 1150.457199] percpu_ref_get_many+0x2c/0x104
[ 1150.457202] refill_obj_stock.llvm.3785610425212570905+0xa8/0x24c
[ 1150.457208] memcg_slab_free_hook+0x138/0x1a8
[ 1150.457212] kmem_cache_free+0x14c/0x378
[ 1150.457214] unlink_anon_vmas+0x60/0x1e0
[ 1150.457217] free_pgtables+0x54/0x190
[ 1150.457219] unmap_region+0xfc/0x148
[ 1150.457223] __do_munmap+0x588/0x79c
[ 1150.457225] __vm_munmap.llvm.11919687734878218350+0x88/0x174
[ 1150.457228] __arm64_sys_munmap+0x44/0x5c
[ 1150.457231] invoke_syscall+0x60/0x150
[ 1150.457235] el0_svc_common.llvm.8274709215075016746+0xc8/0x114
[ 1150.457237] do_el0_svc+0x28/0xa0
[ 1150.457239] el0_svc+0x28/0x90
[ 1150.457243] el0t_64_sync_handler+0x88/0xec
[ 1150.457246] el0t_64_sync+0x1b4/0x1b8
[ 1150.457250] Code: 9402597f b0014e20 91196000 97fb46b8 (f8bfc289)
I parsed the information with the tool crash. The invalid address problem happened on the line percpu_ptr = READ_ONCE(ref->percpu_count_ptr); as below:
/*
* Internal helper. Don't use outside percpu-refcount proper. The
* function doesn't return the pointer and let the caller test it for NULL
* because doing so forces the compiler to generate two conditional
* branches as it can't assume that #ref->percpu_count is not NULL.
*/
static inline bool __ref_is_percpu(struct percpu_ref *ref,
unsigned long __percpu **percpu_countp)
{
unsigned long percpu_ptr;
/*
* The value of #ref->percpu_count_ptr is tested for
* !__PERCPU_REF_ATOMIC, which may be set asynchronously, and then
* used as a pointer. If the compiler generates a separate fetch
* when using it as a pointer, __PERCPU_REF_ATOMIC may be set in
* between contaminating the pointer value, meaning that
* READ_ONCE() is required when fetching it.
*
* The dependency ordering from the READ_ONCE() pairs
* with smp_store_release() in __percpu_ref_switch_to_percpu().
*/
percpu_ptr = READ_ONCE(ref->percpu_count_ptr);
/*
* Theoretically, the following could test just ATOMIC; however,
* then we'd have to mask off DEAD separately as DEAD may be
* visible without ATOMIC if we race with percpu_ref_kill(). DEAD
* implies ATOMIC anyway. Test them together.
*/
if (unlikely(percpu_ptr & __PERCPU_REF_ATOMIC_DEAD))
return false;
*percpu_countp = (unsigned long __percpu *)percpu_ptr;
return true;
}
Another case happend on line if (unlikely(percpu_ptr & __PERCPU_REF_ATOMIC_DEAD)).
pointer variable ref comes from an address &objcg->refcnt as blow:
static inline void obj_cgroup_get(struct obj_cgroup *objcg)
{
percpu_ref_get(&objcg->refcnt);
}
So it cann't be invalid. Why did invalid address problem happened?
I am writing code for a linux kernel module that allocates space and stores some data in it, but the kmalloc allocation happens in the write function for the vfs api as i need the size of the buffer coming from the user application and i cannot access it outside the write function. where should i place the kfree() function? i cannot place it in under cleanup because it gives me an error whenever i try to uninstall the module.
ssize_t hcsr04_write(struct file *filp, const char *buffer, size_t length, loff_t * offset)
{
if (pulsecount < (5)){
pulseptr[pulsecount] = kmalloc(sizeof(buffer),GFP_ATOMIC);
sprintf (pulseptr[pulsecount],"%s",buffer);
pulsecount++;
}
else{
int j = 0;
while (j<4){
sprintf (pulseptr[j], "%s", (pulseptr[j+1]) ); // [5 , 20 , 30 , 70 , 50] ===> [20 , 30 , 70 , 50 , 50]
j++;
}
sprintf (pulseptr[4],"%s",buffer);
}
}
this is my write function.
static void __exit hcsr04_module_cleanup(void)
{
//if (pulseptr!= {NULL,NULL,NULL,NULL,NULL}){
kfree(pulseptr);
printk(KERN_INFO "Dynamic memory freed successfully.");
//}
//pulseptr = {NULL,NULL,NULL,NULL,NULL};
gpio_free( GPIO_OUT );
gpio_free( GPIO_IN );
hcsr04_lock = 0;
cdev_del(&hcsr04_cdev);
unregister_chrdev_region( hcsr04_dev, 1 );
kobject_put( hcsr04_kobject );
}
this is the cleanup function. if i execute rmmod command with the cleanup function like this i get the following error :
[ 93.294821] 8<--- cut here ---
[ 93.297928] Unable to handle kernel paging request at virtual address bcf03574
[ 93.305253] pgd = 3cdbb3d3
[ 93.307993] [bcf03574] *pgd=00000000
[ 93.311621] Internal error: Oops: 5 [#1] SMP ARM
[ 93.316301] Modules linked in: hcsr04(O-) nfc bnep bluetooth ecdh_generic ecc ipv6 hello(PO) g_serial libcomposite udc_core brcmfmac brcmutil sha256_generic libsha256 vc4 cfg80211 bcm2835_codec(C) rfkill bcm2835_isp(C) bcm2835_v4l2(C) v4l2_mem2mem cec bcm2835_mmal_vchiq(C) videobuf2_dma_contig snd_soc_core videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 snd_compress snd_pcm_dmaengine videobuf2_common snd_pcm videodev snd_timer mc snd raspberrypi_hwmon vc_sm_cma(C) uio_pdrv_genirq uio fixed
[ 93.360563] CPU: 0 PID: 478 Comm: rmmod Tainted: P C O 5.4.72-v7 #1
[ 93.368060] Hardware name: BCM2835
[ 93.371516] PC is at kfree+0x48/0x2bc
[ 93.375235] LR is at hcsr04_module_cleanup+0x18/0xcac [hcsr04]
[ 93.381148] pc : [<802fd004>] lr : [<7f17a36c>] psr: 20010013
[ 93.387501] sp : b80abf08 ip : b80abf38 fp : b80abf34
[ 93.392797] r10: 00000081 r9 : b80aa000 r8 : 801011c4
[ 93.398095] r7 : 7f17a36c r6 : 7e92dc38 r5 : 7f17c000 r4 : bcf03570
[ 93.404713] r3 : bab24000 r2 : 00000024 r1 : 00000000 r0 : 7f17c000
[ 93.411333] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 93.418568] Control: 10c5383d Table: 38d5806a DAC: 00000055
[ 93.424394] Process rmmod (pid: 478, stack limit = 0x274b04e4)
[ 93.430307] Stack: (0xb80abf08 to 0xb80ac000)
[ 93.434728] bf00: 801c8158 80989110 7f17c0c0 00000000 7e92dc38 00000081
[ 93.443026] bf20: 801011c4 b80aa000 b80abf4c b80abf38 7f17a36c 802fcfc8 7f17c0c0 00000000
[ 93.451324] bf40: b80abfa4 b80abf50 801ca940 7f17a360 72736368 00003430 00000000 80da6b10
[ 93.459621] bf60: 80101068 7e92cbe8 00000000 801011c4 b80aa000 00000006 b80abfac b80abf88
[ 93.467918] bf80: 80228294 8022938c 00000000 80e05f88 00000000 7e92de2c 00000000 b80abfa8
[ 93.476216] bfa0: 80101000 801ca7e0 00000000 7e92de2c 01677694 00000800 6a0f1b00 7e92dbe4
[ 93.484513] bfc0: 00000000 7e92de2c 7e92dc38 00000081 7e92df1f 7e92dc34 01677190 00000001
[ 93.492811] bfe0: 004e1f70 7e92dbec 004c866f 76f37218 60010030 01677694 00000000 00000000
[ 93.501100] Backtrace:
[ 93.503593] [<802fcfbc>] (kfree) from [<7f17a36c>] (hcsr04_module_cleanup+0x18/0xcac [hcsr04])
[ 93.512331] r9:b80aa000 r8:801011c4 r7:00000081 r6:7e92dc38 r5:00000000 r4:7f17c0c0
[ 93.520195] [<7f17a354>] (hcsr04_module_cleanup [hcsr04]) from [<801ca940>] (sys_delete_module+0x16c/0x244)
[ 93.530073] r5:00000000 r4:7f17c0c0
[ 93.533704] [<801ca7d4>] (sys_delete_module) from [<80101000>] (ret_fast_syscall+0x0/0x28)
[ 93.542084] Exception stack(0xb80abfa8 to 0xb80abff0)
[ 93.547209] bfa0: 00000000 7e92de2c 01677694 00000800 6a0f1b00 7e92dbe4
[ 93.555507] bfc0: 00000000 7e92de2c 7e92dc38 00000081 7e92df1f 7e92dc34 01677190 00000001
[ 93.563801] bfe0: 004e1f70 7e92dbec 004c866f 76f37218
[ 93.568922] r5:7e92de2c r4:00000000
[ 93.572549] Code: e3a02024 e5933000 e1a04624 e0243492 (e5943004)
[ 93.578730] ---[ end trace cff8773499967501 ]---
the error goes away once i comment out kfree
I Realised what i did wrong. I shouldve done kfree(pulseptr[0]) where 0 can be the index number of the memory locations i have allocated.
I am trying to enable Bluetooth interface for CSR8811 chipset on a phytec board(imx6ul arm). Kernel is 4.8
I am getting an exception when doing:
# hciattach /dev/ttyACM0 bcsp
# hciattach /dev/ttyACM0 bcsp
[ 157.902406] INFO: rcu_sched self-detected stall on CPU
[ 157.907628] 0-...: (2600 ticks this GP) idle=21b/140000000000002/0 softirq=8480/8480 fqs=0
[ 157.916085] (t=2600 jiffies g=4247 c=4246 q=48)
[ 157.920841] rcu_sched kthread starved for 2600 jiffies! g4247 c4246 f0x0 RCU_GP_WAIT_FQS(3) ->state=0x1
[ 157.930253] rcu_sched S c0905b98 0 7 2 0x00000000
[ 157.936673] Backtrace:
[ 157.939180] [<c090594c>] (__schedule) from [<c09060dc>] (schedule+0x48/0xa0)
[ 157.946247] r10:dffc84c0 r9:ffffffff r8:c0e02100 r7:00000000 r6:de48bea0 r5:dffc84c0
[ 157.954204] r4:de48a000
[ 157.956787] [<c0906094>] (schedule) from [<c090a998>] (schedule_timeout+0x218/0x318)
[ 157.964543] r5:dffc84c0 r4:ffffbe56
[ 157.968193] [<c090a780>] (schedule_timeout) from [<c018a31c>] (rcu_gp_kthread+0x4f0/0x840)
[ 157.976472] r10:c0e15680 r9:00000000 r8:00000001 r7:00000001 r6:c0e156d0 r5:c0e156f8
[ 157.984429] r4:c0e15440
[ 157.987013] [<c0189e2c>] (rcu_gp_kthread) from [<c0145ddc>] (kthread+0xdc/0xf8)
[ 157.994336] r7:c0189e2c
[ 157.996919] [<c0145d00>] (kthread) from [<c0107eb0>] (ret_from_fork+0x14/0x24)
[ 158.004155] r7:00000000 r6:00000000 r5:c0145d00 r4:de435040
[ 158.009977] Task dump for CPU 0:
[ 158.013230] hciattach R running 0 856 847 0x00000003
[ 158.019646] Backtrace:
[ 158.022146] [<c010c46c>] (dump_backtrace) from [<c010c664>] (show_stack+0x18/0x1c)
[ 158.029734] r7:00000240 r6:c0e6db57 r5:0000034f r4:ddfd4800
[ 158.035507] [<c010c64c>] (show_stack) from [<c015101c>] (sched_show_task+0x11c/0x22c)
[ 158.043368] [<c0150f00>] (sched_show_task) from [<c0153d14>] (dump_cpu_task+0x34/0x44)
[ 158.051298] r6:c0e15440 r5:00000000 r4:00000000
[ 158.056008] [<c0153ce0>] (dump_cpu_task) from [<c01cf058>] (rcu_dump_cpu_stacks+0xa4/0xc8)
[ 158.064286] r5:00000000 r4:c0e15440
[ 158.067930] [<c01cefb4>] (rcu_dump_cpu_stacks) from [<c018b258>] (rcu_check_callbacks+0x6f4/0x8b4)
[ 158.076902] r9:c0e15d44 r8:c0e02b18 r7:1f256000 r6:c0d76180 r5:dffcc180 r4:c0e15440
[ 158.084789] [<c018ab64>] (rcu_check_callbacks) from [<c018e5c8>] (update_process_times+0x38/0x64)
[ 158.093675] r10:c01a15c8 r9:dffc964c r8:dffc9640 r7:00000024 r6:c2fb3fd3 r5:00000000
[ 158.101630] r4:ddfd4800
[ 158.104214] [<c018e590>] (update_process_times) from [<c01a15c4>] (tick_sched_handle+0x50/0x54)
[ 158.112927] r5:dd8ff940 r4:dffc9908
[ 158.116570] [<c01a1574>] (tick_sched_handle) from [<c01a1628>] (tick_sched_timer+0x60/0xac)
[ 158.124951] [<c01a15c8>] (tick_sched_timer) from [<c018f5b4>] (__hrtimer_run_queues+0xc8/0x1e4)
[ 158.133662] r7:00000000 r6:c0e22828 r5:dffc9908 r4:dffc95c0
[ 158.139440] [<c018f4ec>] (__hrtimer_run_queues) from [<c018f8e4>] (hrtimer_interrupt+0xbc/0x210)
[ 158.148241] r10:dffc9678 r9:dffc9698 r8:dffc9600 r7:dffc96b8 r6:ffffffff r5:00000003
[ 158.156196] r4:dffc95c0
[ 158.158781] [<c018f828>] (hrtimer_interrupt) from [<c06b7c5c>] (mxc_timer_interrupt+0x3c/0x44)
[ 158.167408] r10:c0e6db92 r9:de41d000 r8:00000010 r7:dd8ff874 r6:00000000 r5:de41d000
[ 158.175365] r4:de402440
[ 158.177949] [<c06b7c20>] (mxc_timer_interrupt) from [<c017c4c0>] (__handle_irq_event_percpu+0x8c/0x124)
[ 158.187356] r5:de41d000 r4:de402500
[ 158.191001] [<c017c434>] (__handle_irq_event_percpu) from [<c017c57c>] (handle_irq_event_percpu+0x24/0x60)
[ 158.200668] r10:00000000 r9:de406000 r8:00000001 r7:dd8ffad0 r6:c0e10120 r5:de41d000
[ 158.208622] r4:de41d000
[ 158.211201] [<c017c558>] (handle_irq_event_percpu) from [<c017c5f8>] (handle_irq_event+0x40/0x64)
[ 158.220086] r5:de41d060 r4:de41d000
[ 158.223728] [<c017c5b8>] (handle_irq_event) from [<c017fd74>] (handle_fasteoi_irq+0xd4/0x1ac)
[ 158.232266] r7:dd8ffad0 r6:c0e10120 r5:de41d060 r4:de41d000
[ 158.238045] [<c017fca0>] (handle_fasteoi_irq) from [<c017b9cc>] (generic_handle_irq+0x28/0x3c)
[ 158.246671] r7:dd8ffad0 r6:c0e02b18 r5:00000010 r4:c0d73fa4
[ 158.252449] [<c017b9a4>] (generic_handle_irq) from [<c017bd24>] (__handle_domain_irq+0x6c/0xe8)
[ 158.261177] [<c017bcb8>] (__handle_domain_irq) from [<c01015f8>] (gic_handle_irq+0x58/0xb8)
[ 158.269542] r9:c0e02c7c r8:e0804000 r7:c0e22a40 r6:dd8ff940 r5:000003eb r4:e080400c
[ 158.277422] [<c01015a0>] (gic_handle_irq) from [<c010d2b0>] (__irq_svc+0x70/0x98)
[ 158.284921] Exception stack(0xdd8ff940 to 0xdd8ff988)
[ 158.290001] f940: 00000001 00000110 00000000 ddfd4800 dda57f00 60070113 00000000 dde98164
[ 158.298204] f960: dde98160 c0e02b18 c0e70b40 dd8ff9ac dd8ff938 dd8ff990 c016ec14 c05e1b00
[ 158.306397] f980: 60070113 ffffffff
[ 158.309899] r10:c0e70b40 r9:dd8fe000 r8:dde98160 r7:dd8ff974 r6:ffffffff r5:60070113
[ 158.317856] r4:c05e1b00
[ 158.320443] [<c05e1a20>] (__usb_hcd_giveback_urb) from [<c05e1bb0>] (usb_giveback_urb_bh+0x90/0xcc)
[ 158.329502] r7:dde98164 r6:dde98184 r5:00000000 r4:dd8ff9b0
[ 158.335278] [<c05e1b20>] (usb_giveback_urb_bh) from [<c0129b4c>] (tasklet_action+0x9c/0x154)
[ 158.343730] r8:00000000 r7:dd8fe000 r6:00000000 r5:dde98190 r4:dde9818c
[ 158.350568] [<c0129ab0>] (tasklet_action) from [<c0129d9c>] (__do_softirq+0x12c/0x298)
[ 158.358499] r10:40000006 r9:c0e02080 r8:00000100 r7:c0e02098 r6:dd8fe000 r5:00000006
[ 158.366454] r4:00000000
[ 158.369032] [<c0129c70>] (__do_softirq) from [<c012a280>] (irq_exit+0xc8/0x13c)
[ 158.376355] r10:00000000 r9:de406000 r8:00000001 r7:00000000 r6:c0e02b18 r5:00000000
[ 158.384310] r4:c0d73fa4
[ 158.386890] [<c012a1b8>] (irq_exit) from [<c017bd2c>] (__handle_domain_irq+0x74/0xe8)
[ 158.394747] [<c017bcb8>] (__handle_domain_irq) from [<c01015f8>] (gic_handle_irq+0x58/0xb8)
[ 158.403113] r9:c0e02c7c r8:e0804000 r7:c0e22a40 r6:dd8ffad0 r5:000003eb r4:e080400c
[ 158.410992] [<c01015a0>] (gic_handle_irq) from [<c010d2b0>] (__irq_svc+0x70/0x98)
[ 158.418491] Exception stack(0xdd8ffad0 to 0xdd8ffb18)
[ 158.423566] fac0: 00000001 00000110 00000000 ddfd4800
[ 158.431768] fae0: a0070013 dde9827c dde7d800 a0070013 00000081 dde98000 dde9827c dd8ffb34
[ 158.439967] fb00: dd8ffac8 dd8ffb20 c016ec14 c090b33c 20070013 ffffffff
[ 158.446594] r10:dde9827c r9:dd8fe000 r8:00000081 r7:dd8ffb04 r6:ffffffff r5:20070013
[ 158.454550] r4:c090b33c
[ 158.457135] [<c090b300>] (_raw_spin_unlock_irqrestore) from [<c05fdf00>] (ehci_urb_enqueue+0xe8/0xdbc)
[ 158.466457] r5:00000000 r4:dd8ffb68
[ 158.470104] [<c05fde18>] (ehci_urb_enqueue) from [<c05e3500>] (usb_hcd_submit_urb+0xb4/0x86c)
[ 158.478643] r10:ddfd9c00 r9:00000003 r8:024000c0 r7:00000000 r6:dde98000 r5:dde7d808
[ 158.486599] r4:dde7d800
[ 158.489180] [<c05e344c>] (usb_hcd_submit_urb) from [<c05e4c54>] (usb_submit_urb+0x2a8/0x4fc)
[ 158.497631] r10:ddfd9c00 r9:00000003 r8:00000204 r7:00000002 r6:dd803c00 r5:024000c0
[ 158.505587] r4:dde7d800
[ 158.508190] [<c05e49ac>] (usb_submit_urb) from [<bf00424c>] (acm_submit_read_urb+0x48/0x8c [cdc_acm])
[ 158.517426] r10:ddfd9c00 r9:00000102 r8:de788800 r7:de788b64 r6:de788800 r5:0000000f
[ 158.525382] r4:024000c0
[ 158.527982] [<bf004204>] (acm_submit_read_urb [cdc_acm]) from [<bf005a34>] (acm_port_activate+0x13c/0x1a4 [cdc_acm])
[ 158.538520] r7:0000000f r6:de788d38 r5:00000000 r4:de78880c
[ 158.544306] [<bf0058f8>] (acm_port_activate [cdc_acm]) from [<c048b944>] (tty_port_open+0x88/0xc8)
[ 158.553281] r9:00000102 r8:c1641b54 r7:de63e8c0 r6:de788930 r5:ddfd9c00 r4:de78880c
[ 158.561171] [<c048b8bc>] (tty_port_open) from [<bf005484>] (acm_tty_open+0x20/0x24 [cdc_acm])
[ 158.569710] r9:00000102 r8:c1641b54 r7:dda4c068 r6:0a600000 r5:de63e8c0 r4:ddfd9c00
[ 158.577608] [<bf005464>] (acm_tty_open [cdc_acm]) from [<c048418c>] (tty_open+0xbc/0x674)
[ 158.585816] [<c04840d0>] (tty_open) from [<c02226d8>] (chrdev_open+0xa4/0x180)
[ 158.593056] r10:dd8ffea8 r9:dd8ffe20 r8:00000000 r7:c0a3bf70 r6:de63e8c0 r5:dda4c068
[ 158.601011] r4:ddeae140
[ 158.603592] [<c0222634>] (chrdev_open) from [<c021b270>] (do_dentry_open+0x1ec/0x310)
[ 158.611436] r7:c0222634 r6:de63e8c8 r5:dda4c068 r4:de63e8c0
[ 158.617212] [<c021b084>] (do_dentry_open) from [<c021c448>] (vfs_open+0x54/0x84)
[ 158.624623] r9:dd8ffe20 r8:00000000 r7:00000102 r6:00000000 r5:de63e8c0 r4:dd8ffea8
[ 158.632511] [<c021c3f4>] (vfs_open) from [<c022c428>] (path_openat+0x384/0xfbc)
[ 158.639836] r6:00000000 r5:dd8fff5c r4:00000000
[ 158.644546] [<c022c0a4>] (path_openat) from [<c022e3e8>] (do_filp_open+0x68/0xcc)
[ 158.652042] r10:00000000 r9:dd8fe000 r8:c0107fc4 r7:00000001 r6:dd8fff5c r5:dd8ffea8
[ 158.659997] r4:00000003
[ 158.662579] [<c022e380>] (do_filp_open) from [<c021c7f0>] (do_sys_open+0x108/0x1c8)
[ 158.670249] r7:00000005 r6:dda86000 r5:ffffff9c r4:00000003
[ 158.676026] [<c021c6e8>] (do_sys_open) from [<c021c8d0>] (SyS_open+0x20/0x24)
[ 158.683176] r9:dd8fe000 r8:c0107fc4 r7:00000005 r6:bea62d84 r5:bea61c08 r4:00037390
[ 158.691063] [<c021c8b0>] (SyS_open) from [<c0107e20>] (ret_fast_syscall+0x0/0x1c)
I have tried looking at the functions before the exception as they are listed in the stack trace and make small changes see where could be the problem. But was not successfully.
I have also compared the USB stack with the one in an earlier version: 4.6 but could not see what difference could lead to this crash.
does anybody have experience with this topic or could give some advice on hardware to proceed?
Thanks in advance
I'm getting kernel panics while running linux application on my custom hardware design. But another custom hardware which is similar to this can run this linux application without any problem. I did the memory calibration and stress app test for this board. But there was not any issue related to memory. So how can I debug this to clarify whether this is hardware or software problem. I could debug kernel and uboot using JTAG properly. But how can I pinpoint the issue for this kernel panic while running certain application ?
Here is the panic message (LOG)
[ 308.268356] Unable to handle kernel paging request at virtual address
54494156
[ 308.275647] pgd = 80004000
[ 308.278365] [54494156] *pgd=00000000
[ 308.281977] Internal error: Oops: 80000005 [#1] PREEMPT SMP ARM
[ 308.287904] Modules linked in: tw6869 mxc_v4l2_capture ipu_bg_overlay_sdc
ipu_still ipu_prp_enc videobuf2_dma_contig ipu_csi_enc videobuf2_memops
adv7610_video ipu_fg_overlay_sdc v4l2_int_device galcore(O)
[ 308.306375] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G O 4.1.15-2.0.0-
ga+yocto+gff4e28b #1
[ 308.309584] tw6869 0000:01:00.0: tw6869_querystd: vch1: unknown std
detected
[ 308.322648] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 308.329184] task: ce11bc00 ti: ce14c000 task.ti: ce14c000
[ 308.334598] PC is at 0x54494156
[ 308.337766] LR is at cpuidle_enter_state+0x90/0x350
[ 308.342650] pc : [<54494156>] lr : [<806d59b0>] psr: 800b00b3
[ 308.342650] sp : ce14df30 ip : 00000017 fp : ce14df8c
[ 308.354132] r10: 80e02508 r9 : 80e08ad0 r8 : 80d9b880
[ 308.359361] r7 : 00000001 r6 : 80e88160 r5 : 00000047 r4 : c04b271c
[ 308.365892] r3 : 54494157 r2 : 00000000 r1 : 80e08a80 r0 : 80d9b880
[ 308.372430] Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment
kernel
[ 308.380004] Control: 10c5387d Table: 5f38404a DAC: 00000015
[ 308.385755] Process swapper/3 (pid: 0, stack limit = 0xce14c210)
[ 308.391768] Stack: (0xce14df30 to 0xce14e000)
[ 308.396135] df20: 00000000 d0f2c140 c04b271c 00000047
[ 308.404333] df40: 00000000 00000000 004832f1 00000000 c04b271c 00000047
00000000 dc8ba30f
[ 308.412537] df60: 80d97320 ce14c000 80e025e8 80e88160 d0f2bed0 80e08a74
80a02970 ce14dfa0
[ 308.420738] df80: ce14df9c ce14df90 806d5cc0 806d592c ce14dfdc ce14dfa0
80171a74 806d5ca8
[ 308.428939] dfa0: 80d9b880 80d9b880 00000000 80e02e00 80e025f0 80e878ea
00000001 80c09164
[ 308.437140] dfc0: 80d9aec8 80d97300 10c0387d 80e8d35c ce14dff4 ce14dfe0
8010fae0 801717d8
[ 308.445340] dfe0: 5e12c06a 00000015 00000000 ce14dff8 1010162c 8010f994
00000000 00000000
[ 308.453529] Backtrace:
[ 308.456036] [<806d5920>] (cpuidle_enter_state) from [<806d5cc0>]
(cpuidle_enter+0x24/0x28)
[ 308.464320] r10:ce14dfa0 r9:80a02970 r8:80e08a74 r7:d0f2bed0 r6:80e88160
r5:80e025e8
[ 308.472277] r4:ce14c000
[ 308.474868] [<806d5c9c>] (cpuidle_enter) from [<80171a74>]
(cpu_startup_entry+0x2a8/0x43c)
[ 308.483171] [<801717cc>] (cpu_startup_entry) from [<8010fae0>]
(secondary_start_kernel+0x158/0x164)
[ 308.492232] r7:80e8d35c
[ 308.494813] [<8010f988>] (secondary_start_kernel) from [<1010162c>]
(0x1010162c)
[ 308.502223] r5:00000015 r4:5e12c06a
[ 308.505862] Code: bad PC value
[ 308.508940] ---[ end trace 1d6a0d2b2019793f ]---
[ 308.513579] Kernel panic - not syncing: Attempted to kill the idle task!
[ 308.520313] CPU1: stopping
[ 308.523060] CPU: 1 PID: 37 Comm: cfinteractive Tainted: G D O 4.1.15-
2.0.0-ga+yocto+gff4e28b #1
[ 308.532731] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 308.539274] Backtrace:
[ 308.541792] [<8010c358>] (dump_backtrace) from [<8010c5d4>]
(show_stack+0x20/0x24)
[ 308.549379] r7:80e87b48 r6:80e45ca0 r5:00000000 r4:80e45ca0
[ 308.555168] [<8010c5b4>] (show_stack) from [<80919780>]
(dump_stack+0x7c/0xbc)
[ 308.562421] [<80919704>] (dump_stack) from [<80110038>]
(handle_IPI+0x2e4/0x2f8)
[ 308.569831] r7:80e87b48 r6:00000005 r5:80d99c34 r4:80d99c34
[ 308.575608] [<8010fd54>] (handle_IPI) from [<80101594>]
(gic_handle_irq+0x68/0x6c)
[ 308.583192] r10:00000002 r9:ce020000 r8:00000001 r7:f4a00100 r6:ce321b28
r5:80e02f7c
[ 308.591152] r4:f4a0010c r3:ce321b28
[ 308.594795] [<8010152c>] (gic_handle_irq) from [<8010d240>]
(__irq_svc+0x40/0x74)
[ 308.602295] Exception stack(0xce321b28 to 0xce321b70)
[ 308.607371] 1b20: 00000001 80bbbbd4 80e8f9c0 00000000 ffffe000 80e8f9c0
[ 308.615572] 1b40: 00000010 00000000 00000001 ce020000 00000002 ce321bd4
ce321b60 ce321b70
[ 308.623769] 1b60: 80493dc0 80137668 200f0113 ffffffff
[ 308.628833] r7:ce321b5c r6:ffffffff r5:200f0113 r4:80137668
[ 308.634617] [<801375b4>] (__do_softirq) from [<80137c20>]
(irq_exit+0xd0/0x10c)
[ 308.641940] r10:ce321c40 r9:ce020000 r8:00000001 r7:00000000 r6:00000010
r5:00000000
[ 308.649901] r4:80d99c34
[ 308.652491] [<80137b50>] (irq_exit) from [<8017beb4>]
(__handle_domain_irq+0x90/0xfc)
[ 308.660335] r5:00000000 r4:80d99c34
[ 308.663984] [<8017be24>] (__handle_domain_irq) from [<80101560>]
(gic_handle_irq+0x34/0x6c)
[ 308.672348] r10:00000004 r9:ce321d90 r8:00000001 r7:f4a00100 r6:ce321c40
r5:80e02f7c
[ 308.680311] r4:f4a0010c r3:ce321c40
[ 308.683954] [<8010152c>] (gic_handle_irq) from [<8010d240>]
(__irq_svc+0x40/0x74)
[ 308.691453] Exception stack(0xce321c40 to 0xce321c88)
[ 308.696528] 1c40: 00000003 d0f2f89c 00000003 00000003 80e02650 d0f13180
80e02e00 d0f13184
[ 308.704729] 1c60: 00000001 ce321d90 00000004 ce321cbc 00000003 ce321c88
801a739c 801a73cc
[ 308.712923] 1c80: 200f0013 ffffffff
[ 308.716425] r7:ce321c74 r6:ffffffff r5:200f0013 r4:801a73cc
[ 308.722208] [<801a715c>] (smp_call_function_many) from [<801a7468>]
(smp_call_function+0x48/0x88)
[ 308.731093] r10:ffffffff r9:ce321d88 r8:00000000 r7:00000000 r6:00000001
r5:ce321d90
[ 308.739054] r4:80110990
[ 308.741634] [<801a7420>] (smp_call_function) from [<801a74e0>]
(on_each_cpu+0x38/0x90)
[ 308.749564] r7:00000000 r6:00000001 r5:ce321d90 r4:80110990
[ 308.755342] [<801a74a8>] (on_each_cpu) from [<80110d2c>]
(twd_rate_change+0x38/0x40)
[ 308.763099] r7:00000000 r6:00000002 r5:ce321d88 r4:ffffffff
[ 308.768890] [<80110cf4>] (twd_rate_change) from [<801523c4>]
(notifier_call_chain+0x54/0x94)
[ 308.777357] [<80152370>] (notifier_call_chain) from [<80152894>]
(__srcu_notifier_call_chain+0x54/0x70)
[ 308.786763] r9:ce321d88 r8:00000002 r7:00000000 r6:00000000 r5:ce0a6184
r4:ce0a619c
[ 308.794650] [<80152840>] (__srcu_notifier_call_chain) from [<801528d8>]
(srcu_notifier_call_chain+0x28/0x30)
[ 308.804491] r10:00000000 r9:80e8a384 r8:00000002 r7:80e02508 r6:ce026000
r5:80e73b44
[ 308.812451] r4:ce0a6180
[ 308.815042] [<801528b0>] (srcu_notifier_call_chain) from [<80746114>]
(__clk_notify+0xa0/0xa8)
[ 308.823683] [<80746074>] (__clk_notify) from [<807461c4>]
(__clk_recalc_rates+0xa8/0xac)
[ 308.831786] r8:ce003f80 r7:00000001 r6:1daee080 r5:00000002 r4:ce026000
[ 308.838630] [<8074611c>] (__clk_recalc_rates) from [<80746198>]
(__clk_recalc_rates+0x7c/0xac)
[ 308.847254] r7:00000001 r6:3b5dc100 r5:00000002 r4:ce026000
[ 308.853030] [<8074611c>] (__clk_recalc_rates) from [<80746198>]
(__clk_recalc_rates+0x7c/0xac)
[ 308.861654] r7:00000001 r6:3b5dc100 r5:00000002 r4:ce026a80
[ 308.867438] [<8074611c>] (__clk_recalc_rates) from [<80748b50>]
(clk_core_set_parent+0x1bc/0x2dc)
[ 308.876324] r7:00000001 r6:00000000 r5:ce026380 r4:ce026400
[ 308.882102] [<80748994>] (clk_core_set_parent) from [<80748c9c>]
(clk_set_parent+0x2c/0x30)
[ 308.890467] r9:00000000 r8:179a7b00 r7:80e02508 r6:000f32a0 r5:00060ae0
r4:80eec6ac
[ 308.898357] [<80748c70>] (clk_set_parent) from [<806d4220>]
(imx6q_set_target+0x490/0x544)
[ 308.906653] [<806d3d90>] (imx6q_set_target) from [<806ca034>]
(__cpufreq_driver_target+0x184/0x2b0)
[ 308.915712] r10:00000000 r9:00000000 r8:80eec5e4 r7:00000000 r6:80e02508
r5:ce66b500
[ 308.923671] r4:00000000
[ 308.926253] [<806c9eb0>] (__cpufreq_driver_target) from [<806d2d44>]
(cpufreq_interactive_speedchange_task+0x264/0x354)
[ 308.937048] r10:80d9ae10 r9:80e02650 r8:80e02e00 r7:00000000 r6:000f32a0
r5:80d9ae10
[ 308.945007] r4:d0f1ee10
[ 308.947591] [<806d2ae0>] (cpufreq_interactive_speedchange_task) from
[<801514e4>] (kthread+0xfc/0x114)
[ 308.956911] r10:00000000 r9:00000000 r8:00000000 r7:806d2ae0 r6:00000000
r5:ce303480
[ 308.964870] r4:00000000
[ 308.967456] [<801513e8>] (kthread) from [<80108028>]
(ret_from_fork+0x14/0x2c)
[ 308.974692] r7:00000000 r6:00000000 r5:801513e8 r4:ce303480
[ 308.980460] CPU0: stopping
[ 308.983202] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D O 4.1.15-2.0.0-
ga+yocto+gff4e28b #1
[ 308.992439] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 308.998981] Backtrace:
[ 309.001488] [<8010c358>] (dump_backtrace) from [<8010c5d4>]
(show_stack+0x20/0x24)
[ 309.009073] r7:80e87b48 r6:80e45ca0 r5:00000000 r4:80e45ca0
[ 309.014859] [<8010c5b4>] (show_stack) from [<80919780>]
(dump_stack+0x7c/0xbc)
[ 309.022112] [<80919704>] (dump_stack) from [<80110038>]
(handle_IPI+0x2e4/0x2f8)
[ 309.029522] r7:80e87b48 r6:00000005 r5:80d99c34 r4:80d99c34
[ 309.035298] [<8010fd54>] (handle_IPI) from [<80101594>]
(gic_handle_irq+0x68/0x6c)
[ 309.042881] r10:80e02508 r9:80e08b14 r8:d0f04ed0 r7:f4a00100 r6:80e01e98
r5:80e02f7c
[ 309.050843] r4:f4a0010c r3:80e01e98
[ 309.054488] [<8010152c>] (gic_handle_irq) from [<8010d240>]
(__irq_svc+0x40/0x74)
[ 309.061987] Exception stack(0x80e01e98 to 0x80e01ee0)
[ 309.067058] 1e80: 00000000 d0f084c0
[ 309.075261] 1ea0: dc8ba30f dc8ba30f cef8dbc4 00000047 80e88160 00000004
d0f04ed0 80e08b14
[ 309.083462] 1ec0: 80e02508 80e01f3c 80e01e80 80e01ee0 8091f2bc 806d59e0
600f0013 ffffffff
[ 309.091652] r7:80e01ecc r6:ffffffff r5:600f0013 r4:806d59e0
[ 309.097430] [<806d5920>] (cpuidle_enter_state) from [<806d5cc0>]
(cpuidle_enter+0x24/0x28)
[ 309.105708] r10:80e01f50 r9:80a02970 r8:80e08a74 r7:d0f04ed0 r6:80e88160
r5:80e025e8
[ 309.113667] r4:80e00000
[ 309.116248] [<806d5c9c>] (cpuidle_enter) from [<80171a74>]
(cpu_startup_entry+0x2a8/0x43c)
[ 309.124540] [<801717cc>] (cpu_startup_entry) from [<80917448>]
(rest_init+0x98/0x9c)
[ 309.132297] r7:80e02500
[ 309.134893] [<809173b0>] (rest_init) from [<80d00d9c>]
(start_kernel+0x404/0x424)
[ 309.142390] r5:80e8d000 r4:80e8d04c
[ 309.146037] [<80d00998>] (start_kernel) from [<1000807c>] (0x1000807c)
[ 309.152583] CPU2: stopping
[ 309.155327] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G D O 4.1.15-2.0.0-
ga+yocto+gff4e28b #1
[ 309.164565] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 309.171106] Backtrace:
[ 309.173611] [<8010c358>] (dump_backtrace) from [<8010c5d4>]
(show_stack+0x20/0x24)
[ 309.181196] r7:80e87b48 r6:80e45ca0 r5:00000000 r4:80e45ca0
[ 309.186977] [<8010c5b4>] (show_stack) from [<80919780>]
(dump_stack+0x7c/0xbc)
[ 309.194230] [<80919704>] (dump_stack) from [<80110038>]
(handle_IPI+0x2e4/0x2f8)
[ 309.201639] r7:80e87b48 r6:00000005 r5:80d99c34 r4:80d99c34
[ 309.207417] [<8010fd54>] (handle_IPI) from [<80101594>]
(gic_handle_irq+0x68/0x6c)
[ 309.215001] r10:80e02508 r9:80e08b14 r8:d0f1eed0 r7:f4a00100 r6:ce14bee8
r5:80e02f7c
[ 309.222960] r4:f4a0010c r3:ce14bee8
[ 309.226604] [<8010152c>] (gic_handle_irq) from [<8010d240>]
(__irq_svc+0x40/0x74)
[ 309.234103] Exception stack(0xce14bee8 to 0xce14bf30)
[ 309.239179] bee0: 00000000 d0f224c0 dc8ba30f dc8ba30f ce933307 00000047
[ 309.247383] bf00: 80e88160 00000004 d0f1eed0 80e08b14 80e02508 ce14bf8c
ce14bed0 ce14bf30
[ 309.255578] bf20: 8091f2bc 806d59e0 600f0013 ffffffff
[ 309.260643] r7:ce14bf1c r6:ffffffff r5:600f0013 r4:806d59e0
[ 309.266420] [<806d5920>] (cpuidle_enter_state) from [<806d5cc0>]
(cpuidle_enter+0x24/0x28)
[ 309.274698] r10:ce14bfa0 r9:80a02970 r8:80e08a74 r7:d0f1eed0 r6:80e88160
r5:80e025e8
[ 309.282656] r4:ce14a000
[ 309.285237] [<806d5c9c>] (cpuidle_enter) from [<80171a74>]
(cpu_startup_entry+0x2a8/0x43c)
[ 309.293528] [<801717cc>] (cpu_startup_entry) from [<8010fae0>]
(secondary_start_kernel+0x158/0x164)
[ 309.302587] r7:80e8d35c
[ 309.305168] [<8010f988>] (secondary_start_kernel) from [<1010162c>]
(0x1010162c)
[ 309.312579] r5:00000015 r4:5e12c06a
[ 309.316221] ---[ end Kernel panic - not syncing: Attempted to kill the
idle task!
I must be thankful to you if you can guide me on this issue. Are there any methods for hardware debugging to pinpoint the issues related to this while running applications on linux ?
Regards,
Kulunu.
On a ARM Cortex-A9 (Freescale iMX6SL) running Linux kernel 3.0.35, I am seeing a kernel oops with PC and LR (0x402aca32/0x402ac3cd) that is in user space. Mode is USER_32 and ISA is Thumb. There is no code on this system that executes in Thumb mode.
[ 597.195954] Unable to handle kernel paging request at virtual address 000a34d4
[ 597.205436] pgd = c35dc000
[ 597.208149] [000a34d4] *pgd=8c454831, *pte=8374c1cf, *ppte=8374ca3e
[ 597.214657] Internal error: Oops: 81f [#1] PREEMPT
[ 597.219609] Modules linked in: ...<snip>...
[ 597.243075] CPU: 0 Tainted: P W (3.0.35-aaaaaa #1)
[ 597.249162] PC is at 0x402aca32
[ 597.252304] LR is at 0x402ac3cd
[ 597.255448] pc : [<402aca32>] lr : [<402ac3cd>] psr: 60000030
[ 597.255453] sp : be8fc220 ip : 00000000 fp : 00000809
[ 597.266940] r10: 00000004 r9 : 40336ea0 r8 : 00000818
[ 597.272168] r7 : 4034c25c r6 : 00011b31 r5 : 00001250 r4 : 000a2cc8
[ 597.278698] r3 : 00000000 r2 : 000a34d0 r1 : 00011b30 r0 : 00000809
[ 597.285229] Flags: nZCv IRQs on FIQs on Mode USER_32 ISA Thumb Segment user
[ 597.292629] Control: 10c53c7d Table: 835dc059 DAC: 00000015
[ 597.298378] Process wancontrol (pid: 7551, stack limit = 0xce9f02e8)
[ 597.307890] ---[ end trace f50414d2a3d239df ]---
[ 597.312516] Kernel panic - not syncing: Fatal exception in interrupt
[ 597.325257] Backtrace:
[ 597.327567] [<c0135248>] (dump_backtrace+0x0/0x110) from [<c041e188>] (dump_stack+0x18/0x1c)
[ 597.336837] r6:c3088d20 r5:ce9f02e8 r4:c0537b48 r3:00000002
[ 597.342382] [<c041e170>] (dump_stack+0x0/0x1c) from [<c041e200>] (panic+0x74/0x194)
[ 597.350794] [<c041e18c>] (panic+0x0/0x194) from [<c01355b0>] (die+0x1a4/0x1e4)
[ 597.358402] r3:07ffff00 r2:ce9f1db8 r1:c0537f90 r0:c04ac8ba
[ 597.364044] r7:00000000
[ 597.366591] [<c013540c>] (die+0x0/0x1e4) from [<c013a7b0>] (__do_kernel_fault+0x6c/0x8c)
[ 597.375465] r8:00000000 r7:ce9f1fb0 r6:cee35900 r5:0000081f r4:000a34d4
[ 597.382060] [<c013a744>] (__do_kernel_fault+0x0/0x8c) from [<c013aa90>] (do_page_fault+0x2c0/0x2f0)
[ 597.391760] r8:cee35900 r7:000a34d4 r6:c3088d20 r5:ce9f1fb0 r4:00000001
[ 597.398438] r3:ce9f1fb0
[ 597.400909] [<c013a7d0>] (do_page_fault+0x0/0x2f0) from [<c012c1b8>] (do_DataAbort+0x38/0xa0)
[ 597.410178] [<c012c180>] (do_DataAbort+0x0/0xa0) from [<c0131a88>] (ret_from_exception+0x0/0x10)
[ 597.419298] Exception stack(0xce9f1fb0 to 0xce9f1ff8)
[ 597.424664] 1fa0: 00000809 00011b30 000a34d0 00000000
[ 597.434300] 1fc0: 000a2cc8 00001250 00011b31 4034c25c 00000818 40336ea0 00000004 00000809
[ 597.442488] 1fe0: 00000000 be8fc220 402ac3cd 402aca32 60000030 ffffffff
[ 597.455455] r8:00000818 r7:4034c25c r6:00011b31 r5:0000000f r4:0000040f
If code was executing in user space, it should get SEGV.
void arm_notify_die(const char *str, struct pt_regs *regs,
struct siginfo *info, unsigned long err, unsigned long trap)
{
if (user_mode(regs)) {
current->thread.error_code = err;
current->thread.trap_no = trap;
force_sig_info(info->si_signo, info, current);
} else {
die(str, regs, err);
}
}
Why does it go into die()?
This happens repeatedly with the same backtrace for the same address 0x000a34d4. I can't say the stack has been hosed because the values look the same in different instances of this kernel oops.