
{"id":9875,"date":"2022-06-21T09:10:27","date_gmt":"2022-06-21T09:10:27","guid":{"rendered":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/documentation\/rdk_video_documentation\/components\/open-sourced_components\/crashupload\/"},"modified":"2025-12-23T13:33:27","modified_gmt":"2025-12-23T13:33:27","slug":"crashupload","status":"publish","type":"page","link":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/","title":{"rendered":"Crashupload"},"content":{"rendered":"<p><br \/>\n <\/p>\n<div class=\"toc-macro client-side-toc-macro  conf-macro output-block\" data-headerelements=\"H1,H2,H3,H4,H5,H6,H7\" data-hasbody=\"false\" data-macro-name=\"toc\"> <\/div>\n\n\n<h2 class=\"wp-block-heading wp-main-header\">Overview<\/h2>\n\n\n<p>Crash dumping system facilitates service providers or developers to collect crashes happened in the set-top boxes and do the debugging in offline. Crash dumping system is a debug supporting system, which consists of Crash dumping server(s) with user interfaces.&nbsp; Crash dumping server collect crash logs which happened in the connected STBs, process these logs and store for future reference.<\/p>\n<p>Crash log is a log file automatically created on Set top boxes when a crash occurs. This information is useful for offline debugging.&nbsp;<\/p>\n\n\n<h2 class=\"wp-block-heading wp-main-header\"><span>Minidump<\/span><\/h2>\n\n\n<ul>\n<li>A list of the executable and shared libraries that were loaded in the process at the time the dump was created. This list includes both file names and identifiers for the particular versions of those files that were loaded.<\/li>\n<li>A list of threads present in the process. For each thread, the minidump includes the state of the processor registers, and the contents of the threads&#8217; stack memory.<\/li>\n<li>Other information about the system on which the dump was collected: processor and operating system versions, the reason for the dump, and so on.\u00a0<\/li>\n<\/ul>\n<p>Google Breakpad<\/p>\n<p>Breakpad is a library that records crashes in compact &#8220;minidump&#8221; files. It \u00a0produce C and C++ stack traces from minidumps. Breakpad can also write minidumps on request for programs that have not crashed.\u00a0<\/p>\n<p>\u00a0\u00a0<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/sites\/16\/2023\/09\/crashupload.drawio.png\" \/><\/p>\n<p><strong>How to Integrate <strong>Google Breakpad library<\/strong>?<\/strong><\/p>\n<ul>\n<li>\n<p>Link against libbreakpad_client library.<\/p>\n<\/li>\n<li>\n<p>#include &#8220;client\/linux\/handler\/exception_handler.h\u201c<\/p>\n<\/li>\n<li>Instantiate an ExceptionHandler object, ExceptionHandler constructor requires a path where it can write minidumps, as well as a callback function to receive information about minidumps that were written.<\/li>\n<\/ul>\n<p>\u00a0 \u00a0 \u00a0<\/p>\n<div class=\"code panel pdl conf-macro output-block\" data-hasbody=\"true\" data-macro-name=\"code\">\n<div class=\"codeContent panelContent pdl\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include \"client\/linux\/handler\/exception_handler.h\u201c \/\/ Include Header file for exception handler\nstatic bool dumpCallback(const google_breakpad::MinidumpDescriptor&amp; descriptor, void* context, bool succeeded)\n{\n\u00a0 printf(\"Dump path: %sn\", descriptor.path());\n\u00a0 return succeeded;\n}\n\nint main(int argc, char* argv[])\n{\n\u00a0 google_breakpad::MinidumpDescriptor descriptor(\"\/tmp\"); \n\u00a0 google_breakpad::ExceptionHandler eh(descriptor, \/\/ Minidump will be saved in \/tmp\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0NULL,\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0dumpCallback, \/\/Callback\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0NULL,\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0true,\n<\/pre>\n<\/div>\n<\/div>\n<p><strong>Google Breakpad Utilities<\/strong><\/p>\n<ul>\n<li>dump_syms is used for symbol extraction.<\/li>\n<\/ul>\n<div class=\"panel conf-macro output-block\" data-hasbody=\"true\" data-macro-name=\"panel\">\n<div class=\"panelContent\">dump_syms .\/gpsample_app &gt; gpsample_app.sym, will generate symbol file.<\/div>\n<\/div>\n<ul>\n<li>minidump_stackwalk is used for \u00a0symbolized stack trace\u00a0<\/li>\n<\/ul>\n<div class=\"panel conf-macro output-block\" data-hasbody=\"true\" data-macro-name=\"panel\">\n<div class=\"panelContent\">\n<p class=\"_mce_tagged_br\">It takes a minidump and its corresponding text-format symbols and produce a symbolized stacktrace.<\/p>\n<p class=\"_mce_tagged_br\">minidump_stackwalk minidump.dmp gpsample_app.sym<\/p>\n<\/div>\n<\/div>\n<p>uploadDumps.sh collects core dumps\/ mini dumps \u00a0to crash server whenever any applications crashes.<\/p>\n<p><strong>Sample Application<\/strong><\/p>\n<div class=\"code panel pdl conf-macro output-block\" data-hasbody=\"true\" data-macro-name=\"code\">\n<div class=\"codeContent panelContent pdl\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include \"client\/linux\/handler\/exception_handler.h\u201c\nstatic bool dumpCallback(const google_breakpad::MinidumpDescriptor&amp; descriptor,\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0void* context,\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0bool succeeded)\n{\n\u00a0 printf(\"Dump path: %sn\", descriptor.path());\n\u00a0 return succeeded;\n}\n\nvoid crash()\n{\n\u00a0 volatile int* a = (int*)(NULL);\n\u00a0 *a = 1;\n}\n\n\nint main(int argc, char* argv[])\n{\n\u00a0 google_breakpad::MinidumpDescriptor descriptor(\"\/tmp\");\n\u00a0 google_breakpad::ExceptionHandler eh(descriptor,\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0NULL,\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0dumpCallback,\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0NULL,\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0true,\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0-1);\n\u00a0 crash();\n\u00a0 return 0;\n}\n<\/pre>\n<\/div>\n<\/div>\n<p><u>To compile the source <\/u><\/p>\n<ul>\n<li>Create a simple Makefile<\/li>\n<li>Add the following contents to the Makefile<\/li>\n<\/ul>\n<div class=\"panel conf-macro output-block\" data-hasbody=\"true\" data-macro-name=\"panel\">\n<div class=\"panelContent\">\n<p>PKG_CONFIG_PATH=..\/<\/p>\n<p>all: breakpad_exercise.c<\/p>\n<p>@ $(CXX) -std=c++11 breakpad_exercise.c -g -o breakpad_exercise `pkg-config &#8211;cflags breakpad` -L.\/client\/linux\/ -lbreakpad_client -I.\/ -lpthread<\/p>\n<\/div>\n<\/div>\n<ul>\n<li>make\u00a0<\/li>\n<\/ul>\n<p><u>Execute the sample application<\/u><\/p>\n<ul>\n<li>An application of name \u201cbreakpad_exercise\u201d will be generated. Copy this executable to the box\u00a0<\/li>\n<li>Run the application in the box which will cause segmentation fault:\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">root@raspberrypi-rdk-hybrid:~# ls\nbreakpad_exercise\nroot@raspberrypi-rdk-hybrid:~# .\/breakpad_exercise\nCrash occured, Callback function called.\nSegmentation fault (core dumped)\nroot@raspberrypi-rdk-hybrid:~# <\/pre>\n<\/li>\n<li>A minidump will be generated in the same file\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">root@raspberrypi-rdk-hybrid:~# ls\n40e9abf8-19cc-4b55-cd2bb29f-dbd37900.dmp breakpad_exercise\nroot@raspberrypi-rdk-hybrid:~#<\/pre>\n<\/li>\n<\/ul>\n\n\n<h2 class=\"wp-block-heading wp-main-header\">Coredump<\/h2>\n\n\n<p><span>Core dump files generated after an uncaught signal in a process (as a SIGSEGV or SIGQUIT), are generated in the base directory where the program was executed, and the core dumps starts with the name &nbsp;as &ldquo;core&rdquo; or &ldquo;<\/span><span class=\"skimlinks-unlinked\">core.PID<\/span><span>&rdquo;.<\/span><\/p>\n<p>By default size of the core will be zero, To generate the core, we need to set the size of the core to unlimited.&nbsp;<\/p>\n<ul>\n<li><strong>ulimit -c unlimited<\/strong><\/li>\n<\/ul>\n<p>By default, core will be generated in the current directory with the file name &#8220;<strong>core<\/strong>&#8220;. We can change the core generating directory from current directory to another by editing the kernel configuration file&nbsp;<strong>core pattern(<strong>\/proc\/sys\/kernel\/core_pattern)&nbsp;<\/strong><\/strong>&nbsp;in the kernel.<\/p>\n<ul>\n<li>\n<p><strong>echo &#8220;newpattern&#8221; &gt; \/proc\/sys\/kernel\/core_pattern<\/strong><\/p>\n<\/li>\n<\/ul>\n<p>Core pattern is helpful in the case if there are&nbsp;<span>couple of core dumps files in one directory and we don&#8217;t know which program caused it.<\/span><\/p>\n<p><strong><span>How to get stack trace?<\/span><\/strong><\/p>\n<p><span>Make sue the executable is compiled with -g option to turn on the debugging symbols<\/span><\/p>\n<div class=\"panel conf-macro output-block\" data-hasbody=\"true\" data-macro-name=\"panel\">\n<div class=\"panelContent\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"><code>gdb &lt;executable_path&gt; &lt;coredump_file_path&gt;\n<\/code><\/pre>\n<p>After you get inside the gdb-prompt, (on execution of the above command), type;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">(gdb) bt full<\/pre>\n<\/div>\n<\/div>\n\n\n<h2 class=\"wp-block-heading wp-main-header\">API Documentation<\/h2>\n\n\n<p><span>To know more about SoC\/Application level APIs details use in RDK, refer the link&nbsp;&nbsp;<\/span><a href=\"https:\/\/wiki.rdkcentral.com\/doxygen\/rdkv-opensourced\/d2\/d2a\/group___crashupload___a_p_i.html\" rel=\"nofollow\">Crashupload API Documentation<\/a><\/p>\n<\/p>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>Overview Crash dumping system facilitates service providers or developers to collect crashes happened in the [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":0,"parent":9844,"menu_order":5,"comment_status":"open","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-9875","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Crashupload - RDK Documentation Portal | Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Crashupload - RDK Documentation Portal | Documentation\" \/>\n<meta property=\"og:description\" content=\"Overview Crash dumping system facilitates service providers or developers to collect crashes happened in the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/\" \/>\n<meta property=\"og:site_name\" content=\"RDK Documentation Portal | Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-23T13:33:27+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/\",\"name\":\"Crashupload - RDK Documentation Portal | Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/#website\"},\"datePublished\":\"2022-06-21T09:10:27+00:00\",\"dateModified\":\"2025-12-23T13:33:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Documentation\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"RDK Video\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Components\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Crashupload\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/#website\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/\",\"name\":\"RDK Documentation Portal | Documentation\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/developer.rdkcentral.com\/documentation\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Crashupload - RDK Documentation Portal | Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/","og_locale":"en_US","og_type":"article","og_title":"Crashupload - RDK Documentation Portal | Documentation","og_description":"Overview Crash dumping system facilitates service providers or developers to collect crashes happened in the [&hellip;]","og_url":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/","og_site_name":"RDK Documentation Portal | Documentation","article_modified_time":"2025-12-23T13:33:27+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/","url":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/","name":"Crashupload - RDK Documentation Portal | Documentation","isPartOf":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/#website"},"datePublished":"2022-06-21T09:10:27+00:00","dateModified":"2025-12-23T13:33:27+00:00","breadcrumb":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/crashupload\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/developer.rdkcentral.com\/documentation\/"},{"@type":"ListItem","position":2,"name":"Documentation","item":"https:\/\/developer.rdkcentral.com\/documentation\/"},{"@type":"ListItem","position":3,"name":"RDK Video","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/"},{"@type":"ListItem","position":4,"name":"Components","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_video_documentation\/components\/"},{"@type":"ListItem","position":5,"name":"Crashupload"}]},{"@type":"WebSite","@id":"https:\/\/developer.rdkcentral.com\/documentation\/#website","url":"https:\/\/developer.rdkcentral.com\/documentation\/","name":"RDK Documentation Portal | Documentation","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/developer.rdkcentral.com\/documentation\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/9875","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/comments?post=9875"}],"version-history":[{"count":8,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/9875\/revisions"}],"predecessor-version":[{"id":12652,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/9875\/revisions\/12652"}],"up":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/9844"}],"wp:attachment":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/media?parent=9875"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}