Open-source Versus Commercial Software: A Quantitative Comparison



Similar documents
Scoping (Readings 7.1,7.4,7.6) Parameter passing methods (7.5) Building symbol tables (7.6)

Lecture 10: Dynamic Memory Allocation 1: Into the jaws of malloc()

Static Analysis. Find the Bug! : Analysis of Software Artifacts. Jonathan Aldrich. disable interrupts. ERROR: returning with interrupts disabled

Oracle Solaris Studio Code Analyzer

Software Reliability Estimation Based on Static Error Detection

Applying Clang Static Analyzer to Linux Kernel

GDB Tutorial. A Walkthrough with Examples. CMSC Spring Last modified March 22, GDB Tutorial

Introduction to Static Analysis for Assurance

Two case studies of Open Source Software Development: Apache and Mozilla

Technical paper review. Program visualization and explanation for novice C programmers by Matthew Heinsen Egan and Chris McDonald.

How Safe does my Code Need to be? Shawn A. Prestridge, Senior Field Applications Engineer

Fundamentals of Measurements

Kernel Intrusion Detection System

Transparent Monitoring of a Process Self in a Virtual Environment

No no-argument constructor. No default constructor found

Detecting Critical Defects on the Developer s Desktop

Not agree with bug 3, precision actually was. 8,5 not set in the code. Not agree with bug 3, precision actually was

Operating Systems Design 16. Networking: Sockets

Software Engineering Concepts: Testing. Pointers & Dynamic Allocation. CS 311 Data Structures and Algorithms Lecture Slides Monday, September 14, 2009

Stack Allocation. Run-Time Data Structures. Static Structures

Client-server Sockets

Gold Standard Method for Benchmarking C Source Code Static Analysis Tools

Static Code Analysis Procedures in the Development Cycle

An Introduction to. Metrics. used during. Software Development

Frysk The Systems Monitoring and Debugging Tool. Andrew Cagney

Software Engineering Techniques

The Advantages of Dan Grossman CSE303 Spring 2005, Lecture 25

Lecture 11 Doubly Linked Lists & Array of Linked Lists. Doubly Linked Lists

Effective Software Verification for Medical Devices

A Dozen Years of Shellphish From DEFCON to the Cyber Grand Challenge

The V8 JavaScript Engine

Source Code Security Analysis Tool Functional Specification Version 1.0

Software Testing & Analysis (F22ST3): Static Analysis Techniques 2. Andrew Ireland

Secure Programming with Static Analysis. Jacob West

Abstract Data Type. EECS 281: Data Structures and Algorithms. The Foundation: Data Structures and Abstract Data Types

The FDA Forensics Lab, New Tools and Capabilities

Software Engineering Compiled By: Roshani Ghimire Page 1

COVERITY SCAN: 2013 OPEN SOURCE REPORT. Coverity Scan: 2013 Open Source Report

Fully Automated Static Analysis of Fedora Packages

Software testing. Objectives

Linux Kernel. Security Report

Measuring Software Complexity to Target Risky Modules in Autonomous Vehicle Systems

Development Testing for Agile Environments

Coverity Scan. Big Data Spotlight

Introduction to Software Engineering. 8. Software Quality

Java Monitoring. Stuff You Can Get For Free (And Stuff You Can t) Paul Jasek Sales Engineer

A Test Suite for Basic CWE Effectiveness. Paul E. Black.

How To Install Linux Titan

Monitoring, Tracing, Debugging (Under Construction)

The C Programming Language course syllabus associate level

Memory Debugging with TotalView on AIX and Linux/Power

Verification and Validation of Software Components and Component Based Software Systems

CPSC 330 Software Engineering

LINKED DATA STRUCTURES

Quiz 4 Solutions EECS 211: FUNDAMENTALS OF COMPUTER PROGRAMMING II. 1 Q u i z 4 S o l u t i o n s

TOOL EVALUATION REPORT: FORTIFY

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Operating System Engineering: Fall 2005

General Introduction

Security types to the rescue

Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6

Software Engineering Introduction & Background. Complaints. General Problems. Department of Computer Science Kent State University

Jonathan Worthington Scarborough Linux User Group

Darshan Institute of Engineering & Technology Unit : 7

Upping the game. Improving your software development process

Semantic Analysis: Types and Type Checking

Common Errors in C/C++ Code and Static Analysis

A static analyzer for finding dynamic programming errors

Molecular Dynamics Simulations with Applications in Soft Matter Handout 7 Memory Diagram of a Struct

Smooks Dev Tools Reference Guide. Version: GA

APPROACHES TO SOFTWARE TESTING PROGRAM VERIFICATION AND VALIDATION

Gold Standard Benchmark for Static Source Code Analyzers

Software security specification and verification

Coding Rules. Encoding the type of a function into the name (so-called Hungarian notation) is forbidden - it only confuses the programmer.

Source Code Review Using Static Analysis Tools

How To Improve Your Software

Test-driving static analysis tools in search of C code vulnerabilities

SOFTWARE QUALITY IN 2002: A SURVEY OF THE STATE OF THE ART

How to Write a Checker in 24 Hours

Application-Level Debugging and Profiling: Gaps in the Tool Ecosystem. Dr Rosemary Francis, Ellexus

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur

Unit 11: Software Metrics

Telelogic White Paper. Strategic QA. Steps to Effective Software Quality Assurance. Dominic Tavassoli, Telelogic 1.0. July 2007

Know or Go Practical Quest for Reliable Software

Continuous System Integration of Distributed Real-time and Embedded Systems

DHCP and DNS Protocols

Satisfying ASIL Requirements with Parasoft C++test Achieving Functional Safety in the Automotive Industry

System Security Fundamentals

Chap 1. Software Quality Management

Data Structure with C

ISTQB Certified Tester. Foundation Level. Sample Exam 1

Tomcat Tuning. Mark Thomas April 2009

Apache Tomcat. Load-balancing and Clustering. Mark Thomas, 20 November Pivotal Software, Inc. All rights reserved.

(Refer Slide Time: 01:52)

How Comcast Built An Open Source Content Delivery Network National Engineering & Technical Operations

Useful Automated Software Testing Metrics

recursion, O(n), linked lists 6/14

Outline. 1 Denitions. 2 Principles. 4 Implementation and Evaluation. 5 Debugging. 6 References

Clustering with Tomcat. Introduction. O'Reilly Network: Clustering with Tomcat. by Shyam Kumar Doddavula 07/17/2002

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur

Web development... the server side (of the force)

Transcription:

Open-source Versus Commercial Software: A Quantitative Comparison Rix Groenboom Reasoning NL BV rix.groenboom@reasoning.com

Agenda About Reasoning The Study Inspection Results Analysis Conclusions New results Input for Discussion April 2003 - Reasoning, Inc 2

About Reasoning Reasoning provides an automated inspection service for organizations that develop software Enables building better software in less time and at lower cost Support C, C++, and Java Have inspected over 1B LOC April 2003 - Reasoning, Inc 3

The Study First, some background: Proponents of Open-Source software have long claimed their code is of higher quality Power of peer review Root cause analysis on site enables easier fix Commercial software vendors have long claimed their code is of higher quality Market focused Defined processes for development and testing April 2003 - Reasoning, Inc 4

The Study Why do the study? Our customers wanted to understand the real differences between Open-Source software and Commercial software Reasoning is uniquely positioned to provide this information When was the study performed? Open-source inspection = December 2002 Commercial inspections = Throughout 2002 April 2003 - Reasoning, Inc 5

Used Software Inspection AKA Peer Review Implicit in Extreme Programming Examination of source code to: Detect defects Trace code to requirements Check coding standards April 2003 - Reasoning, Inc 6

Value of Inspections Increased Reliability, Reduced Cost and Time-to-Market Without ASI Software Development Lifecycle Design Code Code Integrate Integrate Test $$$ With ASI Automated Inspections Savings April 2003 - Reasoning, Inc 7

Types of Defects Searched for NULL Pointer Dereference Out of Bounds Array Access Memory Leak Uninitialized Variable Bad Deallocation Using an Automated Software Inspection (ASI) methodology. April 2003 - Reasoning, Inc 8

Architecture ASI Technology Source Code Language Parser Computation Analysis Graph (CAG) Builder Summarize CAGs by Function & Level Detection Rules Symbolic Evaluation Using Value Lattices Potential Violations Reports Defect Review Potential Defects Feasible Path Analysis April 2003 - Reasoning, Inc 9

Project Scope Open Source implementation of TCP/IP in version 2.4.19 of Linux Kernel Five commercial implementations of TCP/IP in commercial, general purpose operating systems and telecommunications equipment Why TCP/IP? Well-defined set of published requirements Implementations have been in existence for several years Publicly available conformance tests April 2003 - Reasoning, Inc 10

Can You Spot the Defect? static int sock_fasync(int fd, struct file *filp, int on) { struct fasync_struct *fa, *fna=null, **prev; struct socket *sock; struct sock *sk; If this is true if (on) {.. this memory leaks fna=(struct fasync_struct *)kmalloc(sizeof(struct fasync_struct), GFP_KERNEL); if(fna==null) return -ENOMEM; } sock = socki_lookup(filp->f_dentry->d_inode); if ((sk=sock->sk) == NULL) return -EINVAL;.. and this true April 2003 - Reasoning, Inc 11

DEFECT CLASS: Memory Leak LOCATION: src\linux-2.4.19\net\socket.c : 750 Actual Report DESCRIPTION Local variable fna, declared on line 735, is assigned a pointer to a block of memory allocated by kmalloc on line 741. No other pointer refers to this memory block, so it is inaccessible (still allocated, but unreachable) once fna goes out of scope after line 750. PRECONDITIONS The conditional expression (on) on line 739 evaluates to true AND The conditional expression (fna==null) on line 742 evaluates to false AND The conditional expression ((sk=sock->sk) == NULL) on line 749 evaluates to true. CODE FRAGMENT 733 static int sock_fasync(int fd, struct file *filp, int on) 734 { 735 st ruct f async_st ruc t *f a, *f na=null, **pre v; 736 st r uct socke t *s ock; 737 st r uct sock *s k; 738 739 i f ( on) 740 { 741 fna=(struct fasync_struct *)kmalloc(sizeof(struct fasync_stru GF P_ KERNEL) ; 742 i f ( f na==null) 743 return -ENOMEM; 744 } 745 746 747 sock = socki _l ookup( f i l p- >f _dent r y- >d_i node) ; 748 749 i f ( ( sk=s ock- >s k) == NULL) 750 re t urn - EI NVAL; 751 752 l ock_sock( sk) ; 753 754 pr ev=&( sock- >f as ync _l i st ) ; 755 756 for (fa=*prev; fa!=null; prev=&fa->fa_next, fa=*prev) 757 i f ( f a- >f a_f i l e==f i l p) 758 br ea k; 759 760 i f ( on) April 2003 - Reasoning, Inc 12

Defect Overview Memory Leak Null Pointer Dereference Bad Deallocation Out of Bounds Array Access Uninitialized Variable Totals Total Defects in 5 Commercial Implementations 43 128 0 9 132 312 Total Defects in Linux Kernel 1 3 0 3 1 8 April 2003 - Reasoning, Inc 13

Feedback Linux Developer On OOB access: Nope, not wrong, the table is indexed off-by-one. If you were right, rtnetlink would simply not work. On NPD: In the cases where SKB is NULL, opt is never NULL, check the two callers. On ML: Fixed in the subsequent release. April 2003 - Reasoning, Inc 14

Feedback Commercial Developer For the Linux community to just shrug these off with "well the kernel works so it must be ok" doesn't really cut it. I think the NULL dereference checks should be added, and definitely the out of bounds array checking [..] For example, the out of bounds array reference could start causing a problem by just rearranging the order variables are declared. April 2003 - Reasoning, Inc 15

Fix Rates Reported Repaired % Commercial Implementations 312 235 75.3 Linux Kernel 2.4.19 8 1 12.5 April 2003 - Reasoning, Inc 16

Metrics Comparison D e fe c t D e n s ity Comparison Defects per KLSC 1.20 1.00 0.80 0.60 0.40 0.20 W ors tt h ird M iddle Third B est Third 0.00 Industry Average Linux Kernel 2.4.19 C om m ercial TC P /IP Linux stack: 0.10 Commercial stack: 0.55 April 2003 - Reasoning, Inc 17

Preliminary Hypothesis Number of Defects? Commercial TCP/IP Peer Review Linux 2.4.19 TCP/IP More Research Needed Time Initial defect densities of Open Source vs. Commercial? Defect removal rates of Open Source projects April 2003 - Reasoning, Inc 18

Conclusions Open-source is not inherently worse More research is required Code inspections still find critical defects in extremely well tested software April 2003 - Reasoning, Inc 19

New results Apache test Httpd 2.1-dev (development version 01/31/03) Will determine, track, and report on defect density through lifecycle Results on www.reasoning.com Java implementation Tomcat Jakarta Results on www.reasoning.com (soon) What else would you like to see? April 2003 - Reasoning, Inc 20

New results Apache implementation Httpd 2.1-dev (development version from 01/31/03) 31 Defects in 59 KLOC; density 0.53 Normal defect density; non typical defect distribution April 2003 - Reasoning, Inc 21

New results Java inspections: Out of Bounds Array Access NULL pointer dereferences String Comparison Jakarta Tomcat 4.1.24: 11 Defects in 71 KLOC; density 0.15 (Java average commercial software is 0.16). Wait for feedback from the community Next inspection will include resource leaks April 2003 - Reasoning, Inc 22

Towards discussion OK, nice hobby horse for Reasoning and others for research on test efficiency: See SPIder News for a Stanford study on Linux Les Hatton has compared Linux and CMM level Ownership: Who finds the bugs? Who fixes the bugs? Open source: Will commercial end-user will actually make changes to the source? Who will actually review the source (e.g. for quality of the algorithms / security)? April 2003 - Reasoning, Inc 23

Discussion!!! April 2003 - Reasoning, Inc 24