Condividi tramite


Wait, that was MY bug? Ouch!

Over the weekend, the wires were full with reports of a speech recognition demo at the Microsoft's Financial Analysts Meeting here in Seattle that went horribly wrong. 

Slashdot had it, Neowin had it,  Digg had it, Reuters had it.  It was everywhere.

And it was all my fault.

 

Well, mostly.  Rob Chambers on the speech team has already written about this, here's the same problem from my side of the fence.

About a month ago (more-or-less), we got some reports from an IHV that sometimes when they set the volume on a capture stream the actual volume would go crazy (crazy, for those that don't know, is a technical term).  Since volume is one of the areas in the audio subsystem that I own, the bug landed on my plate.  At the time, I was overloaded with bugs, so another of the developers on the audio team took over the investigation and root caused the bug fairly quickly.  The annoying thing about it was that the bug wasn't reproducible - every time he stepped through the code in the debugger, it worked perfectly, but it kept failing when run without any traces.

 

If you've worked with analog audio, it's pretty clear what's happening here - there's a timing issue that is causing a positive feedback loop that resulted from a signal being fed back into an amplifier.

It turns out that one of the common causes of feedback loops in software is a concurrency issue with notifications - a notification is received with new data, which updates a value, updating the value causes a new notification to be generated, which updates a value, updating the value causes a new notification, and so-on...

The code actually handled most of the feedback cases involving notifications, but there were two lower level bugs that complicated things.  The first bug was that there was an incorrect calculation that occurred when handling one of the values in the notification, and the second was that there was a concurrency issue - a member variable that should have been protected wasn't (I'm simplifying what actually happened, but this suffices). 

 

As a consequence of these two very subtle low level bugs, the speech recognition engine wasn't able to correctly control the gain on the microphone, when it did, it hit the notification feedback loop, which caused the microphone to clip, which meant that the samples being received by the speech recognition engine weren't accurate.

There were other contributing factors to the problem (the bug was fixed on more recent Vista builds than the one they were using for the demo, there were some issues with way the speech recognition engine had been "trained", etc), but it doesn't matter - the problem wouldn't have been nearly as significant.

Mea Culpa.

Comments

  • Anonymous
    July 31, 2006
    Larry, a long time Microsoft blogger, and key member of the audio team, speaks out about the root cause...

  • Anonymous
    July 31, 2006
    The comment has been removed

  • Anonymous
    July 31, 2006
    notquitesure: Beats me, it's tied up in DSP and how those algorithms work.  The SPL for words like "delete" and "select all" may be higher than the ones for the other words.

  • Anonymous
    July 31, 2006
    PingBack from http://blogs.reuters.com/2006/07/28/when-good-demos-go-very-very-bad/

  • Anonymous
    July 31, 2006
    Why did the presenter not rehearse his demo ten times before he went up to make sure everything was working?  Even if you have identified the bug now, I don't see how a presenter could not have tested the software before he went up.

  • Anonymous
    July 31, 2006
    Bob, see Rob Chamber's post - they did try it multiple times.  This problem is subtle and timing related, it's hideously unfortunate that the one time it showed up was the one time it mattered the most.

    Murphy's law at its finest.

  • Anonymous
    July 31, 2006
    I'm surprised there's no indication or warning that oversteering/clipping is occurring. If it has such detrimental effects, especially with analysts and TV crews present :), surely it'd be useful to notify users about it?

  • Anonymous
    July 31, 2006
    We've all been there.  Nothing like watching your app crash and burn on the public stage.  You seem to be taking it well though.  Keep your chin up.

    -Chris

  • Anonymous
    July 31, 2006
    PingBack from http://crazyfactor.com/2006/07/31/larry-says-%e2%80%9cit%e2%80%99s-my-bug%e2%80%9d/

  • Anonymous
    July 31, 2006
    Thanks for the good laugh.

    I wouldn't worry too much about it. It has happened to Windows, too, and it's still the most popular OS.

  • Anonymous
    July 31, 2006
    The comment has been removed

  • Anonymous
    July 31, 2006
    PingBack from http://blogs.reuters.com/2006/07/31/microsoft-recognizes-speech-software-bug/

  • Anonymous
    July 31, 2006
    Via Scoble: Wait, that was MY bug? Ouch! Microsoft's Larry Osterman steps up and claims responsibility for the code that botched the demo I posted on Saturday. Here's something new and interesting from Microsoft. Someone stepping up and saying that the

  • Anonymous
    July 31, 2006
    Here's the correct digg link (not that it matters, though)...

    http://digg.com/tech_news/When_good_demos_go_very_very_bad

  • Anonymous
    July 31, 2006
    Let’s set Wagged PR response: “ambient noise”, so double delete the killer bug reports, select all “silent room”, double the.

  • Anonymous
    July 31, 2006
    > and root caused the bug fairly quickly.

    That's what you get for running as root.  If you ran as a limited user then you wouldn't cause bugs.

    > The annoying thing about it was that the bug wasn't
    > reproducible

    So just mark it as resolved, not reproducible, and close it.  That's what Microsoft does with lots of my Vista beta bug reports.

    Unlike ordinary Windows bugs where Microsoft requires fees to be paid before allowing bugs to be reported, with Vista betas it's easy.
    (1) Find a secret link posted by Microsoft to get a bug reporting tool,
    http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=467250&SiteID=17
    (2) Download, install, and run the tool.
    (3) Get a reply containing some combination of:
    (3a) A request for more information, telling you to view a page on the Connect site but not allowing you to view the page because Microsoft intentionally prohibits you from viewing your own bug reports and Microsoft's replies to them (that is, if you paid for the beta as part of an MSDN subscription),
    (3b) A resolution that Microsoft couldn't reproduce the bug, accompanied by a request to try it again under build 5472, but not accompanied by a link from which build 5472 could be downloaded (MSDN has links for build 5472 in English and German but not Japanese),
    (3c) A bunch of question marks, for which Microsoft's original words can't be guessed, because Microsoft doesn't know how to select an encoding for Microsoft's own e-mail that can send Microsoft's own words to the victim.

    Mr. Osterman, all you have to do is conform to your employer's practices.  (3b) would make things easy for you.

  • Anonymous
    July 31, 2006
    It was a very good technical definition on what happened during the demo. But a bug is a bug and other people just see it that way. I will not be suprised if Vista will not ship by early next year. Anyway, we can all look forward for the Zune instead of Vista :)

  • Anonymous
    July 31, 2006
    Everyone is talking about that Windows Vista Speech Recognition demo at the Financial Analysts Meeting....

  • Anonymous
    July 31, 2006
    The comment has been removed

  • Anonymous
    July 31, 2006
    Since Microsoft is so fond of 'ahem', ripping off Apple, why not steal Steve Job's presentation preparation routine.

  • Anonymous
    July 31, 2006
    And people wonder why some developers try to deflect any bug from their perfect code - this is the perfect example of what happens when you stand up and say "That was my bug and I squashed it!"  (The fun in the comments, that is.)

    Good job Larry!  It's a beta, you found an error and fixed it for RTM.  It sounds like both jobs were done - both testing in real world situations to find the bug and a solution was found.

    Oh ye who have not released code with bugs - go ahead and admit you haven't written any code.

  • Anonymous
    July 31, 2006
    Larry,

    Thanks for the technical explanation of this. It's why I read your blog! Please don't be disheartened by some of the negative comments.

  • Anonymous
    July 31, 2006
    There's a reason presenters joke nervously about "the demo gods".  No matter how many times you rehearse something the odds of something going wrong increases proportionally with the number of people watching.  I recently presented a session at a local code camp.  Rehearsed the demos dozens of times.  I get in the room, connect my laptop to the projector and go to login and XP does not recognize my password!  I tried it a couple of times slowly, made sure caps lock was off but still no joy.  Unbelievable.  So I restarted the laptop and got lucky - it allowed me to login!  Next time I will figure out the appropriate sacrifice to "the demo gods" before presenting a session like that.  :-)

  • Anonymous
    July 31, 2006
    The comment has been removed

  • Anonymous
    July 31, 2006
    Lots of great comments from listeners, you all keep me on my A game. I think your gonna like the new intro tonight we get you in the mood for a rocking podcast. Please submit your votes at Podcast Alley....

  • Anonymous
    July 31, 2006
    PingBack from http://pcgeek.geekyblogs.com/2006/08/01/vista-voice-recognition-demo-doesnt-go-so-well-for-microsoft/

  • Anonymous
    July 31, 2006
    The blog entry of the speech team member Rob Chambers is funny. It cites Wikipedia as source of a definition of a term of digital signal processing (clipping).

    Shouldn't they have more scientific and accurate sources than wikipedia? I mean for a college student would be fine to cite such sources but for a member of the speech team of the biggest software company in the world?

  • Anonymous
    July 31, 2006
    Dude, if this is a timing issue with your traces on , you should try doing what we do - set up a ram drive on your test machine and send all debug out to it. It reduces the timing issues involved with tracing ..

    Alternatively, just ship vista with tracing on, and have a scheduled job that cleans it up once every so often?

  • Anonymous
    July 31, 2006
    You are fired!

  • Anonymous
    August 01, 2006
    Chris, we actually use WPP (ETW based logging) for our traces, it's essentially overhead-less (not quite, but close).

    Gino, I use the wikipedia on occasion too.  It has its issues (it can have serious accuracy issues (look at the history for "The Overlake School" for an example), but it works, and sometimes there's no more convenient source on the web.

  • Anonymous
    August 01, 2006
    The comment has been removed

  • Anonymous
    August 01, 2006
    Speech is not that bad in Vista.  My big issue is that when typing documents in MSFT Word, the Office 2003 Speech does a better job.

    Larry thankyou for keeping us up to date.

  • Anonymous
    August 01, 2006
    Your candor is refreshing and as a non-microsoftie investor I appreciate it very much. Just take extra care before you ship the product out. Good luck.

  • Anonymous
    August 01, 2006
    The comment has been removed

  • Anonymous
    August 01, 2006
    PingBack from http://www.carnatic.com/mokshore/2006/08/02/links-for-2006-08-02/

  • Anonymous
    August 01, 2006
    Tuesday, August 01, 2006 10:52 AM by Lon Ingram
    > Norman "Mommy Never Loved Me" Diamond said:
    >> and root caused the bug fairly quickly.
    >That's what you get for running as root.  If you ran as a
    >limited user then you wouldn't cause bugs.

    Close.  It's "grammar never loved me".  Sorry my pun had too many layers for you.

    Interesting that you have no comment on the way Microsoft treats more widespread bugs.  Though oddly, after I posted that comment, it seems Microsoft decided that they really will let me see some of my bug reports and their requests for further information.  I hope to try it out this weekend.  Of course even this much is only being allowed because Vista's bugs aren't yet being sold as a product.

  • Anonymous
    August 01, 2006
    I was present at the meeting and I didn't really think the 'glitch' was as bad as the media have led everyone to believe. I made a blog post about it <a href="http://blogs.3sharp.com/Blog/dougv/archive/2006/08/01/1672.aspx">here</a>.

  • Anonymous
    August 01, 2006
    Larry and Rob blog postings about the Vista Speech Recognition bug is a great indicator on how far Microsoft has come from the ‘’Borg’’ days.
    As a partner dealing with Microsoft, it gives me a lot of ...

  • Anonymous
    August 01, 2006
    This is a joke. Microsoft speech team lost all of its stars.

  • Anonymous
    August 01, 2006
    PingBack from http://www.cortell.net/2006/08/02/siete-anos-despues-microsoft-sigue-sin-conseguirlo/

  • Anonymous
    August 01, 2006
    The tipical excuse is say that the bug was solved in a early version but not in the demo version. To solve this there is a very good free product that is SUBVERSION and it's works very well, simply with tagging one revision

  • Anonymous
    August 01, 2006
    I'm glad to see individuals at MSFT own up to problems and suggest the approp. measures to address them.  Larry, thanks for your candid commentary on the issue and best of luck during the next demo!

  • Anonymous
    August 01, 2006
    Thank you larry for your explanation. You are clear and sincere as ever. Is your blog that made me dreaming of working on OSes, and even post like this one are a push forward to achieve my goal in the future, and study and work even more hard. Errors and bugs happens even to the greatest ones, the important thing is to not be disheartened and go forward!

  • Anonymous
    August 01, 2006
    > The annoying thing about it was that the
    > bug wasn't reproducible - every time he
    > stepped through the code in the debugger,
    > it worked perfectly, but it kept failing when
    > run without any traces.

    In the unlikely event you didn't know, the technical term for this is a 'Heisenbug'. See http://en.wikipedia.org/wiki/Heisenbug#Heisenbugs.

  • Anonymous
    August 02, 2006
    PingBack from http://www.werbeblogger.de/2006/08/02/mein-pc-hort-aufs-wort/

  • Anonymous
    August 02, 2006
    Don't you think you should retire or something? I think there are many skilled 20 years old programmers who could make that work in 5 minutes?

    Man you are getting too old..

  • Anonymous
    August 02, 2006
    When next public demonstration takes place, I hope the presenter starts "Dear aunt.."

  • Anonymous
    August 03, 2006
    someone forgot some unittest cases at a lower level :-)

  • Anonymous
    August 03, 2006
    furroy, no, the unit tests didn't catch this one, because that's not what unit tests are supposed to catch.

    It WAS caught by the FVT (feature verification tests), but it was intermittent even for them.

  • Anonymous
    August 04, 2006
    Well, sometime it also sounds like it was done intentionally? just to catch more customer attention. Microsoft was sure it will be hosted on videos.google.com.! Viral Marketing.!

    Wait - till they do a demo again - with everything - up and running. ! It will have more positive affect!

    Ah! BTW - I am not Microsoft fan, But I am indeed a marketing fan!

  • Anonymous
    August 04, 2006
    bmbm

  • Anonymous
    August 04, 2006
    I know that bug since 3 day but I did want say.
    If you cong that error really stupid, protent any conference.
    I do'nt love Microsoft but I use really Microsoft Productions.
    We are wait big antle Vista, if we'll wait a long time, dont working at the Vista.

    If you are ask my cong, you are very houldying stupid.
    I's speech properties, wait vista at the properties.

    Microsoft is wur00z.
    I kiss you everybody.

  • Anonymous
    August 05, 2006
    The comment has been removed

  • Anonymous
    August 05, 2006
    The comment has been removed

  • Anonymous
    August 06, 2006
    The comment has been removed

  • Anonymous
    August 07, 2006
    PingBack from http://www.istartedsomething.com/20060807/msnbc-deceived-the-public-vistas-speech-recognition/

  • Anonymous
    August 07, 2006
    Saturday, August 05, 2006 7:09 PM by Will Parker
    > When I was a tester at Microsoft (Yay, MacBU!), a bug of
    > this severity would have been call a 'Pri 2' - the app didn't
    > actually crash, but the user couldn't precede with their
    > planned tasks. In most cases, Pri 2 bugs are accorded 'Must
    > Fix' status unless the repro steps are deemed quite unlikely.

    Wow, Microsoft's ratings of "must fix" vs. "won't fix" are still astounding.  A bug in the DDK compiler's code generation a "won't release a hotfix", a different and older bug of severity that destroys entire hard disk partitions is a "won't fix", but a bug in speech recognition is a "must fix".  When a DDK Even my previous level of cynicism was inadequate.

    When the DDK's compiler causes a BSOD every app crashes and the user can't proceed with their tasks.  When an entire hard disk partition gets corrupted the user can proceed with their tasks a day later by restoring all files from another backup, unless the backup was on a partition created by the same FDISK program.  Therefore these rank far below such a critical app as speech recognition.

    Thank you very much for this information though.  Sad as the facts are, it's better to know them than not to know them.

  • Anonymous
    August 10, 2006
    You've do doubt heard about the Microsoft Financial Analyst Meeting two weeks ago where&amp;nbsp;a demonstration...

  • Anonymous
    August 11, 2006
    The comment has been removed

  • Anonymous
    August 11, 2006
    The comment has been removed

  • Anonymous
    August 11, 2006
    PingBack from http://scottrose.wordpress.com/2006/08/11/googles-version-of-comedy/

  • Anonymous
    August 11, 2006
    The comment has been removed

  • Anonymous
    August 12, 2006
    PingBack from http://puntodivista.wordpress.com/2006/08/12/microsoft-corre-ai-ripari-ora-il-riconoscimento-vocale-funziona/

  • Anonymous
    August 14, 2006
    The comment has been removed

  • Anonymous
    August 14, 2006
    Microsoft doesn't know how real people experience these kind of bugs several times a day.  Bill should make a few less billion and pay to fix the problems.  Mac commercial can't be answered because they are true.  MS stopped trying to be better because they are the "most popular OS in the world."  Sounds a lot like Big Blue twenty years eariler...

    Google-type web based programs seem like the future so Bill can lose a couple of billion now or lose it all in ten years.  My computer reports the same bugs to MS each week but MS never fix them.

  • Anonymous
    August 17, 2006
    From my son, Joseph, speech recognition the Vista way... And for those who think I take delight in bashing Microsoft, here's a follow-up video that shows the demo wasn't really as bad as it seemed. It was worse... Seriously, though,...

  • Anonymous
    August 17, 2006
    Here is some really good news.

    Yesterday Vista build 5472 proved itself more powerful than Windows 95 and more powerful than some observations in Windows 98 and Windows 2000.  Instead of destroying the contents of one or two partitions on external hard drives (or in the case of Windows 98 deleting the wrong logical drive in the extended partition), Vista destroyed the entire contents of an internal hard drive.  Right down to the MBR no longer having its signature, and not having any partitions on it after being re-signed.  On a different physical drive internal to the same machine I have Windows 2000 SP4 with the registry key to recognize 48-bit LBA so it could also show the partitions when they used to exist, it agreed with the Vista DVD's repair console about the fact that the partition table was gone, and it could re-sign the MBR but still not bring back the partition table.

    Now, here is why that is good news.

    Windows Media Centre crashed three times.  Two of those times it yielded Vista's equivalent of BSODs, though the BSOD text wasn't visible.  After the last time, that is when Vista wouldn't reboot, the booter told me to try to do a repair, and the repair tool in the Vista DVD failed.

    Therefore this problem results in the user not being able to use Windows Media Centre for its intended purpose.  Therefore Microsoft might rate it as a must-fix.  Maybe.  Let's hope.

    If it were just deleting the entire hard drive including deleting the Vista installation without Windows Media Centre having been installed, it would have rated its usual zero.

  • Anonymous
    August 21, 2006
    Saturday, August 05, 2006 7:09 PM by Will Parker

    > When I was a tester at Microsoft (Yay, MacBU!), a bug of
    > this severity would have been call a 'Pri 2' - the app didn't
    > actually crash, but the user couldn't precede with their
    > planned tasks. In most cases, Pri 2 bugs are accorded 'Must
    > Fix' status unless the repro steps are deemed quite unlikely.

    Well, you'll be glad to know that Pri 2 is still Pri 2.

    When Vista build 5472 deletes the entire contents of an internal SATA hard disk including the Vista installation itself, that must be a Pri 1.  It takes priority over Pri 2.  So it no longer matters that the user of Windows Media Centre can't proceed with their planned tasks.  Even this Pri 2 collateral damage isn't enough to gain a "must fix" or "might fix" or "find permission to consider fixing".  Deletion of an entire hard drive is a "must not fix", Pri 1.

    https://connect.microsoft.com/windows/feedback/ViewFeedback.aspx?FeedbackID=181905

    Closed without explanation.  But who needs an explanation.  Microsoft is still Microsoft.  The only question is, why, after all these years, do I still find it so hard to believe.  I'm still not cynical enough.

  • Anonymous
    August 23, 2006
    a good speech recognition tool for you!

    Real-time conversion of speech to text! Dictation 2005 brings you the combined power of several top-quality speech-recognition tools.

    http://www.sharewarecheap.com/business-finance-word-processing/dictation3821-1.htm

  • Anonymous
    September 15, 2006
    Larry Osterman (ya, the same Larry Osterman that got bit by the Audio bug) has a great post on why XGL...

  • Anonymous
    October 01, 2006
    Larry Osterman (ya, the same Larry Osterman that got bit by the Audio bug ) has a great post on why XGL

  • Anonymous
    October 26, 2006
    You've no doubt heard about the Microsoft Financial Analyst Meeting two weeks ago where a demonstration

  • Anonymous
    November 17, 2006
    PingBack from http://climbtothestars.org/archives/2006/11/17/stamm-genilem-sous-les-projos/

  • Anonymous
    December 12, 2006
    When our new speech recognition for Windows Vista was demonstrated at the Microsoft Financial Analyst

  • Anonymous
    December 30, 2006
    Lots of great comments from listeners, you all keep me on my A game. I think your gonna like the new intro tonight we get you in the mood for a rocking podcast. Please submit your votes at Podcast Alley....

  • Anonymous
    May 04, 2007
    Watch what?

  • Anonymous
    May 21, 2007
    PingBack from http://engtech.wordpress.com/2006/08/01/windows-vista-speech-recognition-demo-blows-up/

  • Anonymous
    July 23, 2007
    PingBack from http://veryangel.cn/index.php/8233/googles-version-of-comedy-this-is-that

  • Anonymous
    July 26, 2007
    PingBack from http://rigues.badcoffee.info/?p=13

  • Anonymous
    September 24, 2007
    PingBack from http://climbtothestars.org/archives/2007/09/24/how-blogging-brings-dialogue-to-corporate-communications/

  • Anonymous
    January 18, 2008
    PingBack from http://www.go4vista.net/2006/08/02/windows-vista-speech-recognition-the-whole-story/

  • Anonymous
    January 26, 2008
    PingBack from http://www.envlog.com/2008/01/27/windows-vista-speech-recognition-the-whole-story/

  • Anonymous
    February 04, 2008
    PingBack from http://laomien.com/2008/02/05/windows-vista-speech-recognition-the-whole-story/

  • Anonymous
    February 07, 2008
    PingBack from http://www.vdodownload.info/2008/02/07/windows-vista-speech-recognition-the-whole-story/

  • Anonymous
    February 11, 2008
    PingBack from http://www.hi5vdo.com/2008/02/11/windows-vista-speech-recognition-the-whole-story/

  • Anonymous
    August 04, 2008
    PingBack from http://video24hours.com/2008/08/05/windows-vista-speech-recognition-the-whole-story/

  • Anonymous
    December 02, 2008
    PingBack from http://www.blogmeblue.com/?p=3172

  • Anonymous
    January 08, 2009
    PingBack from http://www.tech-munch.com/2009/01/windows-vista-speech-recognition-the-whole-story/

  • Anonymous
    January 22, 2009
    PingBack from http://www.hilpers.pl/474064-z-cyklu-vista-killer-apps

  • Anonymous
    February 08, 2009
    PingBack from http://weedooz.eu/710/windows-vista-speech-recognition-the-whole-story/

  • Anonymous
    May 31, 2009
    PingBack from http://woodtvstand.info/story.php?id=4379

  • Anonymous
    June 02, 2009
    PingBack from http://outdoorceilingfansite.info/story.php?id=53151

  • Anonymous
    June 02, 2009
    PingBack from http://woodtvstand.info/story.php?id=45567

  • Anonymous
    June 14, 2009
    PingBack from http://adirondackchairshub.info/story.php?id=396

  • Anonymous
    June 15, 2009
    PingBack from http://debtsolutionsnow.info/story.php?id=1881

  • Anonymous
    June 17, 2009
    PingBack from http://pooltoysite.info/story.php?id=9482

  • Anonymous
    June 19, 2009
    PingBack from http://mydebtconsolidator.info/story.php?id=6856

  • Anonymous
    June 22, 2009
    PingBack from http://picture-download.zoxic.com/picture-windows/windows-vista-speech-recognition-the-whole-story