-
Notifications
You must be signed in to change notification settings - Fork 47
uReport
uReport (microreport) is a JSON object representing a problem: binary crash, kerneloops, SELinux AVC denial... The report is expected to be completely anonymous (see below). The object contains a numeric field ureport_version
, which defines the expected contents. If the field is missing, the version is considered 0.
First uReports were not versioned at all because of quick evolution. uReport0 is the codename for the last of these (no known client has ever sent ureport_version = 0
). All former uReports will fail parsing. Although uReport0 is still supported (it can be turned into uReport1), it is obsolete and should not be used in client applications.
uReport1 format was designed for the needs of ABRT (at that moment processing C/C++ crashes, unhandled Python exceptions and kerneloopses). The background idea is that all the reports contain a stacktrace and some metadata about the environment (OS version, CPU architecture, kernel version...). Only supported fields are allowed. Some of them are mandatory, some are not. Any uReport containing excessive fields or missing mandatory fields will fail parsing.
-
ureport_version
(int) MUST be set to1
in order to be parsed and processed by uReport1 workflow -
type
(string) either ofuserspace
python
kerneloops
-
reason
(string) a short message describing what happend -
uptime
(int) uptime of the machine -
component
(string) affected component -
executable
(string) affected executable -
architecture
(string) CPU architecture -
crash_thread
(int) ID of the crash thread -
kernel_taint_state
(string) kernel tainted flags -
proc_status
placeholder -
proc_limits
placeholder -
oops
(string) the raw kerneloops as written into syslog -
user_type
(string) either ofroot
nologin
local
remote
-
installed_package
(obj) maps to appropriate RPM attributes -
-
name
(string)
-
-
-
epoch
(int)
-
-
-
version
(string)
-
-
-
release
(string)
-
-
-
architecture
(string)
-
-
running_package
(obj) same asinstalled_package
-
related_packages
(list) list of following objects: -
-
installed_package
(obj) same asinstalled_package
above
-
-
-
running_package
(obj) same asinstalled_package
above
-
-
os
(obj) operating system -
-
name
(string)
-
-
-
version
(string)
-
-
reporter
(obj) identification of the client application -
-
name
(string)
-
-
-
version
(string)
-
-
core_backtrace
(list) list of frames (following objects): -
-
thread
(int) thread number
-
-
-
frame
(int) frame number
-
-
-
path
(string) associated file
-
-
-
buildid
(string) build-id of the file
-
-
-
offset
(int) offset within the file
-
-
-
funcname
(string) function name
-
-
-
funchash
(string) function hash
-
-
os_state
(obj) -
-
suspend
(string) eitheryes
orno
-
-
-
boot
(string) eitheryes
orno
-
-
-
login
(string) eitheryes
orno
-
-
-
logout
(string) eitheryes
orno
-
-
-
shutdown
(string) eitheryes
orno
-
-
selinux
(obj) -
-
mode
(string) either ofenforcing
permissive
disabled
-
-
-
context
(string) the affected context
-
-
-
policy_package
(obj) same format asinstalled_package
-
Example:
{
"ureport_version": 1,
"type": "python",
"reason": "TypeError",
"uptime": 1,
"component": "faf",
"executable": "/usr/bin/faf-btserver-cgi",
"installed_package": { "name": "faf",
"version": "0.4",
"release": "1.fc16",
"epoch": 0,
"architecture": "noarch" },
"related_packages": [ { "installed_package": { "name": "python",
"version": "2.7.2",
"release": "4.fc16",
"epoch": 0,
"architecture": "x86_64" } } ],
"os": { "name": "Fedora", "version": "16" },
"architecture": "x86_64",
"reporter": { "name": "abrt", "version": "2.0.7-2.fc16" },
"crash_thread": 0,
"core_backtrace": [
{ "thread": 0,
"frame": 1,
"buildid": "f76f656ab6e1b558fc78d0496f1960071565b0aa",
"offset": 24,
"path": "/usr/bin/faf-btserver-cgi",
"funcname": "<module>" },
{ "thread": 0,
"frame": 2,
"buildid": "b07daccd370e885bf3d459984a4af09eb889360a",
"offset": 190,
"path": "/usr/lib64/python2.7/re.py",
"funcname": "compile" },
{ "thread": 0,
"frame": 3,
"buildid": "b07daccd370e885bf3d459984a4af09eb889360a",
"offset": 241,
"path": "/usr/lib64/python2.7/re.py",
"funcname": "_compile" }
],
"user_type": "root",
"selinux": { "mode": "permissive",
"context": "unconfined_u:unconfined_r:unconfined_t:s0",
"policy_package": { "name": "selinux-policy",
"version": "3.10.0",
"release": "2.fc16",
"epoch": 0,
"architecture": "noarch" } },
"kernel_taint_state": "G B ",
}
- Although uReport1 was designed to be independent on the operating system, it is closely related to Fedora.
- New types of problems are appearing, uReport1 is not generic enough to handle differences (SELinux AVC denial does not contain stacktrace, kerneloops does not contain executable...)
- All reports are handled in the same way. This either results into special-casing in code (
if type != "python"
etc.) or into lower-quality results (clustering kerneloops and C/C++ with the same parameters does not work well).
The format of uReport2 is derived from the new pluginable model of faf project. It only contains a very common metadata and the identification of OS plugin and Problem plugin. Only the common part is parsed by a global parser. Custom parts are forwarded to the plugins. All common fields are required (common fields are those described below except for custom
). All excessive fields are ignored.
uReport2 is still being designed, any RFEs are welcome.
-
ureport_version
(int) must be set to2
in order to be parsed and processed by uReport2 workflow -
type
(string) must match to thename
of any installed Problem plugin -
os
(obj) operating system -
-
name
(string) must match thename
of any installed OS plugin
-
-
-
version
(string) must match to the version in storage
-
-
-
arch
(string) CPU architecture
-
-
interpreter
(obj) OS-independent identification of the interpreter of the application (e.g. Kernel for binaries, Python for python scripts, Eclipse for its plugins etc.) -
-
name
(string)
-
-
-
version
(string)
-
-
reason
(string) a short message describing what happend -
reporter
(obj) identification of the client application -
-
name
(string)
-
-
-
version
(string)
-
-
custom
(obj) plugin-dependent part of the uReport -
-
os
(obj) whatever - forwarded to OS plugin
-
-
-
problem
(obj) whatever - forwarded to Problem plugin
-
Examples:
ureport = {
"ureport_version": 2,
"problem": {
"type": "ccpp", # problem plugin
"core_stacktrace": [ # threads
{
"crash_thread": true,
"frames": [
{ # frame (top frame = most recently called)
"address": 4195358,
"build_id": "fedcba",
"build_id_offset": 12345,
"function_name": "main",
"fingerprint": "27fec48d69579748149aa1a5456ea2d906ff5744",
"fingerprint_hashed": true # optional, assume true?
}
]
}
],
"executable": "/bin/sleep",
"signal": 11, # might be per-thread, need to investigate
},
"os": {
"name": "fedora", # OS plugin
"version": "16",
"arch": "x86_64",
"selinux": {
"mode": "enforcing",
"policy": "3.11.1-81.fc18",
},
"user": {
"root": false,
"local": true
},
},
"packages": [
{
"name": "kernel",
"version": "3.7.9",
"release": "205.fc18"
"epoch": 0,
"architecture": "x86_64",
},
{
"name": "glibc",
"version": "2.16",
"release": "30.fc18"
"epoch": 0,
"architecture": "x86_64",
},
],
"reason": "Killed by SIGSEGV",
"reporter": {
"name": "ABRT",
"version": "2.0.20",
},
}
ureport = {
"ureport_version": 2,
"problem" = {
"type": "eclipse", # problem plugin
"plugin_name": "Testing plugin",
"class_name": "TestingPlugin",
"exception": "UnresponsivePluginException",
"backtrace": {
...
},
},
"os": { # OS plugin
"name": "windows",
"version": "7",
"arch": "i386",
"service_pack": 1,
"antivirus": "nod32",
"uptime": 249200,
},
"interpreter": {
"name": "eclipse",
"version": "juno",
},
"reason": "Plugin unresponsive for 60 seconds",
"reporter": {
"name": "Eclipse Problem Reporter",
"version": "1.0.0",
},
}
uReport MUST NOT contain any private data. uReports are considered public and may be accessed through the web UI or web API, forwarded to other instances or archived. Clients need to think about the data they are sending. These may contain passwords, credit card numbers, private keys etc.
Example:
Why not to include the message from python exception? Think about the following:
ValueError: invalid literal for int() with base 10: 'my_secret_password'
uh oh!