tarantool / vshard

The new generation of sharding based on virtual buckets
Other
100 stars 31 forks source link

flaky tests: storage/storage and unit/util #390

Closed Serpentian closed 1 year ago

Serpentian commented 1 year ago

Something is going on with fibers:

storage/storage.test.lua ``` storage/storage.test.lua memtx [ fail ] Test failed! Result content mismatch: --- storage/storage.result Mon Dec 5 12:49:08 2022 +++ /home/runner/work/vshard/vshard/test/var/rejects/storage/storage.reject Mon Dec 5 12:53:05 2022 @@ -962,7 +962,7 @@ ... assert(not ok and err.message) --- -- fiber is cancelled +- error: assertion failed! ... -- -- Bucket_are_all_rw() registry function. ```
unit/util.test.lua ``` unit/util.test.lua [ fail ] Test failed! Result content mismatch: --- unit/util.result Mon Dec 5 12:49:08 2022 +++ /home/runner/work/vshard/vshard/test/var/rejects/unit/util.reject Mon Dec 5 12:53:21 2022 @@ -266,15 +266,16 @@ ... assert(not ok) --- -- true +- error: assertion failed! ... err.message --- -- fiber is cancelled +- error: '[string "return err.message "]:1: attempt to index global ''err'' (a nil + value)' ... assert(type(err) == 'table') --- -- true +- error: assertion failed! ... -- -- Exception-safe fiber cancel check. ```

Reproduced on CI Tarantool 2.7 and 2.8. Cannot reproduced it locally

Serpentian commented 1 year ago

The problem actually was in CI, it didn't run tests on 2.7 and 2.8, but fetched 2.6 version, where the behavior of fibers wasn't the one we expect it now. But AFAICS we don't support 2.6 version.

It seems, that the problem isn't reproduced on CI anymore, I've rerunned it 3 times. This PR should close the issue.

@Gerold103, what do you think? Should we investigate this ticket further or just close it.

Gerold103 commented 1 year ago

But AFAICS we don't support 2.6 version.

We support everything >= 1.10.1.

the behavior of fibers wasn't the one we expect it now

Hm, I don't remember any changes in fiber behaviour since ever and in fiber API since > 1.9. From the errors in the ticket description the problem doesn't seem to be in the fibers really. It seem there are bugs in those tests which throw a Lua exception and terminate those fibers early or something.

Serpentian commented 1 year ago

Hm, I don't remember any changes in fiber behaviour since ever and in fiber API since > 1.9.

The problem is not in the API, but in the behavior of the fibers. Before https://github.com/tarantool/tarantool/commit/bd03dfc76c0b76f56374c3e66052e2af0c50ae65 these tests doesn't work. Error fiber is cancelled just wasn't set during waiting for fiber condition before 2.7.0.

This is expected behavior, as we don't test vshard over 2.6 I don't see any reason to change tests. @Gerold103, if you don't think so, feel free to reopen the issue.