您尚未登录。

楼主 #1 2021-04-21 09:42:32

chenpeng1210
会员
注册时间: 2021-03-09
已发帖子: 7
积分: 4.5

HI3516EV200 gdb调试问题

大家好,新手有个问题请教还请各位高手能指导一下了,非常感谢!
最近在HI3516EV200上调试涂鸦应用时出现一个必现的Segmentation fault问题,抓取了core文件有141M多,本身带-g编译出来的应用sample_sdk有8M多,抓取到core文件后执行./gdb sample_sdk core时有时会一直卡住,有时过一会会提示内存不够gdb被kill掉了,请问这种情况怎么解决呢?有办法把这gdb和core放到linux电脑上执行分析吗?或者有其它调试手段吗?谢谢

/nfsroot/coredump # ./gdb sample_sdk core
random: fast init done
GNU gdb (GDB) 7.9.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-himix100-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from sample_sdk...done.

warning: core file may not match specified executable file.
[New LWP 1125]
[New LWP 1072]
[New LWP 1078]
[New LWP 1079]
[New LWP 1080]
[New LWP 1081]
[New LWP 1083]
[New LWP 1086]
[New LWP 1087]
[New LWP 1088]
[New LWP 1089]
[New LWP 1090]
[New LWP 1091]
[New LWP 1092]
[New LWP 1093]
[New LWP 1098]
[New LWP 1113]
[New LWP 1114]
[New LWP 1116]
[New LWP 1126]
[New LWP 1127]
[New LWP 1128]
[New LWP 1129]
[New LWP 1130]
[New LWP 1131]
[New LWP 1233]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
random: crng init done
gdb invoked oom-killer: gfp_mask=0x26040c0(GFP_KERNEL|__GFP_COMP|__GFP_NOTRACK), nodemask=0, order=0, oom_score_adj=0
CPU: 0 PID: 1079 Comm: gdb Tainted: P           O    4.9.37 #2
Hardware name: Generic DT based system
Backtrace:
[<c0012870>] (dump_backtrace) from [<c0012b2c>] (show_stack+0x18/0x1c)
r7:00000218 r6:00000000 r5:00000001 r4:c1053a30
[<c0012b14>] (show_stack) from [<c024f10c>] (dump_stack+0x24/0x28)
[<c024f0e8>] (dump_stack) from [<c00b1098>] (dump_header.constprop.4+0x70/0x198)
[<c00b1028>] (dump_header.constprop.4) from [<c0078e54>] (oom_kill_process+0x2a0/0x468)
r10:026040c0 r9:00000000 r8:00000d28 r7:00000218 r6:c06145f4 r5:c1053a30
r4:c103ef00
[<c0078bb4>] (oom_kill_process) from [<c00793b0>] (out_of_memory+0xf4/0x408)
r10:026040c0 r9:00000000 r8:00000d28 r7:c06d11f8 r6:c06d11f8 r5:c103ef00
r4:c1053a30
[<c00792bc>] (out_of_memory) from [<c007d48c>] (__alloc_pages_nodemask+0xa40/0xa60)
r8:00000040 r7:00000040 r6:00000145 r5:00000000 r4:00000000
[<c007ca4c>] (__alloc_pages_nodemask) from [<c00ab230>] (new_slab+0x37c/0x418)
r10:00210d00 r9:00000000 r8:024080c0 r7:00000000 r6:00000007 r5:024040c0
r4:c1801780
[<c00aaeb4>] (new_slab) from [<c00ac768>] (___slab_alloc.constprop.10+0x20c/0x274)
r10:00210d00 r9:c0186c54 r8:024080c0 r7:c1801780 r6:c1fa9270 r5:00000000
r4:00000000
[<c00ac55c>] (___slab_alloc.constprop.10) from [<c00acac8>] (kmem_cache_alloc+0xa8/0xe0)
r10:00000000 r9:00000000 r8:00001000 r7:60000113 r6:024080c0 r5:c1801780
r4:c1053d14
[<c00aca20>] (kmem_cache_alloc) from [<c0186c54>] (nfs_readhdr_alloc+0x24/0x28)
r7:c1053d14 r6:c0560da4 r5:c1053cdc r4:c1053d14
[<c0186c30>] (nfs_readhdr_alloc) from [<c01857e0>] (nfs_generic_pg_pgios+0x20/0xb8)
[<c01857c0>] (nfs_generic_pg_pgios) from [<c01851a8>] (nfs_pageio_doio+0x34/0x64)
r6:c1034380 r5:c1053cdc r4:c1053d14
[<c0185174>] (nfs_pageio_doio) from [<c0185c0c>] (__nfs_pageio_add_request+0xd8/0x4fc)
r5:c1053cdc r4:c1034380
[<c0185b34>] (__nfs_pageio_add_request) from [<c01867b0>] (nfs_pageio_add_request+0xd0/0x2d0)
r10:c0623b3c r9:c06ddd48 r8:00000000 r7:c1034380 r6:00000000 r5:c1034380
r4:c1053cdc
[<c01866e0>] (nfs_pageio_add_request) from [<c0186edc>] (readpage_async_filler+0x7c/0x1b0)
r10:c0186e60 r9:00000100 r8:00000200 r7:c1053cd4 r6:c1fe5340 r5:00000000
r4:c1034380
[<c0186e60>] (readpage_async_filler) from [<c0081370>] (read_cache_pages+0xb0/0x148)
r8:00000200 r7:c14c5464 r6:c1fe5340 r5:c1053d68 r4:c1fe5354
[<c00812c0>] (read_cache_pages) from [<c0187884>] (nfs_readpages+0xc0/0x198)
r10:c1053d68 r9:c14c5468 r8:000005f4 r7:c1053d68 r6:c14c5464 r5:c1053cdc
r4:c14c53a0
[<c01877c4>] (nfs_readpages) from [<c008157c>] (__do_page_cache_readahead+0x174/0x250)
r7:00000052 r6:c01877c4 r5:00000053 r4:000002af
[<c0081408>] (__do_page_cache_readahead) from [<c0077954>] (filemap_fault+0x334/0x594)
r10:c1053e1c r9:0000029f r8:c14c53a0 r7:00000000 r6:00000000 r5:c104a900
r4:00000298
[<c0077620>] (filemap_fault) from [<c0096ae8>] (__do_fault+0x74/0x100)
r10:c1053fb0 r9:0000029f r8:002a8000 r7:00000298 r6:00000000 r5:c1053e7c
r4:00000054
[<c0096a74>] (__do_fault) from [<c0099b40>] (handle_mm_fault+0x778/0xf40)
r5:00000290 r4:c1000370
[<c00993c8>] (handle_mm_fault) from [<c0015e8c>] (do_page_fault+0x224/0x2a0)
r9:00000054 r8:c10b93b4 r7:002a89dc r6:80000007 r5:c10b9380 r4:c103ef00
[<c0015c68>] (do_page_fault) from [<c0009328>] (do_PrefetchAbort+0x40/0xa4)
r10:b6f20f74 r9:00000000 r8:c1053fb0 r7:002a89dc r6:c0015c68 r5:00000007
r4:c06d2664
[<c00092e8>] (do_PrefetchAbort) from [<c0013aa0>] (ret_from_exception+0x0/0x20)
Exception stack(0xc1053fb0 to 0xc1053ff8)
3fa0:                                     01baaf06 00000000 00000000 00000001
3fc0: 00000067 00012ca0 b6ed2000 be8a1c90 00000000 00000000 b6f20f74 be8a172c
3fe0: b6ed2050 be8a1718 001671e4 002a89dc 60000010 ffffffff
r8:10c53c7d r7:10c53c7d r6:ffffffff r5:60000010 r4:002a89dc
Mem-Info:
active_anon:3423 inactive_anon:0 isolated_anon:0
active_file:141 inactive_file:184 isolated_file:0
unevictable:0 dirty:0 writeback:0 unstable:0
slab_reclaimable:75 slab_unreclaimable:835
mapped:139 shmem:0 pagetables:25 bounce:0
free:157 free_pcp:0 free_cma:0
Node 0 active_anon:13692kB inactive_anon:0kB active_file:564kB inactive_file:736kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:556kB dirty:0kB writeback:0kB shmem:0kB writeback_tmp:0kB unstable:0kB pages_scanned:1993 all_unreclaimable? yes
Normal free:628kB min:628kB low:784kB high:940kB active_anon:13692kB inactive_anon:0kB active_file:564kB inactive_file:736kB unevictable:0kB writepending:0kB present:32768kB managed:25132kB mlocked:0kB slab_reclaimable:300kB slab_unreclaimable:3340kB kernel_stack:432kB pagetables:100kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 0
Normal: 11*4kB (UE) 11*8kB (UME) 5*16kB (UME) 3*32kB (UME) 3*64kB (UE) 1*128kB (E) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 628kB
325 total pagecache pages
8192 pages RAM
0 pages HighMem/MovableOnly
1909 pages reserved
[ pid ]   uid  tgid total_vm      rss nr_ptes nr_pmds swapents oom_score_adj name
[  650]     0   650      338       40       3       0        0         -1000 udevd
[  960]     0   960      423       20       3       0        0             0 udhcpc
[ 1065]     0  1065      480       26       3       0        0             0 sh
[ 1079]     0  1079     4991     3459      13       0        0             0 gdb
Out of memory: Kill process 1079 (gdb) score 536 or sacrifice child
Killed process 1079 (gdb) total-vm:19964kB, anon-rss:13280kB, file-rss:556kB, shmem-rss:0kB
oom_reaper: reaped process 1079 (gdb), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Killed

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn