GithubHelp home page GithubHelp logo

Comments (8)

olegrok avatar olegrok commented on June 13, 2024

Problem does not appear if jit.off() is called

from avro-schema.

Totktonada avatar Totktonada commented on June 13, 2024

Can you share a reproducer?

from avro-schema.

olegrok avatar olegrok commented on June 13, 2024

It happens inside my application. Avro schema code that I extracted does not reproduce it.

I think jit traces are broken inside my application and root of problem could be inside another place

from avro-schema.

Totktonada avatar Totktonada commented on June 13, 2024

I propose to work on a reproducer (at least via avro-schema, at max reduce it to just Lua code) during some fixed time (say, two working days) and:

  • If it'll succeed, file an issue against tarantool/tarantool or tarantool/luajit regarding GC 64 / Mac OS.
  • If it'll fail, close this issue (or what else we can do?).

from avro-schema.

olegrok avatar olegrok commented on June 13, 2024

This logic looks like:

local fiber = require('fiber')
local json = require('json')
local avro_schema = require('avro_schema')

local json_schema = [[
[
    {
    "type": "record",
    "name": "TestObject",
    "fields": [
        {"name": "id", "type": "long"},
        {"name": "value", "type": "int"},
        {"name": "body", "type": "string*"}
    ]
  }
]
]]

local schema = json.decode(json_schema)

local ok, handle = avro_schema.create(schema)

assert(ok, handle)

local object = {
    TestObject = {
        id = 1,
        value = 1,
        body = "tdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdgtdg",
    }
}

local function validate_object(obj)
    local ok, err = avro_schema.validate(handle, obj)
    assert(ok, err)
end

validate_object(object)

box.cfg{memtx_memory = 4 * 2^30}

local space = box.schema.space.create('test_space', {if_not_exists = true})
space:create_index('pk', {if_not_exists = true})


local function insert_object(obj)
    space:replace({obj.id, obj.value, obj.body})
end

local worker_count = 1e3

for i = 1, worker_count do
    local obj = table.deepcopy(object)
    obj['TestObject']['id'] = i
    fiber.new(function()
        while true do
            validate_object(obj)
            insert_object(obj['TestObject'])
            obj['TestObject']['id'] = obj['TestObject']['id'] + worker_count
        end
    end)
end

But seems it doesn't reproduce a problem.

from avro-schema.

Totktonada avatar Totktonada commented on June 13, 2024

Can you share a reproducer based on your application (it is okay to do so privately; preferably via an issue in the application repository)?

from avro-schema.

olegrok avatar olegrok commented on June 13, 2024

I haven't faced this issue for long. As I remember it was perftest for TDG1. I'm not sure I'm able to reproduce it again but probably I should try to do it.

Also feel free to close this issue. I'm not sure it's avro-schema issue it looks like luajit bug. The most awful that I don't have isolated testcase.

from avro-schema.

Totktonada avatar Totktonada commented on June 13, 2024

With non-isolated test case we at least can make a guess about similarity to othre known problems and try to bisect on tarantool and/or luajit commits.

from avro-schema.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.