Comments (8)
Problem does not appear if jit.off() is called
from avro-schema.
Can you share a reproducer?
from avro-schema.
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.
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.
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.
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.
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.
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)
- Random flatten errors HOT 1
- Create validate which do not copy a data
- Document 'hidden' field feature
- nil and box.NULL are treated differently in validate of a union
- Consider adding package level constants for types HOT 2
- Wrong array validation HOT 1
- flatten says 'Expecting MAP, encountered LONG' for a string
- validate, default value MAP convert to ARRAY HOT 2
- LuajitError: <schema-jit>:<LINE>: function at line <LINE> has more than 200 local variables HOT 4
- Non-informative error on empty model creation HOT 3
- Support decimal
- document: add doc for avro.create options argument
- validation for "long" allows "string" HOT 3
- [string "avro.utils.fstack"]:31: attempt to call field 'clear' (a nil value)
- Consider replacing back fstack with debug.getlocal() HOT 1
- Error when a schema has defaults array values HOT 1
- Set up simple CI based on GitHub Actions
- Nullable enum field causes data corruption on unflatten
- RPM fails to build with packpack HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avro-schema.