summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunmin Lee <sunm.lee@samsung.com>2016-12-05 16:59:22 +0900
committerSunmin Lee <sunm.lee@samsung.com>2016-12-05 18:55:30 +0900
commit0b4d07401375ca142782fe9001eef196b0ecf0d7 (patch)
treed16c86c6267197b8d976c7541f15cef149f03da8
parent7be4966ac4a0ca03b68ded0b9b883a0f7bc568f1 (diff)
downloadcrash-worker-accepted/tizen/3.0/tv/20161209.102432.tar.gz
crash-worker-accepted/tizen/3.0/tv/20161209.102432.tar.bz2
crash-worker-accepted/tizen/3.0/tv/20161209.102432.zip
Launching crash popup and collecting log are required to be done first. Change-Id: I97d48117223fffc7c61923c742062f16b4f288eb
-rw-r--r--src/crash-manager/99-crash-manager.conf.in2
-rw-r--r--src/crash-manager/crash-manager.sh.in38
2 files changed, 12 insertions, 28 deletions
diff --git a/src/crash-manager/99-crash-manager.conf.in b/src/crash-manager/99-crash-manager.conf.in
index 8277deb..505bc20 100644
--- a/src/crash-manager/99-crash-manager.conf.in
+++ b/src/crash-manager/99-crash-manager.conf.in
@@ -1,3 +1,3 @@
# Tizen crash-manager
-kernel.core_pattern=|/usr/bin/crash-manager.sh %p %u %g %s %t %e
+kernel.core_pattern=|/usr/bin/crash-manager.sh %p %u %g %s %t %e %E
kernel.core_pipe_limit=10
diff --git a/src/crash-manager/crash-manager.sh.in b/src/crash-manager/crash-manager.sh.in
index 882f0c3..93e1e6a 100644
--- a/src/crash-manager/crash-manager.sh.in
+++ b/src/crash-manager/crash-manager.sh.in
@@ -26,7 +26,7 @@ DEBUG=1
# Expected invocation from kernel:
#
-# argv0 PID UID GID SIGNAL TIME CMD
+# argv0 PID UID GID SIGNAL TIME CMD EXEPATH
pid="$1"
time="$5"
cmd="$6"
@@ -48,34 +48,10 @@ then
mv "$sysassert_cs_path" "$pfx/"
fi
-if [ $DEBUG -eq 1 ]
-then
- @CRASH_PIPE_PATH@ --save-core "$core_path" --report "$@" > "$info_path"
-# @CRASH_STACK_PATH@ --pid "$pid" >> "$info_path"
-else
- @CRASH_PIPE_PATH@ --report "$@" > "$info_path"
-# @CRASH_STACK_PATH@ --pid "$pid" >> "$info_path"
-fi
-
if [ -e $TZ_SYS_ETC/.debugmode ]
then
#Find the full path of executable. The path is used to find appid in the crash-popup
- exepath=" "
- found=0
- while read line
- do
- if [ $found -eq 1 ]
- then
- exepath=$(echo $line | sed "s/0: //")
- break
- fi
-
- if [ "$line" = "Cmdline:" ]
- then
- found=1
- fi
-
- done < $info_path
+ exepath="$(echo $7 | sed 's/!/\//g')"
#Call dbus method to launch the crash-popup
/usr/bin/dbus-send --system --type=method_call --print-reply --reply-timeout=120000 --dest=org.tizen.system.popup /Org/Tizen/System/Popup/Crash org.tizen.system.popup.Crash.PopupLaunch dict:string:string:"_SYSPOPUP_CONTENT_","crash","_PROCESS_NAME_","${cmd}","_EXEPATH_","${exepath}"
@@ -84,8 +60,16 @@ fi
dump_systemstate -d -k -f "$log_path" || true
+if [ $DEBUG -eq 1 ]
+then
+ @CRASH_PIPE_PATH@ --save-core "$core_path" --report "$@" > "$info_path"
+# @CRASH_STACK_PATH@ --pid "$pid" >> "$info_path"
+else
+ @CRASH_PIPE_PATH@ --report "$@" > "$info_path"
+# @CRASH_STACK_PATH@ --pid "$pid" >> "$info_path"
+fi
+
tar czf "${temp_dir}/report.tar.gz" -C "$temp_dir" "$name"
mv "${temp_dir}/report.tar.gz" "$result_path"
[ "$temp_dir" ] && rm -rf "$temp_dir"
-