Student Application
Name: Yuru Shao
Contact/Email/IRC nick: shaoyuru@gmail.com My Homepage
Background: I am a first year graduate student from Department of Electronic Engineering and Computer Science, University of Michigan, Ann Arbor. As a CS major, I have good foundations in operating systems, networks, algorithms, etc. Moreover, I have solid coding skills, as well as strong background in shell scripts and Linux programming. I developed a shared library injection tool and an ELF hook engine (droid_injectso) for Android’s native layer (The native layer of Android is basically a Linux environment), which gained popularity on ?GitHub.
Project title: Apport for Debian
Project details: Apport is a tool for detecting and reporting program crashes. In Debian, we would like to see Apport play flexible roles. In this project, we will improve its GUI, integrate it with Reportbug and Debian BST, and add offline support. Meanwhile, we will use smart ways to identify if candidate bug reports has been reported, fetch related reports and display them to users, aiming to make bug reporting and bug fixing more efficient and more user-friendly.
Based on project description and my preliminary investigations, as well as my discussion with the mentor, I have three concrete ideas.
1.1 Crash Signature
Apport is able to parse core dumps into crash files (with the .crash extension), which provide us rich information regarding each crash, including stack trace, process map, disassembly, and so on. Apport generates crash reports on the basis of crash files and uploads them to the server. However, both crash files and crash reports are not comparable. That means we cannot know the similarity between two reports, resulting in possible duplicate.
To address this, we can generate a signature from the crash file for each program crash. Here the signature should not contain any machine-dependent information, e.g., addresses in stacktrace. Such signatures are comparable, which enables us to determine how similar two reports are by comparing their signatures. One naive approach is to calculate the Levenshtein distance between two signatures. The smaller the distance is, the more related these two reports are.
We attach the signature to each crash report. When a crash happens, before we display all related reports to the user, we can first prioritize them and show the user most relevant ones. One of the the project goals is to integrate Apport with Debian bug reporting system (BST). To prevent crash report flooding we can leverage the crash signature to ensure that bugs/crashes that have been reported will not be reported again.
1.2 Offline Support
For Debian boxes that are completely isolated from network, we could use similar strategies to apt-offline. However, our goal is different from that of apt-offline.
apt-offline aims to copy data (the archive containing packages) to a machine that has no Internet access, while apport wants to send data (crash reports) out. We could let the user save bug reports to a removable medium. Once the removable media is connected to a box that has can access the Internet, reports will be uploaded.
For boxes behind a firewall, but in the same network there exist other machines that can access the Internet, we could let the user configure an “apport proxy”, through which crash related reports could be pulled in and new reports could be sent out. Potential security issues need to be considered because such proxy might be abused.
1.3 GUI Improvements
If desktop environment is available, Debian Apport interacts with users through a graphical user interface (GUI) to handle newly generated bug report. However, at this stage the GUI’s functionality is very limited.
- (1) The GUI can only show one report at a time. It is impossible for users to examine potentially related reports that have been recorded in Debian BST. (2) It does not allow users to export reports. (3) It just tells users that bugs cannot be reported due to the lack of debug symbols, but does not try to help users install them.
To address these limitations and improve Apport GUI’s usability, we should add more features.
- (1) Displaying related bug reports (adding a “Fetch Existing Reports” button). Apport pulls in all related bug reports, then displays them to the user. As mentioned before,Apport prioritizes downloaded reports and shows most similar ones first. This feature will better assist the user in addressing the bug, and ensure that the candidate bug report has not been report yet. (2) Exporting reports (adding a “Export Report” button). This allows the user to save bug reports in text form, which is extremely useful for Debian boxes that do not have Internet access. (3) Once Apport finds debug symbols are not available, it prompts up a dialog to ask the user’s permission for downloading and installing debug symbols automatically.
Synopsis: Apport has shown its capability in Ubuntu, but it is still in experimental stage in Debian. It is a good opportunity to improve Apport and make it a more meaningful tool for both Debian users and developers.
Benefits to Debian: Having an official Debian archive with Apport will help detect and report bugs/crashes. Integrating Apport with Debian BST will help Debian users address their problems quickly.
Deliverables: (1) Integration with Debian BST. (2) Fetch and display similar or related bug reports to users if Internet access is available. (3) Improved GUI written by PyQT. (4) Offline support that allows.
Project schedule:
Exams and other commitments: No
Other summer plans: I will be unavailable from July 24 to July 29, as I am gonna run San Francisco marathon and visit my friends there.
Why Debian?: As one of the most popular Linux distributions, Debian has profound influence to Linux and the open-source community. I have benefited so much from Debian so I would be very happy if I could contribute something valuable to it.