Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH luajit] test: disable tests for OOM on trace on *BSD
@ 2023-10-31 16:06 Maksim Kokryashkin via Tarantool-patches
  2023-10-31 17:22 ` Sergey Kaplun via Tarantool-patches
  0 siblings, 1 reply; 2+ messages in thread
From: Maksim Kokryashkin via Tarantool-patches @ 2023-10-31 16:06 UTC (permalink / raw)
  To: tarantool-patches, sergeyb, skaplun, m.kokryashkin; +Cc: Maksim Kokryashkin

These tests are flaky on *BSD, because JIT fails to allocate
the mcode memory. This patch disables them on *BSD platforms.
---
Branch: https://github.com/tarantool/luajit/tree/fckxorg/lj-1004-fix-flaky
PR: https://github.com/tarantool/tarantool/pull/9318
 test/tarantool-tests/gh-7745-oom-on-trace.test.lua    | 2 ++
 test/tarantool-tests/lj-1004-oom-error-frame.test.lua | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/test/tarantool-tests/gh-7745-oom-on-trace.test.lua b/test/tarantool-tests/gh-7745-oom-on-trace.test.lua
index 9ac41ac7..e700f081 100644
--- a/test/tarantool-tests/gh-7745-oom-on-trace.test.lua
+++ b/test/tarantool-tests/gh-7745-oom-on-trace.test.lua
@@ -7,6 +7,8 @@ local test = tap.test('OOM on trace'):skipcond({
                                                    (jit.os == 'OSX'),
   ['Disabled on MacOS due to #8652'] = jit.os == 'OSX',
   ['Test requires JIT enabled'] = not jit.status(),
+  -- OOM during the trace mcode allocation.
+  ['Disabled on *BSD due to #4819'] = jit.os == 'BSD',
 })

 test:plan(1)
diff --git a/test/tarantool-tests/lj-1004-oom-error-frame.test.lua b/test/tarantool-tests/lj-1004-oom-error-frame.test.lua
index 3be6b555..8f831177 100644
--- a/test/tarantool-tests/lj-1004-oom-error-frame.test.lua
+++ b/test/tarantool-tests/lj-1004-oom-error-frame.test.lua
@@ -4,6 +4,8 @@ local test  = tap.test('lj-1004-oom-error-frame'):skipcond({
   ['Test requires JIT enabled'] = not jit.status(),
   ['Test requires GC64 mode disabled'] = ffi.abi('gc64'),
   ['Disabled on MacOS due to #8652'] = jit.os == 'OSX',
+  -- OOM during the trace mcode allocation.
+  ['Disabled on *BSD due to #4819'] = jit.os == 'BSD',
 })

 test:plan(2)
--
2.39.3 (Apple Git-145)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit] test: disable tests for OOM on trace on *BSD
  2023-10-31 16:06 [Tarantool-patches] [PATCH luajit] test: disable tests for OOM on trace on *BSD Maksim Kokryashkin via Tarantool-patches
@ 2023-10-31 17:22 ` Sergey Kaplun via Tarantool-patches
  0 siblings, 0 replies; 2+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-10-31 17:22 UTC (permalink / raw)
  To: Maksim Kokryashkin; +Cc: tarantool-patches

Hi, Maxim!
Thanks for the patch!
Please, consider my comment below.

On 31.10.23, Maksim Kokryashkin wrote:
> These tests are flaky on *BSD, because JIT fails to allocate
> the mcode memory. This patch disables them on *BSD platforms.

IINM, the reason is not the OOM during "mcode" allocation -- we have
similar allocator for BSD, so there are no differences here. The reason
is that some objects are allocated outside protected frame, and there is
no room for them. Also, it may strike on other platforms if Tarantool
has more objects on the start, may not it?

I suppose that to become bulletproof, the lj-1004 test should have
`collectgarbage()` on the start and also the following lines with the
correponding comment right after `pcall()`:

| anchor_memory = nil
| collectgarbage()

I beleive that after such changes there is no need in skipcond for BSD.

So, the gh-7745 has the following lines, and I see no flaky failures for
him. Can you provide the CI links where the test fails?

> ---
> Branch: https://github.com/tarantool/luajit/tree/fckxorg/lj-1004-fix-flaky
> PR: https://github.com/tarantool/tarantool/pull/9318
>  test/tarantool-tests/gh-7745-oom-on-trace.test.lua    | 2 ++
>  test/tarantool-tests/lj-1004-oom-error-frame.test.lua | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/test/tarantool-tests/gh-7745-oom-on-trace.test.lua b/test/tarantool-tests/gh-7745-oom-on-trace.test.lua
> index 9ac41ac7..e700f081 100644
> --- a/test/tarantool-tests/gh-7745-oom-on-trace.test.lua
> +++ b/test/tarantool-tests/gh-7745-oom-on-trace.test.lua
> @@ -7,6 +7,8 @@ local test = tap.test('OOM on trace'):skipcond({
>                                                     (jit.os == 'OSX'),
>    ['Disabled on MacOS due to #8652'] = jit.os == 'OSX',
>    ['Test requires JIT enabled'] = not jit.status(),
> +  -- OOM during the trace mcode allocation.
> +  ['Disabled on *BSD due to #4819'] = jit.os == 'BSD',
>  })
> 
>  test:plan(1)
> diff --git a/test/tarantool-tests/lj-1004-oom-error-frame.test.lua b/test/tarantool-tests/lj-1004-oom-error-frame.test.lua
> index 3be6b555..8f831177 100644
> --- a/test/tarantool-tests/lj-1004-oom-error-frame.test.lua
> +++ b/test/tarantool-tests/lj-1004-oom-error-frame.test.lua
> @@ -4,6 +4,8 @@ local test  = tap.test('lj-1004-oom-error-frame'):skipcond({
>    ['Test requires JIT enabled'] = not jit.status(),
>    ['Test requires GC64 mode disabled'] = ffi.abi('gc64'),
>    ['Disabled on MacOS due to #8652'] = jit.os == 'OSX',
> +  -- OOM during the trace mcode allocation.
> +  ['Disabled on *BSD due to #4819'] = jit.os == 'BSD',
>  })
> 
>  test:plan(2)
> --
> 2.39.3 (Apple Git-145)
> 

-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-31 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-31 16:06 [Tarantool-patches] [PATCH luajit] test: disable tests for OOM on trace on *BSD Maksim Kokryashkin via Tarantool-patches
2023-10-31 17:22 ` Sergey Kaplun via Tarantool-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox