wiki:TipAndDoc/VM/NestedVMM/GDB

  • KVM on KVMで、内側のゲストカーネルをGDBでデバッグしようとすると予想しない挙動を示す
  • テストした環境
  • case1
    • L0
      • Core i7 940
      • Ubuntu 12.04 3.2.0-49-generic x86_64
      • QEMU emulator version 1.0 (qemu-kvm-1.0)
    • L1
      • Core 2 Duo T7700
      • Ubuntu 12.10 3.5.0-36-generic i686
      • QEMU emulator version 1.2.0 (qemu-kvm-1.2.0+noroms-0ubuntu2.12.10.4, Debian)
    • L2
      • QEMU Virtual CPU version 1.2.0
      • Ubuntu 12.04 3.2.48 i686
        • linux-3.2.48.tar.xz with /boot/config-3.2.0-49-generic
  • case2
    • L0
      • Core i5 750
      • Ubuntu 12.10 3.5.1 x86_64
        • linux-3.5.1.tar.xz with /boot/config-3.5.0-36-generic
      • QEMU emulator version 1.2.0 (qemu-kvm-1.2.0+noroms-0ubuntu2.12.10.4, Debian)
    • L1
      • Core i7 9xx (Nehalem Class Core i7)
      • Ubuntu 12.10 3.5.1 x86_64
      • QEMU emulator version 1.2.0 (qemu-kvm-1.2.0+noroms-0ubuntu2.12.10.4, Debian)
    • L2
      • QEMU Virtual CPU version 1.2.0
      • Ubuntu 12.10 3.5.1 x86_64
  • getpid.c
    #include <stdio.h>
    #include <sys/types.h>
    #include <unistd.h>
    
    int main() {
        printf ("%d\n", getpid());
        
        return 0;
    }
    
  • case1
    • gdb attach L0 => L2
      • mitty@quantal-l0:~/works/linux-3.5.1$ gdb
        (gdb) file vmlinux
        Reading symbols from /home/mitty/works/linux-3.5.1/vmlinux...done.
        (gdb) b sys_getpid
        Breakpoint 1 at 0xffffffff81064070: file kernel/timer.c, line 1414.
        (gdb) target remote 192.168.XX.223:1234
        Remote debugging using 192.168.XX.223:1234
        native_safe_halt ()
            at /home/mitty/works/linux-3.5.1/arch/x86/include/asm/irqflags.h:50
        50      }
        (gdb) c
        Continuing.
        
      • kern.log
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.578453] int3: 0000 [#1] SMP 
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.591921] CPU 0 
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.594478] Modules linked in: kvm_intel kvm ppdev psmouse microcode parport_pc serio_raw i2c_piix4 mac_hid lp parport floppy 8139too 8139cp
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.614280] 
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.616880] Pid: 946, comm: getpid Not tainted 3.5.1 #1 Bochs Bochs
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.622425] RIP: 0010:[<ffffffff81064071>]  [<ffffffff81064071>] sys_getpid+0x1/0x30
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.629986] RSP: 0018:ffff88003cfa5f80  EFLAGS: 00010293
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.634137] RAX: 0000000000000027 RBX: 0000000000000000 RCX: 00007fffb9729930
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.638935] RDX: 0000000000000000 RSI: 00007fffb9729c88 RDI: 0000000000000001
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.643660] RBP: 00007fffb9729ba0 R08: 0000000000400610 R09: 00007f664da39750
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.648427] R10: 00007fffb9729930 R11: 0000000000000246 R12: 0000000000400450
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.652946] R13: 00007fffb9729c80 R14: 0000000000000000 R15: 0000000000000000
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.657537] FS:  00007f664dc42700(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.664543] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.668770] CR2: 00007f664d72b6d0 CR3: 000000001921f000 CR4: 00000000000006f0
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.673353] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.678072] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.682699] Process getpid (pid: 946, threadinfo ffff88003cfa4000, task ffff88003da44500)
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.693357] Stack:
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.696519]  ffffffff816812e9 0000000000000246 00007fffb9729930 00007f664da39750
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.705634]  0000000000400610 0000000000000027 0000000000400580 0000000000000000
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.714651]  00007fffb9729c88 0000000000000001 0000000000000027 00007f664d72b6f9
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.724455] Call Trace:
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.727731]  [<ffffffff816812e9>] ? system_call_fastpath+0x16/0x1b
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.732259] Code: 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 66 66 66 66 90 e8 c2 4d ff ff 5d 89 c0 c3 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 cc <48> 89 e5 66 66 66 66 90 65 48 8b 04 25 00 c7 00 00 48 8b 80 f0 
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.792020] RIP  [<ffffffff81064071>] sys_getpid+0x1/0x30
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.797667]  RSP <ffff88003cfa5f80>
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.801729] ---[ end trace 626ed62bf5aa88ab ]---
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.806097] BUG: scheduling while atomic: getpid/946/0x10000001
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.810788] Modules linked in: kvm_intel kvm ppdev psmouse microcode parport_pc serio_raw i2c_piix4 mac_hid lp parport floppy 8139too 8139cp
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.827458] Pid: 946, comm: getpid Tainted: G      D      3.5.1 #1
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.832034] Call Trace:
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.835138]  <#DB>  [<ffffffff8166e564>] __schedule_bug+0x4d/0x59
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.839978]  [<ffffffff81677d34>] __schedule+0x6e4/0x7c0
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.844322]  [<ffffffff81084b4a>] __cond_resched+0x2a/0x40
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.848360]  [<ffffffff81677e90>] _cond_resched+0x30/0x40
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.852387]  [<ffffffff81677326>] down_read+0x16/0x2b
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.856313]  [<ffffffff810681cb>] exit_signals+0x2b/0x130
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.860322]  [<ffffffff8107c3e6>] ? blocking_notifier_call_chain+0x16/0x20
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.864782]  [<ffffffff810577b4>] do_exit+0xb4/0x8e0
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.868730]  [<ffffffff8166dfe0>] ? printk+0x61/0x63
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.873228]  [<ffffffff8167a334>] oops_end+0xa4/0xf0
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.877232]  [<ffffffff810166b8>] die+0x58/0x90
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.881063]  [<ffffffff81679c40>] do_trap+0xc0/0x170
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.885899]  [<ffffffff81679f39>] do_int3+0xd9/0x130
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.889902]  [<ffffffff81679698>] int3+0x28/0x40
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.893805]  [<ffffffff81064071>] ? sys_getpid+0x1/0x30
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.897890]  <<EOE>>  [<ffffffff816812e9>] ? system_call_fastpath+0x16/0x1b
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.903220] note: getpid[946] exited with preempt_count 1
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.907471] BUG: scheduling while atomic: getpid/946/0x10000001
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.915076] Modules linked in: kvm_intel kvm ppdev psmouse microcode parport_pc serio_raw i2c_piix4 mac_hid lp parport floppy 8139too 8139cp
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.933729] Pid: 946, comm: getpid Tainted: G      D W    3.5.1 #1
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.938159] Call Trace:
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.941419]  <#DB>  [<ffffffff8166e564>] __schedule_bug+0x4d/0x59
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.946391]  [<ffffffff81677d34>] __schedule+0x6e4/0x7c0
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.950571]  [<ffffffff81084b4a>] __cond_resched+0x2a/0x40
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.954840]  [<ffffffff81677e90>] _cond_resched+0x30/0x40
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.959065]  [<ffffffff81677326>] down_read+0x16/0x2b
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.963238]  [<ffffffff810b7acb>] acct_collect+0x4b/0x1c0
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.967488]  [<ffffffff81057d83>] do_exit+0x683/0x8e0
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.971680]  [<ffffffff8167a334>] oops_end+0xa4/0xf0
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.975844]  [<ffffffff810166b8>] die+0x58/0x90
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.979899]  [<ffffffff81679c40>] do_trap+0xc0/0x170
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.984131]  [<ffffffff81679f39>] do_int3+0xd9/0x130
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.987954]  [<ffffffff81679698>] int3+0x28/0x40
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.992037]  [<ffffffff81064071>] ? sys_getpid+0x1/0x30
        Jul 11 23:31:00 quantal-nested kernel: [ 1877.995934]  <<EOE>>  [<ffffffff816812e9>] ? system_call_fastpath+0x16/0x1b
        
    • gdb attach L1 => L2
      • mitty@quantal-l1:~/works/linux-3.5.1$ gdb
        (gdb) file vmlinux
        Reading symbols from /home/mitty/works/linux-3.5.1/vmlinux...done.
        (gdb) b sys_getpid
        Breakpoint 1 at 0xffffffff81064070: file kernel/timer.c, line 1414.
        (gdb) target remote 127.0.0.1:1234
        Remote debugging using 127.0.0.1:1234
        native_safe_halt ()
            at /home/mitty/works/linux-3.5.1/arch/x86/include/asm/irqflags.h:50
        50      }
        (gdb) c
        Continuing.
        
      • kern.log
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.193620] int3: 0000 [#2] SMP 
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] CPU 0 
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] Modules linked in: kvm_intel kvm ppdev psmouse microcode parport_pc serio_raw i2c_piix4 mac_hid lp parport floppy 8139too 8139cp
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] 
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] Pid: 970, comm: getpid Tainted: G      D W    3.5.1 #1 Bochs Bochs
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] RIP: 0010:[<ffffffff81064071>]  [<ffffffff81064071>] sys_getpid+0x1/0x30
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] RSP: 0018:ffff880018dfff80  EFLAGS: 00010293
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] RAX: 0000000000000027 RBX: 0000000000000000 RCX: 00007fff6dc338f0
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] RDX: 0000000000000000 RSI: 00007fff6dc33c48 RDI: 0000000000000001
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] RBP: 00007fff6dc33b60 R08: 0000000000400610 R09: 00007fce0d61b750
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] R10: 00007fff6dc338f0 R11: 0000000000000246 R12: 0000000000400450
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] R13: 00007fff6dc33c40 R14: 0000000000000000 R15: 0000000000000000
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] FS:  00007fce0d824700(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] CR2: 00007fce0d30d6d0 CR3: 0000000024c2f000 CR4: 00000000000006f0
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] Process getpid (pid: 970, threadinfo ffff880018dfe000, task ffff88003da44500)
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] Stack:
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085]  ffffffff816812e9 0000000000000246 00007fff6dc338f0 00007fce0d61b750
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085]  0000000000400610 0000000000000027 0000000000400580 0000000000000000
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085]  00007fff6dc33c48 0000000000000001 0000000000000027 00007fce0d30d6f9
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] Call Trace:
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085]  [<ffffffff816812e9>] ? system_call_fastpath+0x16/0x1b
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] Code: 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 66 66 66 66 90 e8 c2 4d ff ff 5d 89 c0 c3 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 cc <48> 89 e5 66 66 66 66 90 65 48 8b 04 25 00 c7 00 00 48 8b 80 f0 
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085] RIP  [<ffffffff81064071>] sys_getpid+0x1/0x30
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.196085]  RSP <ffff880018dfff80>
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.429516] ---[ end trace 626ed62bf5aa88ac ]---
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.433353] BUG: scheduling while atomic: getpid/970/0x10000001
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.437605] Modules linked in: kvm_intel kvm ppdev psmouse microcode parport_pc serio_raw i2c_piix4 mac_hid lp parport floppy 8139too 8139cp
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.454074] Pid: 970, comm: getpid Tainted: G      D W    3.5.1 #1
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.459631] Call Trace:
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.463006]  <#DB[1]>  [<ffffffff8166e564>] __schedule_bug+0x4d/0x59
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.467796]  [<ffffffff81677d34>] __schedule+0x6e4/0x7c0
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.472053]  [<ffffffff81084b4a>] __cond_resched+0x2a/0x40
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.476354]  [<ffffffff81677e90>] _cond_resched+0x30/0x40
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.480364]  [<ffffffff81677326>] down_read+0x16/0x2b
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.484258]  [<ffffffff810681cb>] exit_signals+0x2b/0x130
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.488224]  [<ffffffff8107c3e6>] ? blocking_notifier_call_chain+0x16/0x20
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.492594]  [<ffffffff810577b4>] do_exit+0xb4/0x8e0
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.496434]  [<ffffffff8166dfe0>] ? printk+0x61/0x63
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.502565]  [<ffffffff8167a334>] oops_end+0xa4/0xf0
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.506615]  [<ffffffff810166b8>] die+0x58/0x90
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.510514]  [<ffffffff81679c40>] do_trap+0xc0/0x170
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.514546]  [<ffffffff8167d062>] ? __atomic_notifier_call_chain+0x12/0x20
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.519120]  [<ffffffff81679f39>] do_int3+0xd9/0x130
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.523203]  [<ffffffff81679698>] int3+0x28/0x40
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.527218]  [<ffffffff81064071>] ? sys_getpid+0x1/0x30
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.531377]  <<EOE>>  [<ffffffff816812e9>] ? system_call_fastpath+0x16/0x1b
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.536974] note: getpid[970] exited with preempt_count 1
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.541020] BUG: scheduling while atomic: getpid/970/0x10000001
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.545193] Modules linked in: kvm_intel kvm ppdev psmouse microcode parport_pc serio_raw i2c_piix4 mac_hid lp parport floppy 8139too 8139cp
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.561926] Pid: 970, comm: getpid Tainted: G      D W    3.5.1 #1
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.566331] Call Trace:
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.569623]  <#DB[1]>  [<ffffffff8166e564>] __schedule_bug+0x4d/0x59
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.574595]  [<ffffffff81677d34>] __schedule+0x6e4/0x7c0
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.578747]  [<ffffffff81084b4a>] __cond_resched+0x2a/0x40
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.583011]  [<ffffffff81677e90>] _cond_resched+0x30/0x40
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.587401]  [<ffffffff81677326>] down_read+0x16/0x2b
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.593630]  [<ffffffff810b7acb>] acct_collect+0x4b/0x1c0
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.597808]  [<ffffffff81057d83>] do_exit+0x683/0x8e0
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.601871]  [<ffffffff8167a334>] oops_end+0xa4/0xf0
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.605873]  [<ffffffff810166b8>] die+0x58/0x90
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.609722]  [<ffffffff81679c40>] do_trap+0xc0/0x170
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.613718]  [<ffffffff8167d062>] ? __atomic_notifier_call_chain+0x12/0x20
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.618365]  [<ffffffff81679f39>] do_int3+0xd9/0x130
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.622438]  [<ffffffff81679698>] int3+0x28/0x40
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.626413]  [<ffffffff81064071>] ? sys_getpid+0x1/0x30
        Jul 11 23:32:34 quantal-nested kernel: [ 1971.630548]  <<EOE>>  [<ffffffff816812e9>] ? system_call_fastpath+0x16/0x1b
        
  • case2
    • gdb attach L1 => L2
      • mitty@kvm-l1:~/works/linux-3.2.48$ gdb
        (gdb) file vmlinux
        Reading symbols from /home/mitty/works/linux-3.2.48/vmlinux...done.
        (gdb) b sys_getpid
        Breakpoint 1 at 0xc1068290: file kernel/timer.c, line 1358.
        (gdb) target remote 127.0.0.1:1234
        Remote debugging using 127.0.0.1:1234
        native_safe_halt ()
            at /home/mitty/works/linux-3.2.48/arch/x86/include/asm/irqflags.h:50
        50      }
        (gdb) c
        Continuing.
        
      • kern.log
        Jul 11 22:51:18 precise-l2 kernel: [  440.401637] int3: 0000 [#1] SMP 
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089] Modules linked in: ppdev psmouse parport_pc serio_raw mac_hid i2c_piix4 lp parport floppy 8139too 8139cp
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089] 
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089] Pid: 994, comm: getpid Not tainted 3.2.48 #1 Bochs Bochs
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089] EIP: 0060:[<c1068291>] EFLAGS: 00000297 CPU: 0
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089] EIP is at sys_getpid+0x1/0x30
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089] EAX: 00000014 EBX: b7747ff4 ECX: bfb4cfc4 EDX: 000000e0
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089] ESI: 00000000 EDI: 00000000 EBP: e5702000 ESP: e5703fb0
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089] Process getpid (pid: 994, ti=e5702000 task=e57ecbc0 task.ti=e5702000)
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089] Stack:
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089]  c158dd44 b7747ff4 bfb4cfc4 00000000 00000000 00000000 bfb4cf28 00000014
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089]  0000007b 0000007b 00000000 00000033 00000014 b7753416 00000073 00000246
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089]  bfb4cf08 0000007b 00000000 00000000
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089] Call Trace:
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089]  [<c158dd44>] ? syscall_call+0x7/0xb
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089] Code: f8 8b 7d fc 89 ec 5d c3 66 90 55 89 e5 3e 8d 74 26 00 8b 45 08 e8 c0 55 ff ff 5d c3 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00 cc <89> e5 3e 8d 74 26 00 64 a1 4c ae 8f c1 8b 80 2c 02 00 00 8b 80 
        Jul 11 22:51:18 precise-l2 kernel: [  440.404089] EIP: [<c1068291>] sys_getpid+0x1/0x30 SS:ESP 0068:e5703fb0
        Jul 11 22:51:18 precise-l2 kernel: [  440.584643] ---[ end trace 13cb4567d2843904 ]---
        Jul 11 22:51:18 precise-l2 kernel: [  440.589404] note: getpid[994] exited with preempt_count 1
        Jul 11 22:51:18 precise-l2 kernel: [  440.594107] BUG: scheduling while atomic: getpid/994/0x10000001
        Jul 11 22:51:18 precise-l2 kernel: [  440.599042] Modules linked in: ppdev psmouse parport_pc serio_raw mac_hid i2c_piix4 lp parport floppy 8139too 8139cp
        Jul 11 22:51:18 precise-l2 kernel: [  440.614812] Pid: 994, comm: getpid Tainted: G      D      3.2.48 #1
        Jul 11 22:51:18 precise-l2 kernel: [  440.620549] Call Trace:
        Jul 11 22:51:18 precise-l2 kernel: [  440.624267]  [<c1584497>] ? printk+0x2d/0x2f
        Jul 11 22:51:18 precise-l2 kernel: [  440.628617]  [<c1584242>] __schedule_bug+0x60/0x66
        Jul 11 22:51:18 precise-l2 kernel: [  440.633044]  [<c158baa7>] __schedule+0x757/0x8c0
        Jul 11 22:51:18 precise-l2 kernel: [  440.637723]  [<c10594c6>] ? vprintk+0x176/0x4a0
        Jul 11 22:51:18 precise-l2 kernel: [  440.642134]  [<c10353b8>] ? default_spin_lock_flags+0x8/0x10
        Jul 11 22:51:18 precise-l2 kernel: [  440.647215]  [<c158dc3d>] ? _raw_spin_lock_irqsave+0x2d/0x40
        Jul 11 22:51:18 precise-l2 kernel: [  440.652420]  [<c10512fb>] __cond_resched+0x1b/0x30
        Jul 11 22:51:18 precise-l2 kernel: [  440.656954]  [<c158bc86>] _cond_resched+0x26/0x30
        Jul 11 22:51:18 precise-l2 kernel: [  440.661390]  [<c158cf20>] down_read+0x10/0x1f
        Jul 11 22:51:18 precise-l2 kernel: [  440.666075]  [<c109d832>] acct_collect+0x42/0x170
        Jul 11 22:51:18 precise-l2 kernel: [  440.670738]  [<c105c9c7>] do_exit+0x567/0x6f0
        Jul 11 22:51:18 precise-l2 kernel: [  440.675455]  [<c158eb8e>] oops_end+0x8e/0xd0
        Jul 11 22:51:18 precise-l2 kernel: [  440.681704]  [<c1013984>] die+0x54/0x80
        Jul 11 22:51:18 precise-l2 kernel: [  440.686044]  [<c158e666>] do_trap+0x96/0xd0
        Jul 11 22:51:18 precise-l2 kernel: [  440.690568]  [<c158e8c1>] do_int3+0xa1/0xc0
        Jul 11 22:51:18 precise-l2 kernel: [  440.695007]  [<c158e5a4>] int3+0x30/0x38
        Jul 11 22:51:18 precise-l2 kernel: [  440.699589]  [<c15900d8>] ? trampoline_handler+0x158/0x190
        Jul 11 22:51:18 precise-l2 kernel: [  440.704554]  [<c1068291>] ? sys_getpid+0x1/0x30
        Jul 11 22:51:18 precise-l2 kernel: [  440.709022]  [<c158dd44>] ? syscall_call+0x7/0xb
        
Last modified 4 years ago Last modified on Jul 11, 2013 11:44:14 PM