<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>18539</bug_id>
          
          <creation_ts>2012-08-11 23:12:15 +0000</creation_ts>
          <short_desc>System locking protection / warnings</short_desc>
          <delta_ts>2014-10-28 17:17:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>AudioWG</product>
          <component>Web Audio API</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>TBD</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jussi Kalliokoski">jussi.kalliokoski</reporter>
          <assigned_to name="Chris Rogers">crogers</assigned_to>
          <cc>eric.carlson</cc>
          
          <qa_contact>public-audio</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72081</commentid>
    <comment_count>0</comment_count>
    <who name="Jussi Kalliokoski">jussi.kalliokoski</who>
    <bug_when>2012-08-11 23:12:15 +0000</bug_when>
    <thetext>I believe it is currently possible to lock a single-core system with the Web Audio API, as the processing takes place in a realtime thread that takes priority. 

This should never be allowed to happen, especially from a security perspective. I suggest the following:

The AudioContext should monitor its status in regard of CPU usage and underruns. If the mechanism should detect that the graph is failing to meet its deadlines or seems to be locking the system, it should issue an error event on the AudioContext. This gives the developer a chance to try and scale down the intensive parts of the graph. There are two possible default actions for the event I can think of:

 * If not canceled by event.preventDefault(), the graph will become inactive. If the graph continues to fail to deliver for X times without the developer letting it become inactive, lower the process priority. This should make little difference, because the audio is glitching already, but it prevents evil-intentioned programs from locking the system.

 * Same as above, except that the default action would be to lower the process priority and to just do it anyway if the developer fails to mend the situation.

Thoughts?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75411</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2012-10-05 21:33:17 +0000</bug_when>
    <thetext>I believe it&apos;s well understood by browser vendors that it&apos;s not acceptable to crash or lock up the machine from the use of any web API.  So I think this is really more in the realm of implementation detail, and not part of the specification.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113962</commentid>
    <comment_count>2</comment_count>
    <who name="Olivier Thereaux">olivier.thereaux</who>
    <bug_when>2014-10-28 17:14:52 +0000</bug_when>
    <thetext>Web Audio API issues have been migrated to Github. 
See https://github.com/WebAudio/web-audio-api/issues</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114112</commentid>
    <comment_count>3</comment_count>
    <who name="Olivier Thereaux">olivier.thereaux</who>
    <bug_when>2014-10-28 17:17:50 +0000</bug_when>
    <thetext>Closing. See https://github.com/WebAudio/web-audio-api/issues for up to date list of issues for the Web Audio API.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>