Sunday, August 2, 2020

How ABRT Avoid Storing Duplicated Crashes — Deduplication

Processes crash for a multitude of reasons and it’s often difficult to understand the root causes that contribute to such crashes.  The Automatic Bug Reporting Tool, commonly abbreviated as ABRT, could offer help for forensic investigation.

ABRT


ABRT consists of the abrtd daemon and a number of system services and utilities to process, analyze, and report detected problems. 

The daemon runs silently in the background most of the time, and springs into action when an application crashes or a kernel oops is detected. The daemon then collects the relevant problem data such as a core file if there is one, the crashing application's command-line parameters, and other data of forensic utility.

Why ABRT?


Earlier when applications crashed, core dumps were generated, but not limited, which could quickly fill up the disk.

A solution is to use ABRT.  For example, it can
  • Rotate cores within a size limit by deleting the oldest[11]
  • Avoid storing duplicate crashes by deduplication[9]

Elements Collected by ABRT


In the below table, it shows a shortened list of elements collected by ABRT and their descriptions. For a full list see [4].  These elements are stored in the form of files in a single directory per detected problem (such a directory is called 'dump directory').
 
core_backtraceMachine readable backtrace with no private data
coredumpCoredump of the crashing process
countNumber of times this problem occured
crash_functionFunction which crashed
dmesgCopy of dmesg
docker_inspectOutput of docker inspect $(container_id)
dso_listList of dynamic libraries loaded at the time of crash
duphashHash of the crash's backtrace
environDump of process environment variable along with their values
event_logMessages produced by ABRT tools during processing the detected problem
executableExecutable path of the component which caused the problem.
global_pidValue of %P as passed by kernel to the core_pattern helper (see man core for more details)
hostnameHostname of the affected machine
kernelKernel version string
kernel_logResults of vmcore crash analysis performed by retrace-server
kernel_tainted_longTainted kernel description
kernel_tainted_shortKernel tainted flags (For more information about tainted flags see [1])
last_occurrenceTime of the last occurence (unixtime)
 

Deduplication


When ABRT catches new crash, it compares it to the rest of the stored problems to avoid storing duplicate crashes:
  1. It first checks if there is core_bactrace or uuid item in the problem directory it is processing
  2. If there is a core_backtrace
    • It iterates over all other dump directories and computes similarity to their core backtraces (if any). If one of them is similar enough to be considered duplicate, event processing is stopped and only notify-dup event is fired.
  3. Or if there is an uuid item (and no core backtrace)
    • Simple comparison of uuid hashes is used for duplicate detection.
You can read abrt-action-analyze-backtrace for more information.[6]


count & last_occurrence


After the forensic investigation, you can use:
  • abrt-cli rm <path to the problem directory>
to remove the specified problem data directory with all its contents.

[abrt]# abrt-cli rm ccpp-2019-08-21-13:59:02-31929
PrivateReports is disabled. Run abrt-cli-root to see all problems detected by ABRT.
rm 'ccpp-2019-08-21-13:59:02-31929'

However, note that ABRT performs a detection of duplicate problems by comparing new problems with all locally saved problems. 

For a repeating crash, ABRT requires you to act upon it only once. But, if you delete the crash dump of that problem, the next time this specific problem occurs, ABRT will treat it as a new crash: ABRT will alert you about it, prompt you to fill in a description, and report it. To avoid having ABRT notifying you about a recurring problem, do not delete its problem data.

If you didn't remove a specific problem data directory, here is what would happen when ABRT catches a new crash :
  • ABRT compares it to the rest of locally stored problems
  • If it's a new problem, a new problem directory will be created
  • Otherwise, ABRT will update the recurring problem by:
    • Incrementing "count" by one
    • Updating "last_occurrence" with a new epoch
[ccpp-2019-08-21-13:59:02-31929]# ls -lrt
total 868572
-rw-r-----. 1 abrt  abrt         3 Aug 21  2019 uid
-rw-r-----. 1 abrt  abrt        10 Aug 21  2019 time
-rw-r-----. 1 abrt  abrt        32 Aug 21  2019 os_release
-rw-r-----. 1 abrt  abrt        30 Aug 21  2019 kernel
-rw-r-----. 1 abrt  abrt        24 Aug 21  2019 hostname
-rw-r-----. 1 abrt   abrt         6 Aug 21  2019 architecture
-rw-r-----. 1 abrt  abrt     70033 Aug 21  2019 maps
-rw-r-----. 1 abrt  abrt      1323 Aug 21  2019 limits
-rw-r-----. 1 abrt  abrt        88 Aug 21  2019 cgroup
-rw-r-----. 1 abrt  abrt         4 Aug 21  2019 type
-rw-r-----. 1 abrt  abrt        90 Aug 21  2019 reason
-rw-r-----. 1 abrt  abrt        39 Aug 21  2019 pwd
-rw-r-----. 1 abrt  abrt         5 Aug 21  2019 pid
-rw-r-----. 1 abrt  abrt      2072 Aug 21  2019 open_fds
-rw-r-----. 1 abrt  abrt        48 Aug 21  2019 executable
-rw-r-----. 1 abrt  abrt     14722 Aug 21  2019 environ
-rw-r-----. 1 abrt  abrt        48 Aug 21  2019 cmdline
-rw-r-----. 1 abrt  abrt         4 Aug 21  2019 analyzer
-rw-r-----. 1 abrt  abrt         5 Aug 21  2019 abrt_version
-rw-r-----. 1 abrt  abrt 886996992 Aug 21  2019 coredump
-rw-r-----. 1 abrt  abrt         7 Aug 21  2019 username
-rw-r-----. 1 abrt  abrt   1846076 Aug 21  2019 sosreport.tar.xz
-rw-r-----. 1 abrt  abrt         0 Aug 21  2019 event_log
-rw-r-----. 1 abrt  abrt        93 Aug 21  2019 machineid
-rw-r-----. 1 abrt  abrt    378414 Aug 21  2019 core_backtrace
-rw-r-----. 1 abrt  abrt        40 Aug 21  2019 uuid
-rw-r-----. 1 abrt  abrt      1424 Aug 21  2019 dso_list
-rw-r-----. 1 abrt  abrt       199 Aug 21  2019 var_log_messages
-rw-r-----. 1 abrt  abrt         2 Jul 25 08:00 count
-rw-r-----. 1 abrt  abrt        10 Jul 25 08:00 last_occurrence

[ccpp-2019-08-21-13:59:02-31929]# cat count
2

[ccpp-2019-08-21-13:59:02-31929]# cat last_occurrence
1595664006

[ccpp-2019-08-21-13:59:02-31929]# date -u -d @1595664006
Sat Jul 25 08:00:06 UTC 2020

[ccpp-2019-08-21-13:59:02-31929]# cat reason
Process /u01/app/xxx/server/bin/yyy was killed by signal 11 (SIGSEGV)

ABRT Configuration Files


Standard ABRT installation currently provides the following ABRT specific configuration files:
  • /etc/abrt/abrt.conf — allows you to modify the behavior of the abrtd service.
  • /etc/abrt/abrt-action-save-package-data.conf — allows you to modify the behavior of the abrt-action-save-package-data program.
  • /etc/abrt/plugins/CCpp.conf — allows you to modify the behavior of ABRT's core catching hook.
For example, the default location where problem data directories are created and in which problem core dumps and all other problem data are stored is:
/var/spool/abrt

[~]# cd /var/spool/abrt

[abrt]# ls -lrt
total 32
-rw-------. 1 root   root   23 Mar  8 05:18 last-via-server
-rw-------. 1 root   root   48 Jul 25 08:00 last-ccpp
drwxr-x---. 2 abrt   abrt 4096 Jul 28 15:22 ccpp-2019-08-21-13:59:02-31929

Read [11] for all the details of ABRT configuration files.

References

  1. ABRT Documentation (Release 2.14)
  2. How to properly delete a report problem in ABRT
  3. AUTOMATIC BUG REPORTING TOOL (ABRT)
  4. Elements collected by ABRT
  5. Basic ABRT components
  6. abrt-action-analyze-backtrace
    • Analyzes C/C++ backtrace, generates duplication hash, backtrace rating, and identifies crash function in problem directory DIR
    • Then it saves this data as new elements global_uuid, rating, crash_function in this problem directory
  7. abrt-backtrace
  8. ABRT FAQ
  9. ABRT Design
  10. backtrace_rating (Red Hat doc)
    • Numerical representation of quality of backtrace based on ratio of unrecognized frames among all backtrace frames
  11. ABRT SPECIFIC CONFIGURATION

49 comments:

  1. This article truly made my day and I am really so happy with your ideas. You can not believe just how a lot time I had spent for this info! Thanks admin for this release. Assignment Help Australia -
    Assignment Help Melbourne -
    Assignment Help Perth

    ReplyDelete
  2. Might you want to know why you should pick specialists for material science homework at ABC Assignment Experts? Investigate a portion of the highlights of the Physics homework specialists at ABC Assignment Experts and become more acquainted with why we will end up being your most ideal decision for physical science homework helpers. visit - cheap assignment help , write my assignment

    ReplyDelete
  3. Excellent thread, I have to thank you for this. It helps me a lot to enhance my knowledge. I truly like your way of blogging. I bookmarked it to my bookmark website list and will be checking back soon. Please check out my website acid mine drainage assignment as well and let me know what you think.
    economics assignment
    Canada assignment
    dissertation writing service
    case study assignment

    ReplyDelete
  4. this is the thing which I have noticed about the health of the people suffering from the facts of assignment help easily and understandable which is a great thing to comply with and getting this with the phase of the people with assignment help Singapore exactly with the things that includes the following Nursing assignment help Brisbane services at affordable prices.

    ReplyDelete
  5. Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign. GoAssignmentHelp has a team of highly experienced writers proofreading services australia they have already set a benchmark make my assignment australia with their work all around the world. Our team consists of many Ph.D. assignment experts who will help you with expert study helper assistance in every way possible.

    ReplyDelete
  6. You can find Test Bank For Advanced Financial Accounting 11th Edition online in pdf/word format. Avail instant assistance for issues 24/7. There is no waiting time!

    ReplyDelete
  7. Do My Homework for Me?
    The Answer is Yes. We at Do My Homework Help are looking for opportunities to help you complete your homework on time so that you do not miss any of your assignment submissions. We are here to help you achieve balance in your life and make you enjoy what you like without worrying about completing your assignments. Our team is well educated and expert in writing different types of assignments and doing homework for all the fields, including commerce, Management, Accounting, Business, Science, Computer Science and many more.
    Do My Homework For Me
    Do My Homework Help

    ReplyDelete
  8. Looking for the best study guides online? We offer Child Development 9th Edition Test Bank at the lowest prices. Download instantly and improve your grades today.

    ReplyDelete
  9. The secret for student success lies in the material you use for learning.Try Test Bank For Assessment Of Exceptional Students 8 E 8th Edition and feel the difference.

    ReplyDelete
  10. The secret for student success lies in the material you use for learning.Try Test Bank For Introduction To Criminology Why Do They Do It Second Edition and feel the difference.

    ReplyDelete
  11. Gain better scores in every assignment and exam with Test Bank For Marketing An Introduction 12 E 12th Edition . Be on the top of your class.

    ReplyDelete
  12. Make the best use of your time by browsing about this awesome topic right away!

    ReplyDelete
  13. Thanks for sharing this useful and interesting information, checkout this uniuyo cut off mark for mass communication it can be useful to you. Keep on sending in more useful and amazing information on your blog

    ReplyDelete
  14. This an amazing blog and I really appreciate you for sharing this excellent and informative blog, fell in love with your beautiful design and unique contents, thanks for sharing. rugipo academic calendar first semister (amended)

    ReplyDelete
  15. Be a successful student and class topper throught TestBanks 21 assistance. Try our Solution Manual For Heat And Mass Transfer Fundamentals And Applications 5th Edition right away!

    ReplyDelete
  16. Exams are easier with the TestBanks21 assistance. Find best selling Horngrens Accounting 12th Edition Solution Manual and solution manuals and be on the top of your class today.

    ReplyDelete
  17. Sometimes emergencies pop in too! Say you are ill or you have severe migraine attacks. Now you can’t finish your assignment on time. At the same time, you must need someone who takes last-minute assignment orders and finishes the whole task on time. Search the internet with java assignment help, and you will get thousands of links. It is always wise to find someone from your locality. You could knock them personally if they did not deliver on time. Sometimes writers do delay a lot as they need to handle piles of work. If the person stays close by your place, you can visit them any time and remind them about the assignment you are yet to receive.

    ReplyDelete
  18. Thanks for the amazing article. I want to add that the best place for test banks and solution manuals online is TestBanks21. You can get the best quality and updated Test Bank For Educational Psychology Developing Learners 8th Edition at great discounts here.

    ReplyDelete
  19. Become a Data Science expert with Innomatics. we provide classroom training on Data Science course in Hyderabad for the individuals who believe hand-held training. We teach as per the Indian Standard Time (IST) with In-depth practical Knowledge on each topic in classroom training, 80 – 90 Hrs of Real-time practical training classes. There are different slots available on weekends or weekdays according to your choices.

    ReplyDelete
  20. Hard exams, assignments and homework are a now things of the past with Test Bank For Accounting Information Systems 15th Edition. Order and download now!

    ReplyDelete
  21. Become an expert in Data Science experts by enrolling in AI Patasala’s Data Science Training in Hyderabad program. Here you can gain practical knowledge with industry experts.
    Data Scientist Training in Hyderabad

    ReplyDelete
  22. ketu in 11th house is a good sign. It means that the natives will attain prosperity and everything they desire.

    ReplyDelete
  23. Hi there, thank you for sharing such great informative post with us. It is really helpful.
    Fix Discord Installation
    Chrome DNS
    Getting Windows Ready
    Install Kodi on Ubuntu

    ReplyDelete
  24. The majority of people believe that hiring writing pros is outrageously expensive. However, because the majority of consumers are students on a restricted budget, such services are extremely affordable. As a result, everyone in need of academic aid can afford the services. If you want high-quality help with paper, engage a professional writer from a legitimate and reputable writing service, and you will never be sorry.

    ReplyDelete
  25. Find your post engaging to read.Also, you can take a look at our latest post.The post is related to online mouse test Refer to the article and learn more.

    ReplyDelete
  26. Hello there, everyone! In all courses, coursework is now required as a means of assessment. Because it allows for a range of learning techniques, it is more inclusive. The fact that a kid can take on such a major school project and finish it on time indicates professionalism and abilities that any business would value. Furthermore, coursework gives you the opportunity to achieve an excellent grade even if you do poorly on the tests. However, not every component of writing an assignment is pleasurable. You must produce high-quality material regardless of your academic level. With a busy schedule, however, it can be tough to do so, let alone present your work on time. Students seek online Coursework Help from a professional with expertise and experience in that field of study, as well as strong writing abilities, to assure good success.

    ReplyDelete

  27. We, here at Best Custom Boxes, make sure to provide you with the noodle boxes best of the quality to impactfully place your brands in the hands of the customers and boost your sales.

    ReplyDelete
  28. Informative blog you posted here. Really amazing and useful, I must say the language is very easy so everyone can read easily. Just like you I am also here to promote my Assignment help website, so if you need assignment related help or if you find any difficulty in my content then please let me know. Suggestions are always welcomed.

    ReplyDelete

  29. Company have highly skilled Engineering academic writers from Australia who will assist you throughout the process. Get high quality Engineering Assignment Help and outlay article writing services from our qualified academic experts that ensure quality and timely delivery of work. Our Engineering assignment writers provide students with high-quality assignment effort.

    ReplyDelete
  30. I spared as a most loved it to my bookmark website page list and will check back rather than later. Share your thoughts. Do you know How To Drag Click? If not, then check out the blog and find out about it here.

    ReplyDelete
  31. Earth Science Solutions based on your textbook is the smartest way to handle your homework, projects, assignments and exam preparation. Checkout the ScholarOn collection to be on the top of your class.

    ReplyDelete
  32. Facing issues with your assignments because of the tight deadlines, then don't go any where else and ask us Do My Assignment in Malaysia and get your assignments completed by the professionals just by paying a very nominal amount.

    ReplyDelete
  33. Nice post!! Students can score high marks In Their college and university assignments by hiring the best assignment help with writing homework from the experts.
    MBA Assignment Help

    ReplyDelete
  34. It was a very useful post for me as when I was writing an interview profile essay example I mentioned my gadgets and my hobbies related to them.

    ReplyDelete
  35. This comment has been removed by the author.

    ReplyDelete
  36. Hey! As you may be aware, the number of people who aspire to become gamers is increasing daily. We offer a course where you may learn all there is to know about gaming and, after completing it, turn into a pro. I have the mission game that can help you to achieves all the gaming abilities which BitLife Mafia game and play how to Join Italian Mafia in BitLife Mafia game.

    ReplyDelete
  37. This is a Informative knowledge of blog put to shared here with the viewers. I appreciate your time and energy put to give out this an astonish write-up.  when is aun post utme de form expiring

    ReplyDelete
  38. I will love to Appreciate you for your time just for this amazing article! I really liked every little bit of it. Thanks so much for sharing. aocoed departmental cut off mark for all courses

    ReplyDelete
  39. Your blog post has lots of knowledgeable stuffs. All content you describe is in your post very helpful for us. Thanks for sharing the valuable information. peaceland coe admission form deadline

    ReplyDelete
  40. Great One! Well-written blog! Keep it up! Connect with us for the Best Assignment Help Liverpool UK service and get completely customized work with zero errors and plagiarism. Our helpers are highly-educated and available 24/7 to ensure you get the perfect assistance within a few minutes. With the help of our writing service, you can easily manage the entire task, especially those whose deadlines clash. So, visit us and order now.

    ReplyDelete
  41. Your words always bring a sense of optimism and joy to my day. I highly recommend using an Auto clicker to save time on those mind-numbing clicking tasks!

    ReplyDelete
  42. Your post is a great way for me to expand my knowledge. I'm grateful. Everyone ought to read a profile like this one IO Game. IO games are quick-witted entertainment with simple rules.

    ReplyDelete