From Fedora Project Wiki
No edit summary |
No edit summary |
||
(14 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{Update}} | |||
{{QA/Test_Case | {{QA/Test_Case | ||
|description= This test case is designed to confirm that | |description= This test case is designed to confirm that ABRT can properly detect and diagnose application crashes from C/C++ programs. | ||
|actions= | |actions= | ||
# In {{filename|/etc/abrt/ | # In {{filename|/etc/abrt/abrt_event.conf}}, ensure a reporting mechanism is configured to save package data: | ||
# | #:EVENT=post-create abrt-action-save-package-data | ||
# Choose | #:include events.d/*.conf | ||
# Run the application you wish to capture a crash. If using the {{command|sleep}} command, open a terminal and run the command: | # Make sure you have <tt>EVENT=post-create analyzer=CCpp abrt-action-analyze-c</tt> in {{filename|/etc/abrt/events.d/ccpp_events.conf}} | ||
# In another terminal, force an application crash by locating the process id, and using the {{command|kill}} command. | {{admon/note|These are defaults|The settings above are the defaults. If you are running a clean live image or have never manually changed abrt configuration, they should be correct.}} | ||
# If you changed configuration, restart the ''abrtd'' service with the command {{command|su -c 'service abrtd restart'}}. | |||
# Open {{command|abrt-gui}} by clicking on | # Choose any ELF binary application and crash it. For this example, we will use the {{command|sleep}} command which is provided by {{package|coreutils}}. | ||
# Pick the crash from the list, generate a crash report by pressing " | # Run the application you wish to capture a crash. If using the {{command|sleep}} command, open a terminal and run the command: {{command|sleep 5m}} | ||
# In another terminal, force an application crash by locating the process id, and using the {{command|kill}} command, or using {{command|pkill}} or {{command|killall}}. For example, {{command|pkill -SIGSEGV sleep}} | |||
# Open {{command|abrt-gui}} by clicking on applet icon or notification. | |||
# Pick the crash from the list, generate a crash report by pressing "Open" button, then provide meaningful information into text areas, choosing one of configured analyzers (e.g. Retrace Server). Then choose desired reporter facility e.g. Logger, review the backtrace and finally report data. | |||
|results= | |results= | ||
# | # A desktop notification and applet icon should appear in notification area with notification stating "Crash in package coreutils-1.2.3 has been detected" | ||
# | # There are two buttons in the notification: | ||
# Selecting the application from {{command|abrt-gui}} and reporting the failure | ## "Report" -> opens the reporter dialog for the latest detected crash directly | ||
## "Show" -> opens the main window | |||
Core was generated by `sleep | # Selecting the application from {{command|abrt-gui}} and reporting the failure should generate a proper backtrace. Proper backtrace should have symbolic information, for example: | ||
Program terminated with signal 6, Aborted. | #: Core was generated by `sleep 5m'. | ||
#0 0x00007f4b65f45380 in __nanosleep_nocancel () from /lib64/libc.so.6 | #: Program terminated with signal 6, Aborted. | ||
#: #0 0x00007f4b65f45380 in __nanosleep_nocancel () from /lib64/libc.so.6 | |||
Thread 1 (Thread 8328): | #: | ||
#0 0x00007f4b65f45380 in __nanosleep_nocancel () from /lib64/libc.so.6 | #: Thread 1 (Thread 8328): | ||
No symbol table info available. | #: #0 0x00007f4b65f45380 in __nanosleep_nocancel () from /lib64/libc.so.6 | ||
#1 0x00000000004037ab in rpl_nanosleep (requested_delay=0x7fff893f35c0, | #: No symbol table info available. | ||
remaining_delay=0x0) at nanosleep.c:69 | #: #1 0x00000000004037ab in rpl_nanosleep (requested_delay=0x7fff893f35c0, | ||
r = -516 | #: remaining_delay=0x0) at nanosleep.c:69 | ||
delay = {tv_sec = 1260, tv_nsec = 0} | #: r = -516 | ||
t0 = {tv_sec = 29277, tv_nsec = 542118648} | #: delay = {tv_sec = 1260, tv_nsec = 0} | ||
#2 0x000000000040321b in xnanosleep (seconds=<value optimized out>) | #: t0 = {tv_sec = 29277, tv_nsec = 542118648} | ||
at xnanosleep.c:112 | #: #2 0x000000000040321b in xnanosleep (seconds=<value optimized out>) | ||
overflow = false | #: at xnanosleep.c:112 | ||
ts_sleep = {tv_sec = 1260, tv_nsec = 0} | #: overflow = false | ||
__PRETTY_FUNCTION__ = "xnanosleep" | #: ts_sleep = {tv_sec = 1260, tv_nsec = 0} | ||
#3 0x000000000040176c in main (argc=2, argv=0x7fff893f3758) at sleep.c:147 | #: __PRETTY_FUNCTION__ = "xnanosleep" | ||
i = 2 | #: #3 0x000000000040176c in main (argc=2, argv=0x7fff893f3758) at sleep.c:147 | ||
seconds = 1260 | #: i = 2 | ||
ok = true | #: seconds = 1260 | ||
... | #: ok = true | ||
#: ... | |||
}} | }} | ||
[[Category: | [[Category:Package_abrt_test_cases]] |
Latest revision as of 17:50, 22 September 2011
Description
This test case is designed to confirm that ABRT can properly detect and diagnose application crashes from C/C++ programs.
How to test
- In
/etc/abrt/abrt_event.conf
, ensure a reporting mechanism is configured to save package data:- EVENT=post-create abrt-action-save-package-data
- include events.d/*.conf
- Make sure you have EVENT=post-create analyzer=CCpp abrt-action-analyze-c in
/etc/abrt/events.d/ccpp_events.conf
- If you changed configuration, restart the abrtd service with the command
su -c 'service abrtd restart'
. - Choose any ELF binary application and crash it. For this example, we will use the
sleep
command which is provided bycoreutils
. - Run the application you wish to capture a crash. If using the
sleep
command, open a terminal and run the command:sleep 5m
- In another terminal, force an application crash by locating the process id, and using the
kill
command, or usingpkill
orkillall
. For example,pkill -SIGSEGV sleep
- Open
abrt-gui
by clicking on applet icon or notification. - Pick the crash from the list, generate a crash report by pressing "Open" button, then provide meaningful information into text areas, choosing one of configured analyzers (e.g. Retrace Server). Then choose desired reporter facility e.g. Logger, review the backtrace and finally report data.
Expected Results
- A desktop notification and applet icon should appear in notification area with notification stating "Crash in package coreutils-1.2.3 has been detected"
- There are two buttons in the notification:
- "Report" -> opens the reporter dialog for the latest detected crash directly
- "Show" -> opens the main window
- Selecting the application from
abrt-gui
and reporting the failure should generate a proper backtrace. Proper backtrace should have symbolic information, for example:- Core was generated by `sleep 5m'.
- Program terminated with signal 6, Aborted.
- #0 0x00007f4b65f45380 in __nanosleep_nocancel () from /lib64/libc.so.6
- Thread 1 (Thread 8328):
- #0 0x00007f4b65f45380 in __nanosleep_nocancel () from /lib64/libc.so.6
- No symbol table info available.
- #1 0x00000000004037ab in rpl_nanosleep (requested_delay=0x7fff893f35c0,
- remaining_delay=0x0) at nanosleep.c:69
- r = -516
- delay = {tv_sec = 1260, tv_nsec = 0}
- t0 = {tv_sec = 29277, tv_nsec = 542118648}
- #2 0x000000000040321b in xnanosleep (seconds=<value optimized out>)
- at xnanosleep.c:112
- overflow = false
- ts_sleep = {tv_sec = 1260, tv_nsec = 0}
- __PRETTY_FUNCTION__ = "xnanosleep"
- #3 0x000000000040176c in main (argc=2, argv=0x7fff893f3758) at sleep.c:147
- i = 2
- seconds = 1260
- ok = true
- ...