From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with SMTP id 188256B0012 for ; Thu, 16 Jun 2011 01:32:21 -0400 (EDT) Subject: Re: Oops in VMA code Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: Date: Thu, 16 Jun 2011 07:32:10 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <47FAB15C-B113-40FD-9CE0-49566AACC0DF@suse.de> Sender: owner-linux-mm@kvack.org List-ID: To: Linus Torvalds Cc: Benjamin Herrenschmidt , linux-mm@kvack.org, "linux-kernel@vger.kernel.org List" On 16.06.2011, at 06:32, Linus Torvalds wrote: > On Wed, Jun 15, 2011 at 2:59 PM, Alexander Graf wrote: >> Hi memory management experts, >>=20 >> I just had this crash while compiling code on my PPC G5. I was = running my PPC KVM tree, which was pretty much = 06e86849cf4019945a106913adb9ff0abcc01770 plus a few unrelated KVM = patches. User space is 64-bit. >>=20 >> Is this a known issue or did I hit something completely unexpected? >=20 > It doesn't look at all familiar to me, nor does google really seem to > find anything half-way related. Thanks a lot for looking at it either way :). > In fact, the only thing that that oops makes me think is that we > should get rid of that find_vma_prev() function these days (the vma > list is doubly linked since commit 297c5eee3724, and the whole "look > up prev" thing is some silly old stuff). >=20 > But that's an entirely unrelated issue. >=20 > Also, your disassembly and your gdb line lookup is apparently from > some other kernel, because the addresses don't match. The actual > running kernel actually says >=20 > NIP [c000000000190598] .do_munmap+0x138/0x3f0 >=20 > so it's do_munmap, not find_vma_prev(). Although gdb claiming > find_vma_prev() might be from some inlining issue, of course. > Regardless, it's useless for debugging - it's the do_munap() > disassembly we'd want (but I'm no longer all that fluent in ppc > assembly anyway, so ir probably wouldn't help). The reason the symbol lookup here is wrong is because I manually = stripped the kernel, since yaboot chokes on loading a 250MB elf binary = with debug symbols included: clay:/autotest/ppc/kvm # gdb /boot/vmlinux.autotest.unstrip=20 ... (gdb) x /i 0xc000000000190598 0xc000000000190598 : ld r0,16(r26) (gdb) x /i do_munmap+0x138 0xc000000000190598 : ld r0,16(r26) clay:/autotest/ppc/kvm # gdb /boot/vmlinux.autotest (gdb) x /i 0xc000000000190598 0xc000000000190598: ld r0,16(r26) The latter is the one I'm executing, while the former still has all the = symbols. But you're right. It looks like this is simply an inlined = function - which is why it got stripped away. Here's the disassembly of = the whole do_unmap function. I hope it's of use despite your fading PPC = asm skills :). Host compiler is gcc 4.3.4 from SLES11SP1. 0xc000000000190460 : mflr r0 0xc000000000190464 : std r29,-24(r1) 0xc000000000190468 : std r30,-16(r1) 0xc00000000019046c : mfcr r12 0xc000000000190470 : std r0,16(r1) 0xc000000000190474 : clrldi. r0,r4,52 0xc000000000190478 : mr r29,r3 0xc00000000019047c : std r31,-8(r1) 0xc000000000190480 : std r23,-72(r1) 0xc000000000190484 : std r24,-64(r1) 0xc000000000190488 : std r25,-56(r1) 0xc00000000019048c : std r26,-48(r1) 0xc000000000190490 : std r27,-40(r1) 0xc000000000190494 : std r28,-32(r1) 0xc000000000190498 : stw r12,8(r1) 0xc00000000019049c : ld r30,-18136(r2) 0xc0000000001904a0 : stdu r1,-192(r1) 0xc0000000001904a4 : mr r31,r4 0xc0000000001904a8 : beq 0xc0000000001904f0 = 0xc0000000001904ac : li r3,-22 0xc0000000001904b0 : addi r1,r1,192 0xc0000000001904b4 : ld r0,16(r1) 0xc0000000001904b8 : lwz r12,8(r1) 0xc0000000001904bc : ld r23,-72(r1) 0xc0000000001904c0 : ld r24,-64(r1) 0xc0000000001904c4 : ld r25,-56(r1) 0xc0000000001904c8 : ld r26,-48(r1) 0xc0000000001904cc : ld r27,-40(r1) 0xc0000000001904d0 : ld r28,-32(r1) 0xc0000000001904d4 : mtlr r0 0xc0000000001904d8 : ld r29,-24(r1) 0xc0000000001904dc : ld r30,-16(r1) 0xc0000000001904e0 : mtocrf 8,r12 0xc0000000001904e4 : ld r31,-8(r1) 0xc0000000001904e8 : blr 0xc0000000001904ec : nop 0xc0000000001904f0 : ld r9,456(r13) 0xc0000000001904f4 : ld r11,8(r9) 0xc0000000001904f8 : ld r8,-32712(r30) 0xc0000000001904fc : lis r10,4096 0xc000000000190500 : rldicr r10,r10,16,47 0xc000000000190504 : ld r0,128(r11) 0xc000000000190508 : rldicr r0,r0,59,4 0xc00000000019050c : sradi r0,r0,63 0xc000000000190510 : and r0,r0,r8 0xc000000000190514 : add r0,r0,r10 0xc000000000190518 : cmpld cr7,r0,r4 0xc00000000019051c : blt cr7,0xc0000000001904ac = 0xc000000000190520 : ld r9,456(r13) 0xc000000000190524 : ld r11,8(r9) 0xc000000000190528 : ld r0,128(r11) 0xc00000000019052c : rldicr r0,r0,59,4 0xc000000000190530 : sradi r0,r0,63 0xc000000000190534 : and r0,r0,r8 0xc000000000190538 : add r0,r0,r10 0xc00000000019053c : subf r0,r4,r0 0xc000000000190540 : cmpld cr7,r0,r5 0xc000000000190544 : blt cr7,0xc0000000001904ac = 0xc000000000190548 : addi r0,r5,4095 0xc00000000019054c : rldicr. r4,r0,0,51 0xc000000000190550 : beq 0xc0000000001904ac = 0xc000000000190554 : cmpdi cr7,r3,0 0xc000000000190558 : beq cr7,0xc0000000001907f0 = 0xc00000000019055c : ld r9,8(r3) 0xc000000000190560 : ld r28,0(r3) 0xc000000000190564 : li r11,0 0xc000000000190568 : li r26,0 0xc00000000019056c : cmpdi cr7,r9,0 0xc000000000190570 : bne cr7,0xc000000000190594 = 0xc000000000190574 : b 0xc0000000001905d0 = 0xc000000000190578 : nop 0xc00000000019057c : nop 0xc000000000190580 : ld r9,16(r9) 0xc000000000190584 : mr r26,r11 0xc000000000190588 : cmpdi cr7,r9,0 0xc00000000019058c : mr r11,r26 0xc000000000190590 : beq cr7,0xc0000000001905c4 = 0xc000000000190594 : addi r26,r9,-56 0xc000000000190598 : ld r0,16(r26) 0xc00000000019059c : cmpld cr7,r31,r0 0xc0000000001905a0 : blt cr7,0xc000000000190580 = 0xc0000000001905a4 : ld r11,24(r26) 0xc0000000001905a8 : cmpdi cr7,r11,0 0xc0000000001905ac : beq cr7,0xc0000000001905c4 = 0xc0000000001905b0 : ld r0,16(r11) 0xc0000000001905b4 : cmpld cr7,r31,r0 0xc0000000001905b8 : blt cr7,0xc0000000001905c4 = 0xc0000000001905bc : ld r9,8(r9) 0xc0000000001905c0 : b 0xc000000000190588 = 0xc0000000001905c4 : cmpdi cr7,r26,0 0xc0000000001905c8 : beq cr7,0xc0000000001905d0 = 0xc0000000001905cc : ld r28,24(r26) 0xc0000000001905d0 : cmpdi cr7,r28,0 0xc0000000001905d4 : beq cr7,0xc0000000001907f0 = 0xc0000000001905d8 : ld r0,8(r28) 0xc0000000001905dc : add r24,r4,r31 0xc0000000001905e0 : cmpld cr7,r24,r0 0xc0000000001905e4 : ble cr7,0xc0000000001907f0 = 0xc0000000001905e8 : cmpld cr7,r31,r0 0xc0000000001905ec : ble cr7,0xc00000000019061c = 0xc0000000001905f0 : ld r0,16(r28) 0xc0000000001905f4 : cmpld cr7,r24,r0 0xc0000000001905f8 : blt cr7,0xc000000000190814 = 0xc0000000001905fc : mr r3,r29 0xc000000000190600 : mr r4,r28 0xc000000000190604 : mr r5,r31 0xc000000000190608 : li r6,0 0xc00000000019060c : bl 0xc000000000190160 = <__split_vma> 0xc000000000190610 : cmpdi r3,0 0xc000000000190614 : bne 0xc0000000001904b0 = 0xc000000000190618 : mr r26,r28 0xc00000000019061c : mr r3,r29 0xc000000000190620 : mr r4,r24 0xc000000000190624 : bl 0xc00000000018e580 = 0xc000000000190628 : cmpdi r3,0 0xc00000000019062c : beq 0xc00000000019063c = 0xc000000000190630 : ld r0,8(r3) 0xc000000000190634 : cmpld cr7,r24,r0 0xc000000000190638 : bgt cr7,0xc000000000190830 = 0xc00000000019063c : cmpdi cr4,r26,0 0xc000000000190640 : beq cr4,0xc00000000019071c = 0xc000000000190644 : ld r25,24(r26) 0xc000000000190648 : ld r0,168(r29) 0xc00000000019064c : cmpdi cr7,r0,0 0xc000000000190650 : bne cr7,0xc0000000001906b0 = 0xc000000000190654 : beq = cr4,0xc00000000019080c 0xc000000000190658 : addi = r27,r26,24 0xc00000000019065c : li r0,0 0xc000000000190660 : addi = r23,r29,8 0xc000000000190664 : mr r28,r25 0xc000000000190668 : std = r0,32(r25) 0xc00000000019066c : b = 0xc000000000190680 0xc000000000190670 : ld r0,8(r4) 0xc000000000190674 : cmpld = cr7,r24,r0 0xc000000000190678 : ble = cr7,0xc000000000190724 0xc00000000019067c : mr r28,r4 0xc000000000190680 : mr r4,r23 0xc000000000190684 : addi = r3,r28,56 0xc000000000190688 : bl = 0xc00000000043b1c0 0xc00000000019068c : nop 0xc000000000190690 : lwz = r9,88(r29) 0xc000000000190694 : addi r9,r9,-1 0xc000000000190698 : stw = r9,88(r29) 0xc00000000019069c : ld = r4,24(r28) 0xc0000000001906a0 : cmpdi cr6,r4,0 0xc0000000001906a4 : bne = cr6,0xc000000000190670 0xc0000000001906a8 : std = r4,0(r27) 0xc0000000001906ac : b = 0xc00000000019072c 0xc0000000001906b0 : cmpdi cr7,r25,0 0xc0000000001906b4 : beq cr7,0xc000000000190654 = 0xc0000000001906b8 : ld r11,8(r25) 0xc0000000001906bc : cmpld cr7,r24,r11 0xc0000000001906c0 : ble cr7,0xc000000000190654 = 0xc0000000001906c4 : mr r28,r25 0xc0000000001906c8 : ld r0,48(r28) 0xc0000000001906cc : rldicl. r9,r0,51,63 0xc0000000001906d0 : beq 0xc000000000190700 = 0xc0000000001906d4 : ld r0,16(r28) 0xc0000000001906d8 : ld r9,168(r29) 0xc0000000001906dc : mr r3,r28 0xc0000000001906e0 : subf r0,r11,r0 0xc0000000001906e4 : rldicl r0,r0,52,12 0xc0000000001906e8 : subf r9,r0,r9 0xc0000000001906ec : std r9,168(r29) 0xc0000000001906f0 : ld r4,8(r28) 0xc0000000001906f4 : ld r5,16(r28) 0xc0000000001906f8 : bl = 0xc00000000018d840 0xc0000000001906fc : nop 0xc000000000190700 : ld r28,24(r28) 0xc000000000190704 : cmpdi cr7,r28,0 0xc000000000190708 : beq cr7,0xc000000000190654 = 0xc00000000019070c : ld r11,8(r28) 0xc000000000190710 : cmpld cr7,r24,r11 0xc000000000190714 : bgt cr7,0xc0000000001906c8 = 0xc000000000190718 : b 0xc000000000190654 = 0xc00000000019071c : ld r25,0(r29) 0xc000000000190720 : b 0xc000000000190648 = 0xc000000000190724 : std = r4,0(r27) 0xc000000000190728 : std = r26,32(r4) 0xc00000000019072c : li r9,0 0xc000000000190730 : ld = r0,-32720(r30) 0xc000000000190734 : std = r9,24(r28) 0xc000000000190738 : ld = r9,32(r29) 0xc00000000019073c : cmpd = cr7,r9,r0 0xc000000000190740 : beq = cr7,0xc000000000190800 0xc000000000190744 : beq = cr6,0xc0000000001907f8 0xc000000000190748 : ld r4,8(r4) 0xc00000000019074c : ld r0,0(r9) 0xc000000000190750 : std = r2,40(r1) 0xc000000000190754 : mr r3,r29 0xc000000000190758 : mtctr r0 0xc00000000019075c : ld = r11,16(r9) 0xc000000000190760 : ld r2,8(r9) 0xc000000000190764 : bctrl 0xc000000000190768 : ld = r2,40(r1) 0xc00000000019076c : li r0,0 0xc000000000190770 : mr r5,r26 0xc000000000190774 : mr r6,r31 0xc000000000190778 : mr r7,r24 0xc00000000019077c : std = r0,16(r29) 0xc000000000190780 : mr r3,r29 0xc000000000190784 : mr r4,r25 0xc000000000190788 : bl 0xc00000000018ee70 = 0xc00000000019078c : ld r9,160(r29) 0xc000000000190790 : ld r0,152(r29) 0xc000000000190794 : cmpld cr7,r0,r9 0xc000000000190798 : bge = cr7,0xc0000000001907b4 0xc00000000019079c : std r9,152(r29) 0xc0000000001907a0 : b = 0xc0000000001907b4 0xc0000000001907a4 : nop 0xc0000000001907a8 : nop 0xc0000000001907ac : nop 0xc0000000001907b0 : ld r9,160(r29) 0xc0000000001907b4 : ld r0,8(r25) 0xc0000000001907b8 : ld r6,16(r25) 0xc0000000001907bc : mr r3,r29 0xc0000000001907c0 : subf r6,r0,r6 0xc0000000001907c4 : rldicl r6,r6,52,12 0xc0000000001907c8 : subf r0,r6,r9 0xc0000000001907cc : neg r6,r6 0xc0000000001907d0 : std r0,160(r29) 0xc0000000001907d4 : ld r4,48(r25) 0xc0000000001907d8 : ld r5,152(r25) 0xc0000000001907dc : bl = 0xc00000000018e290 0xc0000000001907e0 : mr r3,r25 0xc0000000001907e4 : bl = 0xc00000000018ec30 0xc0000000001907e8 : mr. r25,r3 0xc0000000001907ec : bne = 0xc0000000001907b0 0xc0000000001907f0 : li r3,0 0xc0000000001907f4 : b = 0xc0000000001904b0 0xc0000000001907f8 : ld = r4,40(r29) 0xc0000000001907fc : b = 0xc00000000019074c 0xc000000000190800 : beq = cr4,0xc0000000001907f8 0xc000000000190804 : ld = r4,16(r26) 0xc000000000190808 : b = 0xc00000000019074c 0xc00000000019080c : mr r27,r29 0xc000000000190810 : b = 0xc00000000019065c 0xc000000000190814 : ld r9,-32728(r30) 0xc000000000190818 : lwz r11,88(r29) 0xc00000000019081c : li r3,-12 0xc000000000190820 : lwz r0,0(r9) 0xc000000000190824 : cmpw cr7,r11,r0 0xc000000000190828 : blt cr7,0xc0000000001905fc = 0xc00000000019082c : b 0xc0000000001904b0 = 0xc000000000190830 : mr r4,r3 0xc000000000190834 : mr r5,r24 0xc000000000190838 : mr r3,r29 0xc00000000019083c : li r6,1 0xc000000000190840 : bl 0xc000000000190160 = <__split_vma> 0xc000000000190844 : cmpdi r3,0 0xc000000000190848 : beq 0xc00000000019063c = 0xc00000000019084c : b 0xc0000000001904b0 = Alex -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org