You are on page 1of 5

AUTOMOTIVE

The Analyzing Method of Root Causes for Software


Problems

Tomomi KATAOKA*, Ken FURUTO and Tatsuji MATSUMOTO

In this technical paper, the authors propose an analyzing method of the root causes for software problems. To prevent
the recurrence of the same problems, it is necessary to logically identify the root causes and take appropriate
measures. Therefore, the authors applied “the 5 whys analysis,” a technique that has been used mainly in the
manufacturing process, to the trouble shooting of software. First, the authors visualized the procedures of software
design by arranging documents illustrating work pieces made in each process to find out the procedures that involve
errors. Next, they prepared many “5 whys” samples related to software development, so that even inexperienced users
can be guided by referring to them. Consequently, the method effectively worked on the software development and
successfully shortened the lead time required for identifying errors and analyzing their causes.
Keywords: software, trouble, analyze method, 5 whys

1. Introduction peculiar to software development.


The first problem is a case in which 5 whys analysis re-
The quality of software needs to be secured through a sults are used only to track down the mechanism of causing
proper development process, and that development program bugs (Fig. 1 (a)). In example (a), an “error in the
process must be improved day to day based on the feed- initialization of the communication driver” is derived as the
back of problems that occurred in actual use. If a bug is factor responsible for the bug event “A specific frame is not
found in software, in particular, it is necessary to investigate transmitted.” However, this is merely the cause that mani-
the root cause of the bug in order to work out a proper fests the bug event. It leads us to a method for correcting
measure to prevent it from recurring(1),(2). the bug concerned but cannot reveal the factor of the
On the one hand, “5 whys analysis” is adopted as an process that caused the bug to exist in the software, making
analysis approach to identifying any and all root causes of it difficult to work out a proper measure to prevent the
problems(3) systematically. Forming part of total quality recurrence of the bug. In this context, the case shown in
management (TQM), this approach is well-known as an im- Fig. 1 (a) is not thoroughly analyzed.
provement method mainly used in the manufacturing in- The second problem is a case in which the analyzer
dustry(4). performs analysis relying on his/her preconception or im-
Our software development sections have also adopted pression. In the 5 whys analysis approach, it is important
the 5 whys analysis approach to analyze the causes of bugs. to sort out objects or events that should be examined and
However, there was no specific procedure applicable to grasp only facts in advance(3). In example in Fig. 1 (b), how-
software development, and analysis operations depended ever, this fact finding is subjective and vague in that the de-
on analyzers’ skills and capabilities. In addition, rework fre- sign engineer’s feelings and the considerations in the
quently occurred because of failure to obtain satisfactory review are mentioned although there is no positive proof
quality of analysis. As a result, it took time to analyze bugs, that can be considered to be a fact. If a problem occurs to
and the lead time from the occurrence of a bug to process manufacturing equipment in a plant, subjective facts re-
improvement tended to become long. garded as the causes of the problems can be collected from
We developed a procedure for identifying issues relat- the manufacturing equipment, materials, or the equip-
ing to the application of the 5 whys analysis approach to ment’s operation records. On the other hand, almost all
software development and conducting quality analysis in processes of software development are carried out by per-
an efficient manner. This is a report on the method. sonnel. Errors in processes are human mistakes in many
cases, and fact finding is likely to depend greatly on the
subjectivity of the personnel involved in the processes.
Facts should, therefore, be verified based on objective pos-
2. Issues in Applying the 5 Whys itive proof, such as design documents.
Analysis Approach The third and last problem is a case in which the in-
vestigation is not performed in depth although there are
To develop the procedure for analyzing root causes, sufficient opportunities to ask why because the downstream
we studied the trend of the past application of the 5 whys processes focus attention on the error in information input
analysis approach in our company. As a result, we identi- by the upstream process (Fig. 1 (c)). Certainly, in this case,
fied the problems in which analyzers were trapped in the process causing the error is identified by scrutinizing
applying the 5 whys analysis approach to software develop- the “operation processes” of personnel in charge and trac-
ment. We consequently discovered three major problems ing back “design documents,” or objective positive proof,

SEI TECHNICAL REVIEW · NUMBER 73 · OCTOBER 2011 · 81


from detailed design documents to basic design docu- [Solution 1] To deal with the first problem “insufficient
ments. However, as a result of focusing the “why” analysis process-related factor analysis,” we developed
step on the identification of the process in which the error a fact finding step that does not rely on “pro-
penetrated into the product, the indispensable root cause gram-related mechanism” investigation by
analysis for investigating “why” the wrong operation was separately performing it and “operation
carried out is not performed. The steps up to the identifi- process-related error” investigation (Fig. 3
cation of the process causing the operation error must be [Step 1])
completed before a full-scale “5 whys analysis” operation [Solution 2] To resolve the second problem “insufficient
for a deeper root cause analysis. collection of objective information,” we col-
lected positive proof that does not depend on
subjectivity by listing from registered docu-
<Bug event> <Why-1> <Why-2> <Why-3>
ments for the project all documents worked
A specific frame A mismatch between
Transmission An unintended out from the initial stage to the program cre-
processing to a interrupt permit
is not transmitted the transmission flag channel whose existed when the ation stage of the software development
under the and the transmission initialization was communication
condition. request bit occurred. not completed was driver was process and investigating which process de-
performed. initialized.
sign document contains an error.
(a) Example of analysis in which only the mechanism of causing
a bug is tracked down [Solution 3] To solve the third problem “insufficient
investigation into the root cause in the
<Bug event> <Why-1> <Why-2> <Why-3>
After reception The design engineer did Although the design process,” we identified the process in the V-
A communication not notice his/her engineer reviewed
check command was interrupted, shaped model software development process
misunderstanding of the the specification,
to the unit the reception specifications and he/she did not his/her
results in an error.
buffer was cleared implemented misunderstanding of in which the error was included in software
at 100 ms. unnecessary processing. the specifications.
by arranging the design documents collected
(b) Example of analysis in which the design engineer relies on
his/her preconception or impression as described in [Solution 2] in order of
processes and investigating to which process
<Bug event> <Why-1> <Why-2> <Why-3>
In the detailed
the design documents were correct and from
Software does In the coding The basic
not begin to run process, wrong specification, the specification which process the design documents con-
wrong port
under the was set as does not contain
condition. a port number.
number
any port number.
tained the error (Fig. 3 [Step 2]).
was specified.

(c) Example of analysis in which only an error in information input


by an upstream process is analyzed

Fig. 1. Examples of past application of 5 whys analysis


[Step 2] Process-related factor analysis

Software requirement analysis Causing factor process


Factor causing the
3. Development of Problem-Solving Policies Basic design bug to be included

Detailed design
To develop an intended procedure for analyzing root
causes when software bugs are found, we studied the Coding
< Side on which V-shaped Process in which Direction of analysis
problem-solving policies presented in Chapter 2. Our model is produced > the bug was included = Tracing back to
development process is a V-shaped model, and we made (Leaking side is omitted.) upstream processes

endeavors to contour the problem-solving policies to this Causing factor process


development process. The V-shaped model is a software Process +
Bug in which Root
development process approach. As shown in Fig. 2, this Step 1 Step 2 Factor Step 3
event the bug was cause
development approach is made up of a process for detailing included causing
the bug to
and implementing requirements, which flows from be included
upstream to downstream on the left side of the V, and a
Direction of analysis = Tracking down

process for verifying that the implemented results properly Causing factor process
Bug event Direction
function as required, which proceeds from downstream to Factor causing the of analysis =
upstream on the right side of the V. bug to be included In-depth
mechanism of occurrence

Behavior of vehicle investigation


Direct factor into factor
Behavior Process factor
of software
Management factor
Software requirement analysis Comprehensive software test Root cause
Process in which Organizational factor
the bug was included
Basic design Integration test
[Step 1] Investigation into [Step 3] 5 whys analysis
mechanism of occurring bug
Detailed design Unit test
Fig. 3. Image of ideal analysis flow
Coding

Fig. 2. V-shaped model and development process

82 · The Analyzing Method of Root Causes for Software Problems


We developed an approach that enables us to spend J1 J2 J3 Why1 Why2 Why3
more time on analyzing deeper factors behind the occur- Bug event Bug event Process in Factor causing
Direct Process
Behavior of Behavior of which the bug the bug to be
factor factor
rence of errors, including process rule-related factors, vehicle software was included included
management-related factors, and the culture of the organ- (On source code) Causing
factor
ization as shown in Fig. 3 [Step 3]. That effect is accom- process
plished by performing the analysis procedure steps
Fig. 5. 5 Whys Analysis Sheet (excerpted)
mechanically.

4-2 Fact finding along the development process of the V-


4. Development of a Procedure for Analyzing the shaped model
Root Cause When a Software Bug is Found In this section, we describe a procedure for accurately
grasping when the bug was included, narrowing down the
4-1 Flow of root cause analysis when a bug is found “causing factor processes,” and identifying the “factor caus-
According to the policies stated in Chapter 3, we de- ing the bug to be included.”
veloped a procedure for analyzing the root cause when a
bug is found. Root cause analysis takes place through Steps
1 to 3 below along the “ideal analysis flow” shown in Fig. 3. Step (2): Configuration Step (3): Fact/Problem
control information
(1) [Step 1] Analyzing the mechanism of occurrence Product configuration Record at the time

Causing factor
Fact/Problem
information of review

process
Track down the mechanism causing the bug event con- • Locating points of change Problem to
No Process • Folder name • Folder name
cerned and identify the location on the program where it name • File name • File name • Grasping facts ideal analysis
Software • Document No. • Document No.
is included. 1 requirement Step (4): Causing factor process
• Date of preparation • Date of
analysis
/update implementation
(2) [Step 2] Analyzing process-related factors Basic design document (Correct)
2 Basic • Person in charge • Form of review “When condition a = 0, load
design etc. • Review record B = OFF → ON.”
Trace the design documents along the development etc. Detailed design document (Error) Although ■
3 Detailed “When condition a = 0, set condition a should be 1, Occurred
process of the V-shaped model to make clear the possible design 1 at port B.” a was set at 0
On source code (Error) Although
processes in which the bug is included (causing factor 4 Implementation “When condition a = 1, set condition a should be 1,
1 at port B.”
B.”” a was set at 0.
processes) and details of the bug (factor causing the bug 5 Unit test Step (1): Transcribe from the results of
analysis of the mechanism of occurrence.
to be included). Combination test specification (Error) When condition a ■
6 Integration There is no test item relating = 0, there was no test item Flowed
test concerning B = OFF → ON.
(3) [Step 3] 5 whys analysis to condition a. out

7 Comprehensive
Investigate factors in depth, and derive the root cause of software test Step (6): To 5 whys analysis Step (5): Flowing out factor process

the inclusion of the bug.


To reflect the solutions presented in Chapter 3 in the steps Fig. 6. Fact Finding Sheet by V-shaped Model Process
shown above, we prepared Tools (1) to (3) shown in Fig. 4.
Each of the Tools is detailed below.

What is important in this procedure is to correctly in-


vestigate any and all facts. We prepared Tool (1) “Fact
(Detection of bug in software) Finding Sheet by V-shaped Model Process” shown in Fig. 6
to perform this investigation. This sheet arranges the
[Step 1] Investigation into names of development processes and investigation items
mechanism of occurring bug
<Solutions (analysis supporting tools)> in the form of a matrix, so that even inexperienced analyz-
[Step 2] Analyzing Tool (1) Fact Finding Sheet by ers can investigate all necessary items without a waste of
process-related factors V-shaped Model Process
time and efforts simply by filling in the columns step by
[Step 3] 5 whys analysis Tool (2) 5 Whys Analysis Sheet (form) step. The specific investigation procedure using the Fact
Finding Sheet by V-shaped Model Process is shown below.
Tool (3) Points of 5 Whys Analysis
(Planning of measure (1) Based on the investigation into the mechanism of bug
to prevent recurrence)
occurrence in [Step 1] in Fig. 4, enter the location
where the bug was included and details in the
Fig. 4. Procedure for analyzing the root cause
when a bug is found and solutions
Fact/Problem column for the coding process.
(2) By making reference to registered documents for the
project, prepare products of each process when the
bug concerned was included, and enter recorded in-
We prepared Tool (2) “5 Whys Analysis Sheet” shown formation at the time of a review.
in Fig. 5, which is intended to enable analyzers to perform (3) By making reference to the products collected in (2)
operations step by step according to a specified procedure. above and based on positive proof, check the details
This sheet contains entry columns corresponding to a se- of the bug entered in (1) and whether there are re-
ries of items that will be the outputs of individual steps. It lated facts and errors, and enter them in the Fact/
is also designed to prevent the skipping of steps and enable Problem column.
personnel other than the analyzer to objectively check (4) Trace the upstream processes one by one from the
analysis results by filling in these columns. process in which the bug entered in (1) was included
by making reference to the information entered in the

SEI TECHNICAL REVIEW · NUMBER 73 · OCTOBER 2011 · 83


Fact/Problem column. If the upstream processes up 4-3 Performing 5 whys analysis
to the preceding process are correct and there is an Next, perform 5 whys analysis using the 5 Whys Analy-
error in the present process, determine and identify sis Sheet shown in Fig. 5 with Why 1 of the causing and out-
the present process as the causing factor process. In flowing factor processes derived in 4-2 as the starting point.
the example shown in Fig. 6, the error “condition a = To derive the root cause, all factors must be investi-
0” is included in the “detailed design” process judging gated in depth in a regular, orderly manner. However, 5
from the information entered in the Fact/Problem whys analysis has been applied to limited cases in our soft-
column. However, since the preceding upstream ware development sections, and well-established know-how
“basic design” process is correct, the “detailed design” has not been available. There are pieces of general litera-
process is considered to be the causing factor process. ture describing know-how about 5 whys analysis, but many
(5) Basically, derive the outflowing factor process assum- of them address samples targeted at problems relating to
ing that the upstream process preceding the verifica- manufacturing equipment and are not of much help in an-
tion process (on the right side of the V) corresponding alyzing software bugs.
on the V-shaped model to the causing factor process To enable even inexperienced analyzers to conduct
is the outflowing factor process. In the example shown quality analysis, we compiled errors likely to occur in analy-
in Fig. 6, the upstream “Integration test” process pre- sis applied to software development into Tool (3) “Points
ceding the “unit test” process, which corresponds to of 5 whys Analysis” as shown in Table 1, with samples rep-
the “detailed design” process identified as the causing resenting experience in software added, by making refer-
factor process in (4), is considered to be the outflow- ence to “Ten Rules on the Performance of 5 Whys Analysis”
ing factor process. In the V-shaped model, this concept proposed in Literature (5).
is based on the principle that the bug should be de-
tected in the upstream process preceding the outflow-
ing (verification) process corresponding to the Table 1. Points of 5 whys analysis (example)
causing (detailed/implementation) process in which
Example in software development
the bug was included. We prepared the flow of No. Point
(×: bad example, °: good example)
processes and that of products shown in Fig. 7 so that
(×) The system design of the source project
even analyzers unfamiliar to this concept can identify contained the bug.
the error according to the procedure. They help de- → The factor causing the bug is unknown
rive the outflowing factor process from the causing fac- Analyze because it was included in the source
tor process. latent bugs in project in the process of its development.
the source (°) The system design of the source project
(6) Set the information entered in the “Problem to ideal B4
project from the contained the bug.
analysis” column in Why 1 of 5 whys analysis described viewpoint of the → Although necessary products were not
in the section that follows. present project. available at the time of the carry-over of
the system design of the source project,
difference verification was not conducted
when applying it to the present project.
Legend (×) The person in charge was poor in skill
: Process name (Enter the number of the Fact
Analyze the bug and could not perform in-depth analysis.
Finding Sheet by V-shaped Model Process as well.) from the view- (°) Behavior when the error occurred was
: Product name (representative one) point of the not thoroughly analyzed from the view-
: Flow of processes
B8
mechanism, not point of vehicle behavior.
: Flow of products as a personal (°) The person in charge was assigned as
matter. design leader although he/she did not
Software requirement Comprehensive software Comprehensive software receive necessary education.
analysis (No. 1) test design (No. 7) test (No. 7)
Software requirement Comprehensive software Comprehensive software
specification test specification test result report
Basic design (No. 2) Integration test design (No. 6) Integration test (No. 6)
Basic design document Integration test specification Integration test result report
5. Application to the Development Process and
Detailed design (No. 3) Unit test design (No. 5) Unit test (No. 5)
Detailed design document Unit test specification Unit test result report
the Effect of the Introduction of the Procedure

Coding (No. 4) In July 2010, the analysis procedure described in Chap-


Program
ter 4 was finally adopted as a standard rule of the mass pro-
Fig. 7. Flows of processes and products of V-shaped model duction development department after trial application.
Under the guidance and supervision of the software
quality assurance (SQA) department, personnel in charge
of respective development projects began to apply the pro-
With the procedure we have described thus far, you cedure to analyze bugs.
can standardize specific operations in the process in which According to data on software quality activities com-
bugs are included, which have not been subjected to in- piled by the SQA department at the end of the business
depth fact finding and have relied on analyzers’ intuition, year 2010, the lead time from the occurrence of a bug to
and objectively judge analysis results with the aid of positive the completion of root cause analysis was reduced by 40%
proof. from the 2009 level. The total lead time from the occur-
rence of a bug to process improvement was shortened to

84 · The Analyzing Method of Root Causes for Software Problems


approximately one-third of the 2009 level, and measures 6. Conclusion
to prevent the recurrence of problems could be finalized
in a shorter period of time. This paper described the 5 whys analysis procedure we
To analyze the contribution of each approach de- developed for the purpose of efficiently conducting
scribed herein to software quality improvement, we con- process improvement activities for automotive software that
ducted a questionnaire survey to the SQA department and is required to offer a high level of quality, as well as the
rated the Tool (1) “Fact Finding Sheet by V-shaped Model effect of its introduction.
Process,” Tool (2) “5 Whys Analysis Sheet,” and Tool (3) We consider that our developed procedure is applica-
“Points of 5 Whys Analysis” in terms of “reduction in lead ble not only to automotive software development adopting
time” and “improvement in analysis quality.” The results of the V-shaped model but also widely to analysis of the root
the survey are shown in Fig. 8. We also discussed the effect causes of problems that occur in the development process.
of the introduction of the procedure, as well as the results There is still plenty of room for improvement in analysis
of hearings from the SQA department separately held. The quality. To further improve analysis quality, we are deter-
results of the discussion are described below. mined to promote the use of the tools for education and
“(1) Fact Finding Sheet by V-shaped Model Process” the accumulation and use of analysis cases peculiar to our
used for “analyzing process-related factors” in [Step 2] in development process and intended products as know-how
4-1 helps identify the process in which a bug was included for 5 whys analysis.
based on objective fact verification. This proves that the
Fact Finding Sheet enables analyzers to accurately grasp
facts and is also effective in improving analysis quality and
reducing the lead time (score: 3.4 points in both items). References
In addition, we received the following comment: “Al- (1) Software Engineering Research Center: “Key Practice of Capability
though we have to take time to complete the Fact Finding Maturity Model, Ver. 1.1,” CMU/SEI-93-TR-25, Carnegie Mellon
Sheet, reanalysis due to insufficient fact verification can be University (1993).
reduced and, as a result, it helps reduce the lead time.” (2) Satoshi Terakubo et al., “Construction of CMM Level 3 Software
Development Process for Automotive ECUs,” SEI Technical Review
This indicates that the improved quality of fact finding
No. 166, pp. 45-50.
makes a contribution to activities to promote measures
(3) Hitoshi Ogura: ‘Introduction to Thorough Use of 5 Whys Analysis –
against the sources of problems. Workshop Improvement Beginning from “Why?”’ JIPM Solution
However, we could not determine whether “(2) 5 (1997).
Whys Analysis Sheet” and “(3) Points of 5 Whys Analysis” (4) Isao Hayakawa et al., Software Quality Symposium 2008, ‘Applying
used in “5 whys analysis” in [Step 3] in 4-1 are effective in “ask why five times” method on software development,’ pp. 185-194.
improving analysis quality at present although the former (5) Hitoshi Ogura: “Make Full Use of 5 Whys Analysis! Complete Drill
has some effect of reducing the lead time. This is probably for Capturing 5 Whys Analysis,” JIPM Solution (2002).
because analyzers’ experience and familiarity with 5 whys
analysis greatly affect 5 whys analysis quality. For this rea- * CMM is a registered trademark of Carnegie Mellon University.
son, we consider it important to make good use of Tool (3)
as an educational material and collect and organize past
cases and further accumulate and utilize analysis know-how
tailored to our software development.
Contributors (The lead author is indicated by an asterisk (*).)

T. KATAOKA*
Effectiveness (reduction in lead time) 0 1 2 3 4
Bad Good • Software Development Center, AutoNet-
(1) Fact Finding Sheet by V-shaped Model Process
-Used for [analyzing process-related factors] 3.4 works Technologies, Ltd.
(2) 5 Whys Analysis Sheet Engaged in the development of in-vehicle
-Used for [5 whys analysis] 3.0
(3) Points of 5 Whys Analysis
2.0
software and establishment of its R&D
- Used for [5 whys analysis]

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0


environment.

Effectiveness (improvement in analysis quality)


Bad
0 1 2 3 4
Good
K. FURUTO
(1) Fact Finding Sheet by V-shaped Model Process • Manager, Software Development Center, AutoNetworks
-Used for [analyzing process-related factors] 3.4
(2) 5 Whys Analysis Sheet
2.6
Technologies, Ltd.
-Used for [5 whys analysis]
(3) Points of 5 Whys Analysis
-Used for [5 whys analysis] 1.8
T. MATSUMOTO
0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0
• General Manager, Software Development Center,
[Surveyed personnel] SQA selected members from the mass production AutoNetworks Technologies, Ltd.
development department
[Survey method] Selective method
[Period of survey] March 15 to 17, 2011
[Number of respondents] 5
[Counting method] The average points of the answers from the respondents are
calculated based on the following points:
4 points: very good, 3 points: good, 2 points: average, 1 point: not so good, 0 points: bad

Fig. 8. Results of questionnaire to the SQA department

SEI TECHNICAL REVIEW · NUMBER 73 · OCTOBER 2011 · 85

You might also like