tarantool / tarantool/doc

new handles for fiber parent backtrace feature

Open
#2,830 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

2.10 feature fiber
Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Related dev. issue(s): https://github.com/tarantool/tarantool/commit/3116c4e7d35e75a70a6b4b6d8e9664f2f7c5de8d.

Product: Tarantool
Since: 2.10.0-rc1
Root document:
https://www.tarantool.io/ru/doc/latest/dev_guide/reference_capi/fiber/
https://www.tarantool.io/ru/doc/latest/reference/reference_lua/fiber/
SME: @ CuriousGeorgiy

Details

With backtrace implementation reworked in afc100d, we can now
efficiently collect unwinding information about parents at fiber
creation time:

  • Add core_backtrace_cat helper for concatenating backtraces.
  • Add 'parent_bt' field to struct fiber for storing fiber parent's
    backtrace.
  • Add fiber_parent_backtrace_enabled and corresponding C/Lua toggles for
    controlling parent backtrace collection for newly created fibers.

local fiber = require('fiber')
local log = require('log')
local yaml = require('yaml')

local function foo()
log.info("%s", yaml.encode(fiber.info()[fiber.self()[id]].backtrace))
end

-- Parent backtrace collection feature is disable by default.
fiber.parent_backtrace_enable()
-- Backtrace will contain also parent's backtrace.
fiber.create(foo)

fiber.parent_backtrace_disable()
-- Backtrace will not contain parent's backtrace.
fiber.create(foo)

local function bar()
-- Fibers created before enabling parent backtrace feature will not be
-- contained in backtrace.
fiber.parent_backtrace_enable()
fiber.create(foo)
end

-- Grandchild will not contain child's backtrace.
fiber.create(bar)

Definition of done

  • You have agreed with @CuriousGeorgiy which sections should have information added and which parameters should be updated
  • The necessary sections have been updated.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked C API and Lua fiber reference pages and review their existing backtrace and fiber creation sections. Confirm with @CuriousGeorgiy which sections need the parent backtrace feature and which parameters require updates. Done means the agreed sections and parameters document the new handles and toggles accurately.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.