Project

General

Profile

Actions

action #59100

closed

Race condition in os-autoinst/commands.pm

Added by tinita about 5 years ago. Updated about 5 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Regressions/Crashes
Target version:
-
Start date:
2019-11-05
Due date:
% Done:

0%

Estimated time:

Description

If I put a sleep 3 into the following code, then the t/full-stack.t test is failing.

Mojo::IOLoop->singleton->reactor->io($isotovideo => sub {
        my ($reactor, $writable) = @_;

        my @isotovideo_responses = myjsonrpc::read_json($isotovideo, undef, 1);

        sleep 3; # <-------------------------------------------

...
})->watch($isotovideo, 1, 0);    # watch only readable (and not writable)

The set_pause_at_test is sent via myjsonrpc::send_json(), but never read via read_json().

https://github.com/os-autoinst/os-autoinst/blob/master/commands.pm#L325-L339


Related issues 1 (0 open1 closed)

Related to openQA Project (public) - action #59043: Fix unstable/flaky full-stack test, i.e. remove sleep, and ui testsResolvedokurz2019-11-04

Actions
Actions #1

Updated by okurz about 5 years ago

  • Category set to Regressions/Crashes
Actions #2

Updated by tinita about 5 years ago

t/full-stack.t .. 17/?     # javascript console output: [
    #   {
    #     level     => "SEVERE",
    #     message   => "http://localhost:53373/asset/e27d1d8f48/ws_console.js 8 WebSocket connection to 'ws://127.0.0.1:20013/m6P3p9XyFV85QKzg/ws' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED",                                       
    #     source    => "javascript",
    #     timestamp => 1572950485996,
    #   },
    # ]

...


#   Failed test 'no errors or warnings on javascript console, waiting for resume'
#   at /home/tina/openqa-devel/repos/openQA/t/lib/OpenQA/SeleniumTest.pm line 260.
# Looks like you failed 3 tests of 85.
t/full-stack .. 18/? 
#   Failed test 'pause at certain test'
#   at t/full-stack.t line 204.
Actions #3

Updated by tinita about 5 years ago

This can be fixed by adding:

# start of callback
$reactor->stop;

...

# end of callback
$reactor->start;

Edit:
According to Sebastian Riedel the suggested fix is wrong, and the bug is somewhere else

Actions #4

Updated by okurz about 5 years ago

  • Related to action #59043: Fix unstable/flaky full-stack test, i.e. remove sleep, and ui tests added
Actions #5

Updated by tinita about 5 years ago

  • Description updated (diff)
Actions #6

Updated by tinita about 5 years ago

  • Status changed from New to Rejected

Bug is elsewhere, see related ticket

Actions

Also available in: Atom PDF