troubleshooting and debugging techniques week 3
Practice Quiz: Why Programs Crash
1. When using Event Viewer on a Windows system, what is the best way to quickly access specific types of logs?
- Export logs
- Create a custom view
- Click on System Reports
- Run the head command
2. An employee runs an application on a shared office computer, and it crashes. This does not happen to other users on the same computer. After reviewing the application logs, you find that the employee didn’t have access to the application. What log error helped you reach this conclusion?
- “No such file or directory”
- “Connection refused”
- “Permission denied”
- “Application terminated”
3. What tool can we use to check the health of our RAM?
- Event Viewer
- S.M.A.R.T. tools
- memtest86
- Process Monitor
4. You've just finished helping a user work around an issue in an application. What important but easy-to-forget step should we remember to do next?
- Fix the code
- Report the bug to the developers
- Reinstall the program
- Change the user’s password
5. A user is experiencing strange behavior from their computer. It is running slow and lagging, and having momentary freeze-ups that it does not usually have. The problem seems to be system-wide and not restricted to a particular application. What is the first thing to ask the user as to whether they have tried it?
- Adding more RAM
- Reinstalling Windows
- Identified the bottleneck with a resource monitor
- Upgrade their HDD to an SSD
6. Which of the following will let code run until a certain line of code is executed?
- Breakpoints
- Watchpoints
- Backtrace
- Pointers
7. Which of the following is NOT likely to cause a segmentation fault?
- Wild pointers
- Reading past the end of an array
- Stack overflow
- RAM replacement
8. A common error worth keeping in mind happens often when iterating through arrays or other collections, and is often fixed by changing the less than or equal sign in our for loop to be a strictly less than sign. What is this common error known as?
- Segmentation fault
- backtrace
- The No such file or directory error
- Off-by-one error
9. A very common method of debugging is to add print statements to our code that display information, such as contents of variables, custom error statements, or return values of functions. What is this type of debugging called?
- Backtracking
- Log review
- Printf debugging
- Assertion debugging
10. When a process crashes, the operating system may generate a file containing information about the state of the process in memory to help the developer debug the program later. What are these files called?
- Log files
- Core files
- Metadata file
- Cache file
11. Which of the following would be effective in resolving a large issue if it happens again in the future?
- Incident controller
- Postmortem
- Rollbacks
- Load balancers
12. During peak hours, users have reported issues connecting to a website. The website is hosted by two load balancing servers in the cloud and are connected to an external SQL database. Logs on both servers show an increase in CPU and RAM usage. What may be the most effective way to resolve this issue with a complex set of servers?
- Use threading in the program
- Cache data in memory
- Automate deployment of additional servers
- Optimize the database
13. It has become increasingly common to use cloud services and virtualization. Which kind of fix, in particular, does virtual cloud deployment speed up and simplify?
- Deployment of new servers
- Application code fixes
- Log reviewing
- Postmortems
14. What should we include in our postmortem? (Check all that apply)
- Root cause of the issue
- How we diagnosed the problem
- How we fixed the problem
- Who caused the problem
15. In general, what is the goal of a postmortem? (Check all that apply)
- To identify who is at fault
- To allow prevention in the future
- To allow speedy remediation of similar issues in the future
- To analyze all system bugs