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
Sunmin Lee [Thu, 22 Dec 2016 08:58:58 +0000 (17:58 +0900)]
Fix handle leak
Fix handle leak of file pointer at crash-stack
Change-Id: I2d68e04ad84ea7263e3c45cc91ef295557532bde
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
Karol Lewandowski [Tue, 20 Dec 2016 17:33:58 +0000 (09:33 -0800)]
Merge "crash-stack: use libunwind for i686 and x86_64" into tizen_3.0
Karol Lewandowski [Tue, 20 Dec 2016 16:23:33 +0000 (08:23 -0800)]
Merge "crash-stack: fixed attaching to thread" into tizen_3.0
Rafal Pietruch [Thu, 15 Dec 2016 15:28:17 +0000 (16:28 +0100)]
crash-stack: use libunwind for i686 and x86_64
Change-Id: I0022cc3ac772ba26ed67f7d64d45c3ab4e22db88
Adrian Szyndela [Fri, 16 Dec 2016 12:27:35 +0000 (13:27 +0100)]
crash-stack: fixed attaching to thread
It is not necessary to attach to parent process main thread to
resolve stack in another thread. This commit also solves hanging up
on 'D' (and 'Z') processes - main thread is not attachable,
when a crash occurs in another thread.
Change-Id: Ic3a085951acb4057fcdd4a476693954d1d3a522b
Sunmin Lee [Mon, 19 Dec 2016 06:26:30 +0000 (15:26 +0900)]
crash-manager: consider backward compatibility for crash-stack
Though the crash-stack is available about tid option,
previous kernel has not supported this feature.
Therefore the crash-manager should call crash-stack
considering backward compatibility.
Change-Id: I779783ed46760b88a6d454a05710b29cd4418a44
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
Sunmin Lee [Tue, 20 Dec 2016 09:41:00 +0000 (18:41 +0900)]
crash-stack: deprecate corefile option
crash-stack should be able to generate call stack
using pid only.
(Generating corefile causes sluggish issue)
Change-Id: Ie9e74494b966838d1dd6548424d51bfd2df4c1e0
Sunmin Lee [Thu, 15 Dec 2016 02:26:38 +0000 (11:26 +0900)]
Revert "engineer mode: make .debugmode on engineer image"
.debugmode is moved to other package
This reverts commit
b153665a12cda6a29f9ba9d12db7f2682ade9af5.
Change-Id: Idfe9cae63b8f4e4122c74abb144250eea45d9f07
Adrian Szyndela [Thu, 15 Dec 2016 12:03:21 +0000 (13:03 +0100)]
crash-stack: get registers from tid instead of pid
Change-Id: Id4ea3f57808420ec6ac0941c2612a5af51136c96
Adrian Szyndela [Tue, 13 Dec 2016 13:43:06 +0000 (14:43 +0100)]
crash-stack: work around hanging up on 'D' processes
Processes in uninterruptible sleep state ('D' status in ps)
cannot be ptraced until they leave the state. To prevent
hanging up of crash-stack, we check the target process state.
If it is 'D', then we give up ptracing it, and instead
print the information from /proc/<pid>/wchan, /proc/<pid>/syscall
and /proc/<pid>/stack.
Change-Id: I82644051a5499c42db2a8e51a7af98693e8da363
Karol Lewandowski [Wed, 14 Dec 2016 16:53:05 +0000 (17:53 +0100)]
crash-stack: Drop duplicate call stack footer
Change-Id: I938f2ead95d312450edb853740cce47becf796fc
Łukasz Stelmach [Wed, 14 Dec 2016 16:30:54 +0000 (17:30 +0100)]
crash-stack: print memory information
Print information from /proc/meminfo and /proc/PID/status
Change-Id: I6c66e9ee6c8eca20a8925e9ecc23e09c0dabcb25
Łukasz Stelmach [Wed, 14 Dec 2016 16:28:10 +0000 (17:28 +0100)]
crash-stack: change error reporting file handle
Change-Id: I734b431f56f9e32c440839e1bd4e5b90112773ec
Łukasz Stelmach [Wed, 14 Dec 2016 14:06:43 +0000 (15:06 +0100)]
crash-stack: print maps information
Print information about mapped memory regions.
Add stub for printing system and process VM information.
Change-Id: I47b2c5f837620f9d22b3270a75d8f5e663d44c78
Łukasz Stelmach [Wed, 14 Dec 2016 15:26:54 +0000 (16:26 +0100)]
crash-stack: print executable file path
Change-Id: Ib5946bcfb5bbad8af7b7bbfc7c8568a3cb3ab207
Adrian Szyndela [Wed, 14 Dec 2016 13:52:37 +0000 (14:52 +0100)]
crash-stack: support for resolving stack from threads
Change-Id: Ic80b6b83acb80b3c332b6b6674fbf662b1003586
Adrian Szyndela [Wed, 14 Dec 2016 07:16:22 +0000 (08:16 +0100)]
crash-stack: put more effort into getting names
It seems libdwfl-0.153 sometimes can't get symbol names
automatically. This commit adds fallback procedure, that
takes module name and mapping provided by libdwfl,
and - using libelf - looks for the symbol name, instead
of relying only on libdwfl.
Change-Id: I7e65f810b46dc43bea217b715852a5ae5c3d70c9
Rafal Pietruch [Wed, 14 Dec 2016 12:11:12 +0000 (13:11 +0100)]
crash-stack: reformat callstack output
Change-Id: Ica727d63de389d8a4a2f1ff7cfced2a463630282
Karol Lewandowski [Wed, 14 Dec 2016 15:45:12 +0000 (07:45 -0800)]
Merge "crash-stack: resolving symbols extracted from printing function" into tizen_3.0
Karol Lewandowski [Wed, 14 Dec 2016 15:44:42 +0000 (07:44 -0800)]
Merge "crash-stack: print information about threads" into tizen_3.0
Rafal Pietruch [Wed, 14 Dec 2016 07:17:39 +0000 (08:17 +0100)]
crash-stack: resolving symbols extracted from printing function
Change-Id: I0ae01bc7a2a9a0e6f084a9e275e1025058645c77
Karol Lewandowski [Wed, 14 Dec 2016 15:11:37 +0000 (07:11 -0800)]
Merge "crash-manager: pass tid number to identify failing thread" into tizen_3.0
Karol Lewandowski [Wed, 14 Dec 2016 15:11:09 +0000 (07:11 -0800)]
Merge "tests: Add a test program for crashing with threads" into tizen_3.0
Karol Lewandowski [Wed, 14 Dec 2016 15:10:59 +0000 (07:10 -0800)]
Merge "crash-stack: align output format with sys-assert" into tizen_3.0
Łukasz Stelmach [Wed, 14 Dec 2016 13:51:14 +0000 (14:51 +0100)]
crash-stack: print information about threads
Change-Id: Ib0e2d9c2bdbd5fd4eacc0608a8c5ecccdfd4f2a8
Łukasz Stelmach [Tue, 13 Dec 2016 15:03:49 +0000 (16:03 +0100)]
crash-manager: pass tid number to identify failing thread
Accept tid as second argument for crash-manager and pass it to
crash-stack.
Change-Id: Icfc0db6f5675eb781777ea7a7c5dc2d4cb581105
Łukasz Stelmach [Tue, 13 Dec 2016 13:01:19 +0000 (14:01 +0100)]
tests: Add a test program for crashing with threads
Change-Id: I0b9ef8567b0bb1203fdd9fe3e0aa753e25ff50df
Sunmin Lee [Wed, 14 Dec 2016 03:51:31 +0000 (12:51 +0900)]
crash-manager: make secure program
- Use secure function (strncat)
- Prevent buffer overrun
Change-Id: I47acf1bb39c0be123a486116f811b78f30d6ff01
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
Łukasz Stelmach [Tue, 13 Dec 2016 09:33:24 +0000 (10:33 +0100)]
crash-stack: align output format with sys-assert
Make crash-stack print register information the very same way as
sys-assert does it.
Change output format slightly for 64 bit architectures to match hw
requirements.
Support both i686 and x86_64 in the same architecture specific file.
Change-Id: Ica03360b61c1aa133b83c5622334cf4f375db3c2
Łukasz Stelmach [Fri, 9 Dec 2016 14:06:14 +0000 (15:06 +0100)]
Update authorship information
Change-Id: I064948790ce22c0167ce6986a4d0a0e78fd974ab
Rafal Pietruch [Mon, 12 Dec 2016 16:19:07 +0000 (17:19 +0100)]
crash-stack: separate libunw code
Change-Id: I1f24781316a78439db862c3ab0d2492fea095c1c
Rafal Pietruch [Fri, 9 Dec 2016 14:04:03 +0000 (15:04 +0100)]
crash-stack: add symbol resolution for arm
Change-Id: Iabb556a96907156a9b8775cdb25281dea560ce69
Rafal Pietruch [Fri, 9 Dec 2016 14:02:57 +0000 (15:02 +0100)]
use libunwind for ARM in case of McTernan unwinder
Change-Id: I6fb6f95df6f09a1b4c7e38489606aaab1e452e59
Kunhoon Baik [Tue, 13 Dec 2016 04:27:31 +0000 (13:27 +0900)]
Resolve crash-stack build issue in emulator
32 bit: Add stub function for _crash_stack_print_regs
64 bit: correct output format specifier
Change-Id: I4d95ab2ebee9c86a4fa05015f6ca5b3ccc8ea151
Kunhoon Baik [Tue, 13 Dec 2016 03:34:28 +0000 (19:34 -0800)]
Revert "crash-pipe: read and parse core"
This reverts commit
b3661520e5b660ce7352381e6bfa5d25647357e4.
Change-Id: I01557e7b7bf4ed5f8c278e2e168d8aaa04f8d49e
Sunmin Lee [Mon, 12 Dec 2016 04:51:13 +0000 (13:51 +0900)]
crash-manager: change default configuration values to unlimited
For ease of debugging, default values of coredump configuration
are changed to 0 (unlimited).
Change-Id: I53188215b55e98acd6aac835195697cbda50b0ae
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
Łukasz Stelmach [Fri, 2 Dec 2016 12:20:39 +0000 (13:20 +0100)]
tests: add a glib based crash test
Change-Id: Ib5c2a176e0108b1fa20cbd0d156fb1f29139b8fa
Łukasz Stelmach [Mon, 28 Nov 2016 13:09:19 +0000 (14:09 +0100)]
tests: add a simple test
test1-crash crashes and dumps a core. test1-sleep enters an infinite
sleep enabling ptrace-based stack examination. test1-ill triggers
the "illegal instruction" exception (SIGILL).
Change-Id: I995f5ce8817e49ec57bac6cac8e7f458807d03f0
Łukasz Stelmach [Fri, 25 Nov 2016 15:12:55 +0000 (16:12 +0100)]
crash-pipe: read and parse core
Read basic information from elf notes segment and dump:
+ NT_SIGINFO: siginfo_t describing the signal that killed the process
+ NT_AUXV: auxiliary vector
+ NT_FILE: memory mapped files
+ NT_PRSTATUS: registers
The information is at the beginnig of the core (< 8kB) so it is not
necessary to read large amounts of data.
Change-Id: Ia2232ce88bb039e49f2129f7a28ff1f4a7c9bbda
Łukasz Stelmach [Fri, 4 Nov 2016 09:43:52 +0000 (10:43 +0100)]
crash-pipe: Print maps information
Change-Id: Idab48c5dde20e0aa2a8337b7008a8244a612d844
Łukasz Stelmach [Fri, 21 Oct 2016 13:06:53 +0000 (15:06 +0200)]
crash-pipe: Print memory information
The code has been ported from sys-assert.
Change-Id: I64ae2fb0d2a12f7def29328b1ac46cb6c335e0a5
Łukasz Stelmach [Mon, 10 Oct 2016 13:37:27 +0000 (15:37 +0200)]
crash-pipe: Print the executable file path
Change-Id: I730978b87b15a02e9464505426d53b9d2037d85f
Łukasz Stelmach [Mon, 10 Oct 2016 13:37:08 +0000 (15:37 +0200)]
crash-pipe: the buffer does not need to be a static variable
Change-Id: Ibb1f489564ecc888451d59c549db9dab9d0d97e9
Łukasz Stelmach [Tue, 6 Dec 2016 09:31:30 +0000 (10:31 +0100)]
crash-stack: report on siginfo_t
Change-Id: I86e8058eded47f23c51d213fffb56f2f078931bc
Łukasz Stelmach [Fri, 4 Nov 2016 13:06:54 +0000 (14:06 +0100)]
crash-stack: Print signal information
Change-Id: Ia6d535d1d229dbc55aafd6b50529062e63b411ff
Łukasz Stelmach [Thu, 8 Dec 2016 11:48:21 +0000 (12:48 +0100)]
crash-stack: link against libebl conditionally
Link against libebl only if crash-stack is built with support for
core dump files.
Rewrite conditional building of sys_assert to use %bcond_with.
Change-Id: I50edbd417a5426a43da3b9c0e912933a7db95f4b
Łukasz Stelmach [Thu, 20 Oct 2016 10:14:53 +0000 (12:14 +0200)]
crash-stack: Print register values
Change-Id: If8d82aa32eb524ffb23715af6016f0fec12bd144
Łukasz Stelmach [Thu, 20 Oct 2016 10:17:27 +0000 (12:17 +0200)]
Add .gitignore and .dir-locals.el files for easier development.
Change-Id: I6ecab2063adb5d5660592becc31db8f21e67c89a
Adrian Szyndela [Wed, 7 Sep 2016 10:26:48 +0000 (12:26 +0200)]
Fixed coding style & added doxygen docs
This fixes and adds again commit
11c142a267540ee070db0c8c1dc47c022edd02a6.
Thus, this reverts commit
7ec36fc1820b0b3622f0c1d941439e906a4603ff
which reverted commit
11c142a267540ee070db0c8c1dc47c022edd02a6.
Change-Id: I944d1e9a664cbc38e84853f9a67b093ecb68754b
Adrian Szyndela [Wed, 7 Sep 2016 10:15:20 +0000 (12:15 +0200)]
crash-stack: adding fallback heuristic method for unwinding
This reverts commit
b7ef1fff4dd5f8f754df1431fe4b80fc1901b459,
which reverted commit
f29763ccb1cf24bea7807b55ecd9722e3cb03743.
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_64 architecture.
Change-Id: If8fd88b8ab3e345a256006127c36bcb4022cc736
Adrian Szyndela [Wed, 7 Sep 2016 09:46:01 +0000 (11:46 +0200)]
crash-stack: unwinding by frame pointer on aarch64
This fixes and adds again commit
269790304eea1bde27644962efa7803c7ab611df.
Thus, this reverts commit
ba3f2151f97c3e4bba1ac04c953f28ac4eb1e463,
which reverted commit
269790304eea1bde27644962efa7803c7ab611df.
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: I461a06c96d56804fefb7167550e44074e734c94b
Sunmin Lee [Thu, 8 Dec 2016 06:19:19 +0000 (15:19 +0900)]
crash-manager: refine internal code
1) Use flock instead of manual lock
The standard function flock substituted lock function
implemented by itself.
2) Clean dump at once
The clean dump logic can be done in single scan.
It would simplify the operation of the function.
Change-Id: Ica807df6f52677a8353bd89395197651f01d99d0
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
Sunmin Lee [Tue, 29 Nov 2016 08:27:00 +0000 (17:27 +0900)]
Change log buffer to system
Use SLOGs instead of LOGs
Change-Id: Id4ce90d14ceab024514b2b5da7696aca414887fc
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
Sunmin Lee [Mon, 28 Nov 2016 08:57:57 +0000 (17:57 +0900)]
Change compressing format to zip
Change compressing format from tar.gz to zip
due to compatibility issues
Change-Id: I1e08c1c139617af9baf3b488c3b8db4bd360e95c
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
Sunmin Lee [Fri, 18 Nov 2016 02:20:20 +0000 (11:20 +0900)]
Configurable crash-manager
crash-manager can manage dump output according to configured value
in config file (crash-manager.conf).
The config values
SystemMaxUse : The maximum usage of partition that crash dump can be generated
SystemKeepFree : The free space should be kept
MaxRetentionSec: The retention time of each dump file
MaxCrashDump : The maximum number of dump file to be preserved
AllowZip : Whether compressing dump or not
Change-Id: Ib0c3cd9445338e469040b07aebf81bf6705fd29e
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
Sunmin Lee [Fri, 11 Nov 2016 02:01:27 +0000 (11:01 +0900)]
Convert crash-manager into c code
For ease of adding features, crash-manager is converted to c code.
* Minor changes
- unused library headers removed (log_dump)
- change date format (epoch -> local)
Change-Id: I6f27547469769b2ba3c01027cf53bc0d17d82c5e
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
Sunmin Lee [Mon, 5 Dec 2016 07:59:22 +0000 (16:59 +0900)]
Rearrange crash-manager tasks
Launching crash popup and collecting log are required to be done first.
Change-Id: I97d48117223fffc7c61923c742062f16b4f288eb
Sunmin Lee [Fri, 2 Dec 2016 09:25:08 +0000 (18:25 +0900)]
dump_systemstate: extend sort buffer size
Dump info needs to have enough information.
So set the buffer size of dlogutil larger than default.
Change-Id: I999caa73c130649fd75449b7ace400f683abfc89
Sunmin Lee [Fri, 2 Dec 2016 08:47:36 +0000 (17:47 +0900)]
Upgrade: set RW update script number
Change-Id: Ib8f40eaf90ee0d096de6f0191a367f458375bb09
Kunhoon Baik [Wed, 30 Nov 2016 08:04:52 +0000 (17:04 +0900)]
Disable New Crash Stack
Change-Id: I3a7446f91e1d6289f8a37150c13669f058442685
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
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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
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
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
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>
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
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
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
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
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>
Adrian Szyndela [Thu, 25 Aug 2016 10:17:00 +0000 (12:17 +0200)]
Fixed coding style & added doxygen docs
Change-Id: I10fef06201d4ef101635d6be410345c22273357c
Karol Lewandowski [Wed, 24 Aug 2016 12:15:49 +0000 (05:15 -0700)]
Merge "crash-pipe: Always return -errno on error" into tizen
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
Adrian Szyndela [Wed, 24 Aug 2016 12:10:54 +0000 (05:10 -0700)]
Merge "crash-stack: unwinding by frame pointer on aarch64" 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
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
Karol Lewandowski [Mon, 22 Aug 2016 12:04:01 +0000 (14:04 +0200)]
crash-pipe: Always return -errno on error
Change-Id: I330b5366a5350cd9e8e54f4a04b7fa53f9122eca
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>
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
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>
Lukasz Skalski [Tue, 26 Jul 2016 12:08:57 +0000 (14:08 +0200)]
crash-worker refactoring to meet Tizen coding style
Change-Id: I8a03903fad20656b61f753689041e478a4db8a5e
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>
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>
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>
Kunhoon Baik [Sat, 9 Jul 2016 02:30:19 +0000 (11:30 +0900)]
Check phdr for Referencing phdr
Change-Id: I63f07a7506d556de3d4c576fd141a007a34ceb0d
Kunhoon Baik [Sat, 9 Jul 2016 02:23:55 +0000 (11:23 +0900)]
Applying Tab indentation in crash-stack source code
Change-Id: If20003e278ec7171a9a7720059b2d3552c3155e1
Taeyoung Kim [Thu, 7 Jul 2016 02:53:50 +0000 (19:53 -0700)]
Merge "Remove SIGSEGV handling" into tizen
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>
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>