[#5818] Get kernel dump info when test mmap1 in bf537-stamp mpu kernel
Submitted By: Vivi Li
Open Date
2010-01-07 22:26:22 Close Date
2010-02-21 22:26:10
Priority:
Medium Assignee:
Barry Song
Status:
Closed Fixed In Release:
N/A
Found In Release:
2010R1 Release:
Category:
N/A Board:
N/A
Processor:
ALL Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
gcc4.3_trunk3771
App binary format:
N/A
Summary: Get kernel dump info when test mmap1 in bf537-stamp mpu kernel
Details:
Get kernel dump info when test mmap1 in bf537-stamp MPU in latest trunk.
--
root:/> mmap1 -x 0.1
mmap1 N 0 INFO : created thread[1026]ULL pointer access
Deferred Exception context
CURRENT PROCESS:
COMM=mmap1 PID=164 CPU=0
TEXT = 0x02cc0040-0x02cd2f20 DATA = 0x02cd2f24-0x02cd6138
BSS = 0x02cd6138-0x02cde934 USER-STACK = 0x02ce6f74
return address: [0x02cc065c]; contents of:
0x02cc0630: 9110 0c00 180e e14a 02cd e10a 8734 9110
0x02cc0640: 3010 e141 02cd e101 3274 6080 e300 3110
0x02cc0650: e14a 02cd e10a 8734 9110 3210 [9951] e14a
0x02cc0660: 02cd e10a 3298 9950 4349 4340 0801 1806
ADSP-BF537-0.3 500(MHz CCLK) 125(MHz SCLK) (mpu on)
Linux version 2.6.32.3-ADI-2010R1-pre-svn8127 (test@uclinux74-mpu) (gcc version 4.3.4 (ADI-trunk/svn-3771) ) #44 Thu Jan 7 20:310
SEQUENCER STATUS: Not tainted
SEQSTAT: 00000027 IPEND: 0008 IMASK: ffff SYSCFG: 0006
EXCAUSE : 0x27
physical IVG3 asserted : <0xffa00704> { _trap + 0x0 }
RETE: <0x00000000> /* Maybe null pointer? */
RETN: <0x02922000> /* kernel dynamic memory */
RETX: <0xffa005f4> { _exception_to_level5 + 0x0 }
RETS: <0x02cc05fc> [ mmap1 + 0x5bc ]
PC : <0x02cc065c> [ mmap1 + 0x61c ]
DCPLB_FAULT_ADDR: <0x00000000> /* Maybe null pointer? */
ICPLB_FAULT_ADDR: <0x02cc065c> [ mmap1 + 0x61c ]
PROCESSOR STATE:
R0 : 00000000 R1 : 00000000 R2 : 00000001 R3 : 00000001
R4 : 02c00004 R5 : 00000006 R6 : 00000003 R7 : 00004000
P0 : 02cd8738 P1 : 0000000c P2 : 00000000 P3 : 00000000
P4 : 00000030 P5 : 02c03e24 FP : 02c03d54 SP : 02921f24
LB0: 02cc9639 LT0: 02cc9636 LC0: 00000000
LB1: 02ccc87b LT1: 02ccc838 LC1: 00000000
B0 : 00000000 L0 : 00000000 M0 : 00000000 I0 : 00000000
B1 : 00000000 L1 : 00000000 M1 : 00000000 I1 : 00000001
B2 : 00000000 L2 : 00000000 M2 : 00000000 I2 : 02d00000
B3 : 00000000 L3 : 00000000 M3 : 00000000 I3 : 00b40000
A0.w: 0000000c A0.x: 00000000 A1.w: 0000000c A1.x: 00000000
USP : 02c03d38 ASTAT: 02003025
Hardware Trace:
0 Target : <0x00005058> { _trap_c + 0x0 }
Source : <0xffa00698> { _exception_to_level5 + 0xa4 } CALL pcrel
1 Target : <0xffa005f4> { _exception_to_level5 + 0x0 }
Source : <0xffa00434> { _ex_dcplb_miss + 0x78 } RTX
2 Target : <0xffa003bc> { _ex_dcplb_miss + 0x0 }
Source : <0xffa0075e> { _trap + 0x5a } JUMP (P4)
3 Target : <0xffa00704> { _trap + 0x0 }
Source : <0xffa004a8> { _bfin_return_from_exception + 0x18 } RTX
4 Target : <0xffa00490> { _bfin_return_from_exception + 0x0 }
Source : <0xffa0054c> { _ex_trap_c + 0x74 } JUMP.S
5 Target : <0xffa004d8> { _ex_trap_c + 0x0 }
Source : <0xffa0075e> { _trap + 0x5a } JUMP (P4)
6 Target : <0xffa00704> { _trap + 0x0 }
Source : <0x02cc065a> [ mmap1 + 0x61a ] 0x3210
7 Target : <0x02cc0650> [ mmap1 + 0x610 ]
Source : <0x02cc0634> [ mmap1 + 0x5f4 ] IF !CC JUMP
8 Target : <0x02cc0628> [ mmap1 + 0x5e8 ]
Source : <0x02cc05fe> [ mmap1 + 0x5be ] IF !CC JUMP
9 Target : <0x02cc05fc> [ mmap1 + 0x5bc ]
Source : <0x02cc9d22> [ mmap1 + 0x9ce2 ] RTS
10 Target : <0x02cc9d08> [ mmap1 + 0x9cc8 ]
Source : <0x02cc752e> [ mmap1 + 0x74ee ] JUMP.L
11 Target : <0x02cc7474> [ mmap1 + 0x7434 ]
Source : <0x02cc05f8> [ mmap1 + 0x5b8 ] CALL pcrel
12 Target : <0x02cc05f0> [ mmap1 + 0x5b0 ]
Source : <0x02cc05cc> [ mmap1 + 0x58c ] IF !CC JUMP
13 Target : <0x02cc05c0> [ mmap1 + 0x580 ]
Source : <0x02cc06aa> [ mmap1 + 0x66a ] IF !CC JUMP
14 Target : <0x02cc0690> [ mmap1 + 0x650 ]
Source : <0xffa00434> { _ex_dcplb_miss + 0x78 } RTX
15 Target : <0xffa003bc> { _ex_dcplb_miss + 0x0 }
Source : <0xffa0075e> { _trap + 0x5a } JUMP (P4)
Userspace Stack
Stack info:
SP: [0x02c03d38] <0x02c03d38> [ mmap1 + 0x3d38 ]
FP: (0x02c03d2c)
Memory from 0x02c03d30 to 02c04000
02c03d30:<02cc05fc> 02c03e24 [00000010] 02cd3174 000000a4 00000000 000003e8 02ce6ee0
02c03d50: 00000000 02c03e04 <02cc13ee> 02ce6ee0 0c011871 60061715 ffb7e63e 2f176804
02c03d70: 523d6007 17400828 e43a2f89 482affbc 0057e120 07086161 48323001 06084a38
02c03d90: e1282eb5 5a38fee0 e14a3040 642002c0 399ce10a bd32b0f0 a278b9ea a0529111
02c03db0: 201ce300 1b200c80 5ac33200 e1202f63 2eb40400 fef4e5ba fed7e6ba 304c2ea6
02c03dd0: 52396007 17100808 48072f80 06206020 60342ec2 e43f2e93 3007ffb8 0714e300
02c03df0: 0c003008 ce821f01 a27ac007 e3000000 6bfb1e69 00000000 <02cc7392> ffffff78
02c03e10: 02c03e24 00000000 6409300e 61be2eb6 e4382e74 02af3e24 02cd5824 00000000
02c03e30: 00000000 00000803 000000a4 00000000 02cda7f4 00000000 00000000 00000000
02c03e50: 00000000 00000000 00000000 00000000 00000000 00000000 02c03e6c 00000000
02c03e70: 02c03e74 00000000 00000000 00000000 02cc053c 02ce6ee0 80000000 00000000
02c03e90: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
02c03eb0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
02c03ed0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
02c03ef0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 00000000
02c03f10: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
02c03f30: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
02c03f50: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
02c03f70: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
02c03f90: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
02c03fb0: 00000000 00000000 02c03e24 00000003 00000000 00000000 00000000 00000000
02c03fd0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
02c03ff0: 00000000 00000000 00000000 00000000
Return addresses in stack:
address : <0x02cc05fc> [ mmap1 + 0x5bc ]
address : <0x02cc13ee> [ mmap1 + 0x13ae ]
address : <0x02cc7392> [ mmap1 + 0x7352 ]
mmap1 0 INFO : created thread[2051]
mmap1 0 INFO : pid[164] - read contents of memory (nil) 1000 times
mmap1 0 INFO : pid[163]: map, change contents, unmap files 1000 times
caught unexpected signal - 11 --- exiting
--
Follow-ups
--- Barry Song 2010-01-18 22:40:21
The problem happens while read_mem(), writing mapped area is ok.
--- Vivi Li 2010-01-19 01:20:27
The last passed version:
--
kernel: Linux release 2.6.31.6-ADI-2010R1-pre-svn7910, build #6 Thu Dec 3
16:16:35 GMT 2009
toolchain: bfin-uclinux-gcc release gcc version 4.3.4 (ADI-trunk/svn-3679)
user-dist: release svn-9212, build #106 Thu Dec 3 16:15:57 GMT 2009
--
The first failed version:
--
Linux release 2.6.32-ADI-2010R1-pre-svn7934, build #13 Sat Dec 5 05:02:17 GMT
2009
toolchain: bfin-uclinux-gcc release gcc version 4.3.4 (ADI-trunk/svn-3679)
user-dist: release svn-9219, build #178 Sat Dec 5 05:01:36 GMT 2009
--
--- Barry Song 2010-01-19 03:28:00
The reason causing this problem is that mmap1 expects siginfo_t->si_addr is
given data address for data access fault:
case SIGSEGV:
if (info->si_code == SEGV_MAPERR &&
info->si_addr == map_address)
{
tst_resm(TINFO,
"page fault occurred at %p",
map_address);
longjmp(jmpbuf, 1);
}
but we place instruction address to info->si_addr even for dcplb_miss.
--- Barry Song 2010-01-19 23:10:49
I think the testing "pass" before means "failure" in fact.
In mmap1.c, both reading mapped and unmmaped area will be tested, then some read
will happen after unmapping, kernel will send a SIGSEGV with dump info, mmap1
should print many:
mmap1 0 INFO : page fault occurred at 0xb6f000
If we never looked kernel dump info before, there must be something wrong in
unmmap.
At the last, test success will print:
"mmap1 1 PASS : Test ended, success"
If test fails, program will exit with -1.
In this test, we should echo 1 > /proc/sys/kernel/printk.
--- Vivi Li 2010-02-21 22:25:22
OK. Close it.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found