tarantool / tarantool/tarantool
http client attempts to stop non-existent ev watcher
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 3.7k
- Forks
- 419
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 88
Description
Bug description
A clear and concise description of what the bug is.
- OS: Linux
- OS Version: Ubuntu 24.04
- Architecture: amd64
Version: a4f4569286c2bc6c237656f63a93b5ff5913ad95
Tarantool 3.3.0-entrypoint-76-g42c2a2f5e5
Target: Linux-x86_64-RelWithDebInfo
Build options: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BACKTRACE=TRUE
Compiler: Clang-16.0.6
C_FLAGS: -fexceptions -funwind-tables -fasynchronous-unwind-tables -fno-common -msse2 -fsanitize=fuzzer-no-link -fsanitize=address -fsanitize-blacklist=/__w/tarantool/tarantool/asan/asan.supp -fmacro-prefix-map=/__w/tarantool/tarantool=. -std=c11 -Wall -Wextra -fsanitize=alignment,bool,bounds,builtin,enum,float-cast-overflow,float-divide-by-zero,function,integer-divide-by-zero,return,shift,unreachable,vla-bound -fno-sanitize-recover=alignment,bool,bounds,builtin,enum,float-cast-overflow,float-divide-by-zero,function,integer-divide-by-zero,return,shift,unreachable,vla-bound -Wno-gnu-alignof-expression -Wno-cast-function-type -Werror -O2 -g -DNDEBUG -ggdb -O2
CXX_FLAGS: -fexceptions -funwind-tables -fasynchronous-unwind-tables -fno-common -msse2 -fsanitize=fuzzer-no-link -fsanitize=address -fsanitize-blacklist=/__w/tarantool/tarantool/asan/asan.supp -fmacro-prefix-map=/__w/tarantool/tarantool=. -std=c++11 -Wall -Wextra -fsanitize=alignment,bool,bounds,builtin,enum,float-cast-overflow,float-divide-by-zero,function,integer-divide-by-zero,return,shift,unreachable,vla-bound -fno-sanitize-recover=alignment,bool,bounds,builtin,enum,float-cast-overflow,float-divide-by-zero,function,integer-divide-by-zero,return,shift,unreachable,vla-bound -Wno-invalid-offsetof -Wno-gnu-alignof-expression -Wno-cast-function-type -Werror -O2 -g -DNDEBUG -ggdb -O2
Steps to reproduce
execute http_client_test.lua
Actual behavior
(gdb) bt
#0 0x0000555556f3e6b9 in clear_pending (loop=0x555558461700 <default_loop_struct>, w=0x0) at third_party/libev/ev.c:4317
#1 ev_io_stop (loop=<optimized out>, w=0x0) at third_party/libev/ev.c:4401
#2 0x000055555657b63f in curl_multi_sock_cb (easy=<optimized out>, fd=<optimized out>, what=<optimized out>, envp=<optimized out>,
watcherp=<optimized out>) at /__w/tarantool/tarantool/src/curl.c:186
#3 0x000055555693654b in connc_disconnect (data=<optimized out>, conn=0x61a000001e80, connc=0x6160000013d8, do_shutdown=false)
at /__w/tarantool/tarantool/third_party/curl/lib/conncache.c:977
#4 0x000055555695d309 in multi_done (data=data@entry=0x621000043900, status=status@entry=CURLE_OK, premature=<optimized out>)
at /__w/tarantool/tarantool/third_party/curl/lib/multi.c:787
#5 0x000055555695f590 in multi_runsingle (multi=multi@entry=0x616000001280, nowp=nowp@entry=0x7fffffffccd8,
data=data@entry=0x621000043900) at /__w/tarantool/tarantool/third_party/curl/lib/multi.c:2561
#6 0x00005555569608c0 in multi_socket (multi=0x616000001280, checkall=<optimized out>, s=<optimized out>, ev_bitmask=<optimized out>,
running_handles=0x7ffff348c320) at /__w/tarantool/tarantool/third_party/curl/lib/multi.c:3249
#7 0x0000555556960a60 in curl_multi_socket_action (multi=0x555558461700 <default_loop_struct>, multi@entry=0x616000001280, s=3,
s@entry=18, ev_bitmask=4, ev_bitmask@entry=1, running_handles=0x0, running_handles@entry=0x7ffff348c320)
at /__w/tarantool/tarantool/third_party/curl/lib/multi.c:3377
#8 0x000055555657d1c2 in curl_multi_process (multi=<optimized out>, sockfd=<optimized out>, events=<optimized out>)
at /__w/tarantool/tarantool/src/curl.c:62
#9 0x0000555556f38d5f in ev_invoke_pending (loop=0x555558461700 <default_loop_struct>) at third_party/libev/ev.c:3797
#10 0x0000555556f3b234 in ev_run (loop=0x555558461700 <default_loop_struct>, flags=<optimized out>) at third_party/libev/ev.c:4221
#11 0x000055555659121d in tarantool_lua_run_script (path=0x7fffffffda04 "/__w/tarantool/tarantool/test-run/lib/luatest/bin/luatest",
instance=<optimized out>, opt_mask=<optimized out>, optc=<optimized out>, optv=<optimized out>, argc=<optimized out>,
argv=<optimized out>) at lua/init.c:1218
#12 0x0000555555e7982b in main (argc=9, argv=0x60c000000048) at /__w/tarantool/tarantool/src/main.cc:1060
(gdb)
Expected behavior
no segfault
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with http_client_test.lua and the curl_multi_sock_cb path in src/curl.c, then inspect the ev_io_stop call shown in third_party/libev/ev.c. Reproduce the failure under the reported Linux setup and verify that the test completes without a segmentation fault.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, lua
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100