SlideShare una empresa de Scribd logo
1 de 33
Descargar para leer sin conexión
Crash Report Mechanism in Tizen
Yu Yucai, 2013/05/31
2
Agenda
• Crash Client (Tizen 2.1.x)
• Samsung’s crash-work-sdk
• Intel’s corewatcher
• Crash Server
• CrashDB Web
• Crash reason location algrithm
3
Agenda
• Crash Client
• Samsung’s crash-work-sdk
• Intel’s corewatcher(3rd Gen)
• Crash Server
• CrashDB Web
• Crash reason location algrithm
4
Crash Client - Samsung’s crash-work-sdk
• Mechanism
• Crash process flow
• Crash report file: *.cs file
5
Crash Client - Samsung’s crash-work-sdk
• Mechanism: force preload libsys-assert.so to overload crash signal
handlers.
sh-4.1# cat /etc/ld.so.preload
/usr/lib/libsys-assert.so
sh-4.1# ldd `which top`
linux-gate.so.1 => (0xb77fd000)
/usr/lib/libsys-assert.so (0xb77f5000)
libproc-3.2.8.so => /lib/libproc-3.2.8.so (0xb77c1000)
libncurses.so.5 => /usr/lib/libncurses.so.5 (0xb7781000)
libc.so.6 => /lib/libc.so.6 (0xb7625000)
libdl.so.2 => /lib/libdl.so.2 (0xb7621000)
/lib/ld-linux.so.2 (0xb77fe000)
6
Crash Client - Samsung’s crash-work-sdk
• Crash process flow
Stage 1: in sys-assert.c (libsys-assert.so)
-> int sig_to_handle[] = { SIGILL, SIGABRT, SIGBUS, SIGFPE, SIGSEGV, };
-> sighandler notify system_server via /opt/share/crash/curbs.log pipeline.
Stage 2: in ss_bs.c (system-server)
-> ecore_file_monitor_add(CRASH_NOTI_PATH,(void *) __crash_file_cb, NULL);
-> __crash_file_cb:
-> launch_crash_worker()
......
launch /usr/bin/crash-worker to generate cs file
launch /usr/apps/org.tizen.crash-popup/bin/crash-popup to popup crash (only 1st)
7
Crash Client - Samsung’s crash-work-sdk
• Crash process flow
Breakpoint 1, launch_app_with_nice (file=0xb46017b0 "/usr/bin/crash-worker", argv=0xbfe52624, pid=0x0, _nice=0)
at /usr/src/debug/system-server-0.1.65/ss_launch.c:140
140 {
(gdb) bt
#0 launch_app_with_nice (file=0xb46017b0 "/usr/bin/crash-worker",
argv=0xbfe52624, pid=0x0, _nice=0)
at /usr/src/debug/system-server-0.1.65/ss_launch.c:140
#1 0x0804d3c9 in launch_app_cmd_with_nice (
cmdline=0xb4601758 "/usr/bin/crash-worker S top 391655492 913 top",
_nice=0) at /usr/src/debug/system-server-0.1.65/ss_launch.c:196
#2 0x0804d744 in ss_launch_evenif_exist (
execpath=0x8060e71 "/usr/bin/crash-worker",
arg=0xbfe53d16 "S top 391655492 913 top")
at /usr/src/debug/system-server-0.1.65/ss_launch.c:289
#3 0x08058b73 in launch_crash_worker (
filename=0xbfe5823c "/opt/share/crash/curbs.log", popup_on=1)
at /usr/src/debug/system-server-0.1.65/ss_bs.c:327
#4 0x08058d47 in __crash_file_cb (data=0x0, em=0x8dabb10,
event=ECORE_FILE_EVENT_MODIFIED,
path=0xbfe5823c "/opt/share/crash/curbs.log")
at /usr/src/debug/system-server-0.1.65/ss_bs.c:374
#5 0xb782f345 in _ecore_file_monitor_inotify_handler ()
from /usr/lib/libecore_file.so.1
#6 0xb7840e5c in _ecore_main_loop_iterate_internal ()
from /usr/lib/libecore.so.1
#7 0xb784141f in ecore_main_loop_begin () from /usr/lib/libecore.so.1
#8 0x0804bd95 in system_main (argc=1, argv=0xbfe59404)
---Type <return> to continue, or q <return> to quit---
at /usr/src/debug/system-server-0.1.65/ss_main.c:102
#9 0x0804bdf1 in elm_main (argc=1, argv=0xbfe59404)
at /usr/src/debug/system-server-0.1.65/ss_main.c:112
#10 0x0804be4e in main (argc=1, argv=0xbfe59404)
at /usr/src/debug/system-server-0.1.65/ss_main.c:119
8
Crash Client - Samsung’s crash-work-sdk
• Crash process flow
Stage 3: crash-worker to generate cs file
sh-4.1# pwd
/opt/usr/share/crash/report
sh-4.1# ls -tlr
total 72
-rwxrw-rw- 1 root app 22248 1982-05-02 18:28 top_19820502182857.cs
-rwxrw-rw- 1 root app 22248 1982-05-02 18:39 top_19820502183647.cs
-rwxrw-rw- 1 root app 22248 1982-05-02 18:49 top_19820502184511.cs
9
Crash Client - Samsung’s crash-work-sdk
• What’s *.cs file.
sh-4.1# cat top_19820502184511.cs
S/W Version Information
Model: handset-blackbay
Tizen-Version: 2.1.0
Build-Number: Tizen_handset-blackbay-tizen-2.1-
mobile_20130430.1
Build-Date: 2013.05.01 03:24:28
Crash Information
PID: 1194
Date: 1982-05-02 18:45:11(GMT+0900)
Executable File Path: top
This process is multi-thread process
pid=1194 tid=1194
Signal: 11
(SIGSEGV)
si_code: 0
signal sent by kill (sent by pid 1195, uid 0)
Register Information
gs = 0x00000033, fs = 0x00000000
es = 0x0000007b, ds = 0x0000007b
edi = 0x08057040, esi = 0x00000000
ebp = 0xbfe13b68, esp = 0xbfe13040
eax = 0xfffffffc, ebx = 0x00000001
ecx = 0xbfe1332c, edx = 0x00000000
eip = 0xb7896424
Memory Information
MemTotal: 995664 KB
MemFree: 457540 KB
Buffers: 14768 KB
Cached: 233204 KB
VmPeak: 2748 KB
VmSize: 2748 KB
VmLck: 0 KB
VmHWM: 1336 KB
VmRSS: 1336 KB
VmData: 492 KB
VmStk: 136 KB
10
Crash Client - Samsung’s crash-work-sdk
• What’s *.cs file.
Maps Information
08048000 08056000 r-xp /usr/bin/top
b7683000 b768d000 r-xp /lib/libnss_files-2.13.so
b768f000 b7698000 r-xp /lib/libnss_nis-2.13.so
b769a000 b76ad000 r-xp /lib/libnsl-2.13.so
b76b1000 b76b7000 r-xp /lib/libnss_compat-2.13.so
b76ba000 b76bc000 r-xp /lib/libdl-2.13.so
b76be000 b7814000 r-xp /lib/libc-2.13.so
b781a000 b7857000 r-xp /usr/lib/libncurses.so.5.7
b785a000 b7868000 r-xp /lib/libproc-3.2.8.so
b788e000 b7892000 r-xp /usr/lib/libsys-assert.so
b7896000 b7897000 r-xp [vdso]
b7897000 b78b3000 r-xp /lib/ld-2.13.so
End of Maps Information
Callstack Information (PID:1194)
Call Stack Count: 1
can't open 0: (0x8049a81) [top] + 0x1a81
End of Call Stack
Latest Debug Message Information
--------- beginning of /dev/log_main
05-02 16:31:42.769 E/Tizen::App( 616): void
Tizen::App::_ConditionManagerStub::OnInstallComplete(const
Tizen::App::AppId&)(133) > failed to
GetAppLaunchConditionListN(org.tizen.taskmgr)
…
omPackageManager(const Tizen::Base::String&, const
Tizen::Base::String&, const Tizen::Base::String&)(493) > Cannot
acquire feature list.
05-02 16:31:43.819 E/Tizen::App( 616): void Tizen::App::_
End of latest debug message
11
Agenda
• Crash Client
• Samsung’s crash-work-sdk
• Intel’s corewatcher(3rd Gen)
• Crash Server
• CrashDB Web
• Crash reason location algrithm
12
Crash Client - Intel’s corewatcher
• Mechanism.
• How to upload crashes to server.
• Crash report file: /var/lib/corewatcher/processed/*.txt.
13
Crash Client - Intel’s corewatcher
• Mechanism.
• Corewatcher as daemon
• Listen to /var/lib/corewatcher/
• When crash comes, invoke gdb to analysis
• Upload crashes to CrashDB server
• Environment about corewatcher
• /proc/sys/kernel/core_pattern=/var/lib/corewatcher/core_%e_%t
• core_uses_pid=1
bt full
info shared
14
Crash Client - Intel’s corewatcher
• CrashDB server: https://tz.otcshare.org/crashdb/
• How to upload crash to server
• WWLAN(3G/2G)
• WiFi/SED
• crash_submit: http://otcqa.sh.intel.com/wiki/Crash_Submit
Even though tz.otcshare.org has security restriction(403 forbidden outside of
Intel), crash submit is allowed.
15
Crash Client - Intel’s corewatcher
• Crash report path: /var/lib/corewatcher/processed/*.txt
• Crash report content(without debug info):
cmdline: /usr/bin/mate-calc
version: 2.1.0
backtrace: |
#0 0x00007fd494c2db41 in g_logv () from /usr/lib64/libglib-2.0.so.0
#0 0x00007fd494c2db41 in g_logv () from /usr/lib64/libglib-2.0.so.0
#1 0x00007fd494c2dcfd in g_log () from /usr/lib64/libglib-2.0.so.0
#2 0x00007fd4959a10ee in g_settings_set_property () from /usr/lib64/libgio-2.0.so.0
#3 0x00007fd4956ae098 in g_object_constructor () from /usr/lib64/libgobject-2.0.so.0
#4 0x00007fd4956af562 in g_object_newv () from /usr/lib64/libgobject-2.0.so.0
16
Crash Client - Intel’s corewatcher
• Crash report content(without debug info):
maps: |
0x00007fd4971f5f00 0x00007fd49745ecf0 Yes (*) /usr/lib64/libgtk-x11-2.0.so.0
0x00007fd496ef7420 0x00007fd496f4ccb8 Yes (*) /usr/lib64/libgdk-x11-2.0.so.0
0x00007fd496cc0030 0x00007fd496ccc290 Yes (*) /usr/lib64/libatk-1.0.so.0
0x00007fd496aa8490 0x00007fd496ab05bc Yes (*) /usr/lib64/libpangoft2-1.0.so.0
0x00007fd496898f20 0x00007fd49689dd14 Yes (*) /usr/lib64/libpangocairo-1.0.so.0
0x00007fd49667aa80 0x00007fd49668c018 Yes (*) /usr/lib64/libgdk_pixbuf-2.0.so.0
0x00007fd496377cc0 0x00007fd49643941c Yes (*) /usr/lib64/libcairo.so.2
0x00007fd496127680 0x00007fd496146fe0 Yes (*) /usr/lib64/libpango-1.0.so.0
0x00007fd495e95a90 0x00007fd495ef1fa4 Yes (*) /usr/lib64/libfreetype.so.6
(*): Shared library is missing debugging information.
17
Crash Client - Intel’s corewatcher
• Crash report content(with debug info):
backtrace: |
#0 g_logv (log_domain=0x7f3d296fbfe1 "GLib-GIO", log_level=G_LOG_LEVEL_ERROR,
format=<optimized out>, args=args@entry=0x7fff7ea01e58) at gmessages.h:101
#0 g_logv (log_domain=0x7f3d296fbfe1 "GLib-GIO", log_level=G_LOG_LEVEL_ERROR,
format=<optimized out>, args=args@entry=0x7fff7ea01e58) at gmessages.h:101
#1 0x00007f3d28941cfd in g_log (log_domain=log_domain@entry=0x7f3d296fbfe1 "GLib-GIO",
log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0x7f3d29717dc0 "Settings schema '%s'
is not installedn") at gmessages.c:1003
#2 0x00007f3d296b50ee in g_settings_set_property (object=<optimized out>, prop_id=<optimized
out>, value=<optimized out>, pspec=<optimized out>) at gsettings.c:492
#3 0x00007f3d293c2098 in object_set_property (nqueue=0xf90e60, value=0xf96408,
pspec=0xf95ca0, object=0xf95540) at gobject.c:1357
18
Crash Client - Intel’s corewatcher
• Crash report content(with debug info):
maps: |
From To Syms Read Shared Object Library
No linux-vdso.so.1
0x00007f3d2af09f00 0x00007f3d2b172cf0 Yes /usr/lib64/libgtk-x11-2.0.so.0
0x00007f3d2ac0b420 0x00007f3d2ac60cb8 Yes /usr/lib64/libgdk-x11-2.0.so.0
0x00007f3d2a9d4030 0x00007f3d2a9e0290 Yes /usr/lib64/libatk-1.0.so.0
0x00007f3d2a7bc490 0x00007f3d2a7c45bc Yes /usr/lib64/libpangoft2-1.0.so.0
0x00007f3d2a5acf20 0x00007f3d2a5b1d14 Yes /usr/lib64/libpangocairo-1.0.so.0
0x00007f3d2a38ea80 0x00007f3d2a3a0018 Yes /usr/lib64/libgdk_pixbuf-2.0.so.0
(*): Shared library is missing debugging information.
19
Crash Client - Intel’s corewatcher
• Crash report path: /var/lib/corewatcher/processed/*.txt
• Crash report content(without debug info):
cmdline: /usr/bin/mate-calc
version: 2.1.0
backtrace: |
#0 0x00007fd494c2db41 in g_logv () from /usr/lib64/libglib-2.0.so.0
#0 0x00007fd494c2db41 in g_logv () from /usr/lib64/libglib-2.0.so.0
#1 0x00007fd494c2dcfd in g_log () from /usr/lib64/libglib-2.0.so.0
#2 0x00007fd4959a10ee in g_settings_set_property () from /usr/lib64/libgio-2.0.so.0
#3 0x00007fd4956ae098 in g_object_constructor () from /usr/lib64/libgobject-2.0.so.0
#4 0x00007fd4956af562 in g_object_newv () from /usr/lib64/libgobject-2.0.so.0
Quality: 66
20
Crash Client - Intel’s corewatcher
• Crash report content(with debug info):
backtrace: |
#0 g_logv (log_domain=0x7f3d296fbfe1 "GLib-GIO", log_level=G_LOG_LEVEL_ERROR,
format=<optimized out>, args=args@entry=0x7fff7ea01e58) at gmessages.h:101
#0 g_logv (log_domain=0x7f3d296fbfe1 "GLib-GIO", log_level=G_LOG_LEVEL_ERROR,
format=<optimized out>, args=args@entry=0x7fff7ea01e58) at gmessages.h:101
#1 0x00007f3d28941cfd in g_log (log_domain=log_domain@entry=0x7f3d296fbfe1 "GLib-GIO",
log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0x7f3d29717dc0 "Settings schema '%s'
is not installedn") at gmessages.c:1003
#2 0x00007f3d296b50ee in g_settings_set_property (object=<optimized out>, prop_id=<optimized
out>, value=<optimized out>, pspec=<optimized out>) at gsettings.c:492
#3 0x00007f3d293c2098 in object_set_property (nqueue=0xf90e60, value=0xf96408,
pspec=0xf95ca0, object=0xf95540) at gobject.c:1357
Quality 100
21
Crash Client - Intel’s corewatcher
• Example (before submit):
root@xiuhua:~# sdb root on
Switched to 'root' account mode
root@xiuhua:~# sdb shell
sh-4.1# find /var/lib/corewatcher/
/var/lib/corewatcher/
/var/lib/corewatcher/processed
/var/lib/corewatcher/processed/core_top_1398992161.1307.processed
/var/lib/corewatcher/processed/core_top_1398992226.1333.processed
/var/lib/corewatcher/processed/top_1398992226.txt
/var/lib/corewatcher/processed/top_1398992161.txt
22
Crash Client - Intel’s corewatcher
• Example (after submitted):
root@xiuhua:~# sdb root on
Switched to 'root' account mode
root@xiuhua:~# sdb shell
sh-4.1# find /var/lib/corewatcher/
/var/lib/corewatcher/
/var/lib/corewatcher/processed
/var/lib/corewatcher/processed/core_top_1398992161.1307.submitted
/var/lib/corewatcher/processed/core_top_1398992226.1333.submitted
/var/lib/corewatcher/processed/top_1398992226.txt
/var/lib/corewatcher/processed/top_1398992161.txt
23
Agenda
• Crash Client
• Samsung’s crash-work-sdk
• Intel’s corewatcher(3rd Gen)
• Crash Server
• CrashDB Web
• Crash reason location algrithm
24
Crash Server – CrashDB Web
• Production Env: https://tz.otcshare.org/crashdb/
• Demo: http://crashdb-y.sh.intel.com/
25
Agenda
• Crash Client
• Samsung’s crash-work-sdk
• Intel’s corewatcher(3rd Gen)
• Crash Server
• CrashDB Web
• Crash reason location algrithm
26
Crash Server – Guilty Function Location
https://bugs.tizen.org/jira/browse/TIVI-649
'Security-server has closed unexpectedly' popped up when playing videos or launching clock
(gdb) bt
#0 0xb4e9c999 in vfprintf () from /lib/libc.so.6
#1 0xb4f3e7b4 in __vsnprintf_chk () from /lib/libc.so.6
#2 0xb5560c00 in __dlog_print () from /usr/lib/libdlog.so.0
#3 0x081019fd in process_cookie_request (sockfd=27) at /usr/src/debug/security-server-
0.0.61/src/security-srv/server/security-server-main.c:367
#4 0x08103b7e in security_server_thread (param=0xb451519c) at /usr/src/debug/security-server-
0.0.61/src/security-srv/server/security-server-main.c:923
#5 0xb554be19 in start_thread () from /lib/libpthread.so.0 #6 0xb4f2affe in clone () from
/lib/libc.so.6
27
Crash Server – Guilty Function Location
https://bugs.tizen.org/jira/browse/TIVI-649
'Security-server has closed unexpectedly' popped up when playing videos or launching clock
(gdb) bt
#0 0xb4e9c999 in vfprintf () from /lib/libc.so.6
#1 0xb4f3e7b4 in __vsnprintf_chk () from /lib/libc.so.6
#2 0xb5560c00 in __dlog_print () from /usr/lib/libdlog.so.0
#3 0x081019fd in process_cookie_request (sockfd=27) at /usr/src/debug/security-server-
0.0.61/src/security-srv/server/security-server-main.c:367
#4 0x08103b7e in security_server_thread (param=0xb451519c) at /usr/src/debug/security-server-
0.0.61/src/security-srv/server/security-server-main.c:923
#5 0xb554be19 in start_thread () from /lib/libpthread.so.0 #6 0xb4f2affe in clone () from
/lib/libc.so.6
28
Crash Server – Guilty Function Location
https://bugs.tizen.org/jira/browse/TIVI-649
'Security-server has closed unexpectedly' popped up when playing videos or launching clock
(gdb) bt
#0 0xb4e9c999 in vfprintf () from /lib/libc.so.6
#1 0xb4f3e7b4 in __vsnprintf_chk () from /lib/libc.so.6
#2 0xb5560c00 in __dlog_print () from /usr/lib/libdlog.so.0
#3 0x081019fd in process_cookie_request (sockfd=27) at /usr/src/debug/security-server-
0.0.61/src/security-srv/server/security-server-main.c:367
#4 0x08103b7e in security_server_thread (param=0xb451519c) at /usr/src/debug/security-server-
0.0.61/src/security-srv/server/security-server-main.c:923
#5 0xb554be19 in start_thread () from /lib/libpthread.so.0 #6 0xb4f2affe in clone () from
/lib/libc.so.6
Guilty Function
29
Crash Server – Guilty Function Location
(gdb) f 3
#3 0x081019fd in process_cookie_request (sockfd=27) at /usr/src/debug/security-server-
0.0.61/src/security-srv/server/security-server-main.c:367
367 SEC_SVR_DBG("Server: Cookie created for client PID %d LABEL >%s<",
(gdb) p created_cookie->smack_label
$2 = 0x1777 <Address 0x1777 out of bounds> (gdb) p *created_cookie $4 = {cookie =
"270217{257354063221 e筗Y370230~021024004244", path_len = 49, permission_len = 90, pid =
1562, path = 0x85e0ba8 "/usr/apps/org.tizen.video-player/bin/video-player", permissions = 0x85b6168,
smack_label = 0x1777 <Address 0x1777 out of bounds>, prev = 0x8589190, next = 0x0}
30
Crash Server – Guilty Function Location
https://bugs.tizen.org/jira/browse/TIVI-649
'Security-server has closed unexpectedly' popped up when playing videos or launching clock
(gdb) bt
#0 0xb4e9c999 in vfprintf () from /lib/libc.so.6
#1 0xb4f3e7b4 in __vsnprintf_chk () from /lib/libc.so.6
#2 0xb5560c00 in __dlog_print () from /usr/lib/libdlog.so.0
#3 0x081019fd in process_cookie_request (sockfd=27) at /usr/src/debug/security-server-
0.0.61/src/security-srv/server/security-server-main.c:367
#4 0x08103b7e in security_server_thread (param=0xb451519c) at /usr/src/debug/security-server-
0.0.61/src/security-srv/server/security-server-main.c:923
#5 0xb554be19 in start_thread () from /lib/libpthread.so.0 #6 0xb4f2affe in clone () from
/lib/libc.so.6
White list
• /lib/libc.so.6
• /usr/lib/libdlog.so.0
31
Crash Server – Guilty Function Location
https://bugs.tizen.org/jira/browse/TIVI-649
'Security-server has closed unexpectedly' popped up when playing videos or launching clock
(gdb) bt
#0 0xb4e9c999 in vfprintf () from /lib/libc.so.6
#1 0xb4f3e7b4 in __vsnprintf_chk () from /lib/libc.so.6
#2 0xb5560c00 in __dlog_print () from /usr/lib/libdlog.so.0
#3 0x081019fd in process_cookie_request (sockfd=27) at /usr/src/debug/security-server-
0.0.61/src/security-srv/server/security-server-main.c:367
#4 0x08103b7e in security_server_thread (param=0xb451519c) at /usr/src/debug/security-server-
0.0.61/src/security-srv/server/security-server-main.c:923
#5 0xb554be19 in start_thread () from /lib/libpthread.so.0 #6 0xb4f2affe in clone () from
/lib/libc.so.6
White list
• /lib/libc.so.6
• /usr/lib/libdlog.so.0
Guilty Function
Q & A
Thanks

Más contenido relacionado

La actualidad más candente

Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全維泰 蔡
 
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)Pixie Labs
 
Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識維泰 蔡
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneDefconRussia
 
Tracer Evaluation
Tracer EvaluationTracer Evaluation
Tracer EvaluationQiao Han
 
Solaris Kernel Debugging V1.0
Solaris Kernel Debugging V1.0Solaris Kernel Debugging V1.0
Solaris Kernel Debugging V1.0Jarod Wang
 
HackLU 2018 Make ARM Shellcode Great Again
HackLU 2018 Make ARM Shellcode Great AgainHackLU 2018 Make ARM Shellcode Great Again
HackLU 2018 Make ARM Shellcode Great AgainSaumil Shah
 
W8_2: Inside the UoS Educational Processor
W8_2: Inside the UoS Educational ProcessorW8_2: Inside the UoS Educational Processor
W8_2: Inside the UoS Educational ProcessorDaniel Roggen
 
Linux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compactLinux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compactAlessandro Selli
 
망고100 보드로 놀아보자 15
망고100 보드로 놀아보자 15망고100 보드로 놀아보자 15
망고100 보드로 놀아보자 15종인 전
 
Creating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server HardeningCreating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server Hardeningarchwisp
 
Make ARM Shellcode Great Again
Make ARM Shellcode Great AgainMake ARM Shellcode Great Again
Make ARM Shellcode Great AgainSaumil Shah
 
Linux kernel debugging(PDF format)
Linux kernel debugging(PDF format)Linux kernel debugging(PDF format)
Linux kernel debugging(PDF format)yang firo
 
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling ToolsTIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling ToolsXiaozhe Wang
 
Honeypots: Visão Geral
Honeypots: Visão GeralHoneypots: Visão Geral
Honeypots: Visão Geralbernardo_mr
 
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)Gavin Guo
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceSUSE Labs Taipei
 
bcc/BPF tools - Strategy, current tools, future challenges
bcc/BPF tools - Strategy, current tools, future challengesbcc/BPF tools - Strategy, current tools, future challenges
bcc/BPF tools - Strategy, current tools, future challengesIO Visor Project
 

La actualidad más candente (20)

Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
 
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
 
Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-one
 
Tracer Evaluation
Tracer EvaluationTracer Evaluation
Tracer Evaluation
 
Solaris Kernel Debugging V1.0
Solaris Kernel Debugging V1.0Solaris Kernel Debugging V1.0
Solaris Kernel Debugging V1.0
 
HackLU 2018 Make ARM Shellcode Great Again
HackLU 2018 Make ARM Shellcode Great AgainHackLU 2018 Make ARM Shellcode Great Again
HackLU 2018 Make ARM Shellcode Great Again
 
W8_2: Inside the UoS Educational Processor
W8_2: Inside the UoS Educational ProcessorW8_2: Inside the UoS Educational Processor
W8_2: Inside the UoS Educational Processor
 
Linux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compactLinux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compact
 
망고100 보드로 놀아보자 15
망고100 보드로 놀아보자 15망고100 보드로 놀아보자 15
망고100 보드로 놀아보자 15
 
Creating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server HardeningCreating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server Hardening
 
Make ARM Shellcode Great Again
Make ARM Shellcode Great AgainMake ARM Shellcode Great Again
Make ARM Shellcode Great Again
 
iCloud keychain
iCloud keychainiCloud keychain
iCloud keychain
 
Linux kernel debugging(PDF format)
Linux kernel debugging(PDF format)Linux kernel debugging(PDF format)
Linux kernel debugging(PDF format)
 
OpenSPARC
OpenSPARCOpenSPARC
OpenSPARC
 
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling ToolsTIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
 
Honeypots: Visão Geral
Honeypots: Visão GeralHoneypots: Visão Geral
Honeypots: Visão Geral
 
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to Userspace
 
bcc/BPF tools - Strategy, current tools, future challenges
bcc/BPF tools - Strategy, current tools, future challengesbcc/BPF tools - Strategy, current tools, future challenges
bcc/BPF tools - Strategy, current tools, future challenges
 

Destacado

Urqa - Android Crash Report
Urqa - Android Crash ReportUrqa - Android Crash Report
Urqa - Android Crash ReportHakbeom Hwang
 
PCD - Process control daemon - Presentation
PCD - Process control daemon - PresentationPCD - Process control daemon - Presentation
PCD - Process control daemon - Presentationhaish
 
Devel::NYTProf v5 at YAPC::NA 201406
Devel::NYTProf v5 at YAPC::NA 201406Devel::NYTProf v5 at YAPC::NA 201406
Devel::NYTProf v5 at YAPC::NA 201406Tim Bunce
 
Android Memory , Where is all My RAM
Android Memory , Where is all My RAM Android Memory , Where is all My RAM
Android Memory , Where is all My RAM Yossi Elkrief
 
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...peknap
 
Perl Memory Use 201209
Perl Memory Use 201209Perl Memory Use 201209
Perl Memory Use 201209Tim Bunce
 
Process control daemon
Process control daemonProcess control daemon
Process control daemonhaish
 
Workshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with VolatilityWorkshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with VolatilityAndrew Case
 
Александр Терещук - Memory Analyzer Tool and memory optimization tips in Android
Александр Терещук - Memory Analyzer Tool and memory optimization tips in AndroidАлександр Терещук - Memory Analyzer Tool and memory optimization tips in Android
Александр Терещук - Memory Analyzer Tool and memory optimization tips in AndroidUA Mobile
 
Perl Memory Use - LPW2013
Perl Memory Use - LPW2013Perl Memory Use - LPW2013
Perl Memory Use - LPW2013Tim Bunce
 
Linux memory-management-kamal
Linux memory-management-kamalLinux memory-management-kamal
Linux memory-management-kamalKamal Maiti
 
Linux memory consumption
Linux memory consumptionLinux memory consumption
Linux memory consumptionhaish
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linuxKyle Hailey
 
Tuning Android for low RAM
Tuning Android for low RAMTuning Android for low RAM
Tuning Android for low RAMChris Simmonds
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devicesDroidcon Berlin
 
Как Linux работает с памятью — Вячеслав Бирюков
Как Linux работает с памятью — Вячеслав БирюковКак Linux работает с памятью — Вячеслав Бирюков
Как Linux работает с памятью — Вячеслав БирюковYandex
 
Android Performance Best Practices
Android Performance Best Practices Android Performance Best Practices
Android Performance Best Practices Amgad Muhammad
 

Destacado (20)

Urqa - Android Crash Report
Urqa - Android Crash ReportUrqa - Android Crash Report
Urqa - Android Crash Report
 
PCD - Process control daemon - Presentation
PCD - Process control daemon - PresentationPCD - Process control daemon - Presentation
PCD - Process control daemon - Presentation
 
Devel::NYTProf v5 at YAPC::NA 201406
Devel::NYTProf v5 at YAPC::NA 201406Devel::NYTProf v5 at YAPC::NA 201406
Devel::NYTProf v5 at YAPC::NA 201406
 
Android Memory , Where is all My RAM
Android Memory , Where is all My RAM Android Memory , Where is all My RAM
Android Memory , Where is all My RAM
 
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
 
Perl Memory Use 201209
Perl Memory Use 201209Perl Memory Use 201209
Perl Memory Use 201209
 
Poster_Jan
Poster_JanPoster_Jan
Poster_Jan
 
Process control daemon
Process control daemonProcess control daemon
Process control daemon
 
Workshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with VolatilityWorkshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with Volatility
 
Александр Терещук - Memory Analyzer Tool and memory optimization tips in Android
Александр Терещук - Memory Analyzer Tool and memory optimization tips in AndroidАлександр Терещук - Memory Analyzer Tool and memory optimization tips in Android
Александр Терещук - Memory Analyzer Tool and memory optimization tips in Android
 
Perl Memory Use - LPW2013
Perl Memory Use - LPW2013Perl Memory Use - LPW2013
Perl Memory Use - LPW2013
 
Memory in Android
Memory in AndroidMemory in Android
Memory in Android
 
Linux memory-management-kamal
Linux memory-management-kamalLinux memory-management-kamal
Linux memory-management-kamal
 
Linux memory consumption
Linux memory consumptionLinux memory consumption
Linux memory consumption
 
Memory management in linux
Memory management in linuxMemory management in linux
Memory management in linux
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
 
Tuning Android for low RAM
Tuning Android for low RAMTuning Android for low RAM
Tuning Android for low RAM
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devices
 
Как Linux работает с памятью — Вячеслав Бирюков
Как Linux работает с памятью — Вячеслав БирюковКак Linux работает с памятью — Вячеслав Бирюков
Как Linux работает с памятью — Вячеслав Бирюков
 
Android Performance Best Practices
Android Performance Best Practices Android Performance Best Practices
Android Performance Best Practices
 

Similar a Crash_Report_Mechanism_In_Tizen

A little systemtap
A little systemtapA little systemtap
A little systemtapyang bingwu
 
A little systemtap
A little systemtapA little systemtap
A little systemtapyang bingwu
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemCyber Security Alliance
 
OSSNA 2017 Performance Analysis Superpowers with Linux BPF
OSSNA 2017 Performance Analysis Superpowers with Linux BPFOSSNA 2017 Performance Analysis Superpowers with Linux BPF
OSSNA 2017 Performance Analysis Superpowers with Linux BPFBrendan Gregg
 
PGCon 2014 - What Do You Mean my Database Server Core Dumped? - How to Inspec...
PGCon 2014 - What Do You Mean my Database Server Core Dumped? - How to Inspec...PGCon 2014 - What Do You Mean my Database Server Core Dumped? - How to Inspec...
PGCon 2014 - What Do You Mean my Database Server Core Dumped? - How to Inspec...Faisal Akber
 
Debugging Ruby
Debugging RubyDebugging Ruby
Debugging RubyAman Gupta
 
Automated reduction of attack surface using call graph enumeration
Automated reduction of attack surface using call graph enumerationAutomated reduction of attack surface using call graph enumeration
Automated reduction of attack surface using call graph enumerationRuo Ando
 
Labs_BT_20221017.pptx
Labs_BT_20221017.pptxLabs_BT_20221017.pptx
Labs_BT_20221017.pptxssuserb4d806
 
Linux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPFLinux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPFBrendan Gregg
 
hacking-embedded-devices.pptx
hacking-embedded-devices.pptxhacking-embedded-devices.pptx
hacking-embedded-devices.pptxssuserfcf43f
 
HKG18-TR14 - Postmortem Debugging with Coresight
HKG18-TR14 - Postmortem Debugging with CoresightHKG18-TR14 - Postmortem Debugging with Coresight
HKG18-TR14 - Postmortem Debugging with CoresightLinaro
 
OSDC 2017 - Werner Fischer - Linux performance profiling and monitoring
OSDC 2017 - Werner Fischer - Linux performance profiling and monitoringOSDC 2017 - Werner Fischer - Linux performance profiling and monitoring
OSDC 2017 - Werner Fischer - Linux performance profiling and monitoringNETWAYS
 
Kernel Recipes 2017 - Performance analysis Superpowers with Linux BPF - Brend...
Kernel Recipes 2017 - Performance analysis Superpowers with Linux BPF - Brend...Kernel Recipes 2017 - Performance analysis Superpowers with Linux BPF - Brend...
Kernel Recipes 2017 - Performance analysis Superpowers with Linux BPF - Brend...Anne Nicolas
 
Kernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPFKernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPFBrendan Gregg
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Ontico
 
USENIX ATC 2017 Performance Superpowers with Enhanced BPF
USENIX ATC 2017 Performance Superpowers with Enhanced BPFUSENIX ATC 2017 Performance Superpowers with Enhanced BPF
USENIX ATC 2017 Performance Superpowers with Enhanced BPFBrendan Gregg
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel CrashdumpMarian Marinov
 
Debugging Ruby Systems
Debugging Ruby SystemsDebugging Ruby Systems
Debugging Ruby SystemsEngine Yard
 

Similar a Crash_Report_Mechanism_In_Tizen (20)

A little systemtap
A little systemtapA little systemtap
A little systemtap
 
A little systemtap
A little systemtapA little systemtap
A little systemtap
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
 
OSSNA 2017 Performance Analysis Superpowers with Linux BPF
OSSNA 2017 Performance Analysis Superpowers with Linux BPFOSSNA 2017 Performance Analysis Superpowers with Linux BPF
OSSNA 2017 Performance Analysis Superpowers with Linux BPF
 
PGCon 2014 - What Do You Mean my Database Server Core Dumped? - How to Inspec...
PGCon 2014 - What Do You Mean my Database Server Core Dumped? - How to Inspec...PGCon 2014 - What Do You Mean my Database Server Core Dumped? - How to Inspec...
PGCon 2014 - What Do You Mean my Database Server Core Dumped? - How to Inspec...
 
Debugging Ruby
Debugging RubyDebugging Ruby
Debugging Ruby
 
Automated reduction of attack surface using call graph enumeration
Automated reduction of attack surface using call graph enumerationAutomated reduction of attack surface using call graph enumeration
Automated reduction of attack surface using call graph enumeration
 
Labs_BT_20221017.pptx
Labs_BT_20221017.pptxLabs_BT_20221017.pptx
Labs_BT_20221017.pptx
 
Linux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPFLinux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPF
 
Debugging 2013- Jesper Brouer
Debugging 2013- Jesper BrouerDebugging 2013- Jesper Brouer
Debugging 2013- Jesper Brouer
 
hacking-embedded-devices.pptx
hacking-embedded-devices.pptxhacking-embedded-devices.pptx
hacking-embedded-devices.pptx
 
Basic Linux kernel
Basic Linux kernelBasic Linux kernel
Basic Linux kernel
 
HKG18-TR14 - Postmortem Debugging with Coresight
HKG18-TR14 - Postmortem Debugging with CoresightHKG18-TR14 - Postmortem Debugging with Coresight
HKG18-TR14 - Postmortem Debugging with Coresight
 
OSDC 2017 - Werner Fischer - Linux performance profiling and monitoring
OSDC 2017 - Werner Fischer - Linux performance profiling and monitoringOSDC 2017 - Werner Fischer - Linux performance profiling and monitoring
OSDC 2017 - Werner Fischer - Linux performance profiling and monitoring
 
Kernel Recipes 2017 - Performance analysis Superpowers with Linux BPF - Brend...
Kernel Recipes 2017 - Performance analysis Superpowers with Linux BPF - Brend...Kernel Recipes 2017 - Performance analysis Superpowers with Linux BPF - Brend...
Kernel Recipes 2017 - Performance analysis Superpowers with Linux BPF - Brend...
 
Kernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPFKernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPF
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)
 
USENIX ATC 2017 Performance Superpowers with Enhanced BPF
USENIX ATC 2017 Performance Superpowers with Enhanced BPFUSENIX ATC 2017 Performance Superpowers with Enhanced BPF
USENIX ATC 2017 Performance Superpowers with Enhanced BPF
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel Crashdump
 
Debugging Ruby Systems
Debugging Ruby SystemsDebugging Ruby Systems
Debugging Ruby Systems
 

Crash_Report_Mechanism_In_Tizen

  • 1. Crash Report Mechanism in Tizen Yu Yucai, 2013/05/31
  • 2. 2 Agenda • Crash Client (Tizen 2.1.x) • Samsung’s crash-work-sdk • Intel’s corewatcher • Crash Server • CrashDB Web • Crash reason location algrithm
  • 3. 3 Agenda • Crash Client • Samsung’s crash-work-sdk • Intel’s corewatcher(3rd Gen) • Crash Server • CrashDB Web • Crash reason location algrithm
  • 4. 4 Crash Client - Samsung’s crash-work-sdk • Mechanism • Crash process flow • Crash report file: *.cs file
  • 5. 5 Crash Client - Samsung’s crash-work-sdk • Mechanism: force preload libsys-assert.so to overload crash signal handlers. sh-4.1# cat /etc/ld.so.preload /usr/lib/libsys-assert.so sh-4.1# ldd `which top` linux-gate.so.1 => (0xb77fd000) /usr/lib/libsys-assert.so (0xb77f5000) libproc-3.2.8.so => /lib/libproc-3.2.8.so (0xb77c1000) libncurses.so.5 => /usr/lib/libncurses.so.5 (0xb7781000) libc.so.6 => /lib/libc.so.6 (0xb7625000) libdl.so.2 => /lib/libdl.so.2 (0xb7621000) /lib/ld-linux.so.2 (0xb77fe000)
  • 6. 6 Crash Client - Samsung’s crash-work-sdk • Crash process flow Stage 1: in sys-assert.c (libsys-assert.so) -> int sig_to_handle[] = { SIGILL, SIGABRT, SIGBUS, SIGFPE, SIGSEGV, }; -> sighandler notify system_server via /opt/share/crash/curbs.log pipeline. Stage 2: in ss_bs.c (system-server) -> ecore_file_monitor_add(CRASH_NOTI_PATH,(void *) __crash_file_cb, NULL); -> __crash_file_cb: -> launch_crash_worker() ...... launch /usr/bin/crash-worker to generate cs file launch /usr/apps/org.tizen.crash-popup/bin/crash-popup to popup crash (only 1st)
  • 7. 7 Crash Client - Samsung’s crash-work-sdk • Crash process flow Breakpoint 1, launch_app_with_nice (file=0xb46017b0 "/usr/bin/crash-worker", argv=0xbfe52624, pid=0x0, _nice=0) at /usr/src/debug/system-server-0.1.65/ss_launch.c:140 140 { (gdb) bt #0 launch_app_with_nice (file=0xb46017b0 "/usr/bin/crash-worker", argv=0xbfe52624, pid=0x0, _nice=0) at /usr/src/debug/system-server-0.1.65/ss_launch.c:140 #1 0x0804d3c9 in launch_app_cmd_with_nice ( cmdline=0xb4601758 "/usr/bin/crash-worker S top 391655492 913 top", _nice=0) at /usr/src/debug/system-server-0.1.65/ss_launch.c:196 #2 0x0804d744 in ss_launch_evenif_exist ( execpath=0x8060e71 "/usr/bin/crash-worker", arg=0xbfe53d16 "S top 391655492 913 top") at /usr/src/debug/system-server-0.1.65/ss_launch.c:289 #3 0x08058b73 in launch_crash_worker ( filename=0xbfe5823c "/opt/share/crash/curbs.log", popup_on=1) at /usr/src/debug/system-server-0.1.65/ss_bs.c:327 #4 0x08058d47 in __crash_file_cb (data=0x0, em=0x8dabb10, event=ECORE_FILE_EVENT_MODIFIED, path=0xbfe5823c "/opt/share/crash/curbs.log") at /usr/src/debug/system-server-0.1.65/ss_bs.c:374 #5 0xb782f345 in _ecore_file_monitor_inotify_handler () from /usr/lib/libecore_file.so.1 #6 0xb7840e5c in _ecore_main_loop_iterate_internal () from /usr/lib/libecore.so.1 #7 0xb784141f in ecore_main_loop_begin () from /usr/lib/libecore.so.1 #8 0x0804bd95 in system_main (argc=1, argv=0xbfe59404) ---Type <return> to continue, or q <return> to quit--- at /usr/src/debug/system-server-0.1.65/ss_main.c:102 #9 0x0804bdf1 in elm_main (argc=1, argv=0xbfe59404) at /usr/src/debug/system-server-0.1.65/ss_main.c:112 #10 0x0804be4e in main (argc=1, argv=0xbfe59404) at /usr/src/debug/system-server-0.1.65/ss_main.c:119
  • 8. 8 Crash Client - Samsung’s crash-work-sdk • Crash process flow Stage 3: crash-worker to generate cs file sh-4.1# pwd /opt/usr/share/crash/report sh-4.1# ls -tlr total 72 -rwxrw-rw- 1 root app 22248 1982-05-02 18:28 top_19820502182857.cs -rwxrw-rw- 1 root app 22248 1982-05-02 18:39 top_19820502183647.cs -rwxrw-rw- 1 root app 22248 1982-05-02 18:49 top_19820502184511.cs
  • 9. 9 Crash Client - Samsung’s crash-work-sdk • What’s *.cs file. sh-4.1# cat top_19820502184511.cs S/W Version Information Model: handset-blackbay Tizen-Version: 2.1.0 Build-Number: Tizen_handset-blackbay-tizen-2.1- mobile_20130430.1 Build-Date: 2013.05.01 03:24:28 Crash Information PID: 1194 Date: 1982-05-02 18:45:11(GMT+0900) Executable File Path: top This process is multi-thread process pid=1194 tid=1194 Signal: 11 (SIGSEGV) si_code: 0 signal sent by kill (sent by pid 1195, uid 0) Register Information gs = 0x00000033, fs = 0x00000000 es = 0x0000007b, ds = 0x0000007b edi = 0x08057040, esi = 0x00000000 ebp = 0xbfe13b68, esp = 0xbfe13040 eax = 0xfffffffc, ebx = 0x00000001 ecx = 0xbfe1332c, edx = 0x00000000 eip = 0xb7896424 Memory Information MemTotal: 995664 KB MemFree: 457540 KB Buffers: 14768 KB Cached: 233204 KB VmPeak: 2748 KB VmSize: 2748 KB VmLck: 0 KB VmHWM: 1336 KB VmRSS: 1336 KB VmData: 492 KB VmStk: 136 KB
  • 10. 10 Crash Client - Samsung’s crash-work-sdk • What’s *.cs file. Maps Information 08048000 08056000 r-xp /usr/bin/top b7683000 b768d000 r-xp /lib/libnss_files-2.13.so b768f000 b7698000 r-xp /lib/libnss_nis-2.13.so b769a000 b76ad000 r-xp /lib/libnsl-2.13.so b76b1000 b76b7000 r-xp /lib/libnss_compat-2.13.so b76ba000 b76bc000 r-xp /lib/libdl-2.13.so b76be000 b7814000 r-xp /lib/libc-2.13.so b781a000 b7857000 r-xp /usr/lib/libncurses.so.5.7 b785a000 b7868000 r-xp /lib/libproc-3.2.8.so b788e000 b7892000 r-xp /usr/lib/libsys-assert.so b7896000 b7897000 r-xp [vdso] b7897000 b78b3000 r-xp /lib/ld-2.13.so End of Maps Information Callstack Information (PID:1194) Call Stack Count: 1 can't open 0: (0x8049a81) [top] + 0x1a81 End of Call Stack Latest Debug Message Information --------- beginning of /dev/log_main 05-02 16:31:42.769 E/Tizen::App( 616): void Tizen::App::_ConditionManagerStub::OnInstallComplete(const Tizen::App::AppId&)(133) > failed to GetAppLaunchConditionListN(org.tizen.taskmgr) … omPackageManager(const Tizen::Base::String&, const Tizen::Base::String&, const Tizen::Base::String&)(493) > Cannot acquire feature list. 05-02 16:31:43.819 E/Tizen::App( 616): void Tizen::App::_ End of latest debug message
  • 11. 11 Agenda • Crash Client • Samsung’s crash-work-sdk • Intel’s corewatcher(3rd Gen) • Crash Server • CrashDB Web • Crash reason location algrithm
  • 12. 12 Crash Client - Intel’s corewatcher • Mechanism. • How to upload crashes to server. • Crash report file: /var/lib/corewatcher/processed/*.txt.
  • 13. 13 Crash Client - Intel’s corewatcher • Mechanism. • Corewatcher as daemon • Listen to /var/lib/corewatcher/ • When crash comes, invoke gdb to analysis • Upload crashes to CrashDB server • Environment about corewatcher • /proc/sys/kernel/core_pattern=/var/lib/corewatcher/core_%e_%t • core_uses_pid=1 bt full info shared
  • 14. 14 Crash Client - Intel’s corewatcher • CrashDB server: https://tz.otcshare.org/crashdb/ • How to upload crash to server • WWLAN(3G/2G) • WiFi/SED • crash_submit: http://otcqa.sh.intel.com/wiki/Crash_Submit Even though tz.otcshare.org has security restriction(403 forbidden outside of Intel), crash submit is allowed.
  • 15. 15 Crash Client - Intel’s corewatcher • Crash report path: /var/lib/corewatcher/processed/*.txt • Crash report content(without debug info): cmdline: /usr/bin/mate-calc version: 2.1.0 backtrace: | #0 0x00007fd494c2db41 in g_logv () from /usr/lib64/libglib-2.0.so.0 #0 0x00007fd494c2db41 in g_logv () from /usr/lib64/libglib-2.0.so.0 #1 0x00007fd494c2dcfd in g_log () from /usr/lib64/libglib-2.0.so.0 #2 0x00007fd4959a10ee in g_settings_set_property () from /usr/lib64/libgio-2.0.so.0 #3 0x00007fd4956ae098 in g_object_constructor () from /usr/lib64/libgobject-2.0.so.0 #4 0x00007fd4956af562 in g_object_newv () from /usr/lib64/libgobject-2.0.so.0
  • 16. 16 Crash Client - Intel’s corewatcher • Crash report content(without debug info): maps: | 0x00007fd4971f5f00 0x00007fd49745ecf0 Yes (*) /usr/lib64/libgtk-x11-2.0.so.0 0x00007fd496ef7420 0x00007fd496f4ccb8 Yes (*) /usr/lib64/libgdk-x11-2.0.so.0 0x00007fd496cc0030 0x00007fd496ccc290 Yes (*) /usr/lib64/libatk-1.0.so.0 0x00007fd496aa8490 0x00007fd496ab05bc Yes (*) /usr/lib64/libpangoft2-1.0.so.0 0x00007fd496898f20 0x00007fd49689dd14 Yes (*) /usr/lib64/libpangocairo-1.0.so.0 0x00007fd49667aa80 0x00007fd49668c018 Yes (*) /usr/lib64/libgdk_pixbuf-2.0.so.0 0x00007fd496377cc0 0x00007fd49643941c Yes (*) /usr/lib64/libcairo.so.2 0x00007fd496127680 0x00007fd496146fe0 Yes (*) /usr/lib64/libpango-1.0.so.0 0x00007fd495e95a90 0x00007fd495ef1fa4 Yes (*) /usr/lib64/libfreetype.so.6 (*): Shared library is missing debugging information.
  • 17. 17 Crash Client - Intel’s corewatcher • Crash report content(with debug info): backtrace: | #0 g_logv (log_domain=0x7f3d296fbfe1 "GLib-GIO", log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=args@entry=0x7fff7ea01e58) at gmessages.h:101 #0 g_logv (log_domain=0x7f3d296fbfe1 "GLib-GIO", log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=args@entry=0x7fff7ea01e58) at gmessages.h:101 #1 0x00007f3d28941cfd in g_log (log_domain=log_domain@entry=0x7f3d296fbfe1 "GLib-GIO", log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0x7f3d29717dc0 "Settings schema '%s' is not installedn") at gmessages.c:1003 #2 0x00007f3d296b50ee in g_settings_set_property (object=<optimized out>, prop_id=<optimized out>, value=<optimized out>, pspec=<optimized out>) at gsettings.c:492 #3 0x00007f3d293c2098 in object_set_property (nqueue=0xf90e60, value=0xf96408, pspec=0xf95ca0, object=0xf95540) at gobject.c:1357
  • 18. 18 Crash Client - Intel’s corewatcher • Crash report content(with debug info): maps: | From To Syms Read Shared Object Library No linux-vdso.so.1 0x00007f3d2af09f00 0x00007f3d2b172cf0 Yes /usr/lib64/libgtk-x11-2.0.so.0 0x00007f3d2ac0b420 0x00007f3d2ac60cb8 Yes /usr/lib64/libgdk-x11-2.0.so.0 0x00007f3d2a9d4030 0x00007f3d2a9e0290 Yes /usr/lib64/libatk-1.0.so.0 0x00007f3d2a7bc490 0x00007f3d2a7c45bc Yes /usr/lib64/libpangoft2-1.0.so.0 0x00007f3d2a5acf20 0x00007f3d2a5b1d14 Yes /usr/lib64/libpangocairo-1.0.so.0 0x00007f3d2a38ea80 0x00007f3d2a3a0018 Yes /usr/lib64/libgdk_pixbuf-2.0.so.0 (*): Shared library is missing debugging information.
  • 19. 19 Crash Client - Intel’s corewatcher • Crash report path: /var/lib/corewatcher/processed/*.txt • Crash report content(without debug info): cmdline: /usr/bin/mate-calc version: 2.1.0 backtrace: | #0 0x00007fd494c2db41 in g_logv () from /usr/lib64/libglib-2.0.so.0 #0 0x00007fd494c2db41 in g_logv () from /usr/lib64/libglib-2.0.so.0 #1 0x00007fd494c2dcfd in g_log () from /usr/lib64/libglib-2.0.so.0 #2 0x00007fd4959a10ee in g_settings_set_property () from /usr/lib64/libgio-2.0.so.0 #3 0x00007fd4956ae098 in g_object_constructor () from /usr/lib64/libgobject-2.0.so.0 #4 0x00007fd4956af562 in g_object_newv () from /usr/lib64/libgobject-2.0.so.0 Quality: 66
  • 20. 20 Crash Client - Intel’s corewatcher • Crash report content(with debug info): backtrace: | #0 g_logv (log_domain=0x7f3d296fbfe1 "GLib-GIO", log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=args@entry=0x7fff7ea01e58) at gmessages.h:101 #0 g_logv (log_domain=0x7f3d296fbfe1 "GLib-GIO", log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=args@entry=0x7fff7ea01e58) at gmessages.h:101 #1 0x00007f3d28941cfd in g_log (log_domain=log_domain@entry=0x7f3d296fbfe1 "GLib-GIO", log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0x7f3d29717dc0 "Settings schema '%s' is not installedn") at gmessages.c:1003 #2 0x00007f3d296b50ee in g_settings_set_property (object=<optimized out>, prop_id=<optimized out>, value=<optimized out>, pspec=<optimized out>) at gsettings.c:492 #3 0x00007f3d293c2098 in object_set_property (nqueue=0xf90e60, value=0xf96408, pspec=0xf95ca0, object=0xf95540) at gobject.c:1357 Quality 100
  • 21. 21 Crash Client - Intel’s corewatcher • Example (before submit): root@xiuhua:~# sdb root on Switched to 'root' account mode root@xiuhua:~# sdb shell sh-4.1# find /var/lib/corewatcher/ /var/lib/corewatcher/ /var/lib/corewatcher/processed /var/lib/corewatcher/processed/core_top_1398992161.1307.processed /var/lib/corewatcher/processed/core_top_1398992226.1333.processed /var/lib/corewatcher/processed/top_1398992226.txt /var/lib/corewatcher/processed/top_1398992161.txt
  • 22. 22 Crash Client - Intel’s corewatcher • Example (after submitted): root@xiuhua:~# sdb root on Switched to 'root' account mode root@xiuhua:~# sdb shell sh-4.1# find /var/lib/corewatcher/ /var/lib/corewatcher/ /var/lib/corewatcher/processed /var/lib/corewatcher/processed/core_top_1398992161.1307.submitted /var/lib/corewatcher/processed/core_top_1398992226.1333.submitted /var/lib/corewatcher/processed/top_1398992226.txt /var/lib/corewatcher/processed/top_1398992161.txt
  • 23. 23 Agenda • Crash Client • Samsung’s crash-work-sdk • Intel’s corewatcher(3rd Gen) • Crash Server • CrashDB Web • Crash reason location algrithm
  • 24. 24 Crash Server – CrashDB Web • Production Env: https://tz.otcshare.org/crashdb/ • Demo: http://crashdb-y.sh.intel.com/
  • 25. 25 Agenda • Crash Client • Samsung’s crash-work-sdk • Intel’s corewatcher(3rd Gen) • Crash Server • CrashDB Web • Crash reason location algrithm
  • 26. 26 Crash Server – Guilty Function Location https://bugs.tizen.org/jira/browse/TIVI-649 'Security-server has closed unexpectedly' popped up when playing videos or launching clock (gdb) bt #0 0xb4e9c999 in vfprintf () from /lib/libc.so.6 #1 0xb4f3e7b4 in __vsnprintf_chk () from /lib/libc.so.6 #2 0xb5560c00 in __dlog_print () from /usr/lib/libdlog.so.0 #3 0x081019fd in process_cookie_request (sockfd=27) at /usr/src/debug/security-server- 0.0.61/src/security-srv/server/security-server-main.c:367 #4 0x08103b7e in security_server_thread (param=0xb451519c) at /usr/src/debug/security-server- 0.0.61/src/security-srv/server/security-server-main.c:923 #5 0xb554be19 in start_thread () from /lib/libpthread.so.0 #6 0xb4f2affe in clone () from /lib/libc.so.6
  • 27. 27 Crash Server – Guilty Function Location https://bugs.tizen.org/jira/browse/TIVI-649 'Security-server has closed unexpectedly' popped up when playing videos or launching clock (gdb) bt #0 0xb4e9c999 in vfprintf () from /lib/libc.so.6 #1 0xb4f3e7b4 in __vsnprintf_chk () from /lib/libc.so.6 #2 0xb5560c00 in __dlog_print () from /usr/lib/libdlog.so.0 #3 0x081019fd in process_cookie_request (sockfd=27) at /usr/src/debug/security-server- 0.0.61/src/security-srv/server/security-server-main.c:367 #4 0x08103b7e in security_server_thread (param=0xb451519c) at /usr/src/debug/security-server- 0.0.61/src/security-srv/server/security-server-main.c:923 #5 0xb554be19 in start_thread () from /lib/libpthread.so.0 #6 0xb4f2affe in clone () from /lib/libc.so.6
  • 28. 28 Crash Server – Guilty Function Location https://bugs.tizen.org/jira/browse/TIVI-649 'Security-server has closed unexpectedly' popped up when playing videos or launching clock (gdb) bt #0 0xb4e9c999 in vfprintf () from /lib/libc.so.6 #1 0xb4f3e7b4 in __vsnprintf_chk () from /lib/libc.so.6 #2 0xb5560c00 in __dlog_print () from /usr/lib/libdlog.so.0 #3 0x081019fd in process_cookie_request (sockfd=27) at /usr/src/debug/security-server- 0.0.61/src/security-srv/server/security-server-main.c:367 #4 0x08103b7e in security_server_thread (param=0xb451519c) at /usr/src/debug/security-server- 0.0.61/src/security-srv/server/security-server-main.c:923 #5 0xb554be19 in start_thread () from /lib/libpthread.so.0 #6 0xb4f2affe in clone () from /lib/libc.so.6 Guilty Function
  • 29. 29 Crash Server – Guilty Function Location (gdb) f 3 #3 0x081019fd in process_cookie_request (sockfd=27) at /usr/src/debug/security-server- 0.0.61/src/security-srv/server/security-server-main.c:367 367 SEC_SVR_DBG("Server: Cookie created for client PID %d LABEL >%s<", (gdb) p created_cookie->smack_label $2 = 0x1777 <Address 0x1777 out of bounds> (gdb) p *created_cookie $4 = {cookie = "270217{257354063221 e筗Y370230~021024004244", path_len = 49, permission_len = 90, pid = 1562, path = 0x85e0ba8 "/usr/apps/org.tizen.video-player/bin/video-player", permissions = 0x85b6168, smack_label = 0x1777 <Address 0x1777 out of bounds>, prev = 0x8589190, next = 0x0}
  • 30. 30 Crash Server – Guilty Function Location https://bugs.tizen.org/jira/browse/TIVI-649 'Security-server has closed unexpectedly' popped up when playing videos or launching clock (gdb) bt #0 0xb4e9c999 in vfprintf () from /lib/libc.so.6 #1 0xb4f3e7b4 in __vsnprintf_chk () from /lib/libc.so.6 #2 0xb5560c00 in __dlog_print () from /usr/lib/libdlog.so.0 #3 0x081019fd in process_cookie_request (sockfd=27) at /usr/src/debug/security-server- 0.0.61/src/security-srv/server/security-server-main.c:367 #4 0x08103b7e in security_server_thread (param=0xb451519c) at /usr/src/debug/security-server- 0.0.61/src/security-srv/server/security-server-main.c:923 #5 0xb554be19 in start_thread () from /lib/libpthread.so.0 #6 0xb4f2affe in clone () from /lib/libc.so.6 White list • /lib/libc.so.6 • /usr/lib/libdlog.so.0
  • 31. 31 Crash Server – Guilty Function Location https://bugs.tizen.org/jira/browse/TIVI-649 'Security-server has closed unexpectedly' popped up when playing videos or launching clock (gdb) bt #0 0xb4e9c999 in vfprintf () from /lib/libc.so.6 #1 0xb4f3e7b4 in __vsnprintf_chk () from /lib/libc.so.6 #2 0xb5560c00 in __dlog_print () from /usr/lib/libdlog.so.0 #3 0x081019fd in process_cookie_request (sockfd=27) at /usr/src/debug/security-server- 0.0.61/src/security-srv/server/security-server-main.c:367 #4 0x08103b7e in security_server_thread (param=0xb451519c) at /usr/src/debug/security-server- 0.0.61/src/security-srv/server/security-server-main.c:923 #5 0xb554be19 in start_thread () from /lib/libpthread.so.0 #6 0xb4f2affe in clone () from /lib/libc.so.6 White list • /lib/libc.so.6 • /usr/lib/libdlog.so.0 Guilty Function
  • 32. Q & A