Skip to content
Snippets Groups Projects
Commit babc4033 authored by Tomas Krizek's avatar Tomas Krizek
Browse files

Merge branch 'http-trace-stability' into 'master'

modules/{http,watchdog}: fix stability problems

See merge request !1136
parents fdb3d720 c0767654
Branches
Tags
1 merge request!1136modules/{http,watchdog}: fix stability problems
Pipeline #76526 failed with stages
in 3 hours, 6 minutes, and 3 seconds
......@@ -23,6 +23,7 @@ local function serve_trace(h, _)
-- Create logging handler callback
local buffer = {}
local buffer_log_cb = ffi.cast('trace_log_f', function (_, msg)
jit.off(true, true) -- JIT for (C -> lua)^2 nesting isn't allowed
table.insert(buffer, ffi.string(msg))
end)
......@@ -32,6 +33,7 @@ local function serve_trace(h, _)
local cond = condition.new()
local waiting, done = false, false
local finish_cb = ffi.cast('trace_callback_f', function (req)
jit.off(true, true) -- JIT for (C -> lua)^2 nesting isn't allowed
table.insert(buffer, req:selected_tostring())
if waiting then
cond:signal()
......
......@@ -23,6 +23,7 @@ end
local function add_tracer(logbuf)
return function (req)
local function qrylogger(_, msg)
jit.off(true, true) -- JIT for (C -> lua)^2 nesting isn't allowed
table.insert(logbuf, ffi.string(msg))
end
req.trace_log = ffi.cast('trace_log_f', qrylogger)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment