In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
In this issue, Xiaobian will bring you about how to use Crash SDK to analyze flashbacks under the mPaaS framework. The article is rich in content and analyzed and described from a professional perspective. After reading this article, I hope you can gain something.
mPaaS Android currently uses Crash SDK to handle flashbacks. Crash SDK is a powerful crash log collection SDK on Android platform, with extremely high crash collection rate and complete and comprehensive crash log information. The log content generated is very conducive to problem follow-up and resolution.
In our daily operation and maintenance, we often encounter some flashbacks. We can't see the reasons directly from the flashback stack, especially some non-Java Native flashbacks. Here we share how to use Crash SDK to analyze flashbacks under mPaaS framework.
Introduction to Flashback Message Analysis Tool
For mPaaS users, the original flashback information exported from the MAS flashback analysis platform is generally more flashback information, if it is difficult to read directly, users can download Chrome plug-in LogAnalyzer.
LogAnalyzer will convert the log text content generated by Crash SDK into HTML page display with strong visual effect. Its functions are still very powerful, mainly including:
Highlight important information in the log and use different colors to distinguish it;
Support the preview of the overall structure of log content and quickly locate key content;
Reminder of common crash causes;
After installing Chrome plugin, you need to do the following configuration
1. Modify the flashback file suffix to.txt
Since the default file suffix downloaded on MAS is.dat, it needs to be changed to.txt, otherwise LogAnalyzer will not recognize it.
2. Modify plug-in configuration
Due to Chrome default permissions restrictions, no Chrome plugin can access file URLs by default. You need to do the following in Chrome plugin.
1. Open Chrome Plugin Management page chrome://extensions/
2. Find LogAnalyzer plugin, click "Details" to enter settings:
3. Find the Allow file URL option and check it;
4. Open or refresh the log page and LogAnalyzer will take effect.
3. Effective effect
Drag the log file directly to Chrome, you can see that after the plug-in on the right takes effect, you can display various fields of flashback information in different colors.
Instructions for use after first opening are as follows:
Normal view flash back screenshots are as follows:
Example of Flashback Analysis
We often encounter some non-Java Native modules flash back in daily operations, such as UC. At this time, many times you can only contact UC team for support. In fact, in many scenarios, the root cause of flashback is not UC, but the final flashback point is UC.
Take the UC kernel flashback that is often encountered in daily operation and maintenance as an example. The handling of some cases is shared as follows.
1. Java null pointer causes UC to flash back
We can see the following flashbacks at the flashback point (the customer apk information has been hidden). If we don't have any clues from this, we continue to read the log:
When we see the logcat node information, we find clues, first we see the keyword: begin to generate native report, indicating that the current is the flash log report log, we look forward, logcat node printed exception stack information.
As you can see from the stack information, the precreate operation triggered the underlying null pointer, which led to an initialization exception and finally triggered a flashback. The solution is to temporarily turn off pre-creation, thereby avoiding flashbacks.
From the above example we can see:
Native flashbacks are not necessarily caused by Native modules, but may be caused by exceptions caused by Java, which leads to Native flashbacks;
You can see logcat information related to flashback near begin to generate native report to help locate some context logs of flashback.
2. Upper OOM causes UC to flash back
First of all, we look at the log of the reported flashback point as shown in the figure below. The flashback is in RenderThread, and there is no clue.
We continue to bite the bullet and look for the begin to generate native report reporting node in the logcat node. We see a large number of exception logs of the underlying OOM, and the basic probability is determined to be the cause of the OOM.
All that remains is to find out where OOM was triggered.
Click on the memory node in the flash back, the basic reason is clearer, the current mobile phone Vmsize has basically reached the maximum, we know that for 32-bit processes, APP can use the maximum VmSize of 3GB, but when running on 64-bit CPU, VmSize maximum can exceed 3GB, close to 4GB.
However, due to the kernel needs to occupy a part, as well as different ROM versions of the difference, we found that there are the following rules: Android 8.1.0 and later systems, most of the native oom crash occurred when the VmoSize distribution in 3.5 - 3.9 G position, relatively concentrated. So the solution to the following case becomes how to solve OOM.
3. FD false close causes UC flash back
The reported log is shown in the following figure. We can only see that SIGILL may be an active crash. Crash ILL_ILLOPC indicates illegal operation.
Then we continue to look at the logcat node begin to generate native report, basically confirming that the reason is because the FD object used by UC is closed by another program.
UC then provided a toolkit with FDscan. After we repeated it, we found that the input stream object of UC calling shouldIntercept callback was closed by other modules, resulting in UC finding that FD object had been closed when it was used, thus crashing. The final solution becomes the user to solve the problem of misswitching FD of other modules.
The above is how to use Crash SDK to analyze flashback under the mPaaS framework shared by Xiaobian. If there is a similar doubt, please refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.