• About Jakob Engblom and this blog
Observations from Uppsala Computer Simulation, Virtual Platforms, Embedded Programming, Multicore and More (by Jakob Engblom)

S4D 2010 Part 2

2010 September 19 21:10 / 4 Comments / Jakob

My previous post on S4D did omit some of my notes from the conference. In particular, the very entertaining and serious keynote of Barry Lock from Lauterbach and some more philosophical observations on the nature of debugging.

Barry Lock

Barry lock gave a very entertaining keynote, from his viewpoint as essentially the champion of physical hardware debug. Lauterbach is clearly focused on debugging using hardware assists in real systems, with not much to do with high-level programming or virtual platforms. Barry has been working with computers longer than I have lived, and have seen both the semiconductor and software side of things.

His main message was that you have to take debuggability into account when buying chips for your embedded project. Saving a few cents by buying a chip with no or limited debug features will come back to haunt you, many times, in many nightmares. He had had grown men crying over the phone, asking for a miracle to save their projects after debugging had utterly failed for many months. He had seen startup companies go under, burning all their money chasing the last bug… and claimed that 75% of all product starts never got to market, blaming debug problems for a large proportion of that.

The most important debug feature is trace - which follows the theme of this being the S4D of trace. After trace, you want hardware breakpoints. Apparently, you need at least two to breakpoints to debug a system with a virtual memory RTOS. One to keep a look at the MMU, and one to actually debug code. More are better, but it is rare to see silicon vendors include many more breakpoints.

Barry gave  a number of examples of projects which had failed by not buying the right hardware. He put the blame both on the buyers chasing a few cents of costs in the end product, but also on the poor quality of silicon salespeople who rather took the price route than the quality route when selling chips.

He also noted that there seemed to be a positive correlation between industry leaders and buying debuggable hardware. Companies like Bosch, Ericsson, and Nokia always spend the extra money to get hardware that can be debugged, and have results to show for it.

Philosophy of Debug

During our two panel discussions on debug, there were two ways to look at debugging that stood out from the crowd.

The first was the observation that debugging today is very much a craft. When things go really bad, you go to the proven expert. Debugging is a craft you learn by apprenticeship with a master, and master debuggers are incredibly valuable for their organizations. This reliance on masters indicate that general programming education to a large extent overlooks debugging as a crucial skill for programmers. It also means that, in the words of one member of the audience, debug cannot scale. As problems become more complex, we still rely on single individuals, which reduces our ability to tackle problems.

The second observation was to liken debugging to the diagnosis of human diseases. As systems become more complex, their behavior gets so complicated and rich that it is hard to even precisely identify what a bug is. A simple crash or illegal operation is clear-cut – but when results of programs are just a bit off? When control loops don’t quite do the right thing, but almost? When the quality of a picture of a television just feels wrong? In those cases, we might be looking at composite measurements of many different parameters and factors in a system, and making a diagnosis of error based on the whole picture rather than each factor in isolation.

Based on these observations, I can envision a somewhat weird future where we train computer doctors (as in medical doctor, not PhD)  to diagnose computer problems based on holistic, systematic, approaches. Such education could be separate from the training of programmers and testers, as their specialty would be the diagnosis of system outputs against the expected outcomes at a high level, rather than the details of code.

Tweet
Posted in: EDA, embedded, embedded software, embedded systeme, programming / Tagged: Barry Lock, debugging, Lauterbach, S4D

4 Thoughts on “S4D 2010 Part 2”

  1. Pingback: Observations from Uppsala » S4D 2010

  2. Joachim Strömbergson on 2010 September 23 at 13:43 said:

    Aloha!

    The “debugging is a craft” notion is very interesting. How should one design an academic or trade course to move this from a “hand down from master to apprentice” approach to efficient education? The areas of SW- and system testing/verification have evolved rapidly the last few years with lots of good tools, methodologies etc generated. How can the same be achieved for debugging. Turn the black magic of debugging inte efficient engineering.

    I haven’t got the answers (but some ideas), but think it would be well worth discussion and pursuing. Esp by companies like yours. ;-)

  3. Tennessee Carmel-Veilleux on 2010 September 27 at 18:21 said:

    Joachim Strömbergson :Aloha!
    The “debugging is a craft” notion is very interesting. How should one design an academic or trade course to move this from a “hand down from master to apprentice” approach to efficient education? The areas of SW- and system testing/verification have evolved rapidly the last few years with lots of good tools, methodologies etc generated. How can the same be achieved for debugging. Turn the black magic of debugging inte efficient engineering.

    I think a good starting point would be to actually start introducing debugging in technology and engineering programs dealing with software !

    Debugging is most often seen as something you learn in the field, through practice. However, if you haven’t had the time and opportunity to learn the tools and methods in the controlled setting of mentored schooling, learning them on the job might not be automatic. This is especially true given the current state of things where debugging is seen as black magic in the software industry.

    Debugging is about validating invariants: you think your program state should be a certain way, or the outcome a certain result, but you must validate throughout the execution that your assumptions are true. Good methodology, sound logic and the use of a source level debugger allow one to do this in a straightforward iterative process, when test cases are present. Although these skills don’t come naturally, they can (and must) be taught and practiced.

    I think debugging is hardly black magic, but rather a blind spot: a lot of practitioners in the software (and hardware) industries only know a fraction of what they must know to debug efficaciously.

    I strongly suggest the reading of “The Art of Debugging (with GDB, DDD and Eclipse)” by Norman Matloff and Peter Jay Salzman, No Starch Press 2008 (http://nostarch.com/debugging.htm).

    That book is a good proof that debugging is far from a complex skill to master. All that is required is methodology, practice and knowledge of the tools.

    Surely, there are some issues, like those Jakob’s colleagues raised, that are beyond what can be done straightforwardly. However, a lot could be done with little effort (think about the 80-20 rule) to raise the level of debugging proficiency of new graduates, which would help, in time, tackle the more complex problems with a larger pool of competent people.

    The starting point is to actually teach it as a skill that is equally important to that of synthesizing the coded solution to a problem.

  4. Joachim Strömbergson on 2010 September 28 at 07:09 said:

    I think a good starting point would be to actually start introducing debugging in technology and engineering programs dealing with software !

    I think debugging is hardly black magic, but rather a blind spot: a lot of practitioners in the software (and hardware) industries only know a fraction of what they must know to debug efficaciously.

    I strongly suggest the reading of “The Art of Debugging (with GDB, DDD and Eclipse)” by Norman Matloff and Peter Jay Salzman, No Starch Press 2008 (http://nostarch.com/debugging.htm).

    I couldn’t agree more, and that book would be a good starting point for a academic course – with some well structured labs for hands on experience. But I would also like to bring in tools like Fuzzers to teach how to provoke invariants.

    I’ve been somewhat involved in developing book and course that tries to teach how to work in real SW-projects. That is, where you have existing legacy code that needs to be debugged, extended, modified etc. Most academic SW courses seem to assume a green field, but in reality that is rarely the case. There ar mountains of (crappy) code in which your new code should interwork. And your code will become someone elses (crappy) code to deal with.

    I believe that learning this fact, and the methodologies and tools to work in such a setting would make new SW designers (and HW designers too, in this case there is NO difference) much better equipped and do a better job.

    Debugging skillz (and esp methodologies) would fit very nicely into this.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation

← Previous Post
Next Post →

Recent Posts

  • Military Science Fiction – The Books Blur Together
  • Wind River Blog: Starting & Configuring Simics
  • Wind River Blog:
  • Nudge Theory and Graphical User Interfaces
  • Wind River Blog: Collaborating with Recording Checkpoints
  • Wind River Blog: Simics 4.8 is Here
  • A Few Electrons too Many
  • Wind River Blog: Visuality NQ CIFS Server on Simics
  • Everything in the Cloud?
  • Wind River Blog: TCF and Simics
  • Off-Topic: Moving Bad Piggies Save Games
  • Two Cores, Four Cores, Eight Cores – Mobile Variety
  • Bliss: Failing to Pivot for Ideology
  • Wind River Blog and Movie: Demo of Simics Debugging
  • Simulation vs Reality in Schlock Mercenary

Categories

  • appearances (30)
  • articles (21)
  • blogging (10)
  • books (7)
  • business issues (31)
  • computer architecture (35)
  • conferences (34)
  • EDA (50)
    • ESL (35)
  • embedded (78)
    • embedded software (57)
    • embedded systeme (50)
  • general research (6)
  • history (32)
    • general history (7)
    • history of computing (26)
  • off-topic (94)
    • biking (5)
    • board games (1)
    • computer games (3)
    • desktop software (35)
    • food and drink (1)
    • funny (12)
    • gadgets (24)
    • Politics (3)
    • popular culture (5)
    • trains (5)
    • transportation (10)
    • travel (10)
    • websites (3)
  • parallel computing (92)
    • multicore computer architecture (51)
    • multicore debug (22)
    • multicore software (65)
  • programming (109)
  • review (8)
  • security (19)
  • teaching (7)
  • testing (9)
  • uncategorized (12)
  • virtual things (131)
    • computer simulation technology (68)
    • virtual machines (18)
    • virtual platforms (99)
    • virtualization (14)
  • Wind River Blog (43)

Tags

ARM blog commentary Cadence Checkpointing clock-cycle models Communications of the ACM computer architecture conference cycle accuracy debugging Domain-specific languages eclipse embedded freescale G900 heterogeneous homogeneous IBM Intel iPod lego linux mobile phones multicore off-topic office 2007 operating systems p4080 podcast commentary power architecture rant research reverse debugging reverse execution S4D SiCS Multicore days Simics simulation software tools Sun SystemC video virtualization Vista Windows

1

  • F-Secure Blog

Blogs and news

  • Andras Vajda's blog (on multicore)
  • Embedded in Academia (John Regehr)
  • Grant Martin
  • Jack Ganssle
  • My Wind River Blog
  • Security Now podcast
  • Secworks (Joachim Strömbergson)
  • Simon Kågström
  • Synopsys View from the Top
  • Worse Than Failure

Archives

  • June 2013 (3)
  • May 2013 (4)
  • April 2013 (1)
  • March 2013 (4)
  • February 2013 (1)
  • January 2013 (3)
  • December 2012 (2)
  • November 2012 (2)
  • October 2012 (1)
  • September 2012 (6)
  • August 2012 (4)
  • July 2012 (4)
  • June 2012 (3)
  • May 2012 (4)
  • April 2012 (2)
  • March 2012 (3)
  • February 2012 (1)
  • January 2012 (6)
  • December 2011 (2)
  • November 2011 (3)
  • October 2011 (4)
  • September 2011 (5)
  • August 2011 (4)
  • July 2011 (3)
  • June 2011 (4)
  • May 2011 (7)
  • April 2011 (1)
  • March 2011 (3)
  • February 2011 (5)
  • January 2011 (1)
  • December 2010 (4)
  • November 2010 (3)
  • October 2010 (5)
  • September 2010 (5)
  • August 2010 (5)
  • July 2010 (6)
  • June 2010 (5)
  • May 2010 (3)
  • April 2010 (4)
  • March 2010 (3)
  • February 2010 (4)
  • January 2010 (7)
  • December 2009 (6)
  • November 2009 (6)
  • October 2009 (7)
  • September 2009 (6)
  • August 2009 (7)
  • July 2009 (11)
  • June 2009 (5)
  • May 2009 (10)
  • April 2009 (7)
  • March 2009 (8)
  • February 2009 (9)
  • January 2009 (12)
  • December 2008 (8)
  • November 2008 (9)
  • October 2008 (9)
  • September 2008 (10)
  • August 2008 (13)
  • July 2008 (12)
  • June 2008 (8)
  • May 2008 (9)
  • April 2008 (10)
  • March 2008 (7)
  • February 2008 (8)
  • January 2008 (5)
  • December 2007 (5)
  • November 2007 (7)
  • October 2007 (7)
  • September 2007 (12)
  • August 2007 (9)
  • July 2007 (2)
© Copyright 2013 - Observations from Uppsala
Infinity Theme by DesignCoral / WordPress