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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>101261</bug_id>
          
          <creation_ts>2012-11-05 14:46:24 -0800</creation_ts>
          <short_desc>test-webkitpy shows failure output on my linux box</short_desc>
          <delta_ts>2013-01-08 11:20:56 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Zan Dobersek">zan</assigned_to>
          <cc>abarth</cc>
    
    <cc>dpranke</cc>
    
    <cc>d-r</cc>
    
    <cc>peter</cc>
    
    <cc>rniwa</cc>
    
    <cc>sam</cc>
    
    <cc>webkit.review.bot</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>758920</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-11-05 14:46:24 -0800</bug_when>
    <thetext>% test-webkitpy
Suppressing most webkitpy logging while running unit tests.
Skipping tests in the following modules or packages because they are really, really, slow:
    webkitpy.common.checkout.scm.scm_unittest
    (https://bugs.webkit.org/show_bug.cgi?id=31818; use --all to include)

[100/1598] webkit2.messages_unittest.HeaderTest.test_header (+15)Failure: No such entity  
Failure: No such entity
Failure: No such entity
Ran 1598 tests in 3.133s                                                                                                         

OK

Unclear if it&apos;s webkit2-code related or not yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758976</commentid>
    <comment_count>1</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-11-05 15:52:03 -0800</bug_when>
    <thetext>It runs cleanly for me on my linux box synced to r133537.

There were some wk2-related failures briefly last week; is it possible you&apos;re synced to one of those revisions?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>799369</commentid>
    <comment_count>2</comment_count>
    <who name="Peter Beverloo">peter</who>
    <bug_when>2013-01-03 07:13:55 -0800</bug_when>
    <thetext>I&apos;m seeing this as well. A Google search on the error shows that it&apos;s likely PulseAudio causing this. Are you on Precise?

The test it shows the failure messages show on differs between tests. I&apos;m not seeing it when executing &quot;test-webkitpy -j1&quot; either, and with -j2 it shows once.

----------

[162/1614] webkitpy.common.net.buildbot.buildbot_unittest.BuilderTest.test_failure_and_flaky passedFailure: No such entity
Failure: No such entity
Failure: No such entity

Ran 1614 tests in 3.034s                                                                               

OK</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>799373</commentid>
    <comment_count>3</comment_count>
    <who name="Peter Beverloo">peter</who>
    <bug_when>2013-01-03 07:33:59 -0800</bug_when>
    <thetext>I&apos;m seeing this consistently when running webkitpy.layout_tests.port.efl_unittest and gtk_unittest. Both ports use the PulseAudioSanitizer class to unload the &quot;module-stream-restore&quot; PulseAudio module before the test run (as part of setup_test_run()), and restore it again as part of clean_up_test_run().

This executes the following commands:

$ pactl list short modules
$ pactl unload-module [index of module-stream-restore module]
.. test run ..
$ pactl load-module module-stream-resource

Adding a print right before the call to unload-module shows that this is being executed twice (or more), so we&apos;re running into a concurrency issue here. The class was added in http://wkrev.com/115478.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>799382</commentid>
    <comment_count>4</comment_count>
    <who name="Peter Beverloo">peter</who>
    <bug_when>2013-01-03 07:51:39 -0800</bug_when>
    <thetext>To clarify: two or more threads are simultaneously running PulseAudioSanitizer._unload_pulseaudio_module(), all execute
  $ pactl list short modules

..and all see that the &quot;module-stream-resource&quot; module is loaded, causing them try to unload it. The first unload succeeds, subsequent unloads show the &quot;Failure: No such entity&quot; message.

Easy solution would be to protect the call to _unload_pulseaudio_module and _restore_pulseaudio_module in a multiprocess.Lock(), but this would still mean that we&apos;re loading and unloading the module two times per webkitpy test run.

Dominik, do you have any preferred solution? IIRC running failed tests again is seen as a separate run, so in case of failed layout tests the PulseAudio module would also be loaded and unloaded twice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>799583</commentid>
    <comment_count>5</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2013-01-03 12:53:53 -0800</bug_when>
    <thetext>Note that you can mark python unit tests in webkitpy as needing to be run in isolation by prepending &quot;serial_&quot; to the test name. I would do that rather than do locking manually.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>800245</commentid>
    <comment_count>6</comment_count>
    <who name="Dominik Röttsches (drott)">d-r</who>
    <bug_when>2013-01-04 09:11:34 -0800</bug_when>
    <thetext>(In reply to comment #4)

&gt; Dominik, do you have any preferred solution? IIRC running failed tests again is seen as a separate run, so in case of failed layout tests the PulseAudio module would also be loaded and unloaded twice.

Do you think what Dirk suggests would be the right fix, or do you mean that you see this when running the unit tests but you consider it an issue in other situations, too?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>800924</commentid>
    <comment_count>7</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2013-01-05 09:16:53 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; Dominik, do you have any preferred solution? IIRC running failed tests again is seen as a separate run, so in case of failed layout tests the PulseAudio module would also be loaded and unloaded twice.

But that isn&apos;t done concurrently, so there&apos;s no &apos;No such entity&apos; output in that case (AFAIK).

I&apos;m not sure there&apos;s a way of enforcing running unit tests from two separate files separately. How about mocking out the PulseAudioSanitizer methods?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>801328</commentid>
    <comment_count>8</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2013-01-07 09:12:24 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; I&apos;m not sure there&apos;s a way of enforcing running unit tests from two separate files separately. How about mocking out the PulseAudioSanitizer methods?

The serial_ feature works across files. Of course, mocking out the routines would probably work as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>802257</commentid>
    <comment_count>9</comment_count>
      <attachid>181697</attachid>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2013-01-08 08:15:35 -0800</bug_when>
    <thetext>Created attachment 181697
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>802267</commentid>
    <comment_count>10</comment_count>
    <who name="Peter Beverloo">peter</who>
    <bug_when>2013-01-08 08:32:58 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; Note that you can mark python unit tests in webkitpy as needing to be run in isolation by prepending &quot;serial_&quot; to the test name. I would do that rather than do locking manually.

In this case it&apos;s a few unit tests for both the EFL and GTK ports that call setup_test_run(), I&apos;m not sure if running them serially is the right solution as it would still unload and restore the module.

(In reply to comment #7)
&gt; (In reply to comment #4)
&gt; &gt; Dominik, do you have any preferred solution? IIRC running failed tests again is seen as a separate run, so in case of failed layout tests the PulseAudio module would also be loaded and unloaded twice.
&gt; 
&gt; But that isn&apos;t done concurrently, so there&apos;s no &apos;No such entity&apos; output in that case (AFAIK).
&gt; 
&gt; I&apos;m not sure there&apos;s a way of enforcing running unit tests from two separate files separately. How about mocking out the PulseAudioSanitizer methods?

The module is being unloaded concurrently as two or more tests are invoking setup_test_run(), and thus the PulseAudio unload method, at the same time.

I think Zan&apos;s solution makes sense, and it stops the unit tests from unloading and restoring the PulseAudio module. Thank you for looking in to it -- it solves the issue for me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>802389</commentid>
    <comment_count>11</comment_count>
      <attachid>181697</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-01-08 10:59:17 -0800</bug_when>
    <thetext>Comment on attachment 181697
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=181697&amp;action=review

Seems fine.  Makes me think that this Port object may be doing too much. :)

&gt; Tools/Scripts/webkitpy/layout_tests/port/efl_unittest.py:43
&gt; +        port._unload_pulseaudio_module = lambda: None
&gt; +        port._restore_pulseaudio_module = lambda: None

I guess there is no PulseAudio object on these ports that you can just mock?  The port itself handles teh loading/unloading (and presumably actions with) this code?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>802402</commentid>
    <comment_count>12</comment_count>
      <attachid>181697</attachid>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2013-01-08 11:06:27 -0800</bug_when>
    <thetext>Comment on attachment 181697
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=181697&amp;action=review

&gt;&gt; Tools/Scripts/webkitpy/layout_tests/port/efl_unittest.py:43
&gt;&gt; +        port._restore_pulseaudio_module = lambda: None
&gt; 
&gt; I guess there is no PulseAudio object on these ports that you can just mock?  The port itself handles teh loading/unloading (and presumably actions with) this code?

The port interfaces inherit from the PulseAudioSanitizer and call these methods on test run setup/cleanup.

https://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/layout_tests/port/efl.py#L37
https://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py#L38

Please give the final thumbs-up for landing this if all seems fine to you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>802412</commentid>
    <comment_count>13</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-01-08 11:14:49 -0800</bug_when>
    <thetext>This is fine.  But eventually we should fix that.  A port &quot;is not&quot; a PulseAudioSanitizer, it might &quot;have a&quot;, but the usage of inheritance here is wrong IMO. :)

But that&apos;s a separate bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>802420</commentid>
    <comment_count>14</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2013-01-08 11:18:43 -0800</bug_when>
    <thetext>(In reply to comment #13)
&gt; But that&apos;s a separate bug.

Filed bug #106354.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>802421</commentid>
    <comment_count>15</comment_count>
      <attachid>181697</attachid>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2013-01-08 11:20:50 -0800</bug_when>
    <thetext>Comment on attachment 181697
Patch

Clearing flags on attachment: 181697

Committed r139084: &lt;http://trac.webkit.org/changeset/139084&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>802422</commentid>
    <comment_count>16</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2013-01-08 11:20:56 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>181697</attachid>
            <date>2013-01-08 08:15:35 -0800</date>
            <delta_ts>2013-01-08 11:20:49 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-101261-20130108171240.patch</filename>
            <type>text/plain</type>
            <size>3263</size>
            <attacher name="Zan Dobersek">zan</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTM5MDU2CmRpZmYgLS1naXQgYS9Ub29scy9DaGFuZ2VMb2cg
Yi9Ub29scy9DaGFuZ2VMb2cKaW5kZXggNGM5NjRlZWQwMzJmMGY4OWJhYjNiYTFkYjc5YjJkNTc0
ZTFmMTg2ZC4uNzM2Mjg3YjEwYTJmNjIyYWYwMTBkNDZkYThkYzIyYzUwZDA1ZWY1MSAxMDA2NDQK
LS0tIGEvVG9vbHMvQ2hhbmdlTG9nCisrKyBiL1Rvb2xzL0NoYW5nZUxvZwpAQCAtMSwzICsxLDIy
IEBACisyMDEzLTAxLTA4ICBaYW4gRG9iZXJzZWsgIDx6YW5kb2JlcnNla0BnbWFpbC5jb20+CisK
KyAgICAgICAgdGVzdC13ZWJraXRweSBz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