pingcap / pingcap/tiflash

TiFlash crash for the null pointer access

Open
#6,301 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

affects-6.5 affects-6.6 affects-7.0 affects-7.1 affects-7.5 affects-8.1 component/compute may-affects-4.0 may-affects-5.0 may-affects-5.1 may-affects-5.2 may-affects-5.3 may-affects-5.4 may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 severity/major type/bug
Dominant language
C++
Stars
1k
Forks
423
Avg merge
1d 15h
Merged PRs (30d)
24

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)
[2022/11/14 08:40:46.735 +08:00] [ERROR] [BaseDaemon.cpp:377] [########################################] [source=BaseDaemon] [thread_id=7684]
[2022/11/14 08:40:46.735 +08:00] [ERROR] [BaseDaemon.cpp:378] ["(from thread 7683) Received signal Segmentation fault(11)."] [source=BaseDaemon] [thread_id=7684]
[2022/11/14 08:40:46.736 +08:00] [ERROR] [BaseDaemon.cpp:406] ["Address: NULL pointer."] [source=BaseDaemon] [thread_id=7684]
[2022/11/14 08:40:46.736 +08:00] [ERROR] [BaseDaemon.cpp:414] ["Access: read."] [source=BaseDaemon] [thread_id=7684]
[2022/11/14 08:40:46.736 +08:00] [ERROR] [BaseDaemon.cpp:426] ["Unknown si_code."] [source=BaseDaemon] [thread_id=7684]
[2022/11/14 08:40:46.767 +08:00] [ERROR] [BaseDaemon.cpp:570] ["\n       0x5544c01\tfaultSignalHandler(int, siginfo_t*, void*) [tiflash+89410561]\n                \tlibs/libdaemon/src/BaseDaemon.cpp:221\n  0x7fa37a025630\t<unknown symbol> [libpthread.so.0+63024]\n       0x69b6913\ttimer_thread(void*) [tiflash+110848275]\n                \tcontrib/grpc/src/core/lib/iomgr/timer_manager.cc:284\n       0x6c8bdca\tgrpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::__invoke(void*) [tiflash+113819082]\n                \tcontrib/grpc/src/core/lib/gprpp/thd_posix.cc:110\n  0x7fa37a01dea5\tstart_thread [libpthread.so.0+32421]"] [source=BaseDaemon] [thread_id=7684]
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiFlash version? (Required)

master 6b393836ea60e5695692e59644e2f9f6aaa81c07

Contributor guide

No contributing guide indexed for this repository

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 stack trace in libs/libdaemon/src/BaseDaemon.cpp:221 and contrib/grpc/src/core/lib/iomgr/timer_manager.cc:284, then inspect the related thread code in thd_posix.cc:110. Reproduce the segmentation fault if possible and trace the NULL read to its source; done means the crash is prevented and the behavior is covered by an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, grpc
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.