[Home]

Summary:ASTERISK-25125: Testsuite: Investigate lock-up of tests/fastagi/record-file
Reporter:Corey Farrell (coreyfarrell)Labels:
Date Opened:2015-05-23 18:37:27Date Closed:2015-06-09 17:47:18
Priority:MajorRegression?
Status:Closed/CompleteComponents:Tests/testsuite
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Every time I run the full testsuite I come back 12 hours later to see progress frozen at tests/fastagi/record-file/.  No instances of Asterisk are running, {{tests/fastagi/record-file/run-test}} is left running.  I run the testsuite with {{./run-local run}}, unsure if that is relevant to this issue.  Marking as major since the full testsuite takes a VERY long time to run, any test that freezes the whole process is a major issue.

Strange thing is it doesn't look like the test ever attempted to start Asterisk.  After this failure there are no {{astroot/tmp/fastagi/record-file}} or {{logs/fastagi/record-file}} folders.  {{logs/messages.txt}} does not have any messages about the test, just a large gap in the timestamps:
{noformat}
[May 23 12:18:52] INFO[19292]: asterisk.test_case:158 __init__: Executing tests/fastagi/hangup
...
[May 23 12:19:19] INFO[19292]: twisted:443 emit: Main loop terminated.
[May 23 18:04:35] INFO[20491]: asterisk.test_case:158 __init__: Executing tests/fastagi/say-alpha
{noformat}

6PM being when I killed the process for {{python tests/fastagi/record-file/run-test}}.  There was a message on the screen about reactor timeout, but for some reason it didn't make it to a log and my screen has scrolled too far.  Once my system is available I will try running this test alone so I can get more information.
Comments:By: Matt Jordan (mjordan) 2015-06-04 16:20:06.373-0500

Strangely enough, it does run okay on my local machine:

{code}
mjordan@mjordan-laptop ~/projects/testsuite (master) $ sudo ./runtests.py --test=tests/fastagi/record-file
[sudo] password for mjordan:
Running tests for Asterisk GIT-master-00a47ff
...

Tests to run: 1,  Maximum test inactivity time: -1 sec.
--> Running test 'tests/fastagi/record-file' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running ['tests/fastagi/record-file/run-test'] ...
No handlers could be found for logger "asterisk.asterisk"

Starting Asterisk

Originating call to begin test which terminates recording with DTMF

Stopping Reactor ...

Test ['tests/fastagi/record-file/run-test', 'GIT-master-00a47ff'] passed

<?xml version="1.0" encoding="utf-8"?>
<testsuite errors="0" failures="0" name="AsteriskTestSuite" tests="1" time="32.72">
 <testcase name="tests/fastagi/record-file" time="32.72"/>
</testsuite>



mjordan@mjordan-laptop ~/projects/testsuite (master) $
{code}

It wouldn't shock me if the test was a bit brittle. Maybe because I'm {{sudoing}} it?

By: Corey Farrell (coreyfarrell) 2015-06-04 16:41:54.931-0500

I've never run the testsuite as root.  I just repeated the test on Fedora 22, no failure.  I'm still getting the failure when I run from my desktop (Linux Mint 17 x86_64/Cinnamon).  I'm using {{./run-local run -t tests/fastagi/record-file}}.  Nothing is created in ./astroot/tmp or ./logs.  To see the error message I have to kill the process of {{python tests/fastagi/record-file/run-test}}.
{noformat}
$ ./run-local run -t tests/fastagi/record-file/
Running tests for Asterisk GIT-master-3cf2397M
...

Tests to run: 1,  Maximum test inactivity time: -1 sec.
--> Running test 'tests/fastagi/record-file' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running ['tests/fastagi/record-file/run-test'] ...
No handlers could be found for logger "asterisk.asterisk"

Starting Asterisk

Unhandled error in Deferred:

Unhandled Error

Traceback (most recent call last):

Failure: exceptions.Exception: Asterisk core waitfullybooted for 127.0.0.1 failed

Test ['tests/fastagi/record-file/run-test', 'GIT-master-3cf2397M'] passed

<?xml version="1.0" encoding="utf-8"?>
<testsuite errors="0" failures="0" name="AsteriskTestSuite" tests="1" time="65.18">
 <testcase name="tests/fastagi/record-file" time="65.18"/>
</testsuite>
{noformat}

In this case 65 seconds is just how long I waited before using kill.  If --timeout is not used this test will sit forever (until it's manually killed).