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

错误的yaml配置,导致ilogtail coredump无法启动 #1503

Closed
blueskygzhz opened this issue May 25, 2024 · 3 comments · Fixed by #1507
Closed

错误的yaml配置,导致ilogtail coredump无法启动 #1503

blueskygzhz opened this issue May 25, 2024 · 3 comments · Fixed by #1507
Labels
bug Something isn't working

Comments

@blueskygzhz
Copy link
Contributor

blueskygzhz commented May 25, 2024

yaml文件:

global:
  EnableTimestampNanosecond: false
inputs:
- Type: input_file
  FilePaths:
  - /root/zhl/als/testjson.log
  MaxDirSearchDepth: 5
  ExcludeFilePaths: []
  TailSizeKB: 0
  AllowingIncludedByMultiConfigs: &id004
    enable: *id004
    global:
      EnableTimestampNanosecond: false
    inputs:
    - Type: input_file
      FilePaths:
      - /root/zhl/als/duohangzhengze.log
      MaxDirSearchDepth: 5
      ExcludeFilePaths: []
      TailSizeKB: 0
      AllowingIncludedByMultiConfigs: *id004

coredump堆栈:
(gdb) r
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff6bc7700 (LWP 63688)]
[New Thread 0x7ffff4ab8700 (LWP 63689)]
[Thread 0x7ffff4ab8700 (LWP 63689) exited]
[New Thread 0x7fffedd74700 (LWP 63690)]
[New Thread 0x7fffed573700 (LWP 63691)]
[New Thread 0x7fffecd72700 (LWP 63692)]
[New Thread 0x7fffec571700 (LWP 63693)]
[New Thread 0x7fffebd70700 (LWP 63694)]
[New Thread 0x7fffeb56f700 (LWP 63695)]
[New Thread 0x7fffead6e700 (LWP 63696)]
[New Thread 0x7fffea56d700 (LWP 63697)]
[New Thread 0x7fffe9d6c700 (LWP 63698)]

Program received signal SIGSEGV, Segmentation fault.
0x00000000006de6c2 in __gthread_active_p() ()
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.6-13.el7.x86_64 elfutils-libelf-0.172-2.el7.x86_64 elfutils-libs-0.172-2.el7.x86_64 glibc-2.17-326.el7_9.x86_64 libattr-2.4.46-13.el7.x86_64 libcap-2.22-9.el7.x86_64 libgcc-4.8.5-44.el7.x86_64 libstdc++-4.8.5-44.el7.x86_64 libuuid-2.23.2-65.el7_9.1.x86_64 systemd-libs-219-62.el7.x86_64 xz-libs-5.2.2-2.el7_9.x86_64 zlib-1.2.7-20.el7_9.x86_64
(gdb) bt
#0 0x00000000006de6c2 in __gthread_active_p() ()
#1 0x00000000006df7e5 in __gnu_cxx::__atomic_add_dispatch(int*, int) ()
#2 0x00000000006f089d in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy() ()
#3 0x00000000006e869f in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) ()
#4 0x00000000032d741d in std::__shared_ptr<YAML::detail::memory_holder, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<YAML::detail::memory_holder, (__gnu_cxx::_Lock_policy)2> const&) ()
#5 0x00000000032d7443 in std::shared_ptrYAML::detail::memory_holder::shared_ptr(std::shared_ptrYAML::detail::memory_holder const&) ()
#6 0x00000000032d7499 in YAML::Node::Node(YAML::Node const&) ()
#7 0x00000000032d84ac in std::pair<YAML::Node, YAML::Node>::pair<YAML::Node, YAML::Node, true>(YAML::Node const&, YAML::Node const&) ()
#8 0x00000000032d6f2d in YAML::detail::iterator_value::iterator_value(YAML::Node const&, YAML::Node const&) ()
#9 0x00000000032d8b38 in YAML::detail::iterator_base<YAML::detail::iterator_value const>::operator*() const ()
#10 0x00000000032d6539 in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#11 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#12 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#13 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#14 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
。。。。。。
#15072 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15073 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15074 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15075 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15076 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15077 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15078 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15079 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15080 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15081 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15082 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15083 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15084 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15085 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15086 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15087 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15088 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15089 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15090 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15091 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15092 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15093 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15094 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
。。。。。。

#15410 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15411 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15412 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15413 0x00000000032d641e in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15414 0x00000000032d655b in logtail::ConvertYamlToJson(YAML::Node const&) [clone .localalias] ()
#15415 0x000000000087e068 in logtail::ParseConfigDetail(std::string const&, std::string const&, Json::Value&, std::string&) ()
#15416 0x000000000087dcfe in logtail::LoadConfigDetailFromFile(std::filesystem::path const&, Json::Value&) ()
#15417 0x0000000000771263 in logtail::ConfigWatcher::CheckConfigDiff() ()
#15418 0x000000000073699c in logtail::Application::Start() ()
#15419 0x00000000006df0b7 in do_worker_process() ()
#15420 0x00000000006df2c1 in main ()

@blueskygzhz blueskygzhz added the bug Something isn't working label May 25, 2024
@alibaba alibaba deleted a comment from quzard May 27, 2024
@blueskygzhz
Copy link
Contributor Author

就是需要检查yaml里面是否存在循环依赖的情况

@Takuka0311
Copy link
Collaborator

是的,配置解析目前缺少对yaml的&和*语法的处理,这是因为iLogtail最初的采集配置都是json格式。近期会添加yaml内循环引用的检查

@Takuka0311
Copy link
Collaborator

Takuka0311 commented May 28, 2024

已经提交了修复 #1507

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants