diff options
author | Karel Klic <kklic@redhat.com> | 2009-11-20 12:22:36 +0100 |
---|---|---|
committer | Karel Klic <kklic@redhat.com> | 2009-11-20 12:22:36 +0100 |
commit | 18363807e6ffa8dab5a76f40bacac3695985147a (patch) | |
tree | 8195336c29136a4761db501160c9f4620b16aa70 | |
parent | bd60681c8227bc31ef0991e98a9a3e849032c924 (diff) | |
parent | 6ec2390e40ba4b0f6e10a2c8ce858d3431b34964 (diff) | |
download | abrt-18363807e6ffa8dab5a76f40bacac3695985147a.tar.gz abrt-18363807e6ffa8dab5a76f40bacac3695985147a.tar.xz abrt-18363807e6ffa8dab5a76f40bacac3695985147a.zip |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
-rw-r--r-- | examples/not_oops1.right | 1 | ||||
-rw-r--r-- | examples/not_oops2.right | 1 | ||||
-rw-r--r-- | examples/oops1.right | 30 | ||||
-rw-r--r-- | examples/oops3 | 224 | ||||
-rw-r--r-- | examples/oops3.right | 157 | ||||
-rw-r--r-- | inc/CrashTypes.h | 2 | ||||
-rw-r--r-- | lib/Plugins/Bugzilla.cpp | 25 | ||||
-rw-r--r-- | lib/Plugins/Catcut.cpp | 58 | ||||
-rw-r--r-- | lib/Plugins/KerneloopsSysLog.cpp | 196 | ||||
-rw-r--r-- | lib/Plugins/Mailx.cpp | 1 | ||||
-rw-r--r-- | lib/Utils/DebugDump.cpp | 90 | ||||
-rw-r--r-- | lib/Utils/DebugDump.h | 3 | ||||
-rw-r--r-- | lib/Utils/Plugin.h | 12 | ||||
-rw-r--r-- | lib/Utils/make_descr.cpp | 85 | ||||
-rw-r--r-- | po/pa.po | 84 | ||||
-rw-r--r-- | src/Daemon/MiddleWare.cpp | 160 | ||||
-rw-r--r-- | src/Daemon/PluginManager.cpp | 11 | ||||
-rw-r--r-- | src/Gui/CCMainWindow.py | 4 | ||||
-rw-r--r-- | src/Gui/CCReporterDialog.py | 44 | ||||
-rw-r--r-- | src/Gui/ConfBackend.py | 2 | ||||
-rw-r--r-- | src/Gui/PluginsSettingsDialog.py | 4 | ||||
-rw-r--r-- | src/Gui/report.glade | 8 | ||||
-rw-r--r-- | src/Hooks/dumpoops.cpp | 7 |
23 files changed, 833 insertions, 376 deletions
diff --git a/examples/not_oops1.right b/examples/not_oops1.right new file mode 100644 index 00000000..5f2c00f0 --- /dev/null +++ b/examples/not_oops1.right @@ -0,0 +1 @@ +dumpoops: found oopses: 0 diff --git a/examples/not_oops2.right b/examples/not_oops2.right new file mode 100644 index 00000000..5f2c00f0 --- /dev/null +++ b/examples/not_oops2.right @@ -0,0 +1 @@ +dumpoops: found oopses: 0 diff --git a/examples/oops1.right b/examples/oops1.right new file mode 100644 index 00000000..d2754b50 --- /dev/null +++ b/examples/oops1.right @@ -0,0 +1,30 @@ +dumpoops: found oopses: 1 + +Version: 2.6.27.9-159.fc10.i686 +BUG: unable to handle kernel NULL pointer dereference at 00000000 +IP: [<f88dec25>] :radeon:radeon_cp_init_ring_buffer+0x90/0x302 +*pde = 6f5c6067 +Oops: 0000 [#1] SMP. +Modules linked in: r8169 mii fuse nfsd lockd nfs_acl auth_rpcgss exportfs bridge stp bnep sco l2cap bl +Pid: 8003, comm: Xorg Not tainted (2.6.27.9-159.fc10.i686 #1) +EIP: 0060:[<f88dec25>] EFLAGS: 00213246 CPU: 1 +EIP is at radeon_cp_init_ring_buffer+0x90/0x302 [radeon] +EAX: 00000000 EBX: f78b4000 ECX: f78b4000 EDX: 00000000 +ESI: f5dbe800 EDI: 00006458 EBP: f0a0cf18 ESP: f0a0cf08 +DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 +Process Xorg (pid: 8003, ti=f0a0c000 task=f2380000 task.ti=f0a0c000) +Stack: f0a0cf18 f78b4000 f5dbe800 00006458 f0a0cf28 f88e11c7 f8911a24 00000000. + f0a0cf4c f88745f8 f30c3ba0 f5dbe800 f88e114a f5dbe828 f890fd78 f097ac00. + 00000000 f0a0cf68 c049b1c0 00000000 00006458 f097ac00 f097ac00 00000000. +Call Trace: +[<f88e11c7>] ? radeon_cp_resume+0x7d/0xbc [radeon] +[<f88745f8>] ? drm_ioctl+0x1b0/0x225 [drm] +[<f88e114a>] ? radeon_cp_resume+0x0/0xbc [radeon] +[<c049b1c0>] ? vfs_ioctl+0x50/0x69 +[<c049b414>] ? do_vfs_ioctl+0x23b/0x247 +[<c0460a56>] ? audit_syscall_entry+0xf9/0x123 +[<c049b460>] ? sys_ioctl+0x40/0x5c +[<c0403c76>] ? syscall_call+0x7/0xb +======================= +Code: 66 31 d2 09 c2 89 d8 e8 fc e7 ff ff 8b 83 cc 00 00 00 8b 53 34 03 10 8b 86 70 02 00 00 2b 50 44 +EIP: [<f88dec25>] radeon_cp_init_ring_buffer+0x90/0x302 [radeon] SS:ESP 0068:f0a0cf08 diff --git a/examples/oops3 b/examples/oops3 new file mode 100644 index 00000000..570b10ee --- /dev/null +++ b/examples/oops3 @@ -0,0 +1,224 @@ +Nov 19 12:33:40 localhost auditd[1632]: Init complete, auditd 2.0.1 listening for events (startup state enable) +Nov 19 12:33:59 localhost restorecond: Unable to watch (/home/jmoskovc/public_html/*) No such file or directory +Nov 19 12:34:38 localhost kernel: [drm] Num pipes: 1 +Nov 19 12:34:38 localhost kernel: Process 1473(Xorg) has RLIMIT_CORE set to 0 +Nov 19 12:34:38 localhost kernel: Aborting core +Nov 19 12:34:38 localhost kernel: general protection fault: 0000 [#1] SMP +Nov 19 12:34:38 localhost kernel: last sysfs file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq +Nov 19 12:34:38 localhost kernel: CPU 0 +Nov 19 12:34:38 localhost kernel: Modules linked in: ipt_MASQUERADE iptable_nat nf_nat bridge stp llc sunrpc xt_physdev ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 cpufreq_ondemand acpi_cpufreq freq_table dm_multipath kvm_intel kvm snd_hda_codec_analog snd_hda_intel snd_hda_codec btusb snd_hwdep joydev ppdev bluetooth snd_seq arc4 snd_seq_device i2c_i801 thinkpad_acpi hwmon ecb parport_pc irda parport crc_ccitt snd_pcm iTCO_wdt iTCO_vendor_support iwl3945 iwlcore snd_timer snd mac80211 soundcore e1000e cfg80211 snd_page_alloc rfkill yenta_socket rsrc_nonstatic video output radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core [last unloaded: microcode] +Nov 19 12:34:38 localhost kernel: Pid: 1473, comm: Xorg Not tainted 2.6.32-0.51.rc7.git2.fc13.x86_64 #1 2007CTO +Nov 19 12:34:38 localhost kernel: RIP: 0010:[<ffffffffa006c13c>] [<ffffffffa006c13c>] radeon_read_ring_rptr+0x30/0x34 [radeon] +Nov 19 12:34:38 localhost kernel: RSP: 0018:ffff88007a7c5ad0 EFLAGS: 00010202 +Nov 19 12:34:38 localhost kernel: RAX: ffff88006d9a7110 RBX: ffff880037f918d8 RCX: ffffc900068a8000 +Nov 19 12:34:38 localhost kernel: RDX: 0000000000000028 RSI: 6b6b6b6b6b6b6b6b RDI: ffff880037f918d8 +Nov 19 12:34:38 localhost kernel: RBP: ffff88007a7c5ad0 R08: ffff880037f91ae8 R09: 0000000000000010 +Nov 19 12:34:38 localhost kernel: R10: ffffffffffffffff R11: 0000000000000000 R12: 0000000000000010 +Nov 19 12:34:38 localhost kernel: R13: ffff88007950e1b0 R14: ffff880037f91a58 R15: ffff88007950e3a0 +Nov 19 12:34:38 localhost kernel: FS: 00007fbb5a7797e0(0000) GS:ffff880006000000(0000) knlGS:0000000000000000 +Nov 19 12:34:38 localhost kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +Nov 19 12:34:38 localhost kernel: CR2: 00000000005a450c CR3: 0000000001001000 CR4: 00000000000026f0 +Nov 19 12:34:38 localhost kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 +Nov 19 12:34:38 localhost kernel: DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 +Nov 19 12:34:38 localhost kernel: Process Xorg (pid: 1473, threadinfo ffff88007a7c4000, task ffff880079058000) +Nov 19 12:34:38 localhost kernel: Stack: +Nov 19 12:34:38 localhost kernel: ffff88007a7c5ae0 ffffffffa006c156 ffff88007a7c5af8 ffffffffa006c881 +Nov 19 12:34:38 localhost kernel: <0> ffff880037f918d8 ffff88007a7c5b18 ffffffffa006d84a 0000000000000000 +Nov 19 12:34:38 localhost kernel: <0> ffff880037f918d8 ffff88007a7c5b38 ffffffffa00709e5 ffff880037f918d8 +Nov 19 12:34:38 localhost kernel: Call Trace: +Nov 19 12:34:38 localhost kernel: [<ffffffffa006c156>] radeon_get_ring_head+0x16/0x41 [radeon] +Nov 19 12:34:38 localhost kernel: [<ffffffffa006c881>] radeon_commit_ring+0x4d/0x9c [radeon] +Nov 19 12:34:38 localhost kernel: [<ffffffffa006d84a>] radeon_do_cp_idle+0x145/0x152 [radeon] +Nov 19 12:34:38 localhost kernel: [<ffffffffa00709e5>] radeon_apply_surface_regs+0x27/0x13d [radeon] +Nov 19 12:34:38 localhost kernel: [<ffffffffa0070bdd>] free_surface+0xe2/0xf8 [radeon] +Nov 19 12:34:38 localhost kernel: [<ffffffffa0076284>] radeon_driver_lastclose+0x41/0x5b [radeon] +Nov 19 12:34:38 localhost kernel: [<ffffffffa0018f04>] drm_lastclose+0x4f/0x2a0 [drm] +Nov 19 12:34:38 localhost kernel: [<ffffffffa0019997>] drm_release+0x4d6/0x510 [drm] +Nov 19 12:34:38 localhost kernel: [<ffffffff8112b3db>] __fput+0x12a/0x1df +Nov 19 12:34:38 localhost kernel: [<ffffffff8112b4aa>] fput+0x1a/0x1c +Nov 19 12:34:38 localhost kernel: [<ffffffff81127715>] filp_close+0x68/0x72 +Nov 19 12:34:38 localhost kernel: [<ffffffff8105b4be>] put_files_struct+0x6a/0xcc +Nov 19 12:34:38 localhost kernel: [<ffffffff8105b55b>] exit_files+0x3b/0x40 +Nov 19 12:34:38 localhost kernel: [<ffffffff8105ce2b>] do_exit+0x25e/0x77f +Nov 19 12:34:38 localhost kernel: [<ffffffff810891d1>] ? lockstat_clock+0x11/0x13 +Nov 19 12:34:38 localhost kernel: [<ffffffff8147cabb>] ? _spin_unlock_irq+0x30/0x3c +Nov 19 12:34:38 localhost kernel: [<ffffffff8105d3d0>] do_group_exit+0x84/0xb0 +Nov 19 12:34:38 localhost kernel: [<ffffffff8106e1ad>] get_signal_to_deliver+0x356/0x375 +Nov 19 12:34:38 localhost kernel: [<ffffffff81011042>] do_signal+0x72/0x6af +Nov 19 12:34:38 localhost kernel: [<ffffffff81011caa>] ? sysret_check+0x2e/0x69 +Nov 19 12:34:38 localhost kernel: [<ffffffff8108a863>] ? trace_hardirqs_on_caller+0x111/0x135 +Nov 19 12:34:38 localhost kernel: [<ffffffff810b568e>] ? audit_syscall_entry+0x11e/0x14a +Nov 19 12:34:38 localhost kernel: [<ffffffff8147c67d>] ? trace_hardirqs_on_thunk+0x3a/0x3f +Nov 19 12:34:38 localhost kernel: [<ffffffff81011d09>] ? sysret_signal+0x5/0x4e +Nov 19 12:34:38 localhost kernel: [<ffffffff810116a9>] do_notify_resume+0x2a/0x7c +Nov 19 12:34:38 localhost kernel: [<ffffffff81011fc1>] int_signal+0x12/0x17 +Nov 19 12:34:38 localhost kernel: Code: 1f 44 00 00 f6 87 0e 04 00 00 08 48 8b 87 10 01 00 00 74 0a 89 f6 48 03 70 18 8b 06 eb 0f c1 ee 02 89 f6 48 c1 e6 02 48 03 70 18 <8b> 06 c9 c3 55 48 89 e5 0f 1f 44 00 00 83 7f 74 00 74 09 31 f6 +Nov 19 12:34:38 localhost kernel: RIP [<ffffffffa006c13c>] radeon_read_ring_rptr+0x30/0x34 [radeon] +Nov 19 12:34:38 localhost kernel: RSP <ffff88007a7c5ad0> +Nov 19 12:34:38 localhost kernel: ---[ end trace f1c5b8d28f1b5165 ]--- +Nov 19 12:34:38 localhost kernel: Fixing recursive fault but reboot is needed! +Nov 19 12:34:56 localhost dnsmasq[1471]: reading /etc/resolv.conf +Nov 19 12:34:56 localhost dnsmasq[1471]: using nameserver 10.11.255.27#53 +Nov 19 12:34:56 localhost dnsmasq[1471]: using nameserver 10.34.255.7#53 +Nov 19 12:34:56 localhost dnsmasq[1471]: using nameserver 10.32.63.5#53 +Nov 19 12:34:56 localhost dnsmasq[1471]: using nameserver 10.34.32.125#53 +Nov 19 12:35:05 localhost init: tty4 main process (1411) killed by TERM signal +Nov 19 12:35:05 localhost init: tty5 main process (1412) killed by TERM signal +Nov 19 12:35:05 localhost init: tty2 main process (1413) killed by TERM signal +Nov 19 12:35:05 localhost init: tty3 main process (1416) killed by TERM signal +Nov 19 12:35:05 localhost init: tty6 main process (1417) killed by TERM signal +Nov 19 12:37:09 localhost dnsmasq[1530]: reading /etc/resolv.conf +Nov 19 12:37:09 localhost dnsmasq[1530]: using nameserver 10.11.255.27#53 +Nov 19 12:37:09 localhost dnsmasq[1530]: using nameserver 10.34.255.7#53 +Nov 19 12:37:09 localhost dnsmasq[1530]: using nameserver 10.32.63.5#53 +Nov 19 12:37:09 localhost dnsmasq[1530]: using nameserver 10.34.32.125#53 +Nov 19 12:38:08 localhost abrtd: Directory 'kerneloops-1258630688-1' creation detected +Nov 19 12:38:08 localhost abrtd: Getting local universal unique identification +Nov 19 12:38:08 localhost abrtd: New crash, saving +Nov 19 12:38:08 localhost abrtd: Activation of plugin 'RunApp' was not successful: Plugin 'RunApp' is not registered +Nov 19 12:39:46 localhost abrtd: Getting crash infos... +Nov 19 12:39:51 localhost abrtd: Creating report... +Nov 19 12:39:51 localhost abrtd: Getting local universal unique identification +Nov 19 12:39:51 localhost abrtd: Getting local universal unique identification +Nov 19 12:39:52 localhost kernel: [drm] Num pipes: 1 +Nov 19 12:39:52 localhost kernel: Process 1525(Xorg) has RLIMIT_CORE set to 0 +Nov 19 12:39:52 localhost kernel: Aborting core +Nov 19 12:39:52 localhost kernel: general protection fault: 0000 [#1] SMP +Nov 19 12:39:52 localhost kernel: last sysfs file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq +Nov 19 12:39:52 localhost kernel: CPU 0 +Nov 19 12:39:52 localhost kernel: Modules linked in: ipt_MASQUERADE iptable_nat nf_nat bridge stp llc sunrpc xt_physdev ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 cpufreq_ondemand acpi_cpufreq freq_table dm_multipath kvm_intel kvm arc4 snd_hda_codec_analog ecb snd_hda_intel snd_hda_codec iwl3945 snd_hwdep iwlcore snd_seq snd_seq_device mac80211 snd_pcm btusb snd_timer bluetooth snd iTCO_wdt soundcore iTCO_vendor_support ppdev thinkpad_acpi cfg80211 e1000e snd_page_alloc joydev i2c_i801 parport_pc irda hwmon parport rfkill crc_ccitt yenta_socket rsrc_nonstatic video output radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core [last unloaded: microcode] +Nov 19 12:39:52 localhost kernel: Pid: 1525, comm: Xorg Not tainted 2.6.32-0.51.rc7.git2.fc13.x86_64 #1 2007CTO +Nov 19 12:39:52 localhost kernel: RIP: 0010:[<ffffffffa006c13c>] [<ffffffffa006c13c>] radeon_read_ring_rptr+0x30/0x34 [radeon] +Nov 19 12:39:52 localhost kernel: RSP: 0018:ffff88007a3d9ad0 EFLAGS: 00010202 +Nov 19 12:39:52 localhost kernel: RAX: ffff88007a398198 RBX: ffff88007921b1b0 RCX: ffffc90006952000 +Nov 19 12:39:52 localhost kernel: RDX: 0000000000000028 RSI: 6b6b6b6b6b6b6b6b RDI: ffff88007921b1b0 +Nov 19 12:39:52 localhost kernel: RBP: ffff88007a3d9ad0 R08: ffff88007921b3c0 R09: 0000000000000010 +Nov 19 12:39:52 localhost kernel: R10: ffffffffffffffff R11: 0000000000000000 R12: 0000000000000010 +Nov 19 12:39:52 localhost kernel: R13: ffff8800794dd168 R14: ffff88007921b330 R15: ffff8800794dd358 +Nov 19 12:39:52 localhost kernel: FS: 00007fb32c7687e0(0000) GS:ffff880006000000(0000) knlGS:0000000000000000 +Nov 19 12:39:52 localhost kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +Nov 19 12:39:52 localhost kernel: CR2: 00000000007cc4b0 CR3: 0000000001001000 CR4: 00000000000026f0 +Nov 19 12:39:52 localhost kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 +Nov 19 12:39:52 localhost kernel: DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 +Nov 19 12:39:52 localhost kernel: Process Xorg (pid: 1525, threadinfo ffff88007a3d8000, task ffff880069d4c9c0) +Nov 19 12:39:52 localhost kernel: Stack: +Nov 19 12:39:52 localhost kernel: ffff88007a3d9ae0 ffffffffa006c156 ffff88007a3d9af8 ffffffffa006c881 +Nov 19 12:39:52 localhost kernel: <0> ffff88007921b1b0 ffff88007a3d9b18 ffffffffa006d84a 0000000000000000 +Nov 19 12:39:52 localhost kernel: <0> ffff88007921b1b0 ffff88007a3d9b38 ffffffffa00709e5 ffff88007921b1b0 +Nov 19 12:39:52 localhost kernel: Call Trace: +Nov 19 12:39:52 localhost kernel: [<ffffffffa006c156>] radeon_get_ring_head+0x16/0x41 [radeon] +Nov 19 12:39:52 localhost kernel: [<ffffffffa006c881>] radeon_commit_ring+0x4d/0x9c [radeon] +Nov 19 12:39:52 localhost kernel: [<ffffffffa006d84a>] radeon_do_cp_idle+0x145/0x152 [radeon] +Nov 19 12:39:52 localhost kernel: [<ffffffffa00709e5>] radeon_apply_surface_regs+0x27/0x13d [radeon] +Nov 19 12:39:52 localhost kernel: [<ffffffffa0070bdd>] free_surface+0xe2/0xf8 [radeon] +Nov 19 12:39:52 localhost kernel: [<ffffffffa0076284>] radeon_driver_lastclose+0x41/0x5b [radeon] +Nov 19 12:39:52 localhost kernel: [<ffffffffa0018f04>] drm_lastclose+0x4f/0x2a0 [drm] +Nov 19 12:39:52 localhost kernel: [<ffffffffa0019997>] drm_release+0x4d6/0x510 [drm] +Nov 19 12:39:52 localhost kernel: [<ffffffff8112b3db>] __fput+0x12a/0x1df +Nov 19 12:39:52 localhost kernel: [<ffffffff8112b4aa>] fput+0x1a/0x1c +Nov 19 12:39:52 localhost kernel: [<ffffffff81127715>] filp_close+0x68/0x72 +Nov 19 12:39:52 localhost kernel: [<ffffffff8105b4be>] put_files_struct+0x6a/0xcc +Nov 19 12:39:52 localhost kernel: [<ffffffff8105b55b>] exit_files+0x3b/0x40 +Nov 19 12:39:52 localhost kernel: [<ffffffff8105ce2b>] do_exit+0x25e/0x77f +Nov 19 12:39:52 localhost kernel: [<ffffffff810891d1>] ? lockstat_clock+0x11/0x13 +Nov 19 12:39:52 localhost kernel: [<ffffffff8147cabb>] ? _spin_unlock_irq+0x30/0x3c +Nov 19 12:39:52 localhost kernel: [<ffffffff8105d3d0>] do_group_exit+0x84/0xb0 +Nov 19 12:39:52 localhost kernel: [<ffffffff8106e1ad>] get_signal_to_deliver+0x356/0x375 +Nov 19 12:39:52 localhost kernel: [<ffffffff81011042>] do_signal+0x72/0x6af +Nov 19 12:39:52 localhost kernel: [<ffffffff81011caa>] ? sysret_check+0x2e/0x69 +Nov 19 12:39:52 localhost kernel: [<ffffffff8108a863>] ? trace_hardirqs_on_caller+0x111/0x135 +Nov 19 12:39:52 localhost kernel: [<ffffffff810b568e>] ? audit_syscall_entry+0x11e/0x14a +Nov 19 12:39:52 localhost kernel: [<ffffffff8147c67d>] ? trace_hardirqs_on_thunk+0x3a/0x3f +Nov 19 12:39:52 localhost kernel: [<ffffffff81011d09>] ? sysret_signal+0x5/0x4e +Nov 19 12:39:52 localhost kernel: [<ffffffff810116a9>] do_notify_resume+0x2a/0x7c +Nov 19 12:39:52 localhost kernel: [<ffffffff81011fc1>] int_signal+0x12/0x17 +Nov 19 12:39:52 localhost kernel: Code: 1f 44 00 00 f6 87 0e 04 00 00 08 48 8b 87 10 01 00 00 74 0a 89 f6 48 03 70 18 8b 06 eb 0f c1 ee 02 89 f6 48 c1 e6 02 48 03 70 18 <8b> 06 c9 c3 55 48 89 e5 0f 1f 44 00 00 83 7f 74 00 74 09 31 f6 +Nov 19 12:39:52 localhost kernel: RIP [<ffffffffa006c13c>] radeon_read_ring_rptr+0x30/0x34 [radeon] +Nov 19 12:39:52 localhost kernel: RSP <ffff88007a3d9ad0> +Nov 19 12:39:52 localhost kernel: ---[ end trace 371f75a80de6ae14 ]--- +Nov 19 12:39:52 localhost kernel: Fixing recursive fault but reboot is needed! +Nov 19 12:40:02 localhost init: tty4 main process (1471) killed by TERM signal +Nov 19 12:40:02 localhost init: tty5 main process (1473) killed by TERM signal +Nov 19 12:40:02 localhost init: tty2 main process (1474) killed by TERM signal +Nov 19 12:40:02 localhost init: tty3 main process (1475) killed by TERM signal +Nov 19 12:40:02 localhost init: tty6 main process (1476) killed by TERM signal +Nov 19 12:40:02 localhost avahi-daemon[1097]: Got SIGTERM, quitting. +Nov 19 16:02:36 localhost kernel: [drm] Setting GART location based on new memory map +Nov 19 16:02:36 localhost kernel: [drm] Loading R500 Microcode +Nov 19 16:02:36 localhost kernel: platform radeon_cp.0: firmware: requesting radeon/R520_cp.bin +Nov 19 16:02:36 localhost kernel: [drm] Num pipes: 1 +Nov 19 16:02:36 localhost kernel: [drm] writeback test succeeded in 1 usecs +Nov 19 16:02:36 localhost avahi-daemon[1051]: Registering new address record for fec0::f101:215:58ff:fec8:1bf on eth0.*. +Nov 19 16:02:36 localhost avahi-daemon[1051]: Withdrawing address record for fe80::215:58ff:fec8:1bf on eth0. +Nov 19 16:02:37 localhost ntpd[1337]: Listening on interface #7 eth0, fec0::f101:215:58ff:fec8:1bf#123 Enabled +Nov 19 16:02:43 localhost gnome-session[1600]: WARNING: Could not launch application 'gnome-power-manager.desktop': Unable to start application: Failed to execute child process "gnome-power-manager" (No such file or directory) +Nov 19 16:02:45 localhost auditd[1662]: Started dispatcher: /sbin/audispd pid: 1664 +Nov 19 16:02:45 localhost audispd: audispd initialized with q_depth=80 and 1 active plugins +Nov 19 16:02:45 localhost auditd[1662]: Init complete, auditd 2.0.1 listening for events (startup state enable) +Nov 19 16:02:46 localhost kernel: CE: hpet increasing min_delta_ns to 15000 nsec +Nov 19 16:03:39 localhost restorecond: Unable to watch (/home/jmoskovc/public_html/*) No such file or directory +Nov 19 16:04:03 localhost kernel: [drm] Num pipes: 1 +Nov 19 16:04:04 localhost kernel: Process 1503(Xorg) has RLIMIT_CORE set to 0 +Nov 19 16:04:04 localhost kernel: Aborting core +Nov 19 16:04:04 localhost kernel: general protection fault: 0000 [#1] SMP +Nov 19 16:04:04 localhost kernel: last sysfs file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq +Nov 19 16:04:04 localhost kernel: CPU 1 +Nov 19 16:04:04 localhost kernel: Modules linked in: ipt_MASQUERADE iptable_nat nf_nat bridge stp llc vboxnetadp vboxnetflt vboxdrv sunrpc xt_physdev ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 cpufreq_ondemand acpi_cpufreq freq_table dm_multipath kvm_intel kvm snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device arc4 ppdev snd_pcm btusb ecb bluetooth irda crc_ccitt thinkpad_acpi hwmon parport_pc parport joydev i2c_i801 iwl3945 iwlcore mac80211 snd_timer iTCO_wdt cfg80211 iTCO_vendor_support snd rfkill soundcore e1000e snd_page_alloc yenta_socket rsrc_nonstatic video output radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core [last unloaded: microcode] +Nov 19 16:04:04 localhost kernel: Pid: 1503, comm: Xorg Not tainted 2.6.32-0.51.rc7.git2.fc13.x86_64 #1 2007CTO +Nov 19 16:04:04 localhost kernel: RIP: 0010:[<ffffffffa006c13c>] [<ffffffffa006c13c>] radeon_read_ring_rptr+0x30/0x34 [radeon] +Nov 19 16:04:04 localhost kernel: RSP: 0018:ffff88007a3b3ad0 EFLAGS: 00010202 +Nov 19 16:04:04 localhost kernel: RAX: ffff88007a239088 RBX: ffff8800792b8848 RCX: ffffc90006dfe000 +Nov 19 16:04:04 localhost kernel: RDX: 0000000000000028 RSI: 6b6b6b6b6b6b6b6b RDI: ffff8800792b8848 +Nov 19 16:04:04 localhost kernel: RBP: ffff88007a3b3ad0 R08: ffff8800792b8a58 R09: 0000000000000010 +Nov 19 16:04:04 localhost kernel: R10: ffffffffffffffff R11: 0000000000000000 R12: 0000000000000010 +Nov 19 16:04:04 localhost kernel: R13: ffff88007950e1b0 R14: ffff8800792b89c8 R15: ffff88007950e3a0 +Nov 19 16:04:04 localhost kernel: FS: 00007f1802da67e0(0000) GS:ffff880006200000(0000) knlGS:0000000000000000 +Nov 19 16:04:04 localhost kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +Nov 19 16:04:04 localhost kernel: CR2: 00000000007cc4b0 CR3: 0000000001001000 CR4: 00000000000026e0 +Nov 19 16:04:04 localhost kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 +Nov 19 16:04:04 localhost kernel: DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 +Nov 19 16:04:04 localhost kernel: Process Xorg (pid: 1503, threadinfo ffff88007a3b2000, task ffff880079c9c9c0) +Nov 19 16:04:04 localhost kernel: Stack: +Nov 19 16:04:04 localhost kernel: ffff88007a3b3ae0 ffffffffa006c156 ffff88007a3b3af8 ffffffffa006c881 +Nov 19 16:04:04 localhost kernel: <0> ffff8800792b8848 ffff88007a3b3b18 ffffffffa006d84a 0000000000000000 +Nov 19 16:04:04 localhost kernel: <0> ffff8800792b8848 ffff88007a3b3b38 ffffffffa00709e5 ffff8800792b8848 +Nov 19 16:04:04 localhost kernel: Call Trace: +Nov 19 16:04:04 localhost kernel: [<ffffffffa006c156>] radeon_get_ring_head+0x16/0x41 [radeon] +Nov 19 16:04:04 localhost kernel: [<ffffffffa006c881>] radeon_commit_ring+0x4d/0x9c [radeon] +Nov 19 16:04:04 localhost kernel: [<ffffffffa006d84a>] radeon_do_cp_idle+0x145/0x152 [radeon] +Nov 19 16:04:04 localhost kernel: [<ffffffffa00709e5>] radeon_apply_surface_regs+0x27/0x13d [radeon] +Nov 19 16:04:04 localhost kernel: [<ffffffffa0070bdd>] free_surface+0xe2/0xf8 [radeon] +Nov 19 16:04:04 localhost kernel: [<ffffffffa0076284>] radeon_driver_lastclose+0x41/0x5b [radeon] +Nov 19 16:04:04 localhost kernel: [<ffffffffa0018f04>] drm_lastclose+0x4f/0x2a0 [drm] +Nov 19 16:04:04 localhost kernel: [<ffffffffa0019997>] drm_release+0x4d6/0x510 [drm] +Nov 19 16:04:04 localhost kernel: [<ffffffff8112b3db>] __fput+0x12a/0x1df +Nov 19 16:04:04 localhost kernel: [<ffffffff8112b4aa>] fput+0x1a/0x1c +Nov 19 16:04:04 localhost kernel: [<ffffffff81127715>] filp_close+0x68/0x72 +Nov 19 16:04:04 localhost kernel: [<ffffffff8105b4be>] put_files_struct+0x6a/0xcc +Nov 19 16:04:04 localhost kernel: [<ffffffff8105b55b>] exit_files+0x3b/0x40 +Nov 19 16:04:04 localhost kernel: [<ffffffff8105ce2b>] do_exit+0x25e/0x77f +Nov 19 16:04:04 localhost kernel: [<ffffffff810891d1>] ? lockstat_clock+0x11/0x13 +Nov 19 16:04:04 localhost kernel: [<ffffffff8147cabb>] ? _spin_unlock_irq+0x30/0x3c +Nov 19 16:04:04 localhost kernel: [<ffffffff8105d3d0>] do_group_exit+0x84/0xb0 +Nov 19 16:04:04 localhost kernel: [<ffffffff8106e1ad>] get_signal_to_deliver+0x356/0x375 +Nov 19 16:04:04 localhost kernel: [<ffffffff81011042>] do_signal+0x72/0x6af +Nov 19 16:04:04 localhost kernel: [<ffffffff81011caa>] ? sysret_check+0x2e/0x69 +Nov 19 16:04:04 localhost kernel: [<ffffffff8108a863>] ? trace_hardirqs_on_caller+0x111/0x135 +Nov 19 16:04:04 localhost kernel: [<ffffffff810b568e>] ? audit_syscall_entry+0x11e/0x14a +Nov 19 16:04:04 localhost kernel: [<ffffffff8147c67d>] ? trace_hardirqs_on_thunk+0x3a/0x3f +Nov 19 16:04:04 localhost kernel: [<ffffffff81011d09>] ? sysret_signal+0x5/0x4e +Nov 19 16:04:04 localhost kernel: [<ffffffff810116a9>] do_notify_resume+0x2a/0x7c +Nov 19 16:04:04 localhost kernel: [<ffffffff81011fc1>] int_signal+0x12/0x17 +Nov 19 16:04:04 localhost kernel: Code: 1f 44 00 00 f6 87 0e 04 00 00 08 48 8b 87 10 01 00 00 74 0a 89 f6 48 03 70 18 8b 06 eb 0f c1 ee 02 89 f6 48 c1 e6 02 48 03 70 18 <8b> 06 c9 c3 55 48 89 e5 0f 1f 44 00 00 83 7f 74 00 74 09 31 f6 +Nov 19 16:04:04 localhost kernel: RIP [<ffffffffa006c13c>] radeon_read_ring_rptr+0x30/0x34 [radeon] +Nov 19 16:04:04 localhost kernel: RSP <ffff88007a3b3ad0> +Nov 19 16:04:04 localhost kernel: ---[ end trace f5193fb73929a56e ]--- +Nov 19 16:04:04 localhost kernel: Fixing recursive fault but reboot is needed! +Nov 19 16:04:31 localhost abrtd: Directory 'kerneloops-1258643071-1' creation detected +Nov 19 16:04:31 localhost abrtd: Getting local universal unique identification +Nov 19 16:04:31 localhost abrtd: New crash, saving +Nov 19 16:04:31 localhost abrtd: Activation of plugin 'RunApp' was not successful: Plugin 'RunApp' is not registered +Nov 19 16:04:32 localhost kernel: ACPI: \_SB_.GDCK - undocking +Nov 19 16:04:32 localhost kernel: usb 1-6: USB disconnect, address 2 +Nov 19 16:04:32 localhost kernel: usb 1-6.4: USB disconnect, address 5 +Nov 19 16:04:34 localhost kernel: e1000e: eth0 NIC Link is Down diff --git a/examples/oops3.right b/examples/oops3.right new file mode 100644 index 00000000..a7711674 --- /dev/null +++ b/examples/oops3.right @@ -0,0 +1,157 @@ +dumpoops: found oopses: 3 + +Version: 2.6.32-0.51.rc7.git2.fc13.x86_64 +general protection fault: 0000 [#1] SMP +last sysfs file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq +CPU 0 +Modules linked in: ipt_MASQUERADE iptable_nat nf_nat bridge stp llc sunrpc xt_physdev ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 cpufreq_ondemand acpi_cpufreq freq_table dm_multipath kvm_intel kvm snd_hda_codec_analog snd_hda_intel snd_hda_codec btusb snd_hwdep joydev ppdev bluetooth snd_seq arc4 snd_seq_device i2c_i801 thinkpad_acpi hwmon ecb parport_pc irda parport crc_ccitt snd_pcm iTCO_wdt iTCO_vendor_support iwl3945 iwlcore snd_timer snd mac80211 soundcore e1000e cfg80211 snd_page_alloc rfkill yenta_socket rsrc_nonstatic video output radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core [last unloaded: microcode] +Pid: 1473, comm: Xorg Not tainted 2.6.32-0.51.rc7.git2.fc13.x86_64 #1 2007CTO +RIP: 0010:[<ffffffffa006c13c>] [<ffffffffa006c13c>] radeon_read_ring_rptr+0x30/0x34 [radeon] +RSP: 0018:ffff88007a7c5ad0 EFLAGS: 00010202 +RAX: ffff88006d9a7110 RBX: ffff880037f918d8 RCX: ffffc900068a8000 +RDX: 0000000000000028 RSI: 6b6b6b6b6b6b6b6b RDI: ffff880037f918d8 +RBP: ffff88007a7c5ad0 R08: ffff880037f91ae8 R09: 0000000000000010 +R10: ffffffffffffffff R11: 0000000000000000 R12: 0000000000000010 +R13: ffff88007950e1b0 R14: ffff880037f91a58 R15: ffff88007950e3a0 +FS: 00007fbb5a7797e0(0000) GS:ffff880006000000(0000) knlGS:0000000000000000 +CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +CR2: 00000000005a450c CR3: 0000000001001000 CR4: 00000000000026f0 +DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 +DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 +Process Xorg (pid: 1473, threadinfo ffff88007a7c4000, task ffff880079058000) +Stack: +ffff88007a7c5ae0 ffffffffa006c156 ffff88007a7c5af8 ffffffffa006c881 + ffff880037f918d8 ffff88007a7c5b18 ffffffffa006d84a 0000000000000000 + ffff880037f918d8 ffff88007a7c5b38 ffffffffa00709e5 ffff880037f918d8 +Call Trace: +[<ffffffffa006c156>] radeon_get_ring_head+0x16/0x41 [radeon] +[<ffffffffa006c881>] radeon_commit_ring+0x4d/0x9c [radeon] +[<ffffffffa006d84a>] radeon_do_cp_idle+0x145/0x152 [radeon] +[<ffffffffa00709e5>] radeon_apply_surface_regs+0x27/0x13d [radeon] +[<ffffffffa0070bdd>] free_surface+0xe2/0xf8 [radeon] +[<ffffffffa0076284>] radeon_driver_lastclose+0x41/0x5b [radeon] +[<ffffffffa0018f04>] drm_lastclose+0x4f/0x2a0 [drm] +[<ffffffffa0019997>] drm_release+0x4d6/0x510 [drm] +[<ffffffff8112b3db>] __fput+0x12a/0x1df +[<ffffffff8112b4aa>] fput+0x1a/0x1c +[<ffffffff81127715>] filp_close+0x68/0x72 +[<ffffffff8105b4be>] put_files_struct+0x6a/0xcc +[<ffffffff8105b55b>] exit_files+0x3b/0x40 +[<ffffffff8105ce2b>] do_exit+0x25e/0x77f +[<ffffffff810891d1>] ? lockstat_clock+0x11/0x13 +[<ffffffff8147cabb>] ? _spin_unlock_irq+0x30/0x3c +[<ffffffff8105d3d0>] do_group_exit+0x84/0xb0 +[<ffffffff8106e1ad>] get_signal_to_deliver+0x356/0x375 +[<ffffffff81011042>] do_signal+0x72/0x6af +[<ffffffff81011caa>] ? sysret_check+0x2e/0x69 +[<ffffffff8108a863>] ? trace_hardirqs_on_caller+0x111/0x135 +[<ffffffff810b568e>] ? audit_syscall_entry+0x11e/0x14a +[<ffffffff8147c67d>] ? trace_hardirqs_on_thunk+0x3a/0x3f +[<ffffffff81011d09>] ? sysret_signal+0x5/0x4e +[<ffffffff810116a9>] do_notify_resume+0x2a/0x7c +[<ffffffff81011fc1>] int_signal+0x12/0x17 +Code: 1f 44 00 00 f6 87 0e 04 00 00 08 48 8b 87 10 01 00 00 74 0a 89 f6 48 03 70 18 8b 06 eb 0f c1 ee 02 89 f6 48 c1 e6 02 48 03 70 18 <8b> 06 c9 c3 55 48 89 e5 0f 1f 44 00 00 83 7f 74 00 74 09 31 f6 + +Version: 2.6.32-0.51.rc7.git2.fc13.x86_64 +general protection fault: 0000 [#1] SMP +last sysfs file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq +CPU 0 +Modules linked in: ipt_MASQUERADE iptable_nat nf_nat bridge stp llc sunrpc xt_physdev ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 cpufreq_ondemand acpi_cpufreq freq_table dm_multipath kvm_intel kvm arc4 snd_hda_codec_analog ecb snd_hda_intel snd_hda_codec iwl3945 snd_hwdep iwlcore snd_seq snd_seq_device mac80211 snd_pcm btusb snd_timer bluetooth snd iTCO_wdt soundcore iTCO_vendor_support ppdev thinkpad_acpi cfg80211 e1000e snd_page_alloc joydev i2c_i801 parport_pc irda hwmon parport rfkill crc_ccitt yenta_socket rsrc_nonstatic video output radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core [last unloaded: microcode] +Pid: 1525, comm: Xorg Not tainted 2.6.32-0.51.rc7.git2.fc13.x86_64 #1 2007CTO +RIP: 0010:[<ffffffffa006c13c>] [<ffffffffa006c13c>] radeon_read_ring_rptr+0x30/0x34 [radeon] +RSP: 0018:ffff88007a3d9ad0 EFLAGS: 00010202 +RAX: ffff88007a398198 RBX: ffff88007921b1b0 RCX: ffffc90006952000 +RDX: 0000000000000028 RSI: 6b6b6b6b6b6b6b6b RDI: ffff88007921b1b0 +RBP: ffff88007a3d9ad0 R08: ffff88007921b3c0 R09: 0000000000000010 +R10: ffffffffffffffff R11: 0000000000000000 R12: 0000000000000010 +R13: ffff8800794dd168 R14: ffff88007921b330 R15: ffff8800794dd358 +FS: 00007fb32c7687e0(0000) GS:ffff880006000000(0000) knlGS:0000000000000000 +CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +CR2: 00000000007cc4b0 CR3: 0000000001001000 CR4: 00000000000026f0 +DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 +DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 +Process Xorg (pid: 1525, threadinfo ffff88007a3d8000, task ffff880069d4c9c0) +Stack: +ffff88007a3d9ae0 ffffffffa006c156 ffff88007a3d9af8 ffffffffa006c881 + ffff88007921b1b0 ffff88007a3d9b18 ffffffffa006d84a 0000000000000000 + ffff88007921b1b0 ffff88007a3d9b38 ffffffffa00709e5 ffff88007921b1b0 +Call Trace: +[<ffffffffa006c156>] radeon_get_ring_head+0x16/0x41 [radeon] +[<ffffffffa006c881>] radeon_commit_ring+0x4d/0x9c [radeon] +[<ffffffffa006d84a>] radeon_do_cp_idle+0x145/0x152 [radeon] +[<ffffffffa00709e5>] radeon_apply_surface_regs+0x27/0x13d [radeon] +[<ffffffffa0070bdd>] free_surface+0xe2/0xf8 [radeon] +[<ffffffffa0076284>] radeon_driver_lastclose+0x41/0x5b [radeon] +[<ffffffffa0018f04>] drm_lastclose+0x4f/0x2a0 [drm] +[<ffffffffa0019997>] drm_release+0x4d6/0x510 [drm] +[<ffffffff8112b3db>] __fput+0x12a/0x1df +[<ffffffff8112b4aa>] fput+0x1a/0x1c +[<ffffffff81127715>] filp_close+0x68/0x72 +[<ffffffff8105b4be>] put_files_struct+0x6a/0xcc +[<ffffffff8105b55b>] exit_files+0x3b/0x40 +[<ffffffff8105ce2b>] do_exit+0x25e/0x77f +[<ffffffff810891d1>] ? lockstat_clock+0x11/0x13 +[<ffffffff8147cabb>] ? _spin_unlock_irq+0x30/0x3c +[<ffffffff8105d3d0>] do_group_exit+0x84/0xb0 +[<ffffffff8106e1ad>] get_signal_to_deliver+0x356/0x375 +[<ffffffff81011042>] do_signal+0x72/0x6af +[<ffffffff81011caa>] ? sysret_check+0x2e/0x69 +[<ffffffff8108a863>] ? trace_hardirqs_on_caller+0x111/0x135 +[<ffffffff810b568e>] ? audit_syscall_entry+0x11e/0x14a +[<ffffffff8147c67d>] ? trace_hardirqs_on_thunk+0x3a/0x3f +[<ffffffff81011d09>] ? sysret_signal+0x5/0x4e +[<ffffffff810116a9>] do_notify_resume+0x2a/0x7c +[<ffffffff81011fc1>] int_signal+0x12/0x17 +Code: 1f 44 00 00 f6 87 0e 04 00 00 08 48 8b 87 10 01 00 00 74 0a 89 f6 48 03 70 18 8b 06 eb 0f c1 ee 02 89 f6 48 c1 e6 02 48 03 70 18 <8b> 06 c9 c3 55 48 89 e5 0f 1f 44 00 00 83 7f 74 00 74 09 31 f6 + +Version: 2.6.32-0.51.rc7.git2.fc13.x86_64 +general protection fault: 0000 [#1] SMP +last sysfs file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq +CPU 1 +Modules linked in: ipt_MASQUERADE iptable_nat nf_nat bridge stp llc vboxnetadp vboxnetflt vboxdrv sunrpc xt_physdev ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 cpufreq_ondemand acpi_cpufreq freq_table dm_multipath kvm_intel kvm snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device arc4 ppdev snd_pcm btusb ecb bluetooth irda crc_ccitt thinkpad_acpi hwmon parport_pc parport joydev i2c_i801 iwl3945 iwlcore mac80211 snd_timer iTCO_wdt cfg80211 iTCO_vendor_support snd rfkill soundcore e1000e snd_page_alloc yenta_socket rsrc_nonstatic video output radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core [last unloaded: microcode] +Pid: 1503, comm: Xorg Not tainted 2.6.32-0.51.rc7.git2.fc13.x86_64 #1 2007CTO +RIP: 0010:[<ffffffffa006c13c>] [<ffffffffa006c13c>] radeon_read_ring_rptr+0x30/0x34 [radeon] +RSP: 0018:ffff88007a3b3ad0 EFLAGS: 00010202 +RAX: ffff88007a239088 RBX: ffff8800792b8848 RCX: ffffc90006dfe000 +RDX: 0000000000000028 RSI: 6b6b6b6b6b6b6b6b RDI: ffff8800792b8848 +RBP: ffff88007a3b3ad0 R08: ffff8800792b8a58 R09: 0000000000000010 +R10: ffffffffffffffff R11: 0000000000000000 R12: 0000000000000010 +R13: ffff88007950e1b0 R14: ffff8800792b89c8 R15: ffff88007950e3a0 +FS: 00007f1802da67e0(0000) GS:ffff880006200000(0000) knlGS:0000000000000000 +CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +CR2: 00000000007cc4b0 CR3: 0000000001001000 CR4: 00000000000026e0 +DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 +DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 +Process Xorg (pid: 1503, threadinfo ffff88007a3b2000, task ffff880079c9c9c0) +Stack: +ffff88007a3b3ae0 ffffffffa006c156 ffff88007a3b3af8 ffffffffa006c881 + ffff8800792b8848 ffff88007a3b3b18 ffffffffa006d84a 0000000000000000 + ffff8800792b8848 ffff88007a3b3b38 ffffffffa00709e5 ffff8800792b8848 +Call Trace: +[<ffffffffa006c156>] radeon_get_ring_head+0x16/0x41 [radeon] +[<ffffffffa006c881>] radeon_commit_ring+0x4d/0x9c [radeon] +[<ffffffffa006d84a>] radeon_do_cp_idle+0x145/0x152 [radeon] +[<ffffffffa00709e5>] radeon_apply_surface_regs+0x27/0x13d [radeon] +[<ffffffffa0070bdd>] free_surface+0xe2/0xf8 [radeon] +[<ffffffffa0076284>] radeon_driver_lastclose+0x41/0x5b [radeon] +[<ffffffffa0018f04>] drm_lastclose+0x4f/0x2a0 [drm] +[<ffffffffa0019997>] drm_release+0x4d6/0x510 [drm] +[<ffffffff8112b3db>] __fput+0x12a/0x1df +[<ffffffff8112b4aa>] fput+0x1a/0x1c +[<ffffffff81127715>] filp_close+0x68/0x72 +[<ffffffff8105b4be>] put_files_struct+0x6a/0xcc +[<ffffffff8105b55b>] exit_files+0x3b/0x40 +[<ffffffff8105ce2b>] do_exit+0x25e/0x77f +[<ffffffff810891d1>] ? lockstat_clock+0x11/0x13 +[<ffffffff8147cabb>] ? _spin_unlock_irq+0x30/0x3c +[<ffffffff8105d3d0>] do_group_exit+0x84/0xb0 +[<ffffffff8106e1ad>] get_signal_to_deliver+0x356/0x375 +[<ffffffff81011042>] do_signal+0x72/0x6af +[<ffffffff81011caa>] ? sysret_check+0x2e/0x69 +[<ffffffff8108a863>] ? trace_hardirqs_on_caller+0x111/0x135 +[<ffffffff810b568e>] ? audit_syscall_entry+0x11e/0x14a +[<ffffffff8147c67d>] ? trace_hardirqs_on_thunk+0x3a/0x3f +[<ffffffff81011d09>] ? sysret_signal+0x5/0x4e +[<ffffffff810116a9>] do_notify_resume+0x2a/0x7c +[<ffffffff81011fc1>] int_signal+0x12/0x17 +Code: 1f 44 00 00 f6 87 0e 04 00 00 08 48 8b 87 10 01 00 00 74 0a 89 f6 48 03 70 18 8b 06 eb 0f c1 ee 02 89 f6 48 c1 e6 02 48 03 70 18 <8b> 06 c9 c3 55 48 89 e5 0f 1f 44 00 00 83 7f 74 00 74 09 31 f6 diff --git a/inc/CrashTypes.h b/inc/CrashTypes.h index 5149fb53..77947f6f 100644 --- a/inc/CrashTypes.h +++ b/inc/CrashTypes.h @@ -7,6 +7,8 @@ // BIN - binary value, should be displayed as a path to binary file // TXT - text value, should be displayed // ATT - text value which can be sent as attachment via reporters +// TODO: maybe we don't need separate CD_ATT - can simply look at strlen(content) +// in all places which want to handle "long" and "short" texts differently #define CD_SYS "s" #define CD_BIN "b" #define CD_TXT "t" diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp index 7ddacf7c..57342389 100644 --- a/lib/Plugins/Bugzilla.cpp +++ b/lib/Plugins/Bugzilla.cpp @@ -14,13 +14,6 @@ #define XML_RPC_SUFFIX "/xmlrpc.cgi" -static void create_new_bug_description(const map_crash_report_t& pCrashReport, std::string& pDescription) -{ - pDescription = "abrt "VERSION" detected a crash.\n\n"; - pDescription += make_description_bz(pCrashReport); -} - - /* * Static namespace for xmlrpc stuff. * Used mainly to ensure we always destroy xmlrpc client and server_info. @@ -236,8 +229,8 @@ uint32_t ctx::new_bug(const map_crash_report_t& pCrashReport) std::string summary = "[abrt] crash detected in " + package; std::string status_whiteboard = "abrt_hash:" + uuid; - std::string description; - create_new_bug_description(pCrashReport, description); + std::string description = "abrt "VERSION" detected a crash.\n\n"; + description += make_description_bz(pCrashReport); std::string product; std::string version; @@ -287,15 +280,17 @@ void ctx::add_attachments(const char* bug_id_str, const map_crash_report_t& pCra map_crash_report_t::const_iterator it = pCrashReport.begin(); for (; it != pCrashReport.end(); it++) { - if (it->second[CD_TYPE] == CD_ATT) + const std::string &filename = it->first; + const std::string &type = it->second[CD_TYPE]; + const std::string &content = it->second[CD_CONTENT]; + + if (type == CD_ATT) { - std::string description = "File: " + it->first; - const std::string& to_encode = it->second[CD_CONTENT]; - char *encoded64 = encode_base64(to_encode.c_str(), to_encode.length()); + char *encoded64 = encode_base64(content.c_str(), content.length()); xmlrpc_value* param = xmlrpc_build_value(&env,"(s{s:s,s:s,s:s,s:s})", bug_id_str, - "description", description.c_str(), - "filename", it->first.c_str(), + "description", ("File: " + filename).c_str(), + "filename", filename.c_str(), "contenttype", "text/plain", "data", encoded64 ); diff --git a/lib/Plugins/Catcut.cpp b/lib/Plugins/Catcut.cpp index cf1d7d9c..e353cbed 100644 --- a/lib/Plugins/Catcut.cpp +++ b/lib/Plugins/Catcut.cpp @@ -9,65 +9,12 @@ #include "ABRTException.h" #include "CommLayerInner.h" #ifdef HAVE_CONFIG_H - #include "config.h" +# include "config.h" #endif using namespace std; -//TODO: move to make_descr.cpp -static void create_new_bug_description(const map_crash_report_t& pCrashReport, string& pDescription) -{ - string howToReproduce; - string comment; - - if (pCrashReport.find(CD_REPRODUCE) != pCrashReport.end()) - { - howToReproduce = "\n\nHow to reproduce\n" - "-----\n" + - pCrashReport.find(CD_REPRODUCE)->second[CD_CONTENT]; - } - if (pCrashReport.find(CD_COMMENT) != pCrashReport.end()) - { - comment = "\n\nComment\n" - "-----\n" + - pCrashReport.find(CD_COMMENT)->second[CD_CONTENT]; - } - pDescription = "\nabrt "VERSION" detected a crash.\n" + - howToReproduce + - comment + - "\n\nAdditional information\n" - "======\n"; - - map_crash_report_t::const_iterator it; - for (it = pCrashReport.begin(); it != pCrashReport.end(); it++) - { - if (it->second[CD_TYPE] == CD_TXT) - { - if (it->first != CD_UUID && - it->first != FILENAME_ARCHITECTURE && - it->first != FILENAME_RELEASE && - it->first != CD_REPRODUCE && - it->first != CD_COMMENT) - { - pDescription += "\n" + it->first + "\n"; - pDescription += "-----\n"; - pDescription += it->second[CD_CONTENT] + "\n\n"; - } - } - else if (it->second[CD_TYPE] == CD_ATT) - { - pDescription += "\n\nAttached files\n" - "----\n"; - pDescription += it->first + "\n"; - } - else if (it->second[CD_TYPE] == CD_BIN) - { - error_msg(_("Binary file %s will not be reported"), it->first.c_str()); - } - } -} - static int put_stream(const char *pURL, FILE* f, size_t content_length) { @@ -324,8 +271,7 @@ ctx::new_bug(const char *auth_cookie, const map_crash_report_t& pCrashReport) string summary = "[abrt] crash detected in " + package; string status_whiteboard = "abrt_hash:" + uuid; - string description; - create_new_bug_description(pCrashReport, description); + string description = make_description_catcut(pCrashReport); string product; string version; diff --git a/lib/Plugins/KerneloopsSysLog.cpp b/lib/Plugins/KerneloopsSysLog.cpp index cb15fccb..4e32f040 100644 --- a/lib/Plugins/KerneloopsSysLog.cpp +++ b/lib/Plugins/KerneloopsSysLog.cpp @@ -87,7 +87,6 @@ int extract_oopses(vector_string_t &oopses, char *buffer, size_t buflen) while (c < buffer + buflen) { char linelevel; char *c9; - char *linepointer; c9 = (char*)memchr(c, '\n', buffer + buflen - c); /* a \n will always be found */ assert(c9); @@ -124,6 +123,7 @@ int extract_oopses(vector_string_t &oopses, char *buffer, size_t buflen) * "hostname abrt: Kerneloops: Reported 1 kernel oopses to Abrt" * we know we submitted everything upto here already */ if (strstr(c, "abrt:") && strstr(c, "Abrt")) { + VERB3 log("Found our marker at line %d, restarting line count from 0", linecount); linecount = 0; lines_info_alloc = 0; free(lines_info); @@ -142,23 +142,20 @@ int extract_oopses(vector_string_t &oopses, char *buffer, size_t buflen) } /* remove jiffies time stamp counter if present */ if (*c == '[') { - char *c2, *c3; - c2 = strchr(c, '.'); - c3 = strchr(c, ']'); + char *c2 = strchr(c, '.'); + char *c3 = strchr(c, ']'); if (c2 && c3 && (c2 < c3) && (c3-c) < 14 && (c2-c) < 8) { c = c3 + 1; if (*c == ' ') c++; } } - linepointer = c; - if (linecount >= lines_info_alloc) { lines_info_alloc += REALLOC_CHUNK; lines_info = (line_info*)xrealloc(lines_info, lines_info_alloc * sizeof(struct line_info)); } - lines_info[linecount].ptr = linepointer; + lines_info[linecount].ptr = c; lines_info[linecount].level = linelevel; linecount++; next_line: @@ -170,68 +167,66 @@ next_line: int i; char prevlevel = 0; int oopsstart = -1; - int oopsend = linecount; int inbacktrace = 0; int oopsesfound = 0; i = 0; while (i < linecount) { - char *c = lines_info[i].ptr; + char *const curline = lines_info[i].ptr; - if (c == NULL) { + if (curline == NULL) { i++; continue; } if (oopsstart < 0) { /* find start-of-oops markers */ - if (strstr(c, "general protection fault:")) + if (strstr(curline, "general protection fault:")) oopsstart = i; - else if (strstr(c, "BUG:")) + else if (strstr(curline, "BUG:")) oopsstart = i; - else if (strstr(c, "kernel BUG at")) + else if (strstr(curline, "kernel BUG at")) oopsstart = i; - else if (strstr(c, "do_IRQ: stack overflow:")) + else if (strstr(curline, "do_IRQ: stack overflow:")) oopsstart = i; - else if (strstr(c, "RTNL: assertion failed")) + else if (strstr(curline, "RTNL: assertion failed")) oopsstart = i; - else if (strstr(c, "Eeek! page_mapcount(page) went negative!")) + else if (strstr(curline, "Eeek! page_mapcount(page) went negative!")) oopsstart = i; - else if (strstr(c, "near stack overflow (cur:")) + else if (strstr(curline, "near stack overflow (cur:")) oopsstart = i; - else if (strstr(c, "double fault:")) + else if (strstr(curline, "double fault:")) oopsstart = i; - else if (strstr(c, "Badness at")) + else if (strstr(curline, "Badness at")) oopsstart = i; - else if (strstr(c, "NETDEV WATCHDOG")) + else if (strstr(curline, "NETDEV WATCHDOG")) oopsstart = i; - else if (strstr(c, "WARNING:") && - !strstr(c, "appears to be on the same physical disk")) + else if (strstr(curline, "WARNING:") + && !strstr(curline, "appears to be on the same physical disk") + ) { oopsstart = i; - else if (strstr(c, "Unable to handle kernel")) + } + else if (strstr(curline, "Unable to handle kernel")) oopsstart = i; - else if (strstr(c, "sysctl table check failed")) + else if (strstr(curline, "sysctl table check failed")) oopsstart = i; - else if (strstr(c, "------------[ cut here ]------------")) + else if (strstr(curline, "------------[ cut here ]------------")) oopsstart = i; - else if (strstr(c, "list_del corruption.")) + else if (strstr(curline, "list_del corruption.")) oopsstart = i; - else if (strstr(c, "list_add corruption.")) + else if (strstr(curline, "list_add corruption.")) oopsstart = i; - if (strstr(c, "Oops:") && i >= 3) + if (strstr(curline, "Oops:") && i >= 3) oopsstart = i-3; -#if DEBUG - /* debug information */ - if (oopsstart >= 0) { - printf("Found start of oops at line %i\n", oopsstart); - printf(" start line is -%s-\n", lines_info[oopsstart].ptr); - if (oopsstart != i) - printf(" trigger line is -%s-\n", c); - } -#endif - /* try to find the end marker */ + if (oopsstart >= 0) { - int i2; - i2 = i+1; + /* debug information */ + VERB3 { + log("Found oops at line %d: '%s'", oopsstart, lines_info[oopsstart].ptr); + if (oopsstart != i) + log("Trigger line is %d: '%s'", i, c); + } + /* try to find the end marker */ + int i2 = i + 1; while (i2 < linecount && i2 < (i+50)) { if (strstr(lines_info[i2].ptr, "---[ end trace")) { inbacktrace = 1; @@ -243,61 +238,58 @@ next_line: } } - /* a calltrace starts with "Call Trace:" or with the " [<.......>] function+0xFF/0xAA" pattern */ - if (oopsstart >= 0 && strstr(lines_info[i].ptr, "Call Trace:")) - inbacktrace = 1; - - else if (oopsstart >= 0 && inbacktrace == 0 && strlen(lines_info[i].ptr) > 8) { - char *c1, *c2, *c3; - c1 = strstr(lines_info[i].ptr, ">]"); - c2 = strstr(lines_info[i].ptr, "+0x"); - c3 = strstr(lines_info[i].ptr, "/0x"); - if (lines_info[i].ptr[0] == ' ' - && lines_info[i].ptr[1] == '[' - && lines_info[i].ptr[2] == '<' - && c1 && c2 && c3 + /* Are we entering a call trace part? */ + /* a call trace starts with "Call Trace:" or with the " [<.......>] function+0xFF/0xAA" pattern */ + if (oopsstart >= 0 && !inbacktrace) { + if (strstr(curline, "Call Trace:")) + inbacktrace = 1; + else + if (strnlen(curline, 9) > 8 + && curline[0] == ' ' && curline[1] == '[' && curline[2] == '<' + && strstr(curline, ">]") + && strstr(curline, "+0x") + && strstr(curline, "/0x") ) { inbacktrace = 1; } } - /* try to see if we're at the end of an oops */ - else if (oopsstart >= 0 && inbacktrace > 0) { - char c2, c3; - c2 = lines_info[i].ptr[0]; - c3 = lines_info[i].ptr[1]; - - /* line needs to start with " [" or have "] ["*/ - if ((c2 != ' ' || c3 != '[') - && strstr(lines_info[i].ptr, "] [") == NULL - && strstr(lines_info[i].ptr, "--- Exception") == NULL - && strstr(lines_info[i].ptr, " LR =") == NULL - && strstr(lines_info[i].ptr, "<#DF>") == NULL - && strstr(lines_info[i].ptr, "<IRQ>") == NULL - && strstr(lines_info[i].ptr, "<EOI>") == NULL - && strstr(lines_info[i].ptr, "<<EOE>>") == NULL + /* Are we at the end of an oops? */ + else if (oopsstart >= 0 && inbacktrace) { + int oopsend = INT_MAX; + + /* The Code: line means we're done with the backtrace */ + if (strstr(curline, "Code:") != NULL) + oopsend = i; + /* line needs to start with " [" or have "] [" if it is still a call trace */ + /* example: "[<ffffffffa006c156>] radeon_get_ring_head+0x16/0x41 [radeon]" */ + else if ((curline[0] != ' ' || curline[1] != '[') + && curline[0] != '[' /* in syslog format, leading space is lost */ + && strstr(curline, "] [") == NULL + && strstr(curline, "--- Exception") == NULL + && strstr(curline, " LR =") == NULL + && strstr(curline, "<#DF>") == NULL + && strstr(curline, "<IRQ>") == NULL + && strstr(curline, "<EOI>") == NULL + && strstr(curline, "<<EOE>>") == NULL ) { - oopsend = i-1; + oopsend = i-1; /* not a call trace line */ } - - /* oops lines are always more than 8 long */ - if (strlen(lines_info[i].ptr) < 8) + /* oops lines are always more than 8 chars long */ + else if (strnlen(curline, 8) < 8) oopsend = i-1; /* single oopses are of the same loglevel */ - if (lines_info[i].level != prevlevel) + else if (lines_info[i].level != prevlevel) oopsend = i-1; - /* The Code: line means we're done with the backtrace */ - if (strstr(lines_info[i].ptr, "Code:") != NULL) - oopsend = i; - if (strstr(lines_info[i].ptr, "Instruction dump::") != NULL) + else if (strstr(curline, "Instruction dump::") != NULL) /* why "::"? is it a typo? */ oopsend = i; /* if a new oops starts, this one has ended */ - if (strstr(lines_info[i].ptr, "WARNING:") != NULL && oopsstart != i) + else if (strstr(curline, "WARNING:") != NULL && oopsstart != i) oopsend = i-1; - if (strstr(lines_info[i].ptr, "Unable to handle") != NULL && oopsstart != i) + else if (strstr(curline, "Unable to handle") != NULL && oopsstart != i) oopsend = i-1; /* kernel end-of-oops marker */ - if (strstr(lines_info[i].ptr, "---[ end trace") != NULL) + else if (strstr(curline, "---[ end trace") != NULL) oopsend = i; if (oopsend <= i) { @@ -307,6 +299,8 @@ next_line: char *oops; char *version; + VERB3 log("End of oops at line %d (%d): '%s'", oopsend, i, lines_info[oopsend].ptr); + len = 2; for (q = oopsstart; q <= oopsend; q++) len += strlen(lines_info[q].ptr) + 1; @@ -327,27 +321,38 @@ next_line: if (strlen(oops) > 100) { queue_oops(oopses, oops, version); oopsesfound++; + } else { + VERB3 log("Dropped oops: too short"); } oopsstart = -1; inbacktrace = 0; - oopsend = linecount; free(oops); free(version); } } + prevlevel = lines_info[i].level; i++; - if (oopsstart > 0 && i-oopsstart > 50) { - oopsstart = -1; - inbacktrace = 0; - oopsend = linecount; - } - if (oopsstart > 0 && !inbacktrace && i-oopsstart > 30) { - oopsstart = -1; - inbacktrace = 0; - oopsend = linecount; + + if (oopsstart >= 0) { + /* Do we have a suspiciously long oops? Cancel it */ + if (i-oopsstart > 50) { + inbacktrace = 0; + oopsstart = -1; + VERB3 log("Dropped oops, too long"); + continue; + } + if (!inbacktrace && i-oopsstart > 30) { + /*inbacktrace = 0; - already is */ + oopsstart = -1; + VERB3 log("Dropped oops, too long"); + continue; + } } - } + } /* while (i < linecount) */ + + /* process last oops if we have one */ +// TODO: do not duplicate code if (oopsstart >= 0) { int q; int len; @@ -355,7 +360,9 @@ next_line: char *oops; char *version; - oopsend = i-1; + int oopsend = i-1; + + VERB3 log("End of oops at line %d (end of file): '%s'", oopsend, lines_info[oopsend].ptr); len = 2; while (oopsend > 0 && lines_info[oopsend].ptr == NULL) @@ -377,10 +384,9 @@ next_line: if (strlen(oops) > 100) { queue_oops(oopses, oops, version); oopsesfound++; + } else { + VERB3 log("Dropped oops: too short"); } - oopsstart = -1; - inbacktrace = 0; - oopsend = linecount; free(oops); free(version); } diff --git a/lib/Plugins/Mailx.cpp b/lib/Plugins/Mailx.cpp index 32eeb25c..dc6e2b0e 100644 --- a/lib/Plugins/Mailx.cpp +++ b/lib/Plugins/Mailx.cpp @@ -90,6 +90,7 @@ std::string CMailx::Report(const map_crash_report_t& pCrashReport, unsigned arg_size = 0; args = append_str_to_vector(args, arg_size, MAILX_COMMAND); +//TODO: move email body generation to make_descr.cpp std::string binaryFiles, commonFiles, bigTextFiles, additionalFiles, UUIDFile; map_crash_report_t::const_iterator it; for (it = pCrashReport.begin(); it != pCrashReport.end(); it++) diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp index 2883d01f..fff46957 100644 --- a/lib/Utils/DebugDump.cpp +++ b/lib/Utils/DebugDump.cpp @@ -23,7 +23,6 @@ #include <iostream> #include <sstream> #include <sys/utsname.h> -//#include <magic.h> #include "abrtlib.h" #include "DebugDump.h" #include "ABRTException.h" @@ -287,72 +286,6 @@ static void DeleteFileDir(const char *pDir) } } -static bool IsTextFile(const char *name) -{ - /* Some files in our dump directories are known to always be textual */ - if (strcmp(name, "backtrace") == 0 - || strcmp(name, "cmdline") == 0 - ) { - return true; - } - -/* This idiotic library thinks that file containing just "0" is not text (!!) - - magic_t m = magic_open(MAGIC_MIME_TYPE); - - if (m == NULL) - { - throw CABRTException(EXCEP_ERROR, std::string(__func__) + "Cannot open magic cookie: " + magic_error(m)); - } - - int r = magic_load(m, NULL); - - if (r == -1) - { - magic_close(m); - throw CABRTException(EXCEP_ERROR, std::string(__func__) + "Cannot load magic db: " + magic_error(m)); - } - - char* ch = (char *) magic_file(m, pName.c_str()); - - if (ch == NULL) - { - magic_close(m); - throw CABRTException(EXCEP_ERROR, std::string(__func__) + "Cannot determine file type: " + magic_error(m)); - } - - bool isText = (strncmp(ch, "text", 4) == 0); - - magic_close(m); - - return isText; - */ - int fd = open(name, O_RDONLY); - if (fd < 0) - return false; - - unsigned char buf[4*1024]; - int r = full_read(fd, buf, sizeof(buf)); - close(fd); - - /* Every once in a while, even a text file contains a few garbled - * or unexpected non-ASCII chars. We should not declare it "binary". - */ - const unsigned RATIO = 50; - unsigned total_chars = r + RATIO; - unsigned bad_chars = 1; /* 1 prevents division by 0 later */ - while (--r >= 0) - { - if (buf[r] >= 0x7f - /* among control chars, only '\t','\n' etc are allowed */ - || (buf[r] < ' ' && !isspace(buf[r])) - ) { - bad_chars++; - } - } - return (total_chars / bad_chars) >= RATIO; -} - void CDebugDump::Delete() { if (!ExistFileDir(m_sDebugDumpDir.c_str())) @@ -460,7 +393,7 @@ void CDebugDump::InitGetNextFile() { if (!m_bOpened) { - throw CABRTException(EXCEP_DD_OPEN, "CDebugDump::InitGetNextFile(): DebugDump is not opened."); + throw CABRTException(EXCEP_DD_OPEN, "DebugDump is not opened"); } if (m_pGetNextFileDir != NULL) { @@ -469,11 +402,11 @@ void CDebugDump::InitGetNextFile() m_pGetNextFileDir = opendir(m_sDebugDumpDir.c_str()); if (m_pGetNextFileDir == NULL) { - throw CABRTException(EXCEP_DD_OPEN, "CDebugDump::InitGetNextFile(): Cannot open dir " + m_sDebugDumpDir); + throw CABRTException(EXCEP_DD_OPEN, "Can't open dir " + m_sDebugDumpDir); } } -bool CDebugDump::GetNextFile(std::string& pFileName, std::string& pContent, bool& pIsTextFile) +bool CDebugDump::GetNextFile(std::string *short_name, std::string *full_name) { if (m_pGetNextFileDir == NULL) { @@ -485,19 +418,10 @@ bool CDebugDump::GetNextFile(std::string& pFileName, std::string& pContent, bool { if (is_regular_file(dent, m_sDebugDumpDir.c_str())) { - std::string fullname = concat_path_file(m_sDebugDumpDir.c_str(), dent->d_name); - - pFileName = dent->d_name; - if (IsTextFile(fullname.c_str())) - { - LoadText(dent->d_name, pContent); - pIsTextFile = true; - } - else - { - pContent.clear(); - pIsTextFile = false; - } + if (short_name) + *short_name = dent->d_name; + if (full_name) + *full_name = concat_path_file(m_sDebugDumpDir.c_str(), dent->d_name); return true; } } diff --git a/lib/Utils/DebugDump.h b/lib/Utils/DebugDump.h index b48a386d..d7533534 100644 --- a/lib/Utils/DebugDump.h +++ b/lib/Utils/DebugDump.h @@ -72,7 +72,8 @@ class CDebugDump void SaveBinary(const char* pName, const char* pData, unsigned pSize); void InitGetNextFile(); - bool GetNextFile(std::string& pFileName, std::string& pContent, bool& pIsTextFile); + /* Pointers may be NULL */ + bool GetNextFile(std::string *short_name, std::string *full_name); }; #endif /*DEBUGDUMP_H_*/ diff --git a/lib/Utils/Plugin.h b/lib/Utils/Plugin.h index f93f7e7b..d7108ce9 100644 --- a/lib/Utils/Plugin.h +++ b/lib/Utils/Plugin.h @@ -26,13 +26,13 @@ #include "abrt_types.h" #include "CrashTypes.h" #if HAVE_CONFIG_H - #include <config.h> +# include <config.h> #endif #if ENABLE_NLS - #include <libintl.h> - #define _(S) gettext(S) +# include <libintl.h> +# define _(S) gettext(S) #else - #define _(S) (S) +# define _(S) (S) #endif #define PLUGINS_MAGIC_NUMBER 6 @@ -83,7 +83,8 @@ typedef enum { ANALYZER, /**< An analyzer plugin*/ ACTION, /**< An action plugin*/ REPORTER, /**< A reporter plugin*/ - DATABASE /**< A database plugin*/ + DATABASE, /**< A database plugin*/ + MAX_PLUGIN_TYPE = DATABASE, } plugin_type_t; /** @@ -121,5 +122,6 @@ typedef struct SPluginInfo /* helper finctions */ std::string make_description_bz(const map_crash_report_t& pCrashReport); std::string make_description_logger(const map_crash_report_t& pCrashReport); +std::string make_description_catcut(const map_crash_report_t& pCrashReport); #endif diff --git a/lib/Utils/make_descr.cpp b/lib/Utils/make_descr.cpp index 0c096143..c4cc3f35 100644 --- a/lib/Utils/make_descr.cpp +++ b/lib/Utils/make_descr.cpp @@ -2,6 +2,15 @@ //#include "abrt_types.h" #include "CrashTypes.h" #include "DebugDump.h" /* FILENAME_ARCHITECTURE etc */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif +#if ENABLE_NLS +# include <libintl.h> +# define _(S) gettext(S) +#else +# define _(S) (S) +#endif using namespace std; @@ -42,6 +51,9 @@ static void add_content(bool &was_multiline, string& description, const char *he } } +/* Text attachments smaller than this will be also included in descrition */ +#define INLINE_TEXT_ATT_SIZE 1024 + string make_description_bz(const map_crash_report_t& pCrashReport) { string description; @@ -68,8 +80,9 @@ string make_description_bz(const map_crash_report_t& pCrashReport) const string &filename = it->first; const string &type = it->second[CD_TYPE]; const string &content = it->second[CD_CONTENT]; - if (type == CD_TXT) - { + if (type == CD_TXT + || (type == CD_ATT && content.size() < INLINE_TEXT_ATT_SIZE) + ) { if (filename != CD_UUID && filename != FILENAME_ARCHITECTURE && filename != FILENAME_RELEASE @@ -78,8 +91,9 @@ string make_description_bz(const map_crash_report_t& pCrashReport) ) { add_content(was_multiline, description, filename.c_str(), content.c_str()); } + continue; } - else if (type == CD_ATT) + if (type == CD_ATT) { add_content(was_multiline, description, "Attached file", filename.c_str()); } @@ -131,3 +145,68 @@ string make_description_logger(const map_crash_report_t& pCrashReport) return description; } + +/* This needs more work to make the result less ugly */ +string make_description_catcut(const map_crash_report_t& pCrashReport) +{ + map_crash_report_t::const_iterator end = pCrashReport.end(); + map_crash_report_t::const_iterator it; + + string howToReproduce; + it = pCrashReport.find(CD_REPRODUCE); + if (it != end) + { + howToReproduce = "\n\nHow to reproduce\n" + "-----\n"; + howToReproduce += it->second[CD_CONTENT]; + } + string comment; + it = pCrashReport.find(CD_COMMENT); + if (it != end) + { + comment = "\n\nComment\n" + "-----\n"; + comment += it->second[CD_CONTENT]; + } + + string pDescription = "\nabrt "VERSION" detected a crash.\n"; + pDescription += howToReproduce; + pDescription += comment; + pDescription += "\n\nAdditional information\n" + "======\n"; + + for (it = pCrashReport.begin(); it != end; it++) + { + const string &filename = it->first; + const string &type = it->second[CD_TYPE]; + const string &content = it->second[CD_CONTENT]; + if (type == CD_TXT) + { + if (filename != CD_UUID + && filename != FILENAME_ARCHITECTURE + && filename != FILENAME_RELEASE + && filename != CD_REPRODUCE + && filename != CD_COMMENT + ) { + pDescription += '\n'; + pDescription += filename; + pDescription += "\n-----\n"; + pDescription += content; + pDescription += "\n\n"; + } + } + else if (type == CD_ATT) + { + pDescription += "\n\nAttached files\n" + "----\n"; + pDescription += filename; + pDescription += '\n'; + } + else if (type == CD_BIN) + { + error_msg(_("Binary file %s will not be reported"), filename.c_str()); + } + } + + return pDescription; +} @@ -2,15 +2,15 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # -#: ../src/Gui/CCReporterDialog.py:191 +#: ../src/Gui/CCReporterDialog.py:196 # Jaswinder Singh <jsingh@redhat.com>, 2009. # A S Alam <aalam@users.sf.net>, 2009. msgid "" msgstr "" "Project-Id-Version: abrt.master.pa\n" "Report-Msgid-Bugs-To: jmoskovc@redhat.com\n" -"POT-Creation-Date: 2009-11-12 03:54+0000\n" -"PO-Revision-Date: 2009-11-12 11:27+0530\n" +"POT-Creation-Date: 2009-11-20 08:48+0000\n" +"PO-Revision-Date: 2009-11-20 16:12+0530\n" "Last-Translator: Jaswinder Singh <jsingh@redhat.com>\n" "Language-Team: Punjabi/Panjabi <kde-i18n-doc@kde.org>\n" "MIME-Version: 1.0\n" @@ -83,7 +83,7 @@ msgstr "<span color=\"white\">ਵੇਰਵਾ</span>" msgid "About ABRT" msgstr "ABRT ਬਾਰੇ" -#: ../src/Gui/ccgui.glade.h:6 +#: ../src/Gui/ccgui.glade.h:6 ../src/Gui/abrt.desktop.in.h:1 msgid "Automatic Bug Reporting Tool" msgstr "ਆਟੋਮੈਟਿਕ ਬੱਗ ਰਿਪੋਰਟਿੰਗ ਟੂਲ" @@ -228,11 +228,12 @@ msgstr "" msgid "Error getting the report: %s" msgstr "ਰਿਪੋਰਟ ਲੈਣ ਵੇਲੇ ਗਲਤੀ: %s" -#: ../src/Gui/CCReporterDialog.py:177 +#: ../src/Gui/CCReporterDialog.py:182 msgid "Brief description how to reproduce this or what you did..." msgstr "ਇਸ ਨੂੰ ਪੈਦਾ ਕਰਨ ਬਾਰੇ ਸੰਖੇਪ ਜਾਣਕਾਰੀ ਜਾਂ ਤੁਸੀਂ ਕੀ ਕੀਤਾ ਹੈ..." -#: ../src/Gui/CCReporterDialog.py:219, python-format +#: ../src/Gui/CCReporterDialog.py:224 +#, python-format msgid "" "Reporting disabled because the backtrace is unusable.\n" "Please try to install debuginfo manually using command:<span color=\"blue\"> " @@ -241,19 +242,20 @@ msgid "" msgstr "" "ਰਿਪੋਰਟ ਦੇਣੀ ਆਯੋਗ ਹੈ ਕਿਉਂਕਿ ਬੈਕਟਰੇਸ ਬੇਕਾਰ ਹੈ!\n" "ਇਸ ਕਮਾਂਡ ਦੀ ਵਰਤੋਂ ਕਰਕੇ ਡੀਬੱਗ-ਜਾਣਕਾਰੀ ਇੰਸਟਾਲ ਕਰਕੇ ਕੋਸ਼ਿਸ਼ ਕਰੋ ਜੀ: <span color=\"blue\"> " -"debuginfo-install %s </span>\n ਤਦ ਬੈਕਟਰੇਸ ਮੁੜ-ਬਣਾਉਣ ਲਈ ਤਾਜ਼ਾ ਕਰੋ ਬਟਨ ਵਰਤੋਂ।" +"debuginfo-install %s </span>\n" +" ਤਦ ਬੈਕਟਰੇਸ ਮੁੜ-ਬਣਾਉਣ ਲਈ ਤਾਜ਼ਾ ਕਰੋ ਬਟਨ ਵਰਤੋਂ।" -#: ../src/Gui/CCReporterDialog.py:221 +#: ../src/Gui/CCReporterDialog.py:226 msgid "The bactrace is unusable, you can't report this!" msgstr "ਬੈਕਟਰੇਸ ਬੇਕਾਰ ਹੈ, ਤੁਸੀਂ ਇਹ ਰਿਪੋਰਟ ਨਹੀਂ ਭੇਜ ਸਕਦੇ ਹੋ!" -#: ../src/Gui/CCReporterDialog.py:227 +#: ../src/Gui/CCReporterDialog.py:232 msgid "" "The bactrace is incomplete, please make sure you provide good steps to " "reproduce." msgstr "ਬੈਕਟਰੇਸ ਅਧੂਰਾ ਹੈ, ਯਕੀਨੀ ਬਣਾਉ ਕਿ ਤੁਸੀਂ ਇਹ ਬਣਾਉਣ ਲਈ ਠੀਕ ਕਦਮ ਚੁੱਕੇ ਹਨ।" -#: ../src/Gui/CCReporterDialog.py:272 +#: ../src/Gui/CCReporterDialog.py:280 #, python-format msgid "" "<b>WARNING</b>, you're about to send data which might contain sensitive " @@ -425,20 +427,20 @@ msgstr "gtk-close" msgid "gtk-remove" msgstr "gtk-remove" +#: ../src/Gui/abrt.desktop.in.h:2 +msgid "View and report application crashes" +msgstr "ਐਪਲੀਕੇਸ਼ਨ ਕਰੈਸ਼ ਵੇਖੋ ਅਤੇ ਰਿਪੋਰਟ ਕਰੋ" + #: ../src/Applet/Applet.cpp:79 #, c-format msgid "A crash in package %s has been detected" msgstr "ਪੈਕੇਜ %s ਵਿੱਚ ਇੱਕ ਕਰੈਸ ਮਿਲਿਆ" -#: ../src/Applet/Applet.cpp:138 -msgid "ABRT service has been started" -msgstr "ABRT ਸਰਵਿਸ ਚਾਲੂ ਹੋ ਗਈ ਹੈ" - -#: ../src/Applet/Applet.cpp:140 ../src/Applet/Applet.cpp:254 +#: ../src/Applet/Applet.cpp:253 msgid "ABRT service is not running" msgstr "ABRT ਸਰਵਿਸ ਨਹੀਂ ਚੱਲ ਰਹੀ ਹੈ" -#: ../src/Applet/CCApplet.cpp:185 +#: ../src/Applet/CCApplet.cpp:196 msgid "Warning" msgstr "ਚੇਤਾਵਨੀ" @@ -450,37 +452,37 @@ msgstr "" "ਰਿਪੋਰਟ ਅਕਾਰ ਦਾ ਕੋਟਾ ਖਤਮ ਹੋ ਗਿਆ ਹੈ। abrt.conf ਵਿੱਚ ਸਿਸਟਮ MaxCrashReportsSize ਮੁੱਲ ਚੈੱਕ " "ਕਰੋ ਜੀ।" -#: ../lib/Plugins/Bugzilla.cpp:209 +#: ../lib/Plugins/Bugzilla.cpp:202 #, c-format msgid "Bug is already reported: %i" msgstr "ਬੱਗ ਪਹਿਲਾਂ ਹੀ ਰਿਪੋਰਟ ਕੀਤਾ ਹੈ: %i" -#: ../lib/Plugins/Bugzilla.cpp:271 +#: ../lib/Plugins/Bugzilla.cpp:264 #, c-format msgid "New bug id: %i" msgstr "ਨਵਾਂ ਬੱਗ id: %i" -#: ../lib/Plugins/Bugzilla.cpp:364 +#: ../lib/Plugins/Bugzilla.cpp:359 msgid "Checking for duplicates..." msgstr "ਡੁਪਲੀਕੇਟ ਲਈ ਜਾਂਚ ਜਾਰੀ..." -#: ../lib/Plugins/Bugzilla.cpp:367 +#: ../lib/Plugins/Bugzilla.cpp:362 msgid "Logging into bugzilla..." msgstr "ਬੱਗਜ਼ੀਲਾ ਉੱਤੇ ਲਾਗਇਨ ਕੀਤਾ ਜਾਂਦਾ ਹੈ..." -#: ../lib/Plugins/Bugzilla.cpp:371 +#: ../lib/Plugins/Bugzilla.cpp:366 msgid "Empty login and password. Please check Bugzilla.conf" msgstr "ਖਾਲੀ ਲਾਗਇਨ ਅਤੇ ਪਾਸਵਰਡ। Bugzilla.conf ਵੇਖੋ ਜੀ।" -#: ../lib/Plugins/Bugzilla.cpp:377 +#: ../lib/Plugins/Bugzilla.cpp:372 msgid "Checking CC..." msgstr "CC ਚੈੱਕ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ..." -#: ../lib/Plugins/Bugzilla.cpp:386 +#: ../lib/Plugins/Bugzilla.cpp:381 msgid "Creating new bug..." msgstr "ਨਵਾਂ ਬੱਗ ਬਣਾ ਰਿਹਾ ਹੈ..." -#: ../lib/Plugins/Bugzilla.cpp:390 +#: ../lib/Plugins/Bugzilla.cpp:385 msgid "Logging out..." msgstr "ਲਾਗਆਉਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ..." @@ -488,31 +490,31 @@ msgstr "ਲਾਗਆਉਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ..." msgid "Getting local universal unique identification" msgstr "ਲੋਕਲ ਯੂਨੀਵਰਸਲ ਵਿਲੱਖਣ ਪਛਾਣ ਲਈ ਜਾ ਰਹੀ ਹੈ" -#: ../lib/Plugins/CCpp.cpp:254 +#: ../lib/Plugins/CCpp.cpp:256 msgid "Getting backtrace..." msgstr "ਬੈਕਟਰੇਸ ਲੈ ਰਿਹਾ..." -#: ../lib/Plugins/CCpp.cpp:552 ../lib/Plugins/CCpp.cpp:679 +#: ../lib/Plugins/CCpp.cpp:565 ../lib/Plugins/CCpp.cpp:692 msgid "Searching for debug-info packages..." msgstr "ਡੀਬੱਗ-ਜਾਣਕਾਰੀ ਪੈਕੇਜ ਲਈ ਖੋਜ ਜਾਰੀ..." -#: ../lib/Plugins/CCpp.cpp:614 ../lib/Plugins/CCpp.cpp:713 +#: ../lib/Plugins/CCpp.cpp:627 ../lib/Plugins/CCpp.cpp:726 msgid "Downloading and installing debug-info packages..." msgstr "ਡੀਬੱਗ-ਜਾਣਕਾਰੀ ਪੈਕੇਜ ਡਾਊਨਲੋਡ ਤੇ ਇੰਸਟਾਲ ਕੀਤੇ ਜਾ ਰਹੇ ਹਨ..." -#: ../lib/Plugins/CCpp.cpp:818 +#: ../lib/Plugins/CCpp.cpp:831 msgid "Getting local universal unique identification..." msgstr "ਲੋਕਲ ਯੂਨੀਵਰਸਲ ਵਿਲੱਖਣ ਪਛਾਣ ਲਈ ਜਾ ਰਹੀ ਹੈ..." -#: ../lib/Plugins/CCpp.cpp:837 +#: ../lib/Plugins/CCpp.cpp:850 msgid "Getting global universal unique identification..." msgstr "ਗਲੋਬਲ ਯੂਨੀਵਰਸਲ ਵਿਲੱਕਣ ਪਛਾਣ ਲਈ ਜਾ ਰਹੀ ਹੈ..." -#: ../lib/Plugins/CCpp.cpp:882 +#: ../lib/Plugins/CCpp.cpp:895 msgid "Starting report creation..." msgstr "ਰਿਪੋਰਟ ਬਣਾਉਣੀ ਸ਼ੁਰੂ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ..." -#: ../lib/Plugins/CCpp.cpp:912 +#: ../lib/Plugins/CCpp.cpp:928 msgid "Skipping debuginfo installation" msgstr "debuginfo ਇੰਸਟਾਲੇਸ਼ਨ ਛੱਡੀ ਜਾ ਰਹੀ ਹੈ" @@ -520,14 +522,10 @@ msgstr "debuginfo ਇੰਸਟਾਲੇਸ਼ਨ ਛੱਡੀ ਜਾ ਰਹੀ ਹ msgid "Creating and submitting a report..." msgstr "ਇੱਕ ਰਿਪੋਰਟ ਬਣਾਈ ਅਤੇ ਭੇਜੀ ਜਾ ਰਹੀ ਹੈ..." -#: ../lib/Plugins/Logger.cpp:65 ../lib/Plugins/Mailx.cpp:124 +#: ../lib/Plugins/Logger.cpp:65 msgid "Creating a report..." msgstr "ਰਿਪੋਰਟ ਬਣਾਈ ਜਾ ਰਹੀ ਹੈ..." -#: ../lib/Plugins/RunApp.cpp:64 -msgid "Executing RunApp plugin..." -msgstr "RunApp ਪਲੱਗਇਨ ਚਲਾਈ ਜਾ ਰਹੀ ਹੈ..." - #: ../lib/Plugins/FileTransfer.cpp:63 ../lib/Plugins/FileTransfer.cpp:384 msgid "FileTransfer: URL not specified" msgstr "ਫਾਇਲਟਰਾਂਸਫਰ: URL ਨਹੀਂ ਦਿੱਤਾ" @@ -555,23 +553,29 @@ msgstr "%s ਅਕਾਇਵ ਬਣਾਇਆ ਅਤੇ ਭੇਜਿਆ ਨਹੀ msgid "Creating kernel oops crash reports..." msgstr "ਕਰਨਲ oops ਕਰੈਸ਼ ਰਿਪੋਰਟਾਂ ਬਣਾਈਆਂ ਜਾ ਰਹੀਆਂ ਹਨ..." -#: ../lib/Plugins/Mailx.cpp:109 +#: ../lib/Plugins/Mailx.cpp:164 msgid "Sending an email..." msgstr "ਈਮੇਲ ਭੇਜੀ ਜਾ ਰਹੀ ਹੈ..." -#: ../lib/Plugins/SOSreport.cpp:100 +#: ../lib/Plugins/SOSreport.cpp:69 msgid "Executing SOSreport plugin..." msgstr "SOSreport ਪਲੱਗਇਨ ਚਲਾਈ ਜਾ ਰਹੀ ਹੈ..." -#: ../lib/Plugins/SOSreport.cpp:122 +#: ../lib/Plugins/SOSreport.cpp:91 #, c-format msgid "running sosreport: %s" msgstr "sosreport ਚਲਾਈ ਜਾ ਰਹੀ ਹੈ: %s " -#: ../lib/Plugins/SOSreport.cpp:137 +#: ../lib/Plugins/SOSreport.cpp:95 msgid "done running sosreport" msgstr "sosreport ਚਲਾਉਣਾ ਮੁਕੰਮਲ" +#~ msgid "ABRT service has been started" +#~ msgstr "ABRT ਸਰਵਿਸ ਚਾਲੂ ਹੋ ਗਈ ਹੈ" + +#~ msgid "Executing RunApp plugin..." +#~ msgstr "RunApp ਪਲੱਗਇਨ ਚਲਾਈ ਜਾ ਰਹੀ ਹੈ..." + #~ msgid "Binary file %s will not be reported." #~ msgstr "ਬਾਇਨਰੀ ਫਾਇਲ %s ਦੀ ਰਿਪੋਰਟ ਨਹੀਂ ਕੀਤੀ ਜਾਵੇਗੀ।" diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index 66bdea67..f3c6bdf4 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -64,6 +64,62 @@ static vector_pair_string_string_t s_vectorActionsAndReporters; static void RunAnalyzerActions(const char *pAnalyzer, const char *pDebugDumpDir); +static char* is_text_file(const char *name, ssize_t *sz) +{ + /* We were using magic.h API to check for file being text, but it thinks + * that file containing just "0" is not text (!!) + * So, we do it ourself. + */ + + int fd = open(name, O_RDONLY); + if (fd < 0) + return NULL; /* it's not text (because it does not exist! :) */ + + char *buf = (char*)xmalloc(*sz); + ssize_t r = *sz = full_read(fd, buf, *sz); + close(fd); + if (r < 0) + { + free(buf); + return NULL; /* it's not text (because we can't read it) */ + } + + /* Some files in our dump directories are known to always be textual */ + if (strcmp(name, "backtrace") == 0 + || strcmp(name, "cmdline") == 0 + ) { + return buf; + } + + /* Every once in a while, even a text file contains a few garbled + * or unexpected non-ASCII chars. We should not declare it "binary". + */ + const unsigned RATIO = 50; + unsigned total_chars = r + RATIO; + unsigned bad_chars = 1; /* 1 prevents division by 0 later */ + while (--r >= 0) + { + if (buf[r] >= 0x7f + /* among control chars, only '\t','\n' etc are allowed */ + || (buf[r] < ' ' && !isspace(buf[r])) + ) { + if (buf[r] == '\0') + { + /* We don't like NULs very much. Not text for sure! */ + free(buf); + return NULL; + } + bad_chars++; + } + } + + if ((total_chars / bad_chars) >= RATIO) + return buf; /* looks like text to me */ + + free(buf); + return NULL; /* it's binary */ +} + /** * Transforms a debugdump direcortry to inner crash * report form. This form is used for later reporting. @@ -72,63 +128,69 @@ static void RunAnalyzerActions(const char *pAnalyzer, const char *pDebugDumpDir) */ static void DebugDumpToCrashReport(const char *pDebugDumpDir, map_crash_report_t& pCrashReport) { - std::string fileName; - std::string content; - bool isTextFile; CDebugDump dd; dd.Open(pDebugDumpDir); - - if (!dd.Exist(FILENAME_ARCHITECTURE) || - !dd.Exist(FILENAME_KERNEL) || - !dd.Exist(FILENAME_PACKAGE) || - !dd.Exist(FILENAME_COMPONENT) || - !dd.Exist(FILENAME_RELEASE) || - !dd.Exist(FILENAME_EXECUTABLE)) - { - throw CABRTException(EXCEP_ERROR, "DebugDumpToCrashReport(): One or more of important file(s)'re missing"); + if (!dd.Exist(FILENAME_ARCHITECTURE) + || !dd.Exist(FILENAME_KERNEL) + || !dd.Exist(FILENAME_PACKAGE) + || !dd.Exist(FILENAME_COMPONENT) + || !dd.Exist(FILENAME_RELEASE) + || !dd.Exist(FILENAME_EXECUTABLE) + ) { + throw CABRTException(EXCEP_ERROR, "DebugDumpToCrashReport(): One or more of important file(s) are missing"); } + std::string short_name; + std::string full_name; pCrashReport.clear(); dd.InitGetNextFile(); - while (dd.GetNextFile(fileName, content, isTextFile)) + while (dd.GetNextFile(&short_name, &full_name)) { - //VERB3 log(" file:'%s' text:%d", fileName.c_str(), isTextFile); - if (!isTextFile) + ssize_t sz = 4*1024; + char *text = is_text_file(full_name.c_str(), &sz); + if (!text) { add_crash_data_to_crash_report(pCrashReport, - fileName, + short_name, CD_BIN, CD_ISNOTEDITABLE, - concat_path_file(pDebugDumpDir, fileName.c_str()) + full_name ); + continue; } - else - { - if (fileName == FILENAME_ARCHITECTURE || - fileName == FILENAME_KERNEL || - fileName == FILENAME_PACKAGE || - fileName == FILENAME_COMPONENT || - fileName == FILENAME_RELEASE || - fileName == FILENAME_EXECUTABLE) - { - add_crash_data_to_crash_report(pCrashReport, fileName, CD_TXT, CD_ISNOTEDITABLE, content); - } - else if (fileName != FILENAME_UID && - fileName != FILENAME_ANALYZER && - fileName != FILENAME_TIME && - fileName != FILENAME_DESCRIPTION && - fileName != FILENAME_REPRODUCE && - fileName != FILENAME_COMMENT) - { - if (content.length() < CD_ATT_SIZE) - { - add_crash_data_to_crash_report(pCrashReport, fileName, CD_TXT, CD_ISEDITABLE, content); - } - else - { - add_crash_data_to_crash_report(pCrashReport, fileName, CD_ATT, CD_ISEDITABLE, content); - } - } + + std::string content; + if (sz < 4*1024) /* is_text_file did read entire file */ + content.assign(text, sz); + else /* no, need to read it all */ + dd.LoadText(short_name.c_str(), content); + free(text); + + if (short_name == FILENAME_ARCHITECTURE + || short_name == FILENAME_KERNEL + || short_name == FILENAME_PACKAGE + || short_name == FILENAME_COMPONENT + || short_name == FILENAME_RELEASE + || short_name == FILENAME_EXECUTABLE + ) { + add_crash_data_to_crash_report(pCrashReport, short_name, CD_TXT, CD_ISNOTEDITABLE, content); + continue; + } + + if (short_name != FILENAME_UID + && short_name != FILENAME_ANALYZER + && short_name != FILENAME_TIME + && short_name != FILENAME_DESCRIPTION + && short_name != FILENAME_REPRODUCE + && short_name != FILENAME_COMMENT + ) { + add_crash_data_to_crash_report( + pCrashReport, + short_name, + (content.length() < CD_ATT_SIZE ? CD_TXT : CD_ATT), + CD_ISEDITABLE, + content + ); } } } @@ -139,8 +201,7 @@ static void DebugDumpToCrashReport(const char *pDebugDumpDir, map_crash_report_t * @param pDebugDumpDir A debugdump dir containing all necessary data. * @return A local UUID. */ -static std::string GetLocalUUID(const char *pAnalyzer, - const char *pDebugDumpDir) +static std::string GetLocalUUID(const char *pAnalyzer, const char *pDebugDumpDir) { CAnalyzer* analyzer = g_pPluginManager->GetAnalyzer(pAnalyzer); return analyzer->GetLocalUUID(pDebugDumpDir); @@ -319,12 +380,17 @@ static bool CheckReport(const map_crash_report_t& pCrashReport) map_crash_report_t::const_iterator end = pCrashReport.end(); + if (it_package == end) + { + return false; + } + // FIXME: bypass the test if it's kerneloops if (it_package->second[CD_CONTENT] == "kernel") return true; if (it_analyzer == end || it_mwuid == end || - it_mwuuid == end || it_package == end || + it_mwuuid == end || /* it_package == end || */ it_architecture == end || it_kernel == end || it_component == end || it_release == end || it_executable == end) diff --git a/src/Daemon/PluginManager.cpp b/src/Daemon/PluginManager.cpp index 3867ec9b..2f4d8750 100644 --- a/src/Daemon/PluginManager.cpp +++ b/src/Daemon/PluginManager.cpp @@ -58,9 +58,9 @@ bool LoadPluginSettings(const char *pPath, map_plugin_settings_t& pSettings) std::string value; for (ii = 0; ii < line.length(); ii++) { - if (line[ii] == '\"') + if (line[ii] == '"') { - in_quote = in_quote == true ? false : true; + in_quote = !in_quote; } if (isspace(line[ii]) && !in_quote) { @@ -166,9 +166,10 @@ void CPluginManager::LoadPlugin(const char *pName) { std::string libPath = ssprintf(PLUGINS_LIB_DIR"/"PLUGINS_LIB_PREFIX"%s."PLUGINS_LIB_EXTENSION, pName); abrtPlugin = new CABRTPlugin(libPath.c_str()); - if (abrtPlugin->GetMagicNumber() != PLUGINS_MAGIC_NUMBER || - (abrtPlugin->GetType() < ANALYZER && abrtPlugin->GetType() > DATABASE)) - { + if (abrtPlugin->GetMagicNumber() != PLUGINS_MAGIC_NUMBER + || abrtPlugin->GetType() < 0 + || abrtPlugin->GetType() > MAX_PLUGIN_TYPE + ) { throw CABRTException(EXCEP_PLUGIN, "CPluginManager::LoadPlugin(): non-compatible plugin"); } log("Plugin %s (%s) succesfully loaded", pName, abrtPlugin->GetVersion()); diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py index 3ada6f25..ee802a88 100644 --- a/src/Gui/CCMainWindow.py +++ b/src/Gui/CCMainWindow.py @@ -305,7 +305,9 @@ class MainWindow(): self.pBarWindow.show_all() self.timer = gobject.timeout_add(100, self.progress_update_cb) reporters_settings = {} - self.pluginlist = getPluginInfoList(self.ccdaemon, refresh=True) + # self.pluginlist = getPluginInfoList(self.ccdaemon, refresh=True) + # don't force refresh! + self.pluginlist = getPluginInfoList(self.ccdaemon) for plugin in self.pluginlist.getReporterPlugins(): reporters_settings[str(plugin)] = plugin.Settings self.ccdaemon.Report(result, reporters_settings) diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py index 5db06963..16f5843f 100644 --- a/src/Gui/CCReporterDialog.py +++ b/src/Gui/CCReporterDialog.py @@ -15,9 +15,15 @@ from PluginList import getPluginInfoList from abrt_utils import _ # FIXME - create method or smth that returns type|editable|content -TYPE = 0 -EDITABLE = 1 -CONTENT = 2 +CD_TYPE = 0 +CD_EDITABLE = 1 +CD_CONTENT = 2 + +CD_SYS = "s" +CD_BIN = "b" +CD_TXT = "t" +CD_ATT = "a" + # response REFRESH = -50 @@ -175,8 +181,8 @@ class ReporterDialog(): buff = gtk.TextBuffer() comment = _("Brief description how to reproduce this or what you did...") try: - if self.report[item][CONTENT]: - comment = self.report[item][CONTENT] + if self.report[item][CD_CONTENT]: + comment = self.report[item][CD_CONTENT] self.comment_changed = True except Exception, e: pass @@ -189,8 +195,8 @@ class ReporterDialog(): buff = gtk.TextBuffer() how_to_reproduce = _("") try: - if self.report[item][CONTENT]: - how_to_reproduce = self.report[item][CONTENT] + if self.report[item][CD_CONTENT]: + how_to_reproduce = self.report[item][CD_CONTENT] self.how_to_changed = True except Exception, e: pass @@ -202,7 +208,7 @@ class ReporterDialog(): # if an backtrace has rating use it if item == "rating": try: - package = self.report["package"][CONTENT] + package = self.report["package"][CD_CONTENT] # if we don't have package for some reason except: package = None @@ -210,7 +216,7 @@ class ReporterDialog(): lErrors = self.wTree.get_widget("lErrors") bSend = self.wTree.get_widget("bSend") # not usable report - if int(self.report[item][CONTENT]) < 3: + if int(self.report[item][CD_CONTENT]) < 3: ebErrors.show() ebErrors.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("red")) if package: @@ -220,7 +226,7 @@ class ReporterDialog(): lErrors.set_markup("<span color=\"white\">%s</span>" % _("The bactrace is unusable, you can't report this!")) bSend.set_sensitive(False) # probably usable 3 - elif int(self.report[item][CONTENT]) < 4: + elif int(self.report[item][CD_CONTENT]) < 4: ebErrors.show() ebErrors.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("yellow")) lErrors.set_markup("<span color=\"black\">%s</span>" % _("The bactrace is incomplete, please make sure you provide good steps to reproduce.")) @@ -229,36 +235,36 @@ class ReporterDialog(): ebErrors.hide() bSend.set_sensitive(True) - if self.report[item][TYPE] != 's': + if self.report[item][CD_TYPE] != CD_SYS: # item name 0| value 1| editable? 2| toggled? 3| visible?(attachment)4 - if self.report[item][EDITABLE] == 'y': + if self.report[item][CD_EDITABLE] == 'y': self.editable.append(item) - self.row_dict[item] = self.reportListStore.append([item, self.report[item][CONTENT], + self.row_dict[item] = self.reportListStore.append([item, self.report[item][CD_CONTENT], item in self.editable, True, - self.report[item][TYPE] in ['a','b']]) + self.report[item][CD_TYPE] in [CD_ATT,CD_BIN]]) def dehydrate(self): attributes = ["item", "content", "editable", "send", "attachment"] for row in self.reportListStore: rowe = dict(zip(attributes, row)) if not rowe["editable"] and not rowe["attachment"]: - self.report[rowe["item"]][CONTENT] = rowe["content"] + self.report[rowe["item"]][CD_CONTENT] = rowe["content"] elif rowe["editable"] and not rowe["attachment"]: - self.report[rowe["item"]][CONTENT] = rowe["content"] + self.report[rowe["item"]][CD_CONTENT] = rowe["content"] elif (rowe["attachment"] or (rowe["editable"] and rowe["attachment"])) and rowe["send"]: - self.report[rowe["item"]][CONTENT] = rowe["content"] + self.report[rowe["item"]][CD_CONTENT] = rowe["content"] else: del self.report[rowe["item"]] # handle comment if self.comment_changed: buff = self.tvComment.get_buffer() - self.report["Comment"] = ['t', 'y', buff.get_text(buff.get_start_iter(),buff.get_end_iter())] + self.report["Comment"] = [CD_TXT, 'y', buff.get_text(buff.get_start_iter(),buff.get_end_iter())] else: del self.report["Comment"] # handle how to reproduce if self.how_to_changed: buff = self.tevHowToReproduce.get_buffer() - self.report["How to reproduce"] = ['t', 'y', buff.get_text(buff.get_start_iter(),buff.get_end_iter())] + self.report["How to reproduce"] = [CD_TXT, 'y', buff.get_text(buff.get_start_iter(),buff.get_end_iter())] else: del self.report["How to reproduce"] diff --git a/src/Gui/ConfBackend.py b/src/Gui/ConfBackend.py index c7b0450d..c5ec597f 100644 --- a/src/Gui/ConfBackend.py +++ b/src/Gui/ConfBackend.py @@ -52,6 +52,8 @@ class ConfBackendGnomeKeyring(ConfBackend): except gkey.NoMatchError: # nothing found pass + except gkey.DeniedError: + print _("Acces to gnome-keyring has been denied, plugins settings won't be saved.") # delete all items containg "AbrtPluginInfo":<plugin_name>, so we always have only 1 item per plugin for item in item_list: diff --git a/src/Gui/PluginsSettingsDialog.py b/src/Gui/PluginsSettingsDialog.py index d8eac71e..48e55bf0 100644 --- a/src/Gui/PluginsSettingsDialog.py +++ b/src/Gui/PluginsSettingsDialog.py @@ -90,7 +90,9 @@ class PluginsSettingsDialog: #print "settings hydrate" self.pluginsListStore.clear() try: - pluginlist = getPluginInfoList(self.ccdaemon, refresh=True) + #pluginlist = getPluginInfoList(self.ccdaemon, refresh=True) + # don't force refresh as it will overwrite settings if g-k is not available + pluginlist = getPluginInfoList(self.ccdaemon) except Exception, e: print e #gui_error_message("Error while loading plugins info, please check if abrt daemon is running\n %s" % e) diff --git a/src/Gui/report.glade b/src/Gui/report.glade index 428c4ec7..29c5c288 100644 --- a/src/Gui/report.glade +++ b/src/Gui/report.glade @@ -93,13 +93,13 @@ <widget class="GtkScrolledWindow" id="scrolledwindow2"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="hscrollbar_policy">never</property> + <property name="hscrollbar_policy">automatic</property> <property name="vscrollbar_policy">automatic</property> <child> <widget class="GtkTextView" id="tevHowToReproduce"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="wrap_mode">word</property> + <property name="wrap_mode">word-char</property> </widget> </child> </widget> @@ -139,13 +139,13 @@ <widget class="GtkScrolledWindow" id="scrolledwindow1"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="hscrollbar_policy">never</property> + <property name="hscrollbar_policy">automatic</property> <property name="vscrollbar_policy">automatic</property> <child> <widget class="GtkTextView" id="tvComment"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="wrap_mode">word</property> + <property name="wrap_mode">word-char</property> </widget> </child> </widget> diff --git a/src/Hooks/dumpoops.cpp b/src/Hooks/dumpoops.cpp index b031d39c..4b6778d0 100644 --- a/src/Hooks/dumpoops.cpp +++ b/src/Hooks/dumpoops.cpp @@ -45,7 +45,7 @@ int main(int argc, char **argv) /* Parse options */ bool opt_d = 0, opt_s = 0; int opt; - while ((opt = getopt(argc, argv, "ds")) != -1) { + while ((opt = getopt(argc, argv, "dsv")) != -1) { switch (opt) { case 'd': opt_d = 1; @@ -53,6 +53,10 @@ int main(int argc, char **argv) case 's': opt_s = 1; break; + case 'v': + /* Kerneloops code uses VERB3, thus: */ + g_verbose = 3; + break; default: usage: error_msg_and_die( @@ -60,6 +64,7 @@ int main(int argc, char **argv) "Options:\n" "\t-d\tCreate ABRT dump for every oops found\n" "\t-s\tPrint found oopses on standard output\n" + "\t-v\tVerbose\n" , program_name ); } |