platform/core/system/crash-worker.git
7 years agoDisable New Crash Stack 72/101072/1 accepted/tizen/3.0/common/20161203.012219 accepted/tizen/3.0/ivi/20161202.005611 accepted/tizen/3.0/mobile/20161202.005518 accepted/tizen/3.0/tv/20161202.005535 accepted/tizen/3.0/wearable/20161202.005555 submit/tizen_3.0/20161201.060326
Kunhoon Baik [Wed, 30 Nov 2016 08:04:52 +0000 (17:04 +0900)]
Disable New Crash Stack

Change-Id: I3a7446f91e1d6289f8a37150c13669f058442685

7 years agolog_dump: broadcast start/finish dbus signal 36/97636/6
Sunmin Lee [Tue, 15 Nov 2016 01:27:56 +0000 (10:27 +0900)]
log_dump: broadcast start/finish dbus signal

log_dump offers start/finish signal so other processes can recognize
log_dump's operation in different way rather than waiting it's reply.

Change-Id: Id23f181fd820f996071da30c895896850c4c474a

7 years agoSeveral modifications for backward compatibility 53/98853/3
Sunmin Lee [Mon, 21 Nov 2016 05:03:36 +0000 (14:03 +0900)]
Several modifications for backward compatibility

1) Change log_dump dbus path and interface.
2) Add delete_dump option to log_dump's dbus interface.
3) Move log_dump's result from CRASH_ROOT to LOG_DUMP_RESULT.
4) tizen-debug on/off services are added.

Change-Id: I0257537ad69b524714370c1ecfa11cc9d942a560
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
7 years agoChange executable to shared object 46/99146/1 accepted/tizen/3.0/common/20161124.181826 accepted/tizen/3.0/ivi/20161124.082111 accepted/tizen/3.0/mobile/20161124.082043 accepted/tizen/3.0/tv/20161124.082055 accepted/tizen/3.0/wearable/20161124.082104 submit/tizen_3.0/20161123.105217
Sunmin Lee [Tue, 22 Nov 2016 04:56:38 +0000 (13:56 +0900)]
Change executable to shared object

Because of security issue, executables made by crash-worker
should be shared object.

Change-Id: I898b8c2f7b6e70366e69d56339fc355ef4c33944
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
7 years agoengineer mode: make .debugmode on engineer image 62/98762/1
taeyoung [Fri, 18 Nov 2016 13:52:29 +0000 (22:52 +0900)]
engineer mode: make .debugmode on engineer image

- .debugmode file makes platform to launch crash popup
  when crash is occurred

Change-Id: Id7bd88b534f1dd1aa86eab12cfcef6e8b48332ab
Signed-off-by: taeyoung <ty317.kim@samsung.com>
7 years agoMerge branch 'tizen' into tizen_3.0 71/97271/1 accepted/tizen/3.0/common/20161115.184135 accepted/tizen/3.0/ivi/20161115.022319 accepted/tizen/3.0/mobile/20161115.022212 accepted/tizen/3.0/tv/20161115.022241 accepted/tizen/3.0/wearable/20161115.022259 submit/tizen_3.0/20161113.013524
taeyoung [Sat, 12 Nov 2016 06:49:45 +0000 (15:49 +0900)]
Merge branch 'tizen' into tizen_3.0

- Fix for user lazy mount of 3 partition.
- Revert "Disable New CallStack Generation"
- util: bug fix for remove_dir_internal()
- log_dump: Dump current system states
- log_dump: triggered by dbus method call
- log_dump: change log_dump output directories
- log_dump: seperate crash dump from log_dump
- Guarantee the completion of crash worker

Change-Id: I7221927edf4b6bde193c424043969407e9eefef3
Signed-off-by: taeyoung <ty317.kim@samsung.com>
7 years agoGuarantee the completion of crash worker 37/97237/1 accepted/tizen/common/20161114.171303 accepted/tizen/ivi/20161114.010215 accepted/tizen/mobile/20161114.010042 accepted/tizen/tv/20161114.010107 accepted/tizen/wearable/20161114.010143 submit/tizen/20161112.041858
Kunhoon Baik [Fri, 11 Nov 2016 12:24:43 +0000 (21:24 +0900)]
Guarantee the completion of crash worker

To handle process information in several process,
The kernel needs to wait for usermode-helper process to be finished.
For supporting the usermode-helper process completion, use core_pipe_limit.

Change-Id: I1035c26cc3780fb3a8ddeded351b4e4a00ad546d

7 years agolog_dump: seperate crash dump from log_dump 87/96287/2
Sunmin Lee [Tue, 8 Nov 2016 10:16:59 +0000 (19:16 +0900)]
log_dump: seperate crash dump from log_dump

The crash dump means output of crash-manager triggered by crashed apps.
These logs will be compressed together when OPT_NORMAL option rather than
be moved into log_dump's output by app_log.sh.

Change-Id: Ib2588176de217d16a37b7a916fd765016b4b8862
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
7 years agolog_dump: change log_dump output directories 04/96204/3
Sunmin Lee [Tue, 8 Nov 2016 05:32:29 +0000 (14:32 +0900)]
log_dump: change log_dump output directories

TZ_SYS_ALLLOGS: log_dump's destination directory.
TZ_SYS_CRASH_ROOT:
 the compressed log file would be placed in TZ_SYS_CRASH_ROOT.

Change-Id: I2abaa253de39c0eaceffd7b61b09ca649ef88026
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
7 years agolog_dump: triggered by dbus method call 14/96014/2 accepted/tizen/common/20161108.131657 accepted/tizen/ivi/20161109.002238 accepted/tizen/mobile/20161109.002140 accepted/tizen/tv/20161109.002159 accepted/tizen/wearable/20161109.002218 submit/tizen/20161108.022628
Sunmin Lee [Mon, 7 Nov 2016 09:02:57 +0000 (18:02 +0900)]
log_dump: triggered by dbus method call

Add dbus activation feature to log_dump.
It handles two method: normal_dump, short_dump.
Each method corresponds to the options of log_dump.

Change-Id: I3384954f70c55fb7990fe9c5e14405ba63673a63
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
7 years agolog_dump: Dump current system states 92/95692/4
Sunmin Lee [Fri, 4 Nov 2016 08:05:52 +0000 (17:05 +0900)]
log_dump: Dump current system states

log_dump is command line tool which is used to dump current system states.
The system states include from dump_systemstate's output
to application/module/system logs.
Further logs can be dumped by the scripts that would be installed
into dump_scripts directory.

Change-Id: Icb60ba85afc8b3d4fbec99e822ad20b8c8a2d36d
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
7 years agoutil: bug fix for remove_dir_internal() 50/95650/1
Sunmin Lee [Fri, 4 Nov 2016 06:03:56 +0000 (15:03 +0900)]
util: bug fix for remove_dir_internal()

In the remove_dir_internal(), it had not skipped dot directories (".", "..").
Fix this malfunction.

Change-Id: Ie37b1e409380b2e0479538d4d3b67bbf27eebc26
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
7 years agoRevert "Disable New CallStack Generation" 59/94459/2
Sunmin Lee [Mon, 31 Oct 2016 04:36:25 +0000 (13:36 +0900)]
Revert "Disable New CallStack Generation"

Enable crash-stack's call stack generation

This reverts commit be6568a9bba0254ecb01b7cb4f9d52f07098a917.

Change-Id: Idaa0bef2862440b67833bec237cadf8793a369f0

7 years agoFix for user lazy mount of 3 partition. 43/93543/1
Kunhoon Baik [Tue, 25 Oct 2016 01:38:04 +0000 (10:38 +0900)]
Fix for user lazy mount of 3 partition.

When user partition is not mounted and some process is crashed,
The crash-worker tries to generate core-files at system partition.

Change-Id: I295553a8afb2f0f11916e574bd116f876271fc7f

7 years agoSet debugmode by checking debugmode file 41/89541/1 accepted/tizen/3.0/common/20161114.110031 accepted/tizen/3.0/ivi/20161011.043757 accepted/tizen/3.0/mobile/20161015.032636 accepted/tizen/3.0/tv/20161016.003932 accepted/tizen/3.0/wearable/20161015.081841 accepted/tizen/common/20160926.154301 accepted/tizen/ivi/20160927.020736 accepted/tizen/mobile/20160927.021102 accepted/tizen/tv/20160927.021042 accepted/tizen/wearable/20160927.021051 submit/tizen/20160926.074333 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000001 submit/tizen_3.0_mobile/20161015.000001 submit/tizen_3.0_tv/20161015.000001 submit/tizen_3.0_wearable/20161015.000001
Kunhoon Baik [Mon, 26 Sep 2016 04:08:18 +0000 (13:08 +0900)]
Set debugmode by checking debugmode file
 - If debugmode is enabled, crash popup is shown
 - Else crash popup is not shown.

Related patch : https://review.tizen.org/gerrit/#/c/88421/

Change-Id: Iad7d79309b507d96e26ddda99472acadc0a45cd9

7 years agoupgrade: add upgrade script 04/88104/6 accepted/tizen/common/20160919.154630 accepted/tizen/ivi/20160920.052653 accepted/tizen/mobile/20160920.052606 accepted/tizen/tv/20160920.052618 accepted/tizen/wearable/20160920.052637 submit/tizen/20160919.061739
taeyoung [Tue, 13 Sep 2016 10:09:57 +0000 (19:09 +0900)]
upgrade: add upgrade script

The script updates the permission, owner, and smack label
of the crash dump path. In addition, not used directories
are removed.

Change-Id: I43e727b5a7b6fe2a0c7636c82024b065239ba1d8
Signed-off-by: taeyoung <ty317.kim@samsung.com>
7 years agoBug fix for crash-wrorker 39/87339/1 accepted/tizen/common/20160909.114645 accepted/tizen/ivi/20160909.062108 accepted/tizen/mobile/20160909.062020 accepted/tizen/tv/20160909.062036 accepted/tizen/wearable/20160909.062050 submit/tizen/20160908.234540 submit/tizen/20160908.234544
Kunhoon Baik [Wed, 7 Sep 2016 11:00:19 +0000 (20:00 +0900)]
Bug fix for crash-wrorker

1) assign privilege for crash-manager.sh
2) check readdir_r's NULL

Change-Id: I42f191edfec12ccbbc47461c2038f33c3c214870

7 years agoRevert "crash-stack: unwinding by frame pointer on aarch64" 53/87253/2 accepted/tizen/common/20160907.154338 accepted/tizen/common/20160907.154541 accepted/tizen/ivi/20160908.003901 accepted/tizen/mobile/20160908.003755 accepted/tizen/tv/20160908.003813 accepted/tizen/wearable/20160908.003839 submit/tizen/20160907.035120 submit/tizen/20160907.071637
Kunhoon Baik [Wed, 7 Sep 2016 07:03:39 +0000 (00:03 -0700)]
Revert "crash-stack: unwinding by frame pointer on aarch64"

This reverts commit 269790304eea1bde27644962efa7803c7ab611df.

Change-Id: I51faa6e98adc9463f589ababd7a5dd8a4a1db2fa

7 years agoRevert "crash-stack: adding fallback heuristic method for unwinding" 51/87251/2
Kunhoon Baik [Wed, 7 Sep 2016 07:03:13 +0000 (00:03 -0700)]
Revert "crash-stack: adding fallback heuristic method for unwinding"

This reverts commit f29763ccb1cf24bea7807b55ecd9722e3cb03743.

Change-Id: Id8885d5593f8e963cb8ad6e35149990168cbe33a

7 years agoRevert "Fixed coding style & added doxygen docs" 50/87250/2
Kunhoon Baik [Wed, 7 Sep 2016 07:02:42 +0000 (00:02 -0700)]
Revert "Fixed coding style & added doxygen docs"

This reverts commit 11c142a267540ee070db0c8c1dc47c022edd02a6.

Change-Id: I9282c61b7116237bddd2172220eb68ed4cb54fcc

7 years agocommon: change %{_tmpfilesdir} to %{_sysconfdir}/tmpfiles.d 86/86786/1
taeyoung [Mon, 5 Sep 2016 01:45:59 +0000 (10:45 +0900)]
common: change %{_tmpfilesdir} to %{_sysconfdir}/tmpfiles.d

- Using /usr/lib/tmpfiles.d requires the systemd dependency.
  Thus the path is replaced to /etc/tmpfiles.d.

Change-Id: I0b62f44ea7c793506bfb44a593ec21e719f1b518
Signed-off-by: taeyoung <ty317.kim@samsung.com>
7 years agoFixed coding style & added doxygen docs 92/85492/4
Adrian Szyndela [Thu, 25 Aug 2016 10:17:00 +0000 (12:17 +0200)]
Fixed coding style & added doxygen docs

Change-Id: I10fef06201d4ef101635d6be410345c22273357c

7 years agoMerge "crash-pipe: Always return -errno on error" into tizen
Karol Lewandowski [Wed, 24 Aug 2016 12:15:49 +0000 (05:15 -0700)]
Merge "crash-pipe: Always return -errno on error" into tizen

7 years agocrash-stack: adding fallback heuristic method for unwinding 71/76371/4
Adrian Szyndela [Thu, 23 Jun 2016 13:01:27 +0000 (15:01 +0200)]
crash-stack: adding fallback heuristic method for unwinding

In case no better method is ready or available, this method
may yield some useful results. It simply walks over data stack
and checks word after word if it looks like an address from
any function. All such addresses are considered as call stack
functions. It should generally show all the called functions
that left any trace on the stack. However, among those there
may be a number of false positives.

This is currently used for x86* architectures.

Change-Id: I0ce28260ed9a6c51b925e1041a3496c1959cab1f

7 years agoMerge "crash-stack: unwinding by frame pointer on aarch64" into tizen
Adrian Szyndela [Wed, 24 Aug 2016 12:10:54 +0000 (05:10 -0700)]
Merge "crash-stack: unwinding by frame pointer on aarch64" into tizen

7 years agoMerge "crash-stack: Made default configuration without core dumps" into tizen
Adrian Szyndela [Wed, 24 Aug 2016 12:10:18 +0000 (05:10 -0700)]
Merge "crash-stack: Made default configuration without core dumps" into tizen

7 years agocrash-stack: unwinding by frame pointer on aarch64 70/76370/4
Adrian Szyndela [Thu, 23 Jun 2016 13:00:28 +0000 (15:00 +0200)]
crash-stack: unwinding by frame pointer on aarch64

To unwind call stack on aarch64 we need to use external
method, as libelf 0.153 does not support unwinding yet.
Possible methods are:
- using libunwind;
- manual walk with frame pointers;
- heuristic unwind by inspecting data stack.

This patch adds support for unwinding on aarch64 with frame pointers,
along with changes needed to modularize unwinding.

Change-Id: Ib2cee21277f6bc500046bf6e9d70cf19a733dca8

7 years agocrash-pipe: Always return -errno on error 39/84839/1
Karol Lewandowski [Mon, 22 Aug 2016 12:04:01 +0000 (14:04 +0200)]
crash-pipe: Always return -errno on error

Change-Id: I330b5366a5350cd9e8e54f4a04b7fa53f9122eca

7 years agopath: change crash root path from tizen-platform-config 12/83212/1 accepted/tizen/common/20160810.161640 accepted/tizen/ivi/20160810.081925 accepted/tizen/mobile/20160810.081827 accepted/tizen/tv/20160810.081846 accepted/tizen/wearable/20160810.081906 submit/tizen/20160809.223243 submit/tizen/20160810.003217
taeyoung [Tue, 9 Aug 2016 12:01:47 +0000 (21:01 +0900)]
path: change crash root path from tizen-platform-config

crash root path is defined by tizen-platform-config-meta.

Change-Id: I396f63afbabe1e4e97c7c3e257e48f10ffdfd64a
Signed-off-by: taeyoung <ty317.kim@samsung.com>
7 years agocrash-stack: Made default configuration without core dumps 55/76355/4
Adrian Szyndela [Thu, 23 Jun 2016 12:56:54 +0000 (14:56 +0200)]
crash-stack: Made default configuration without core dumps

Crash-manager does not use crash-stack core dump configuration now.
Core dump support needs libebl, which is not included in elfutils
license exception. Thus, with core dump support, we would need
to change license to GPL2. This patch disables core dumps support.
It can be enabled by giving -DWITH_CORE_DUMP=ON to cmake (see
crash-worker.spec for an example).

Change-Id: Ic8ed970217c52b6dcbca8934d0d4ee4010245d77

7 years agoRevert "Revert "popup: disable crash popup"" 78/81678/1 accepted/tizen/common/20160728.100403 accepted/tizen/ivi/20160727.235908 accepted/tizen/mobile/20160727.235821 accepted/tizen/tv/20160727.235834 accepted/tizen/wearable/20160727.235858 submit/tizen/20160727.231100
taeyoung [Wed, 27 Jul 2016 23:00:45 +0000 (08:00 +0900)]
Revert "Revert "popup: disable crash popup""

This reverts commit 70cd339a94c42bee1d23d89a44081611a1fbd65c.

Change-Id: I99b8b57a63f8bca3c88ba91c0752856fae9c839d
Signed-off-by: taeyoung <ty317.kim@samsung.com>
7 years agocrash-worker refactoring to meet Tizen coding style 90/81490/1
Lukasz Skalski [Tue, 26 Jul 2016 12:08:57 +0000 (14:08 +0200)]
crash-worker refactoring to meet Tizen coding style

Change-Id: I8a03903fad20656b61f753689041e478a4db8a5e

8 years agoRevert "popup: disable crash popup" 96/79796/1 accepted/tizen/common/20160713.050746 accepted/tizen/ivi/20160713.094220 accepted/tizen/mobile/20160713.094215 accepted/tizen/tv/20160713.094212 accepted/tizen/wearable/20160713.094156 submit/tizen/20160713.042628
taeyoung [Wed, 13 Jul 2016 04:23:31 +0000 (13:23 +0900)]
Revert "popup: disable crash popup"

This reverts commit 0b5f35d0b25269d92163bec2b44fecd5ab894fab.

Change-Id: I230b83937b455731031073bda1cff9102c5233c7
Signed-off-by: taeyoung <ty317.kim@samsung.com>
8 years agopopup: disable crash popup 83/79783/1 accepted/tizen/ivi/20160713.025318 accepted/tizen/mobile/20160713.025218 accepted/tizen/tv/20160713.025239 accepted/tizen/wearable/20160713.025253 submit/tizen/20160713.024126
taeyoung [Wed, 13 Jul 2016 02:37:28 +0000 (11:37 +0900)]
popup: disable crash popup

- For the Mobile and Wearable profile,
  crash popup is disabled

Change-Id: I547aa1e975e0b4083414d661de2ddb705e45baf9
Signed-off-by: taeyoung <ty317.kim@samsung.com>
8 years agocrash-pipe: add oom_score_adj information for the report 59/79659/1
taeyoung [Tue, 12 Jul 2016 08:01:51 +0000 (17:01 +0900)]
crash-pipe: add oom_score_adj information for the report

- oom_score_adj information is added to the crash report
- oom_score_adj is used in resourced as a criteria of
  selecting victims to increase free memory space

Change-Id: I749c0bfb789d3f08cdb7f11288cb9988ddb99e92
Signed-off-by: taeyoung <ty317.kim@samsung.com>
8 years agoCheck phdr for Referencing phdr 17/79217/1 accepted/tizen/common/20160711.170040 accepted/tizen/ivi/20160711.031048 accepted/tizen/mobile/20160711.030623 accepted/tizen/tv/20160711.030542 accepted/tizen/wearable/20160711.030546 submit/tizen/20160711.000426
Kunhoon Baik [Sat, 9 Jul 2016 02:30:19 +0000 (11:30 +0900)]
Check phdr for Referencing phdr

Change-Id: I63f07a7506d556de3d4c576fd141a007a34ceb0d

8 years agoApplying Tab indentation in crash-stack source code 16/79216/1
Kunhoon Baik [Sat, 9 Jul 2016 02:23:55 +0000 (11:23 +0900)]
Applying Tab indentation in crash-stack source code

Change-Id: If20003e278ec7171a9a7720059b2d3552c3155e1

8 years agoMerge "Remove SIGSEGV handling" into tizen accepted/tizen/common/20160707.171705 accepted/tizen/ivi/20160707.043457 accepted/tizen/mobile/20160707.043536 accepted/tizen/tv/20160707.043349 accepted/tizen/wearable/20160707.043505 submit/tizen/20160707.025405
Taeyoung Kim [Thu, 7 Jul 2016 02:53:50 +0000 (19:53 -0700)]
Merge "Remove SIGSEGV handling" into tizen

8 years agocrash: launch crash popup when crash is occurred 07/78407/1 accepted/tizen/common/20160706.142156 accepted/tizen/ivi/20160706.082506 accepted/tizen/mobile/20160706.082325 accepted/tizen/tv/20160706.082335 accepted/tizen/wearable/20160706.082347 submit/tizen/20160706.021530
taeyoung [Tue, 5 Jul 2016 10:38:41 +0000 (19:38 +0900)]
crash: launch crash popup when crash is occurred

- Crash popup is launched by the dbus method.
  The popup requires the full path of executable
  to show the appid to the user

Change-Id: Ibeadfe792faabc61706738f24806f9d7386e6fb3
Signed-off-by: taeyoung <ty317.kim@samsung.com>
8 years agocommon: fix thread safe issues and uninitialized issues 38/78238/1 accepted/tizen/common/20160706.141843 accepted/tizen/ivi/20160706.014012 accepted/tizen/mobile/20160706.013855 accepted/tizen/tv/20160706.013917 accepted/tizen/wearable/20160706.013956 submit/tizen/20160705.090208
taeyoung [Tue, 5 Jul 2016 00:04:46 +0000 (09:04 +0900)]
common: fix thread safe issues and uninitialized issues

Change-Id: Iefa413c6505ea909e20a8220278c46a353ec5c9b
Signed-off-by: taeyoung <ty317.kim@samsung.com>
8 years agoRemove SIGSEGV handling 62/78162/1
Kunhoon Baik [Mon, 4 Jul 2016 11:01:31 +0000 (20:01 +0900)]
Remove SIGSEGV handling

SIGSEGV (signal number - 11) may occur double crash when sys-assert tries to unwind backtrace.
like that

If the double crash is generated, it causes useless backtrace of corefile (double crashed memory dump)
Thus, sys-assert does not handle SIGSEGV.

Change-Id: I826ee2bab796fc87b2b4a003683315514af96339

8 years agocommon: set PATH env 33/77633/2 accepted/tizen/common/20160703.130705 accepted/tizen/ivi/20160701.034025 accepted/tizen/mobile/20160701.034149 accepted/tizen/tv/20160701.033935 accepted/tizen/wearable/20160701.034043 submit/tizen/20160630.121716 submit/tizen_common/20160701.180000
taeyoung [Thu, 30 Jun 2016 10:13:45 +0000 (19:13 +0900)]
common: set PATH env

- PATH env need to be added since system PATH env
  can have weird paths.

Change-Id: I68f82421cfef8d217d7ce7d999b9101496cd2b3e
Signed-off-by: taeyoung <ty317.kim@samsung.com>
8 years agosys-assert: apply registers for 64bit architecture 59/77459/5
taeyoung [Thu, 30 Jun 2016 01:44:00 +0000 (10:44 +0900)]
sys-assert: apply registers for 64bit architecture

- The registers of 64 bit architecture are little bit different
  with 32 bit architecture. Thus the operations to print
  register information are separated according to the architectures.

Change-Id: I44077fa88f18c97e1ae84caa4998feef6408b9dc
Signed-off-by: taeyoung <ty317.kim@samsung.com>
8 years agosys-assert: enable sys-assert 52/76252/6 submit/tizen/20160629.015943
taeyoung [Thu, 23 Jun 2016 07:59:19 +0000 (16:59 +0900)]
sys-assert: enable sys-assert

- Now we can choose crash-pipe/crash-stack or sys-assert
  to get callstacks

Change-Id: Ibb166c9206235cd7884aafd31fab008a8003236a
Signed-off-by: taeyoung <ty317.kim@samsung.com>
8 years agoDisable New CallStack Generation 87/77087/1 accepted/tizen/common/20160629.222736 accepted/tizen/ivi/20160629.021600 accepted/tizen/mobile/20160629.022327 accepted/tizen/tv/20160629.021524 accepted/tizen/wearable/20160629.021628 submit/tizen/20160628.231622
Kunhoon Baik [Tue, 28 Jun 2016 12:16:29 +0000 (21:16 +0900)]
Disable New CallStack Generation

If new callstack generation issues are fixed, this feature will be re-enabled

Change-Id: I7619acc80444d1d1ba0695e148241345df70803e

8 years agoUse ptrace for unwinding also with DEBUG=1. 73/76273/3 accepted/tizen/common/20160623.154616 accepted/tizen/ivi/20160623.125408 accepted/tizen/mobile/20160623.125319 accepted/tizen/tv/20160623.125335 accepted/tizen/wearable/20160623.125356 submit/tizen/20160623.105118 submit/tizen/20160624.015524
Adrian Szyndela [Thu, 23 Jun 2016 08:15:02 +0000 (10:15 +0200)]
Use ptrace for unwinding also with DEBUG=1.

Additionally: made explicit libebl dependency in spec file.
Libebl backends are loaded with dlopen() by libelf.
Thus, rpm can't find the dependency automatically.

Change-Id: Ic0abe5d0eff701afb316f398b142fecb22029423
Signed-off-by: Adrian Szyndela <adrian.s@samsung.com>
8 years agoMake output although some operation fail 85/76085/2
Kunhoon Baik [Wed, 22 Jun 2016 15:47:01 +0000 (00:47 +0900)]
Make output although some operation fail

Although some operations (like generating callstack) failed during processing crash,
The crash output should be generated.

Change-Id: I797a5be407aa2a6cf9047fc84a9e28c4985fbcbe

8 years agocrash-stack: Fix handle leak 83/75183/2 accepted/tizen/common/20160622.145838 accepted/tizen/ivi/20160623.120707 accepted/tizen/mobile/20160623.120615 accepted/tizen/tv/20160623.120631 accepted/tizen/wearable/20160623.120649 submit/tizen/20160622.011710
Sunmin Lee [Fri, 17 Jun 2016 03:49:47 +0000 (12:49 +0900)]
crash-stack: Fix handle leak

Fix vulnerablility caused by handle leak of file.

Change-Id: I037f547633f1d7f074eb63a5dcad2d9b921bfc1a
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
8 years agodump_systemstate : follow dlog backend checking method with newly patched dlog 67/73867/3 accepted/tizen/common/20160615.193713 accepted/tizen/ivi/20160616.002705 accepted/tizen/mobile/20160616.002645 accepted/tizen/tv/20160616.002648 accepted/tizen/wearable/20160616.002635 submit/tizen/20160615.071949
Kichan Kwon [Fri, 10 Jun 2016 01:18:01 +0000 (10:18 +0900)]
dump_systemstate : follow dlog backend checking method with newly patched dlog

Change-Id: I3a3a3b111804f81e8339a5632b7e70f332887b5e
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agolicense: add public domain license 03/70603/1
Taeyoung Kim [Thu, 19 May 2016 23:30:19 +0000 (08:30 +0900)]
license: add public domain license

- ArmStackUnwinding is added at src/crash-stack/wind/
  which is from http://www.mcternan.me.uk/ArmStackUnwinding
  This is Public Domain license codes, and thus
  the license information is specified in spec file.

Change-Id: Iaa63c5cb076731090dfb79396e8e8f1e1a91fa43
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agoSupport for attaching with ptrace 94/67994/8
Adrian Szyndela [Thu, 28 Apr 2016 10:00:33 +0000 (12:00 +0200)]
Support for attaching with ptrace

Additionally:
* made it compiling on aarch64 and x86;
* removed CXX from CMakeLists.txt as it is no longer used.

Change-Id: Id2bdbd19ed864def580afb583b2c044af245fd2e

8 years agocrash-pipe: print symbolic information about errors 16/65816/1
Karol Lewandowski [Tue, 12 Apr 2016 16:08:26 +0000 (18:08 +0200)]
crash-pipe: print symbolic information about errors

This commit brings back symbolic errors removed by commit
81321af5a ("common: remove thread unsafe function") which
eliminated strerror() usage.

Change-Id: I92ed531865dfb8a01f1f00aec32b418a9f4e4f33

8 years agosupport for libelf 0.153 AND later up to 0.165 39/65539/2
Adrian Szyndela [Mon, 11 Apr 2016 10:32:31 +0000 (12:32 +0200)]
support for libelf 0.153 AND later up to 0.165

Change-Id: If3927cbb1438115c7de2397a11ea91be9b9329fe

8 years agoAdded generic unwinding with libelf 47/63547/2
Adrian Szyndela [Thu, 24 Mar 2016 11:56:12 +0000 (12:56 +0100)]
Added generic unwinding with libelf

It is meant to work at least in some basic way on x86, x86_64
and aarch64.

Change-Id: If6c5ebe7a1dc69a2d27188bbc6c9e1a87037ce98

8 years agoMerge "Prototype version of stack trace unwinder" into tizen
Karol Lewandowski [Tue, 12 Apr 2016 15:56:17 +0000 (08:56 -0700)]
Merge "Prototype version of stack trace unwinder" into tizen

8 years agoMerge "Porting McTernan's unwinder to armv7l Tizen" into tizen
Karol Lewandowski [Tue, 12 Apr 2016 15:56:07 +0000 (08:56 -0700)]
Merge "Porting McTernan's unwinder to armv7l Tizen" into tizen

8 years agoMerge "Added sources of ARM Stack Unwinder by Michael McTernan" into tizen
Karol Lewandowski [Tue, 12 Apr 2016 15:56:05 +0000 (08:56 -0700)]
Merge "Added sources of ARM Stack Unwinder by Michael McTernan" into tizen

8 years agoMerge "Added stub of crash-stack" into tizen
Karol Lewandowski [Tue, 12 Apr 2016 15:56:01 +0000 (08:56 -0700)]
Merge "Added stub of crash-stack" into tizen

8 years agopath: change crash paths according to the Tizen policy 96/64596/2 accepted/tizen/common/20160413.130625 accepted/tizen/ivi/20160413.082606 accepted/tizen/mobile/20160413.073028 accepted/tizen/tv/20160413.075349 accepted/tizen/wearable/20160413.080337 submit/tizen/20160412.051623
Taeyoung Kim [Mon, 4 Apr 2016 05:33:54 +0000 (14:33 +0900)]
path: change crash paths according to the Tizen policy

- tizen-platform-config defines the macro to store
  coredumps and logs. Thus crash-worker also uses
  the macro

Change-Id: Iabb96054742da9ac5c7bf3ff5d83bb0f37831ddc
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agocommon: remove thread unsafe function 85/63485/2 accepted/tizen/ivi/20160324.131501 accepted/tizen/mobile/20160324.132645 accepted/tizen/tv/20160324.132543 accepted/tizen/wearable/20160324.132525 submit/tizen/20160324.084401
Taeyoung Kim [Thu, 24 Mar 2016 08:03:18 +0000 (17:03 +0900)]
common: remove thread unsafe function

Change-Id: Icdf26e6f8921dec7b884de8a25277d0d4e42b1fc
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agoPrototype version of stack trace unwinder 48/62148/6
Adrian Szyndela [Fri, 18 Mar 2016 08:50:45 +0000 (09:50 +0100)]
Prototype version of stack trace unwinder

Change-Id: I5ca7262aed2b2a7a3407864f23f25934653131b8

8 years agoPorting McTernan's unwinder to armv7l Tizen 92/62792/3
Adrian Szyndela [Fri, 18 Mar 2016 09:03:17 +0000 (10:03 +0100)]
Porting McTernan's unwinder to armv7l Tizen

- includes
- registers
- recognizing "Thumbness"
- support for 32-bit instructions
- support for newer ARM instructions

Change-Id: I2096e3bf2abcd9ceccd4b6614cd488947ba79e6d

8 years agoAdded sources of ARM Stack Unwinder by Michael McTernan 42/60642/3
Adrian Szyndela [Mon, 29 Feb 2016 12:15:59 +0000 (13:15 +0100)]
Added sources of ARM Stack Unwinder by Michael McTernan

Author: Michael.McTernan.2001@cs.bris.ac.uk

Change-Id: I84666ef71eac4582f29e28607f34e07c8167f4c5

8 years agoAdded stub of crash-stack 41/60641/3
Adrian Szyndela [Mon, 29 Feb 2016 11:26:58 +0000 (12:26 +0100)]
Added stub of crash-stack

Change-Id: Icd6a4c8c5508db7ec39af002939ec7829efbd68e

8 years agocommon: fix resource leak and thread unsafe issues 58/62958/2
Taeyoung Kim [Mon, 21 Mar 2016 08:42:39 +0000 (17:42 +0900)]
common: fix resource leak and thread unsafe issues

Change-Id: I35dcde91a08c52665feccd6a843befa61182f64d
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agoRemove thread unsafety function usages. 80/62480/7 accepted/tizen/common/20160317.161902 accepted/tizen/ivi/20160318.113739 accepted/tizen/mobile/20160318.113526 accepted/tizen/tv/20160318.113623 accepted/tizen/wearable/20160318.113603 submit/tizen/20160317.122246
pr.jung [Wed, 16 Mar 2016 09:26:16 +0000 (18:26 +0900)]
Remove thread unsafety function usages.

- readdir - > readdir_r

Change-Id: I742e48f190e1b77416fd6a71971faf2b27e2fd92
Signed-off-by: pr.jung <pr.jung@samsung.com>
8 years agocrash-manager.sh: remove systemd-journald usage 91/60291/2
Karol Lewandowski [Wed, 24 Feb 2016 16:45:15 +0000 (17:45 +0100)]
crash-manager.sh: remove systemd-journald usage

Change-Id: Ib4012e28105c28b170c407a037a779d033f2c631

8 years agocrash-pipe: Add basic information from /proc to report 44/60044/3
Karol Lewandowski [Wed, 24 Feb 2016 15:39:03 +0000 (16:39 +0100)]
crash-pipe: Add basic information from /proc to report

Change-Id: I61601078c99463dad9cd5b76d07d8aee159d8863

8 years agocrash-pipe: Add utility to process core sent to stdin 43/60043/3
Karol Lewandowski [Mon, 22 Feb 2016 17:11:30 +0000 (18:11 +0100)]
crash-pipe: Add utility to process core sent to stdin

This is going to be used as systemd-coredump replacement.

Change-Id: Ib7074ba5e10990d8487b1693a8c92431cdee6964

8 years agoMerge "path: change coredump path using changed policy" into tizen accepted/tizen/common/20160314.065520 accepted/tizen/ivi/20160310.052638 accepted/tizen/mobile/20160310.052528 accepted/tizen/tv/20160310.052555 accepted/tizen/wearable/20160310.052611 submit/tizen/20160229.000000 submit/tizen/20160305.131859 submit/tizen_common/20160311.185532
Taeyoung Kim [Mon, 29 Feb 2016 03:14:47 +0000 (19:14 -0800)]
Merge "path: change coredump path using changed policy" into tizen

8 years agosmack: change exec label of dump_systemstate to "System" 92/59892/1 accepted/tizen/ivi/20160222.043629 accepted/tizen/mobile/20160222.043444 accepted/tizen/tv/20160222.043518 accepted/tizen/wearable/20160222.043554 submit/tizen/20160222.012437
Taeyoung Kim [Fri, 19 Feb 2016 07:53:41 +0000 (16:53 +0900)]
smack: change exec label of dump_systemstate to "System"

- Previously, the exec label of dump_systemstate is not set (default "_").
  Thus reading vconf keys occurs smack deny issues.

- Now, the exec_label is changed to "System". Thus the smack deny issues
  are fixed. Other operations except reading vconf keys are same.

Change-Id: Ifdf7c1c31aec77343e45775cea15b1f1a4a0853c
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agopath: change coredump path using changed policy 28/59628/1
Taeyoung Kim [Wed, 17 Feb 2016 04:39:46 +0000 (13:39 +0900)]
path: change coredump path using changed policy

- Previously, coredump path was /opt/usr/share/crash.
  TZ_SYS_SHARE was used to get the path /usr/share.
  However, the definition of TZ_SYS_SHARE is changed
  to /opt/share, and thus there is no need to add
  /opt in front of the TZ_SYS_SHARE now.

Change-Id: Ib50fed4935135fa00bb3a07275da685de153dd7a
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agodump_systemstate: modify checking dlog backend to adapt newly patched dlog 22/56722/1 accepted/tizen/ivi/20160218.023959 accepted/tizen/mobile/20160112.224410 accepted/tizen/tv/20160112.224425 accepted/tizen/wearable/20160112.224446 submit/tizen/20160112.094446 submit/tizen_common/20160218.142243 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000003
Kichan Kwon [Tue, 12 Jan 2016 09:11:35 +0000 (18:11 +0900)]
dump_systemstate: modify checking dlog backend to adapt newly patched dlog

Change-Id: Ib2e615ed871cfc0b3578a7d3fc8523b45b953699
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocrash: change strcmp() to strncmp() 80/55480/2 accepted/tizen/mobile/20151228.063717 accepted/tizen/tv/20151228.063744 accepted/tizen/wearable/20151228.063821 submit/tizen/20151228.041818 submit/tizen_common/20151229.142028 submit/tizen_common/20151229.144031 submit/tizen_common/20151229.154718
Taeyoung Kim [Thu, 24 Dec 2015 03:04:48 +0000 (12:04 +0900)]
crash: change strcmp() to strncmp()

- overflow issues can be occurred by strcmp()
  thus strcmp()s are changed to strncmp()

Change-Id: Icc1d3b22bffa56680f6d9b3e54c1661ffe75a8eb
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agocrash: change path for dump to tmpfs 03/54903/2 accepted/tizen/mobile/20151221.050637 accepted/tizen/tv/20151221.050655 accepted/tizen/wearable/20151221.050716 submit/tizen/20151221.014746
Taeyoung Kim [Fri, 18 Dec 2015 12:00:27 +0000 (21:00 +0900)]
crash: change path for dump to tmpfs

- When power is turned off during zipping coredump file,
  the coredump files are remained even if target is rebooted.
- By changing the path to tmpfs, the dumps are removed
  when power is turned off before completing makging dump.

Change-Id: I8718bee8777a3ce6977f07bc975cdce772f5b8ad
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agocrash: remove temporary dump files during booting 82/54882/2
Taeyoung Kim [Fri, 18 Dec 2015 10:48:29 +0000 (19:48 +0900)]
crash: remove temporary dump files during booting

- If power is turned off during making coredump file,
  temporary dump files are stored in /var/lib/systemd/coredump.
  The dump files cannot be used and their sizes are very large.
  Thus they are removed from the path during booting.

- After reboot, previous coredummps are not necessary,
  and coredumpctl is not working for them since there is
  no information in journal. Thus they are removed form the
  path during booting.

Change-Id: I6765da9474f4668d13a4563950b274b0871dcffb
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agodump_systemstate: check dlog backend by /etc/dlog_backend node 93/54593/1 accepted/tizen/mobile/20151217.022339 accepted/tizen/tv/20151217.022112 accepted/tizen/wearable/20151217.022216 submit/tizen/20151216.101812
Taeyoung Kim [Wed, 16 Dec 2015 09:37:00 +0000 (18:37 +0900)]
dump_systemstate: check dlog backend by /etc/dlog_backend node

- If the backend of dlog is logger, dlogutil works well.
  But if the backend of dlog is journal, dlogutil is not stopped
  since it uses "journalctl -f" command. Thus dump_systemstate
  is not stopped.
- Thus dump_systemstate checks the backend of dlog. If the backend
  is journal, journalctl is used directly instead of dlogutil.

Change-Id: I654fc58ae47ab0777cf7e68e618cd3b9d9ae5a80
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agocrash: change dump path to /opt/usr/share/crash 14/54514/1
Taeyoung Kim [Wed, 16 Dec 2015 00:44:23 +0000 (09:44 +0900)]
crash: change dump path to /opt/usr/share/crash

Change-Id: Ie4a7b17a85346d8e6ac023c604a1b41251b0d171
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agosysctl: update core_pattern by sysctl 15/54215/2 submit/tizen/20151215.234045
Taeyoung Kim [Mon, 14 Dec 2015 07:38:33 +0000 (16:38 +0900)]
sysctl: update core_pattern by sysctl

- core_pattern should be updated by sysctl command
  or conf file in /usr/lib/sysctl.d
- /usr/lib/sysctl.d/99-crash-manager.conf is used
  to update the operation for crash situation

Change-Id: I075667349d30e88f64e4dc42168334cdf2f5a10f
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agocommon: change directory pathes to macros 20/54220/1
Taeyoung Kim [Mon, 14 Dec 2015 07:25:29 +0000 (16:25 +0900)]
common: change directory pathes to macros

- hard-coded directory pathes are exchanged to macros

Change-Id: I8bc295b816ef1e772358f5f60820895168e78be6
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agocrash: zip crash informations to one file 88/53488/1 accepted/tizen/mobile/20151208.130302 accepted/tizen/tv/20151208.130315 accepted/tizen/wearable/20151208.130333 submit/tizen/20151208.095021
Taeyoung Kim [Mon, 7 Dec 2015 08:30:13 +0000 (17:30 +0900)]
crash: zip crash informations to one file

- The size of dump file is very large. Thus zipping
  is required to store the informations

Change-Id: I7672083386be8b7ade0dbf5e79d1155099c8026d
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agocrash: use journalctl if backend of dlog is journal 83/53483/1
Taeyoung Kim [Mon, 7 Dec 2015 08:09:43 +0000 (17:09 +0900)]
crash: use journalctl if backend of dlog is journal

- If backend of dlog is journal, dlogutil will
  be stopped and the crash-manager.sh is also held.
  Thus journalctl is used after checking /dev/log_* file

Change-Id: I4720b2e6cb84c399e6a63ce1ab45f8d12c7e055b
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agocrash: make crash info path to be changeable 55/53455/2
Taeyoung Kim [Mon, 7 Dec 2015 05:43:41 +0000 (14:43 +0900)]
crash: make crash info path to be changeable

- The crash info path of Platform is /opt/usr/share/crash/dump
- The path can be changed by manufacturer and thus the path
  is defined in spec file.

Change-Id: I59039910d558b4cd292362efce1c232bd59991b8
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
8 years agocrash: add crash module to use coredumpctl
taeyoung [Thu, 26 Nov 2015 09:37:14 +0000 (18:37 +0900)]
crash: add crash module to use coredumpctl

- For Tizen 2.4, Crash-manager and sys-assert are used
  to getting crash information.
- For Tizen 3.0 coredumpctl is supported, and thus
  coredumpctl is used to get information and store
  coredump file.

Signed-off-by: taeyoung <ty317.kim@samsung.com>
9 years agoInitial empty repository master sandbox/sunm71/test
Jeonghoon Jeon [Thu, 27 Nov 2014 04:48:27 +0000 (20:48 -0800)]
Initial empty repository