Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysprof: add_proto call in the default mode #7264

Closed
mkokryashkin opened this issue Jun 12, 2022 · 0 comments · Fixed by #7435
Closed

sysprof: add_proto call in the default mode #7264

mkokryashkin opened this issue Jun 12, 2022 · 0 comments · Fixed by #7435
Assignees
Labels
2.10 Target is 2.10 and all newer release/master branches bug Something isn't working

Comments

@mkokryashkin
Copy link
Contributor

mkokryashkin commented Jun 12, 2022

Bug description
Function prototype allocation during the sysprof runtime in the default mode leads to SIGABRT.

  • OS: Linux
  • OS Version: Manjaro, Kernel 5.10.114-1
  • Architecture: amd64
Tarantool 2.11.0-entrypoint-114-gbb792631c
Target: Linux-x86_64-Debug
Build options: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BACKTRACE=ON
Compiler: /usr/bin/cc /usr/bin/c++
C_FLAGS: -fexceptions -funwind-tables -fno-common -fopenmp -msse2 -std=c11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-format-truncation -Wno-gnu-alignof-expression -fno-gnu89-inline -Wno-cast-function-type -Werror
CXX_FLAGS: -fexceptions -funwind-tables -fno-common -fopenmp -msse2 -std=c++11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-format-truncation -Wno-invalid-offsetof -Wno-gnu-alignof-expression -Wno-cast-function-type -Werror

Steps to reproduce

Run this script:

jit.off()

local res, err = misc.sysprof.start({mode="D"})
assert(res, err)

local chunk = [[
function lua_global_f()
  local a = 'teststring'
end
]]

local f, err = loadstring(chunk)
assert(f, err)
f()
lua_global_f()

collectgarbage()

local res, err = misc.sysprof.stop()
assert(res, err)

as tarantool script.lua

Actual behavior
tarantool: /home/maxim/Programming/tarantool/third_party/luajit/src/lj_wbuf.c:55: wbuf_reserve: Assertion `n <= buf->size' failed.
[1] 407642 IOT instruction (core dumped) ./src/tarantool

**Expected behavior**
Correct execution with no side effects.
@mkokryashkin mkokryashkin added the bug Something isn't working label Jun 12, 2022
@mkokryashkin mkokryashkin self-assigned this Jun 12, 2022
@mkokryashkin mkokryashkin changed the title sysprof: assertion in lj_wbuf violated when running in interactive mode sysprof: add_proto call in the default mode Jun 12, 2022
mkokryashkin added a commit to tarantool/luajit that referenced this issue Jun 12, 2022
There is no need to dump proto or trace information for sysprof
in the default mode. Moreover, attempts to do so will lead to
segmentation fault due to uninitialized buffer. This commit
disables proto and trace dumps in the default mode.

Resolves tarantool/tarantool#7264
mkokryashkin added a commit to mkokryashkin/tarantool that referenced this issue Jun 12, 2022
sysprof: disable proto and trace dumps in default

Closes tarantool#7264

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
NO_CHANGELOG=LuaJIT submodule bump
mkokryashkin added a commit to tarantool/luajit that referenced this issue Jul 4, 2022
There is no need to dump proto or trace information for sysprof
in the default mode. Moreover, attempts to do so will lead to
segmentation fault due to uninitialized buffer. This commit
disables proto and trace dumps in the default mode.

Resolves tarantool/tarantool#7264
mkokryashkin added a commit to mkokryashkin/tarantool that referenced this issue Jul 4, 2022
sysprof: disable proto and trace dumps in default

Closes tarantool#7264

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
NO_CHANGELOG=LuaJIT submodule bump
igormunkin pushed a commit to tarantool/luajit that referenced this issue Jul 15, 2022
There is no need to dump proto or trace information for sysprof
in the default mode. Moreover, attempts to do so will lead to
segmentation fault due to uninitialized buffer. This commit
disables proto and trace dumps in the default mode.

Resolves tarantool/tarantool#7264
igormunkin pushed a commit to tarantool/luajit that referenced this issue Jul 15, 2022
There is no need to dump proto or trace information for sysprof
in the default mode. Moreover, attempts to do so will lead to
segmentation fault due to uninitialized buffer. This commit
disables proto and trace dumps in the default mode.

Resolves tarantool/tarantool#7264

Reviewed-by: Sergey Kaplun <skaplun@tarantool.org>
Reviewed-by: Igor Munkin <imun@tarantool.org>
Signed-off-by: Igor Munkin <imun@tarantool.org>
(cherry picked from commit 1019a57)
mkokryashkin added a commit to mkokryashkin/tarantool that referenced this issue Jul 18, 2022
sysprof: disable proto and trace dumps in default

Closes tarantool#7264

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
mkokryashkin added a commit to mkokryashkin/tarantool that referenced this issue Jul 18, 2022
sysprof: disable proto and trace dumps in default

Closes tarantool#7264

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
igormunkin added a commit to igormunkin/tarantool that referenced this issue Jul 19, 2022
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes tarantool#7172
Closes tarantool#7244
Closes tarantool#7264
Part of tarantool#7230

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
igormunkin added a commit to igormunkin/tarantool that referenced this issue Jul 19, 2022
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes tarantool#7172
Closes tarantool#7244
Closes tarantool#7264
Part of tarantool#7230

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
igormunkin added a commit to igormunkin/tarantool that referenced this issue Jul 19, 2022
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes tarantool#7172
Closes tarantool#7244
Closes tarantool#7264
Part of tarantool#7230

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
igormunkin added a commit to igormunkin/tarantool that referenced this issue Jul 19, 2022
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes tarantool#7172
Closes tarantool#7244
Closes tarantool#7264
Part of tarantool#7230

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
igormunkin added a commit to igormunkin/tarantool that referenced this issue Jul 20, 2022
* test: increase sampling interval in sysprof tests
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes tarantool#7172
Closes tarantool#7244
Closes tarantool#7264
Part of tarantool#7230

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
igormunkin added a commit to igormunkin/tarantool that referenced this issue Jul 20, 2022
* test: increase sampling interval in sysprof tests
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes tarantool#7172
Closes tarantool#7244
Closes tarantool#7264
Part of tarantool#7230

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
igormunkin added a commit to igormunkin/tarantool that referenced this issue Jul 20, 2022
* test: increase sampling interval in sysprof tests
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes tarantool#7172
Closes tarantool#7244
Closes tarantool#7264
Part of tarantool#7230

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
igormunkin added a commit to igormunkin/tarantool that referenced this issue Jul 20, 2022
* test: increase sampling interval in sysprof tests
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes tarantool#7172
Closes tarantool#7244
Closes tarantool#7264
Part of tarantool#7230

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
igormunkin added a commit to igormunkin/tarantool that referenced this issue Jul 20, 2022
* test: increase sampling interval in sysprof tests
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes tarantool#7172
Closes tarantool#7244
Closes tarantool#7264
Part of tarantool#7230

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
igormunkin added a commit to igormunkin/tarantool that referenced this issue Jul 22, 2022
* test: make sysprof tests more deterministic
* test: increase sampling interval in sysprof tests
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes tarantool#7172
Closes tarantool#7244
Closes tarantool#7264
Part of tarantool#7230

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
igormunkin added a commit to igormunkin/tarantool that referenced this issue Jul 26, 2022
* test: make sysprof tests more deterministic
* test: increase sampling interval in sysprof tests
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes tarantool#7172
Closes tarantool#7244
Closes tarantool#7264
Part of tarantool#7230
Needed for tarantool#7472

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
igormunkin added a commit to igormunkin/tarantool that referenced this issue Jul 26, 2022
* test: make sysprof tests more deterministic
* test: increase sampling interval in sysprof tests
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes tarantool#7172
Closes tarantool#7244
Closes tarantool#7264
Part of tarantool#7230
Needed for tarantool#7472

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
igormunkin added a commit that referenced this issue Jul 27, 2022
* test: make sysprof tests more deterministic
* test: increase sampling interval in sysprof tests
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes #7172
Closes #7244
Closes #7264
Part of #7230
Needed for #7472

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
igormunkin added a commit that referenced this issue Jul 27, 2022
* test: make sysprof tests more deterministic
* test: increase sampling interval in sysprof tests
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes #7172
Closes #7244
Closes #7264
Part of #7230
Needed for #7472

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
p7nov pushed a commit that referenced this issue Aug 3, 2022
* test: make sysprof tests more deterministic
* test: increase sampling interval in sysprof tests
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes #7172
Closes #7244
Closes #7264
Part of #7230
Needed for #7472

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
mkokryashkin pushed a commit to mkokryashkin/tarantool that referenced this issue Sep 9, 2022
* test: make sysprof tests more deterministic
* test: increase sampling interval in sysprof tests
* LJ_GC64: Fix IR_VARG offset for fixed number of results.
* sysprof: implement stack sandwich support
* symtab: fix .symtab section dump of the executable
* sysprof: disable proto and trace dumps in default
* ci: introduce GitHub action for environment setup
* build: configure parallel jobs
* ci: replace hw.ncpu with hw.logicalcpu for macOS
* ci: add Tarantool integration testing
* ci: remove GC64 matrix entries for ARM64 workflows
* ci: fix --parallel argument for MacOS runners

Closes tarantool#7172
Closes tarantool#7244
Closes tarantool#7264
Part of tarantool#7230
Needed for tarantool#7472

NO_DOC=LuaJIT submodule bump
NO_TEST=LuaJIT submodule bump
@igormunkin igormunkin added 2.10 Target is 2.10 and all newer release/master branches and removed 1sp labels Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.10 Target is 2.10 and all newer release/master branches bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants