teawater / kgtp

KGTP is a comprehensive dynamic tracer for analysing Linux kernel and application (including Android) problems on production systems in real time.
http://teawater.github.io/kgtp/
85 stars 36 forks source link

3.5.0-37-generic x86_32 get oops with user space program #2

Closed teawater closed 11 years ago

teawater commented 11 years ago

(gdb) target extended-remote /sys/kernel/debug/gtp Remote debugging using /sys/kernel/debug/gtp 0x00000000 in ?? () (gdb) add-inferior Added inferior 2 (gdb) inferior 2 Switching to inferior 2 [Thread 0](noexec) file ~/tmp/a.out "/home/teawater/tmp/a.out": not in executable format: File truncated (gdb) file ~/tmp/a.out Reading symbols from /home/teawater/tmp/a.out...done. (gdb) attach 2904 Attached to Remote target

teawater commented 11 years ago

Aug 13 07:27:05 ubuntu kernel: [ 272.684901] ------------[ cut here ]------------ Aug 13 07:27:05 ubuntu kernel: [ 272.684906] kernel BUG at /build/buildd/linux-lts-quantal-3.5.0/mm/highmem.c:268! Aug 13 07:27:05 ubuntu kernel: [ 272.684908] invalid opcode: 0000 [#1] SMP Aug 13 07:27:05 ubuntu kernel: [ 272.684911] Modules linked in: gtp(O) acpiphp pcnet32 snd_ens1371 gameport snd_ac97_codec ac97_bus snd_pcm snd_seq_midi snd_rawmidi coretemp snd_seq_midi_event kvm_intel snd_seq snd_timer kvm snd_seq_device aesni_intel rfcomm bnep cryptd aes_i586 snd soundcore snd_page_alloc microcode psmouse vmw_balloon vmwgfx ttm drm bluetooth shpchp ppdev i2c_piix4 joydev serio_raw parport_pc mac_hid lp parport hid_generic usbhid hid floppy mptspi mptscsih mptbase vmw_pvscsi vmxnet3 [last unloaded: pcnet32] Aug 13 07:27:05 ubuntu kernel: [ 272.684935] Aug 13 07:27:05 ubuntu kernel: [ 272.684939] Pid: 2743, comm: gdb Tainted: G O 3.5.0-37-generic #58~precise1-Ubuntu VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform Aug 13 07:27:05 ubuntu kernel: [ 272.684943] EIP: 0060:[] EFLAGS: 00210246 CPU: 0 Aug 13 07:27:05 ubuntu kernel: [ 272.684950] EIP is at kunmap_high+0x9a/0xa0 Aug 13 07:27:05 ubuntu kernel: [ 272.684951] EAX: 00000000 EBX: ffc6f000 ECX: c1a55a40 EDX: 00200296 Aug 13 07:27:05 ubuntu kernel: [ 272.684952] ESI: 00000000 EDI: b772f908 EBP: f3f0de70 ESP: f3f0de68 Aug 13 07:27:05 ubuntu kernel: [ 272.684954] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 Aug 13 07:27:05 ubuntu kernel: [ 272.684955] CR0: 80050033 CR2: 0814e1f4 CR3: 3476e000 CR4: 000407f0 Aug 13 07:27:05 ubuntu kernel: [ 272.684993] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000 Aug 13 07:27:05 ubuntu kernel: [ 272.685005] DR6: ffff0ff0 DR7: 00000400 Aug 13 07:27:05 ubuntu kernel: [ 272.685007] Process gdb (pid: 2743, ti=f3f0c000 task=f6a2bf70 task.ti=f3f0c000) Aug 13 07:27:05 ubuntu kernel: [ 272.685008] Stack: Aug 13 07:27:05 ubuntu kernel: [ 272.685009] b772f908 00000004 f3f0de78 c103fcad f3f0dec0 f9a6c7b7 00000001 00000000 Aug 13 07:27:05 ubuntu kernel: [ 272.685013] 00000001 f3f0deb0 f3f0deac 00000908 f3e351b8 f30a0cb0 f3e35180 ffc6f000 Aug 13 07:27:05 ubuntu kernel: [ 272.685017] f9a76560 f3c4f4d0 f5ea2720 00000000 00000b58 f846f001 f3f0df64 f9a6d469 Aug 13 07:27:05 ubuntu kernel: [ 272.685021] Call Trace: Aug 13 07:27:05 ubuntu kernel: [ 272.685026] [] kunmap+0x3d/0x50 Aug 13 07:27:05 ubuntu kernel: [ 272.685031] [] gtp_task_read+0x257/0x2d0 [gtp] Aug 13 07:27:05 ubuntu kernel: [ 272.685036] [] gtp_write+0xbe9/0x1594 [gtp] Aug 13 07:27:05 ubuntu kernel: [ 272.685039] [] ? handle_mm_fault+0x1e2/0x280 Aug 13 07:27:05 ubuntu kernel: [ 272.685045] [] ? apparmor_file_permission+0x16/0x20 Aug 13 07:27:05 ubuntu kernel: [ 272.685049] [] ? security_file_permission+0x24/0xb0 Aug 13 07:27:05 ubuntu kernel: [ 272.685053] [] ? rw_verify_area+0x6c/0x120 Aug 13 07:27:05 ubuntu kernel: [ 272.685055] [] vfs_write+0x8f/0x160 Aug 13 07:27:05 ubuntu kernel: [ 272.685058] [] ? gtp_task_handler_read+0x50/0x50 [gtp] Aug 13 07:27:05 ubuntu kernel: [ 272.685061] [] sys_write+0x3d/0x70 Aug 13 07:27:05 ubuntu kernel: [ 272.685066] [] sysenter_do_call+0x12/0x28 Aug 13 07:27:05 ubuntu kernel: [ 272.685067] Code: 90 85 db 74 1b b9 01 00 00 00 ba 03 00 00 00 b8 ac e4 87 c1 c7 04 24 00 00 00 00 e8 b1 c4 f4 ff 83 c4 04 5b 5d c3 8d 76 00 0f 0b <0f> 0b 8d 74 26 00 55 89 e5 56 53 66 66 66 66 90 31 db e8 7f 9d Aug 13 07:27:05 ubuntu kernel: [ 272.685094] EIP: [] kunmap_high+0x9a/0xa0 SS:ESP 0068:f3f0de68 Aug 13 07:27:05 ubuntu kernel: [ 272.685099] ---[ end trace 8490693194e26d05 ]---

teawater commented 11 years ago

githubissue2

bdixon-mentor commented 11 years ago

This fix resolves the problem I was experiencing when attempting to attach to a userspace process.

teawater commented 11 years ago

24b95ef05c2e81216f5103005d6a40fb32fe690d