platform/core/system/crash-worker.git
3 years agocrash-stack: Drop unused get_threads() 95/255695/1
Karol Lewandowski [Mon, 22 Mar 2021 15:39:07 +0000 (16:39 +0100)]
crash-stack: Drop unused get_threads()

Change-Id: I8146fe9c52889d872967dadfa12065dabb42cc3f

3 years agoRelease 6.5.13 43/255443/10 submit/tizen/20210322.183501
Mateusz Moscicki [Thu, 18 Mar 2021 10:15:58 +0000 (11:15 +0100)]
Release 6.5.13

Change-Id: Iccc7f0dd4aafcf6056282a71880b4dd8df89a3a1

3 years agoAllow to get bugreports using the diagnostics API 21/255621/3
Mateusz Moscicki [Fri, 19 Mar 2021 16:53:49 +0000 (17:53 +0100)]
Allow to get bugreports using the diagnostics API

bugreport-service registers as a org.tizen.bugreport-service and allows
to get bugreport and crash-info report by dumpsys.
For example: to get all bugreports created in the last hour run:

  dumpsys org.tizen.bugreport-service -- --type bugreport --last 3600

Supported parameters:

  --type <bugreport|crash-info>  Get specified report
  --last <sec>          Get reports created in the last <sec>
  --from <timestamp>    Get reports created after a specified time
  --to <timestamp>      Get reports created before a specified time

Change-Id: I0d3e04c34b63f3a559c8bde9af703eeabeb4e7ae

3 years agoSend diagnostics event (BugreportCreated) when new bugreport is created 20/255620/2
Mateusz Moscicki [Fri, 19 Mar 2021 16:51:35 +0000 (17:51 +0100)]
Send diagnostics event (BugreportCreated) when new bugreport is created

Change-Id: I0fe77932bec656e1abbf0a1fd79eb68ae233ea3d

3 years agolibbugreport: Drop needless -service suffix 60/255460/1 submit/tizen/20210322.215101 submit/tizen/20210324.111927
Karol Lewandowski [Thu, 18 Mar 2021 11:26:43 +0000 (12:26 +0100)]
libbugreport: Drop needless -service suffix

Change-Id: I1f7c0d4b021c5bee76d2325649c55bdc6478eac1

3 years agospec: Fix crash_root directory permission 56/255456/4
Mateusz Moscicki [Thu, 18 Mar 2021 11:57:46 +0000 (12:57 +0100)]
spec: Fix crash_root directory permission

Change-Id: Id2f1f4ac5fb2f160011d5ccb1976645f8b853d55

3 years agospec: Ensure needed crash_worker user is available during package installation 91/255291/2
Karol Lewandowski [Tue, 16 Mar 2021 08:53:01 +0000 (09:53 +0100)]
spec: Ensure needed crash_worker user is available during package installation

Some system users are created by security-config package %post script, thus
we need to ensure this package is installed and configured before we install
packages containing, in our case, crash_worker-user owned files/dirs.

Change-Id: I122e992936f4569cbb5f42f0f38f4ce9f5fb2100

3 years agoMove the libbugreport library to the separate spec 08/255308/3
Mateusz Moscicki [Tue, 16 Mar 2021 11:15:58 +0000 (12:15 +0100)]
Move the libbugreport library to the separate spec

A separate spec is needed because diagnostics depends on libbugreport,
while bugreport-service requires diagnostics.

Change-Id: I809e21be045ca6d29d5851032d135a308e816c16

3 years agoRelease 6.5.12 55/255155/4 accepted/tizen/unified/20210318.055925 submit/tizen/20210315.181414
Karol Lewandowski [Fri, 12 Mar 2021 12:21:22 +0000 (13:21 +0100)]
Release 6.5.12

* Add new dumpsystemstate-service
* Rename crash-service to bugreport-service
* Decouple bugreport-service from crash-worker dependencies
* Rework packaging to make it possible to complile out/disable crash-worker/livedumper/etc.

Change-Id: I7b3bdd9156e786d7bbba1d49ef6db36659eb7c48

3 years agospec: Santize programs' permissions 41/255241/1
Karol Lewandowski [Mon, 15 Mar 2021 14:00:47 +0000 (15:00 +0100)]
spec: Santize programs' permissions

Use default only where necessary and clearly
write the reason behind it.

Change-Id: I96b696c4b8268a9548be3f105dc827a67b436742

3 years agospec: Provide libcrash-service to ease transition to libbugreport 61/255161/2
Karol Lewandowski [Fri, 12 Mar 2021 16:44:49 +0000 (17:44 +0100)]
spec: Provide libcrash-service to ease transition to libbugreport

Change-Id: I33d83f9d5e40e6d6d1940597424bba87fcc4552d

3 years agopackaging: Package only bugreport-service and dumpsystemstate-service for TV 70/255070/3
Karol Lewandowski [Thu, 11 Mar 2021 22:00:42 +0000 (23:00 +0100)]
packaging: Package only bugreport-service and dumpsystemstate-service for TV

Change-Id: Ia2b330a71d6775821dce0db5f2076074dfe396c1

3 years agospec: redesign 58/255058/5
Karol Lewandowski [Thu, 11 Mar 2021 13:59:12 +0000 (14:59 +0100)]
spec: redesign

Change-Id: I5b2b2337413c4ea019be4c876449263d8ef72257

3 years agobugreport-service: Independence from the crash-manager 68/255068/3
Mateusz Moscicki [Wed, 10 Mar 2021 10:30:39 +0000 (11:30 +0100)]
bugreport-service: Independence from the crash-manager

The changes that this commit makes allow to install the
bugreport-service without having to install crash-manager.

Change-Id: If448436c0dff6a69f1bef6b4d249c199f549dec8

3 years agolibcrash-service: Do not export unneeded symbols 54/255054/1
Karol Lewandowski [Thu, 11 Mar 2021 11:23:33 +0000 (12:23 +0100)]
libcrash-service: Do not export unneeded symbols

Change-Id: I5584761b83f386568b869be921f667d18c6cfd3e

3 years agobugreport: Ensure library is linked to libraries we actually need 33/255033/3
Karol Lewandowski [Thu, 11 Mar 2021 09:39:18 +0000 (10:39 +0100)]
bugreport: Ensure library is linked to libraries we actually need

We always link to libcrash-manager but it might not be needed,
if livecoredump suport is disabled.

This commit prepares bugreport-service to be libcrash-manager-independent.

Change-Id: I4d506e517ce2da22daa047741187a15f91da4180

3 years agoAdd dump_systemstate-service 91/253491/10
Mateusz Moscicki [Mon, 15 Feb 2021 12:16:53 +0000 (13:16 +0100)]
Add dump_systemstate-service

The service registers with the name org.tizen.systemstate and provides
the output of defined commands via dumpsys interface. The registration
of commands is done by adding dumpsyscmd parameter to the extra program
configuration file. For example, the following configuration in
/etc/dump_systemstate.conf.d/programs/crash-worker-programs.conf:

  ...

  [buxton system]
  order=141
  cmdflag=b
  title=System configuration
  path=/usr/bin/buxton2ctl
  args=dump system
  dumpsyscmd=buxton_system
  allowdumpsysargs=yes
  ...

allows to get the output of the command:

  /usr/bin/buxton2ctl dump system

by calling:

  dumpsys org.tizen.systemstate buxton_system

The allowdumpsysargs parameter is responsible for the possibility to
provide custom parameters via dumpsys (disallowed by default).

Change-Id: Iff9569d4975ab97addfcf32ea6c22d7237275b35

3 years agodump_systemstate: Extract the function to read ini files 90/253490/5
Mateusz Moscicki [Mon, 15 Feb 2021 12:09:34 +0000 (13:09 +0100)]
dump_systemstate: Extract the function to read ini files

Change-Id: I53b79be8953bfc1d6c3c420913d8afa47cac5004

3 years agopackaging: Split packages to allow installing only bugreport-service with its deps 14/254814/3
Karol Lewandowski [Tue, 9 Mar 2021 13:55:15 +0000 (14:55 +0100)]
packaging: Split packages to allow installing only bugreport-service with its deps

Change-Id: I8e225cc465b6a6585fd7f3f292e249a27bcff898

3 years agobugreport: Ensure DLog tag is always specified 13/254813/1
Karol Lewandowski [Tue, 9 Mar 2021 11:47:59 +0000 (12:47 +0100)]
bugreport: Ensure DLog tag is always specified

Change-Id: I4ccde9340c18e9589fdfdc03ba0937c2632ff4bf

3 years agoChange the crash-service to the bugreport-service 00/254100/4
Mateusz Moscicki [Tue, 23 Feb 2021 09:40:57 +0000 (10:40 +0100)]
Change the crash-service to the bugreport-service

Change-Id: Ieea6c499a279f8bbe6c61232bbc49c4f0f768691

3 years agoCreate a report with only dump_systemstate output for PID <= 0 51/253851/6
Mateusz Moscicki [Thu, 18 Feb 2021 11:08:55 +0000 (12:08 +0100)]
Create a report with only dump_systemstate output for PID <= 0

Passing PID <= 0 to livedump_pid() API method will create a report
containing only dump_systemstate output.

Change-Id: I38dd566acb0ff2f1a0ecf0a492dbdac91343c215

3 years agoRelease 6.5.11 34/254034/1 accepted/tizen/unified/20210222.215244 submit/tizen/20210222.111341
Mateusz Moscicki [Mon, 22 Feb 2021 10:36:33 +0000 (11:36 +0100)]
Release 6.5.11

Change-Id: Ied63aff39a5c9b5d03874683e9e2ab08bab6c661

3 years agoRe-create crash_path for compatibilities. 54/253954/1
Kunhoon Baik [Sun, 21 Feb 2021 03:39:22 +0000 (12:39 +0900)]
Re-create crash_path for compatibilities.

The crash_path should be installed at image creation time for several Tizen testing infras.
Until Tizen testing infras will be modified, the crash_path should be remained.

Change-Id: Iea7166e87a2dbd3b55bb95f8d8a492d17dec50a0

3 years agoRelease 6.5.10 04/253104/6 submit/tizen/20210205.125131 submit/tizen/20210217.095429 submit/tizen/20210217.142253
Mateusz Moscicki [Thu, 4 Feb 2021 11:47:23 +0000 (12:47 +0100)]
Release 6.5.10

Change-Id: I1a7060c4c3949a28f2e7d66c31ff85063e3eb295

3 years agoSet permissions explicitly for directories and reports 02/253202/1
Mateusz Moscicki [Fri, 5 Feb 2021 10:47:31 +0000 (11:47 +0100)]
Set permissions explicitly for directories and reports

Change-Id: If01ddf2a7f73a6b808f3cd8d39f20a77c74231d3

3 years agocrash-manager, service: Set a restrictive umask 13/253113/4
Karol Lewandowski [Thu, 4 Feb 2021 15:03:15 +0000 (16:03 +0100)]
crash-manager, service: Set a restrictive umask

Setting such a mask will make any files created on ocassion (such as
temporary files) unreadable by others.

Change-Id: I6843a49cb123a663effb1ab99e8118e968786624

3 years agopackaging: Drop redundant directories 03/253103/4
Karol Lewandowski [Thu, 4 Feb 2021 11:05:22 +0000 (12:05 +0100)]
packaging: Drop redundant directories

These directories are created on-demand by crash-manager/service.

There is no need to main correct permission/label set in multiple
places.

Change-Id: Ie81cd358d9e17d4249bbdc0a2ed791b5097fa583

3 years agoMerge branch 'tizen_6.0' into tizen 20/252820/1 submit/tizen/20210202.125831
Mateusz Moscicki [Tue, 2 Feb 2021 11:14:57 +0000 (12:14 +0100)]
Merge branch 'tizen_6.0' into tizen

Change-Id: I3d8551cda3f54fd4bfa617667a54ef7238c39949

3 years agoRelease 6.0.30 11/252811/1 submit/tizen_6.0/20210202.125902
Mateusz Moscicki [Tue, 2 Feb 2021 11:13:16 +0000 (12:13 +0100)]
Release 6.0.30

Change-Id: I5480be318f6855562e7b4599be2b002d5d97ca37

3 years agodiagnostics-run.conf: fix tmpfile location in 64 bit 10/252810/1
INSUN PYO [Fri, 29 Jan 2021 03:07:55 +0000 (12:07 +0900)]
diagnostics-run.conf: fix tmpfile location in 64 bit

Change-Id: Ieda58ed71f73503127ba44b85f8bc0d6fa6e26f0

3 years agocrash-manager: Set primary group 01/252801/1
Karol Lewandowski [Tue, 2 Feb 2021 09:00:59 +0000 (10:00 +0100)]
crash-manager: Set primary group

Previously only supplementary groups were set, leaving main gid to
be 'root'.

Change-Id: I50494ca40192c985d07cf07827c4f44c4f99b1d7

3 years agoMerge branch 'tizen' into tizen_6.0 93/252093/1 accepted/tizen/6.0/unified/20210126.035401 submit/tizen_6.0/20210122.102603
Mateusz Moscicki [Fri, 22 Jan 2021 09:47:42 +0000 (10:47 +0100)]
Merge branch 'tizen' into tizen_6.0

Change-Id: Ib47738a925b7ce8f241d1f865a4ca6767013d273

3 years agoRelease 6.5.8 90/252090/1 accepted/tizen/unified/20210125.132336 submit/tizen/20210122.102631
Mateusz Moscicki [Fri, 22 Jan 2021 09:45:55 +0000 (10:45 +0100)]
Release 6.5.8

Change-Id: I4a4549b63a6ea415d8a1818d7bb1b782bebe6eea

3 years agocrash-service: Drop priv_* group from policy as these are not allowed by tizen sanity... 16/252016/2
Karol Lewandowski [Thu, 21 Jan 2021 20:07:11 +0000 (21:07 +0100)]
crash-service: Drop priv_* group from policy as these are not allowed by tizen sanity checkers

It seems priv_* groups can not be explicitly listed, as image creation fails with:

[01/21 15:50:01 UTC] FAILED(assert) at /busconfig/policy[3] : Group 'priv_*' is not allowed.
[01/21 15:50:01 UTC] Found 1 Fails
[01/21 15:50:01 UTC] Remove conf file : mv /etc/dbus-1/system.d/crash-service.conf /etc/dbus-1/system.d/crash-service.conf.fail

Change-Id: Ieea004890dfbccddf9d16ee949f55f3a02461bcc

3 years agoMerge branch 'tizen' into tizen_6.0 04/251904/1 submit/tizen_6.0/20210121.145209
Karol Lewandowski [Wed, 20 Jan 2021 15:32:37 +0000 (16:32 +0100)]
Merge branch 'tizen' into tizen_6.0

Change-Id: Iaec2734d534c06682dc3bb85b7339fc6a685e14f

3 years agoRelease 6.5.7 03/251903/1 submit/tizen/20210121.145225
Karol Lewandowski [Wed, 20 Jan 2021 15:28:46 +0000 (16:28 +0100)]
Release 6.5.7

Change-Id: Iab075746a882ac423c212f4b803fa8fa48984dfe

3 years agocrash-service: Re-add privilege <check> for livedump 33/251833/4
Karol Lewandowski [Tue, 19 Jan 2021 16:56:47 +0000 (17:56 +0100)]
crash-service: Re-add privilege <check> for livedump

dbus-daemon uses getgrouplist() to get group membership, meaning
that we can't depend on group membership alone.  For this to work
dbus-daemon would need to use SO_PEERGROUP, which was introduced
in Linux kernel 4.13.

For now we have to keep both checks (<group> and <check privilege..)

Change-Id: I86b7664f19292be71c5d7c2ca27f837ec7799a96

3 years agoRelease 6.5.6 30/251830/1
Mateusz Moscicki [Tue, 19 Jan 2021 16:29:35 +0000 (17:29 +0100)]
Release 6.5.6

Change-Id: I843c2c7021a04b42799cb5f2b4931fe1a1145fe7

3 years agocrash-service: Simplify the diagnostics get_file access control 23/251823/2
Karol Lewandowski [Tue, 19 Jan 2021 12:17:14 +0000 (13:17 +0100)]
crash-service: Simplify the diagnostics get_file access control

Root is impicitly allowed by <check ..> directive, there is no need
for separate section for this.

Change-Id: I8ff19674fd2610ab1255db14658ae0e1ceeab5e1

3 years agocrash-service: Permit service & app livedump API clients 22/251822/2
Karol Lewandowski [Tue, 19 Jan 2021 12:05:46 +0000 (13:05 +0100)]
crash-service: Permit service & app livedump API clients

The d-bus livedump_pid API can be used by both services and apps.

For service to use the API it should be member of (supplementary)
priv_livecoredumper group.

For application to use the API it should be given the
"http://tizen.org/privilege/internal/livecoredump" privilege.
However, it's internal privilege so it can't be given from the
application manifest. See 'livedumper' section in NOTES file
for hints.

Change-Id: I01586c2c00f7a15d2553e4284ce373a03f9433b1

3 years agoAdd information about the need to manually add a privilege 83/251683/3
Mateusz Moscicki [Mon, 18 Jan 2021 10:26:38 +0000 (11:26 +0100)]
Add information about the need to manually add a privilege

Change-Id: I9832f5fb566e183e414e1fc0f27d3275f2931aa8

3 years agoMerge changes I4fbe1307,I4ed60496 into tizen_6.0 submit/tizen_6.0/20210114.151600
Mateusz Mościcki [Thu, 14 Jan 2021 15:00:17 +0000 (15:00 +0000)]
Merge changes I4fbe1307,I4ed60496 into tizen_6.0

* changes:
  Release 6.0.27
  Fix dbus policy for livedump_pid

3 years agoRelease 6.5.5 23/251523/1 submit/tizen/20210114.150700
Mateusz Moscicki [Thu, 14 Jan 2021 14:12:40 +0000 (15:12 +0100)]
Release 6.5.5

Change-Id: I78053a4c9608f279cb0f71daf72740bd54103943

3 years agoRelease 6.0.27 22/251522/1
Mateusz Moscicki [Thu, 14 Jan 2021 14:12:07 +0000 (15:12 +0100)]
Release 6.0.27

Change-Id: I4fbe1307c1ce48917057b19692a53676d48a344c

3 years agoFix dbus policy for livedump_pid 19/251519/1
Mateusz Moscicki [Thu, 14 Jan 2021 13:25:26 +0000 (14:25 +0100)]
Fix dbus policy for livedump_pid

Change-Id: I4ed60496efefc70ef2b8fb2b8590e4f430e016cb

3 years agoFix dbus policy for livedump_pid 15/251515/1
Mateusz Moscicki [Thu, 14 Jan 2021 13:25:26 +0000 (14:25 +0100)]
Fix dbus policy for livedump_pid

Change-Id: I4ed60496efefc70ef2b8fb2b8590e4f430e016cb

3 years agoRelease 6.5.4 66/250166/1 accepted/tizen/unified/20201222.122551 submit/tizen/20201221.105823
Mateusz Moscicki [Mon, 21 Dec 2020 10:52:43 +0000 (11:52 +0100)]
Release 6.5.4

Change-Id: Ice6551ac00608f994627d5f5c85a3f15457bc17d

3 years agofilename change from "corrupted_cmdline" to "nonascii_cmdline" 45/250145/1
Kunhoon Baik [Sat, 19 Dec 2020 23:46:27 +0000 (08:46 +0900)]
filename change from "corrupted_cmdline" to "nonascii_cmdline"

isgraph cannot check cmdline with unicode.
Thus, it will be better to change to nonascii_cmdline

Change-Id: I60c166512cc0c7cb766d0223f71b336403aa644b

3 years agoRelease 6.5.3 73/250073/1 accepted/tizen/unified/20201220.221656 submit/tizen/20201218.151137
Karol Lewandowski [Fri, 18 Dec 2020 13:08:58 +0000 (14:08 +0100)]
Release 6.5.3

This release introduces cmdline santizing, to avoid creating reports
with 'strange' characters in name (as it's based on cmdline).

Change-Id: I2eb83c0ceb391608db9388115260b9464ecb9c90

3 years agocrash-manager: Santize cmd_line early 65/250065/2
Karol Lewandowski [Fri, 18 Dec 2020 11:24:18 +0000 (12:24 +0100)]
crash-manager: Santize cmd_line early

There is no value in passing cmd_line that is potentially corrupted.

Previously, we wanted to share original cmdline value via dbus-notify
but this no longer seems correct as we have to replace cmd_line
completely when it contains invalid/non-printable characters.

This patch changes behaviour so that santized cmd_line is available
universally via cinfo->cmd_line.

Change-Id: I9a54781614d89c6abb89ef0c0755d8a23a26f55d

3 years agocrash-manager: Create reports with `corrupted_process' prefix when cmdline is corrupted 42/250042/3
Karol Lewandowski [Fri, 18 Dec 2020 10:09:21 +0000 (11:09 +0100)]
crash-manager: Create reports with `corrupted_process' prefix when cmdline is corrupted

Change-Id: I62cd86e70d4d1e347bdadd4d2a2a4fcb448b88d4

3 years agoRelease 6.5.2 38/249938/1 submit/tizen/20201217.120803 submit/tizen/20201218.113325
Mateusz Moscicki [Thu, 17 Dec 2020 11:19:50 +0000 (12:19 +0100)]
Release 6.5.2

Change-Id: Ib9fea66140376d0e4b0a0fe6b93b02b639aa8229

3 years agoFix SVACE warnings 37/249937/1
Mateusz Moscicki [Thu, 17 Dec 2020 11:12:27 +0000 (12:12 +0100)]
Fix SVACE warnings

Change-Id: I7ef2563bee2bf1690b2a38554cc15bf0e10f92fc

3 years agoFix null dereferences 46/249346/1
Michal Bloch [Mon, 7 Dec 2020 21:16:07 +0000 (22:16 +0100)]
Fix null dereferences

Change-Id: Id23b9aaad60752f797783f9ccc6f9bbfa9357941
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
(cherry picked from commit a9a8f5e3955f55e03a05878a381257085dc02951)

3 years agoFix null dereferences 47/249147/2
Michal Bloch [Mon, 7 Dec 2020 21:16:07 +0000 (22:16 +0100)]
Fix null dereferences

Change-Id: Id23b9aaad60752f797783f9ccc6f9bbfa9357941
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoMerge branch 'tizen' into tizen_6.0 02/247402/1 accepted/tizen/6.0/unified/20201113.014501 submit/tizen_6.0/20201110.125153
Mateusz Moscicki [Tue, 10 Nov 2020 10:36:54 +0000 (11:36 +0100)]
Merge branch 'tizen' into tizen_6.0

Change-Id: I5be0529ee820cfb1cedd987686b954b522209cc7

4 years agoRelease 6.5.1 01/247401/1 accepted/tizen/unified/20201116.130510 submit/tizen/20201110.125218
Mateusz Moscicki [Tue, 10 Nov 2020 10:25:20 +0000 (11:25 +0100)]
Release 6.5.1

Change-Id: I9e72706205c738df27cdc73de7b46797e5157018

4 years agoRelease 6.0.25 96/247296/1 submit/tizen/20201109.141343
Mateusz Moscicki [Mon, 9 Nov 2020 13:46:45 +0000 (14:46 +0100)]
Release 6.0.25

Change-Id: Id7d2a7d722ce8b0ee94fc1bf5db390ba52928cc3

4 years agoAdd a SHA1 hashsum to the so_info file 30/246730/5
Mateusz Moscicki [Tue, 3 Nov 2020 11:38:41 +0000 (12:38 +0100)]
Add a SHA1 hashsum to the so_info file

Change-Id: I2508c06f58a9385973511e86737aa6b146fe2de9

4 years agoAdd VCS to the so_info file 29/246729/4
Mateusz Moscicki [Tue, 3 Nov 2020 10:09:15 +0000 (11:09 +0100)]
Add VCS to the so_info file

VCS is read from the rpm database

Change-Id: Ie8359f1ea91bdff9c77517b8d709334ec0e6226e

4 years agoRelease 6.0.24 32/246232/1 accepted/tizen/unified/20201029.124810 submit/tizen/20201027.094710 submit/tizen/20201028.112512
Mateusz Moscicki [Tue, 27 Oct 2020 07:07:04 +0000 (08:07 +0100)]
Release 6.0.24

Change-Id: Ibdd55db0abcde2a91ea08a40dca96200dfede63d

4 years agoUpdate the crash-manager upgrade script 82/246182/2
Mateusz Moscicki [Mon, 26 Oct 2020 11:01:42 +0000 (12:01 +0100)]
Update the crash-manager upgrade script

Change-Id: Ibd9fe951012a828a29038f1ed06c797f4fbecb19

4 years agoFix dbus_notify system test and return the result of tests 00/245700/3
Mateusz Moscicki [Wed, 14 Oct 2020 08:49:29 +0000 (10:49 +0200)]
Fix dbus_notify system test and return the result of tests

Change-Id: I1fa460e024bcb7eeba0c9bdde42903edb91dd8a4

4 years agoAdd a NULL check 99/245999/1
Michal Bloch [Thu, 15 Oct 2020 13:57:43 +0000 (15:57 +0200)]
Add a NULL check

Change-Id: Idf5ef8e27e110fbe2705a647c9de77e3d8a953c0
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoFix incorrect variable qualification 74/245774/1
Michal Bloch [Wed, 7 Oct 2020 11:13:49 +0000 (13:13 +0200)]
Fix incorrect variable qualification

Change-Id: Icf878243cbc7dbd89ac261d9c55108296738d7fc

4 years agoMerge "Use machine-friendly syntax" into tizen
Michal Bloch [Thu, 15 Oct 2020 13:08:36 +0000 (13:08 +0000)]
Merge "Use machine-friendly syntax" into tizen

4 years agoFix some file descriptor leaks 41/245141/1
Michal Bloch [Fri, 2 Oct 2020 17:04:45 +0000 (19:04 +0200)]
Fix some file descriptor leaks

Change-Id: I1bb8cc2580ca208cc8387a84528d9a60e6909cd3

4 years agoUse machine-friendly syntax 39/245139/1
Michal Bloch [Fri, 2 Oct 2020 16:48:01 +0000 (18:48 +0200)]
Use machine-friendly syntax

Various tools (compiler, static analysis) might see better with this one.

Change-Id: I6567c41ca6c69cb026771ce7e7a802efb578d2f9

4 years agoDrop elfutils remains 25/245125/2
Karol Lewandowski [Fri, 2 Oct 2020 10:26:05 +0000 (12:26 +0200)]
Drop elfutils remains

These were not used anyway since own parser has been deployed.

Change-Id: I7c961ea8dd05059944f2a6dcae4ae63c305a8b18

4 years agoRelease 6.0.23 30/244130/1 accepted/tizen/unified/20200916.121724 submit/tizen/20200915.074635
Mateusz Moscicki [Tue, 15 Sep 2020 07:25:42 +0000 (09:25 +0200)]
Release 6.0.23

Change-Id: Ie93e2adbab1653ce14e3ac77e3a98afe3e7591ec

4 years agoFix coverity issue - untrusted divisor 29/244129/1
Mateusz Moscicki [Tue, 15 Sep 2020 06:26:08 +0000 (08:26 +0200)]
Fix coverity issue - untrusted divisor

Change-Id: I85689dc3753e24ebec6ab88cd6e0e39f57cce442

4 years agoRelease 6.0.22 22/243622/2 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.115410 accepted/tizen/6.0/unified/hotfix/20201103.004045 accepted/tizen/unified/20200916.121802 submit/tizen/20200908.125226 submit/tizen_6.0/20201029.205104 submit/tizen_6.0_hotfix/20201102.192504 submit/tizen_6.0_hotfix/20201103.114804 tizen_6.0.m2_release
Mateusz Moscicki [Tue, 8 Sep 2020 12:33:46 +0000 (14:33 +0200)]
Release 6.0.22

Change-Id: If8974ef1ca38a83fea8e571e3058e12af7c03d96

4 years agoCalculate the call stack hash sum 79/231379/10
Mateusz Moscicki [Tue, 21 Apr 2020 11:30:03 +0000 (13:30 +0200)]
Calculate the call stack hash sum

The hash is used to identify crash reports that contain the same call
stack.

Change-Id: Ib08e6775d3f3c671b660d92449de78c0d3bb74ec

4 years agoRelease 6.0.21 72/243172/1 submit/tizen/20200903.132908
Mateusz Moscicki [Thu, 3 Sep 2020 13:17:50 +0000 (15:17 +0200)]
Release 6.0.21

Change-Id: I394cebd522fec96a52207f26869850ec18fcb595

4 years agoFix printing the callstack in case the module name cannot be found 61/243161/1
Mateusz Moscicki [Thu, 3 Sep 2020 11:04:50 +0000 (13:04 +0200)]
Fix printing the callstack in case the module name cannot be found

Change-Id: Ie077c4a53467996d63a71ba8cfe6f58331a4ff16

4 years agoFix building on x86 95/241895/1 accepted/tizen/unified/20200824.030009 submit/tizen/20200820.145124
Mateusz Moscicki [Thu, 20 Aug 2020 14:11:16 +0000 (16:11 +0200)]
Fix building on x86

Change-Id: I99a1b7ad017c5f745cf2304a333d1f130c251586

4 years agoRelease 6.0.20 28/241128/2 submit/tizen/20200820.132715
Mateusz Moscicki [Mon, 17 Aug 2020 16:39:00 +0000 (18:39 +0200)]
Release 6.0.20

Change-Id: I73f6b4b1b66b4a3a37689759c1c568c742698676

4 years agocrash-manager: Change Smack lablel to System::Privileged 66/241366/2
Karol Lewandowski [Wed, 19 Aug 2020 10:48:49 +0000 (12:48 +0200)]
crash-manager: Change Smack lablel to System::Privileged

This partially reverts 8e2f5635896 ("Adjust smack label").

The System::Privileged label is needed again because on
newer kernels (>= 4.20) it's not possible to read/ptrace
processes listed in onlycap set.  Practically, that meant
that many of Tizen processes were not able to generate
coredump properly.

Change-Id: Ifcdeceb88cede67a0d8192474698addfc9aa338b

4 years agoMove crash-worker tests to the /usr/libexec directory 26/241126/2
Mateusz Moscicki [Mon, 17 Aug 2020 10:34:46 +0000 (12:34 +0200)]
Move crash-worker tests to the /usr/libexec directory

Change-Id: Ib4daa77836316318e612740871e4de982d5357cd

4 years agoFix building on aarch64, after changing the ELF parser. 23/241123/3
Mateusz Moscicki [Thu, 13 Aug 2020 15:06:55 +0000 (17:06 +0200)]
Fix building on aarch64, after changing the ELF parser.

Change-Id: I41557a2149ca4b6c5d89ab16a89199d1cdf33170

4 years agoRead ESP and EIP from registers instead of /proc/<pid>/stat 22/241122/3
Karol Lewandowski [Fri, 31 Jul 2020 10:03:07 +0000 (12:03 +0200)]
Read ESP and EIP from registers instead of /proc/<pid>/stat

Since linux kernel commit 0a1eb2d474edfe75466be6b4677ad84e5e8ca3f5,
/proc/<pid>/stat reports EIP and ESP values only if the process is core
dumping. So for livedumper to work, these values must be read by
ptrace().

Change-Id: Ie748e694fc1ae30841c2fbb709fbd9abe67185ba

4 years agocrash-manager: Always emit new style ProcessCrashedEx 75/240975/2
Karol Lewandowski [Thu, 13 Aug 2020 07:24:03 +0000 (09:24 +0200)]
crash-manager: Always emit new style ProcessCrashedEx

ProcessCrashed signature varies between Tizen forks, so introduce
ProcessCrashedEx which does not have this problem.

Change-Id: I4cf3f2327690d6bedb6d39dc85ca96487e859acb

4 years agoCheck for existence of the ExtraScript 95/239995/2
Karol Lewandowski [Fri, 31 Jul 2020 10:03:07 +0000 (12:03 +0200)]
Check for existence of the ExtraScript

In the case where ExtraScript points to non-existent script, the crash worker
will create child process which will remain zombie until it's reaped.  The
reaping is handled after dump_systemstate finishes.  This will cause zombie
process to exist for duration of dump_systemstate execution.

This change prevents creating child process if ExtraScripts points to path
which is not executable.

Change-Id: I4caba47812b6990e9b5b54fe9929930cc667f4eb

4 years agoAdd crash-service part of the diagnostic API 28/229228/9
Mateusz Moscicki [Wed, 18 Mar 2020 11:07:45 +0000 (12:07 +0100)]
Add crash-service part of the diagnostic API

Change-Id: I869ebed29b6657a2227fae407079c643819a551b

4 years agoChange the way ELF file are parsed 00/237600/9
Mateusz Moscicki [Tue, 30 Jun 2020 08:47:26 +0000 (10:47 +0200)]
Change the way ELF file are parsed

Change-Id: I737ec17f8a5a6e71efe24f7f44ad1e08775d24b7

4 years agoAdd an ELF file parser 98/238798/2
Mateusz Moscicki [Fri, 17 Jul 2020 09:28:03 +0000 (11:28 +0200)]
Add an ELF file parser

Change-Id: Ib71d0de73a6dde20f5ccfca1a8b8f0d4e283a19a

4 years agoRelease 6.0.19 72/238372/1 accepted/tizen/unified/20200716.144637 submit/tizen/20200713.084237
Mateusz Moscicki [Mon, 13 Jul 2020 06:01:07 +0000 (08:01 +0200)]
Release 6.0.19

The most important change in this release is the addition of the INFO
report in JSON format (*.info.json)

Change-Id: I5372c7eff95940241365abe8beacb6dfc71245a7

4 years agoChange the function signature to a more universal one 27/229227/6
Mateusz Moscicki [Tue, 24 Mar 2020 09:16:52 +0000 (10:16 +0100)]
Change the function signature to a more universal one

Change-Id: I3fea24d1448ffba3d6ff24e7c2090e6d7e0565e0

4 years agoAdd tool to convert info.json report 01/237601/6
Mateusz Moscicki [Fri, 26 Jun 2020 13:29:40 +0000 (15:29 +0200)]
Add tool to convert info.json report

Change-Id: I4c10ef5880ae919c8b4bf7a8167344db6f8ed2c7

4 years agoAdd report file in JSON format 18/236718/9
Mateusz Moscicki [Thu, 18 Jun 2020 13:47:20 +0000 (15:47 +0200)]
Add report file in JSON format

Change-Id: Ie61fcf83ebd6c8dd536e54e4206094d2d3b94d67

4 years agoSimplifies the printing of registers 17/236717/2
Mateusz Moscicki [Thu, 18 Jun 2020 13:46:06 +0000 (15:46 +0200)]
Simplifies the printing of registers

Change-Id: Ibf6b17258bbb6e108f896db5ca3f4b50db7dde36

4 years agoChange getpwnam to getpwnam_r 25/235425/2
Mateusz Moscicki [Thu, 4 Jun 2020 10:16:45 +0000 (12:16 +0200)]
Change getpwnam to getpwnam_r

Change-Id: I1876f1f16d205698f3385cf472505bcab83de88e

4 years agoFix memory leak 18/235318/1
Mateusz Moscicki [Wed, 3 Jun 2020 08:32:07 +0000 (10:32 +0200)]
Fix memory leak

Change-Id: I472d42d4f486bcad970b52d881c295edd8ec2d49

4 years agoRelease 6.0.18 37/234237/3 accepted/tizen/unified/20200602.133237 submit/tizen/20200601.114633 submit/tizen/20200601.141752
Mateusz Moscicki [Fri, 22 May 2020 14:30:16 +0000 (16:30 +0200)]
Release 6.0.18

This release brings option that allows to specify whether the process is
to be released as soon as all the necessary data has been read or only
after the entire report has been created.

Change-Id: Icb2cab7884966505a26c97aa86745721252b6bb7

4 years agoFix 'full_core' system test 92/234992/1
Mateusz Moscicki [Tue, 26 May 2020 12:59:31 +0000 (14:59 +0200)]
Fix 'full_core' system test

Change-Id: I9bd5831f134141546fe435b9042b87a13ed39c1b

4 years agoAdd option to release the crashed process as soon as possible 96/234096/6
Mateusz Moscicki [Thu, 21 May 2020 09:28:12 +0000 (11:28 +0200)]
Add option to release the crashed process as soon as possible

Change-Id: Idd951c4b8c50ba1e29524339358475acdbacd382

4 years agoMerge "Read the /proc/<PID>/comm earlier" into tizen
Karol Lewandowski [Fri, 22 May 2020 14:12:03 +0000 (14:12 +0000)]
Merge "Read the /proc/<PID>/comm earlier" into tizen

4 years agoRead the /proc/<PID>/comm earlier 95/234095/2
Mateusz Moscicki [Thu, 21 May 2020 10:55:24 +0000 (12:55 +0200)]
Read the /proc/<PID>/comm earlier

Change-Id: Ied692bc4e770c9aa3b8f03f7a2515214bc40cb63

4 years agoClarify logs related to coredump handling 77/234077/2
Karol Lewandowski [Thu, 21 May 2020 10:48:30 +0000 (12:48 +0200)]
Clarify logs related to coredump handling

The coredump should not be created when minicoredumper (-s) works
correctly.  Make this clear in code and logs.

Change-Id: I2e4e160a46ac4be25143f310ffc336b121530cc8