summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-12-10Fix null dereferencestizen_5.0Michal Bloch1-0/+5
Change-Id: Id23b9aaad60752f797783f9ccc6f9bbfa9357941 Signed-off-by: Michal Bloch <m.bloch@samsung.com> (cherry picked from commit a9a8f5e3955f55e03a05878a381257085dc02951)
2020-07-28Release 5.0.10submit/tizen_5.0/20200728.123541accepted/tizen/5.0/unified/20200730.072838accepted/tizen_5.0_unifiedMateusz Moscicki1-1/+1
Change-Id: I072d391a060ee59cb528267412c4d059728cfb54
2020-07-28Fix build on aarch64 and x86Mateusz Moscicki3-6/+8
Change-Id: I08943db8fabf75e03eb25e1bc25d13c76a0d619b
2020-07-28packaging: Drop unused libdw dependencyMateusz Moscicki1-2/+0
Change-Id: I35a339585327b435383d125a5c30d3a06b24db16
2020-07-27packaging: Drop unused libebl dependencyKarol Lewandowski1-2/+0
Change-Id: I65461119baa127ada2dedc4f306a7b6260c7dd15
2020-07-27Release 5.0.9submit/tizen_5.0/20200727.143929Mateusz Moscicki1-1/+1
Change-Id: Id6219d2f6a2845d686af9d99e088c31fa6a5b9a7
2020-07-27Change the way ELF files are parsedMateusz Moscicki8-97/+717
Change-Id: Id8fcf8e4ba11fd1804bc5366b5603c53f698f512
2020-07-27Add an ELF file parserMateusz Moscicki2-0/+460
Change-Id: I56465c6b229812654ccdb9395d8970394854203f
2019-03-04Release 5.0.8submit/tizen_5.0/20190325.155511submit/tizen_5.0/20190325.122116Karol Lewandowski1-1/+1
This commit introduces one change - backport from 5.5 of following patch: - dump_systemstate: Replace extremely inefficient vconftool with buxton2ctl Change-Id: Iac24942f7928f238d4b3cc1c35479f80e5f06308
2019-03-04dump_systemstate: Replace extremely inefficient vconftool with buxton2ctlKarol Lewandowski2-8/+4
vconftool and buxton2ctl access the same data. vconftool is shell script which under the hood uses buxton2ctl. However, it does so in very inefficient manner - to get the keys it calls buxton2ctl once, but to get key values it calls buxton2ctl for each key. This causes it to fork On TM1 target with 548 keys in "db/" this means 548 fork & buxton2ctl execs. buxton2ctl gets the data from server via socket connection, meaning that it needs to connect & write request and wait for response. All of this together sums up to absurd - `buxton2ctl dump system` takes ~50ms, while `vconftool get db/ -r` takes more than 12seconds - which is roughly 250 times slower! sh-3.2# time buxton2ctl dump system >/dev/null real 0m0.050s user 0m0.040s sys 0m0.000s sh-3.2# time vconftool get db/ -r >/dev/null real 0m12.344s user 0m0.560s sys 0m1.190s With this change applied, dump_systemstate invocation time drops from 13seconds to 1.5-2sec (without logs), and from 13 seconds to 3-4secs (with logs, ie. -k -d -j options). [ Backported from Tizen 5.5 ] Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com> Change-Id: I0cb042d18e5322d8246bf03ee142117217c83b4c
2018-10-03Release 5.0.7submit/tmp003/20181003.140912submit/tizen_5.0/20181101.000004submit/tizen/20181003.140929accepted/tizen/unified/20181005.012519accepted/tizen/5.0/unified/20181102.021639Karol Lewandowski1-1/+1
This release brings one addtional fix for indexing array with negative index bug. Change-Id: I9e49379a68f4839256d1df26e42b144b6ed6a708
2018-10-03Fix: Another instance of indexing array with negative indexKarol Lewandowski1-1/+1
Issue reported by Coverity. Change-Id: Ida7f3106d650f48d5fff7e976f1bbc0df0fdc308
2018-10-03Release 5.0.6submit/tizen/20181003.104223Karol Lewandowski1-1/+1
This change brings one fix and set of assorted cleanups: - Fix: Do not index buffer[] with negative index in case of read failure - util: Remove unused file_exist() - util: Allow functions to be called from c++ - util: Add nullvec2str - util: Remove unused cat_file() - util: Dead code removal - crash-manager: Use same constant for minicoredumper, crash-stack and zip command timeouts Change-Id: I46fbdea06ad36f06116751c5f14105350569cad5
2018-10-03Fix: Do not index buffer[] with negative index in case of read failureKarol Lewandowski1-2/+1
Issue reported by Coverity. Change-Id: Ie9cd66d2801770a096bb1849d11c860533508174
2018-10-03util: Remove unused file_exist()Karol Lewandowski1-11/+0
Change-Id: I1e20fc6cd55c9685db304a9aa40b58af56df0c00
2018-10-03util: Allow functions to be called from c++Karol Lewandowski1-2/+11
Change-Id: If4dc6b6e494096713e76a1345ab3753a6914e1c2
2018-10-03util: Add nullvec2strKarol Lewandowski2-0/+14
This function will be used to convert char *arr[] arrays (like argv[] and envp[]) arrays to simple strings. Change-Id: I352f2cc35ee5f06f6a9e6bc81b45702ea11f711d
2018-10-03util: Remove unused cat_file()Karol Lewandowski2-31/+0
Change-Id: Ie56ce502a4a1d6ca27574bf7f05b0f097079eaa2
2018-09-20util: Dead code removalKarol Lewandowski2-47/+0
Change-Id: I42bd0466c365c84b0720291504e10d86cb9859fe
2018-09-17crash-manager: Use same constant for minicoredumper, crash-stack and zip ↵Karol Lewandowski1-3/+4
command timeouts Change-Id: I50d41e850d32cf40ee403f93020db67700002d3c
2018-09-14Release 5.0.5submit/tizen/20180914.151908accepted/tizen/unified/20180917.041311Mateusz Moscicki1-1/+1
Changes from last version: - Code improvements - Fixed SVACE and Coverity warnings - Run zip and crash-stack commands with timeout Change-Id: I84784e44c9baef654159ab55cb70aeaeaa150b42
2018-09-13Fix Coverity warnings: #1020601 #1020599 #1020595 #1020587Mateusz Moscicki2-7/+10
Change-Id: I6cd513db97ad4f67f259f11e088be3e68c8dc319
2018-09-13Fix after security reviewMateusz Moscicki6-64/+40
* File: src/shared/util.c Function: write_fd Write in function may return EINTR correctly. Function does not support this case correctly. If the interrupt occurs program will not dump all data to file. The interrupt may come from child process (SIGCHILD). * File: src/shared/util.c Function: fprintf_fd You may replace fprintf_fd with standard library function dprintf. * File: src/shared/util.c Functions: dump_file_write_fd, copy_file, cat_file Functions don’t support EINTR correctly (write in function write_fd may be interrupt). In this functions it is not clear who will generate signal to interrupt write call, so this is not security risk now. You may replace loop with standard library function sendfile. * File: crash-manager.c Function: launch_crash_popup Memory leak: value conn was allocated but was not deallocated. * File: crash-manager.c Function: prepare_paths Invalid strings are stored in crash_crash_path and crash_temp_path. Both strings are truncated by 1 byte. Change-Id: Ie174b5ee043321861912f1b9233f0f6a6afd027e
2018-09-05Use dynamic allocated memory instead of fixed-size arraysMateusz Moscicki4-72/+105
Change-Id: I03e91bf530204de6f03f1db79e2aa9bdd2608f95
2018-09-05Add timeout to the zip commandMateusz Moscicki1-6/+25
Change-Id: I52db6f8ccd1a2103da030c10898ec33c4a9bcc57
2018-09-05Add timeout to run the crash-stackMateusz Moscicki1-18/+44
In case the crash-stack hangs, the crash-manager will still be able to create a raport. Change-Id: I62b3022dc1aec6507821473619c73cf90337643f
2018-09-05Merge move_dump_dir() and move_info_file()Mateusz Moscicki1-25/+7
Change-Id: I246bf743eefb199577bd00d6b3fd0defa6948eff
2018-09-05Stop using crash_info struct as a global variableMateusz Moscicki1-127/+129
Change-Id: I1dee72cb7abf29e7ff2bf5bdc4e0852bda1329b1
2018-09-04Use parsed command line arguments instead of raw string valuesMateusz Moscicki4-60/+57
Change-Id: I28c9479c2d6cb5d754e7ff3ee37f8cab34235456
2018-08-29Merge "Release 5.0.4" into tizensubmit/tizen/20180829.134902accepted/tizen/unified/20180830.182653Karol Lewandowski1-1/+1
2018-08-29Release 5.0.4Mateusz Moscicki1-1/+1
Changes from last version: - crash-stack use the same function to read /proc/<pid>/exe symlink as the crash-manager - crash-manager: Simplify dump_core error reporting Change-Id: Id5d65baedcfe73c88e7aadee2cc7aef62c91269c
2018-08-29Merge "crash-manager: Simplify dump_core error reporting" into tizenMateusz Mo?cicki1-11/+7
2018-08-29Move the function to read /proc/<pid>/exe symlink to util.cMateusz Moscicki5-58/+64
Change-Id: Ieb533fb66dd3d06eb5bbc827aa016a308cf892a3
2018-08-29crash-manager: Simplify dump_core error reportingKarol Lewandowski1-11/+7
Change-Id: If8ff95811e4e5f16cb3a7a2e48dfe34a0bd3b1cb
2018-08-28Release 5.0.3submit/tizen/20180828.140302Mateusz Moscicki1-1/+1
This version contains fixes of SVACE warnings Change-Id: Id51181c8bf839922b83d0d85d3596a414d005ee5
2018-08-28Fix SVACE warningsMateusz Moscicki5-48/+51
Warnings: 352484, 352485, 352486, 352488, 352489, 352490, 352491, 352492, 352493, 352494, 352495, 352496, 352497, 352498, 352501, 352502, 352487, 358117, 358162 Change-Id: I205ddaee97836c3146b25bbb380e11464713cb25
2018-08-23Release 5.0.2submit/tizen/20180823.142438accepted/tizen/unified/20180824.162511Mateusz Moscicki1-1/+1
Changes from last version: - For INFO report type D-Bus signal has a proper report path - Update license (imported tbstack code is BSD-licensed) - Move finding TID to crash-manager - fixes support on older kernels Change-Id: Ie7e038d4740fcd442e5c599c9d22c91a24c2ce74
2018-08-23Update license information in spec fileMateusz Moscicki1-1/+1
Change-Id: Iee77a2f8580167eb6e7087465fd820f0fae575a1
2018-08-23Fix report path for INFO report typeMateusz Moscicki1-4/+3
Change-Id: I973c452cd08a4ac18d4ad7460b21ceb28d9d6364
2018-08-23Move finding TID to crash-managerMateusz Moscicki4-95/+112
Additionally find_crash_tid() returns PID for single-threaded applications, instead of -1. Change-Id: Id6fcc652b95bddda954f25cd448f1e090918c231
2018-08-22Release 5.0.1submit/tizen/20180822.121814Karol Lewandowski1-1/+1
Major version bump due to versioning scheme change. Major versions will now follow major Tizen releases (eg. crash-worker 5 for Tizen 5). New features: - callstack resolver has been rewritten to not use ptrace This was required to avoid races during resolve process (kernel would wake up ptraced process). Consequently, it's now possible to prepare crash report of VIP process (whose failure causes system to be rebooted). - New-style D-Bus signal ProcessCrashed is now emitted to notify about the crash - .info-only report type now can be selected via configuration option ReportType - Crash dump location can be changed by CrashReportPath config option - Saving core dump (for FULL/.zip reports) can be changed by DumpCore option Change-Id: I91e806d0d516e618802aee7a742120c0281034a1
2018-08-22Normalize minicoredumper config variable namingKarol Lewandowski3-7/+6
Change-Id: I5669d0d46fc15c8193b5e8ea11d1254838a8dfd1
2018-08-22Move crash-manager.conf to /etcKarol Lewandowski4-5/+6
This commit brings back config to /etc to avoid problems with config not being available for crashes happening during bootup (when /opt/ is not mounted yet) Change-Id: Ib384f1fd28192dd199565d888c59f0a33d4d578d
2018-08-22Fail early if can not run minicoredumper properlyKarol Lewandowski1-10/+23
Minicoredumper is essential for gathering report, so it does not make much sense to continue when we can't even pass right parameters (prstatus). Change-Id: Id7560452110871190f243f7ff61f4e849351a8af
2018-08-22Remove unsupported and misleading configuration optionsKarol Lewandowski8-270/+39
- Remove TIZEN_FEATURE_PTRACE_CALLSTACK option Crash report generation method has been reworked and does not depend on ptrace anymore. - Remove TIZEN_ENABLE_MINICOREDUMPER option Minicoredumper is required to dump PRSTATUS, which is later used by crash-manager (for D-Bus signal) and by crash-stack (for callstack unwinding) - Remove TIZEN_ENABLE_COREDUMP option crash-pipe does not dump PRSTATUS so can not be used as an option (see above). Consequently, enabling/disabling coredumps has been moved to configuration file (DumpCore=0/1). Change-Id: If535acfe7e64fdde0a8b50afd8b3a1f44fda2490
2018-08-22Merge changes I5ecf4873,I049952ab into tizenKarol Lewandowski4-19/+5
* changes: log_dump: dbus: Only root can own org.tizen.system.crash name log_dump: Rework service file
2018-08-22Add report typesMateusz Moscicki2-16/+101
Depending on report type we save all zip archive with coredump, logs, so_info and info file, or just only the *.info file. Report type can be set in crash-manager.conf: [CrashManager] ... ReportType=INFO ... Available report types: * INFO - Save *.info file * FULL - Save coredump, *.log, *.so_info and *info file as a ZIP archive (default) Change-Id: I486049ac8eb928ebdc6ac513bdeac3c98aa4adcc
2018-08-22Split execute_crash_modulesMateusz Moscicki1-15/+36
Change-Id: Iae6af748786c68dcb45a50dc37275fe12e40d85d
2018-08-22Add ability to set report path in crash-manager.confMateusz Moscicki2-34/+106
To change default report path (/opt/usr/crash/dump/) modify the value in crash-manager.conf: [CrashManager] ... CrashRootPath=/var/crash ... Change-Id: I39b9bc178e989a1aad5727f5becdee74b1e1b13b
2018-08-22Add DBus signal emitting after report saveMateusz Moscicki5-0/+373
Interface: "org.tizen.system.crash.Crash" Path: "/org/Tizen/System/Crash/Crash" Signal: "ProcessCrashed" Message (signature "sssssiia{sv}"), contains: * process name * exe path * appid * pkgid * report path * PID * TID * dictionary a{sv} contains registers values depends on the architecture: * for x86: * x86.eip * for x86_64: * x86_64.rip * for armv7l: * arm.pc * arm.lr * for aarch64: * aarch64.pc * aarch64.lr Change-Id: I081a3f4982e2f0d4b01fd665b4dffcd3bab847f4