Closed gillarda closed 1 year ago
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale
label.
This issue was closed because it has been stalled for 5 days with no activity.
Bug Report
Describe the bug We use the Banzai logging operator for Kubernetes to aggregate the logs of our clusters. With the Kubernetes filter, fluent-bit requests the kube-apiserver for additionnal metadata about the pods. However we noticed that:
To Reproduce
kill -STOP PID
on the controlplane node (wherePID
is the PID of the kube-apiserver) to make the kube-apiserver hangkill -CONT PID
on the controlplane node (wherePID
is the PID of the kube-apiserver)kill -STOP PID
on the controlplane node (wherePID
is the PID of the kube-apiserver)Expected behavior
Your Environment
[INPUT] Name tail DB /tail-db/tail-containers-state.db Mem_Buf_Limit 5MB Parser docker Path /var/log/containers/.log Refresh_Interval 5 Skip_Long_Lines On Tag kubernetes. [FILTER] Name kubernetes Buffer_Size 0 Kube_CA_File /var/run/secrets/kubernetes.io/serviceaccount/ca.crt Kube_Tag_Prefix kubernetes.var.log.containers Kube_Token_File /var/run/secrets/kubernetes.io/serviceaccount/token Kube_URL https://kubernetes.default.svc:443 Match kubernetes.* Merge_Log On Use_Kubelet Off
[OUTPUT] Name forward Match * Host rancher-logging-root-fluentd.cattle-logging-system.svc.cluster.local Port 24240
/# /fluent-bit/bin/fluent-bit --version Fluent Bit v2.0.6 Git commit: 211f841fe2190cf7decc6183bfe697873ec22ff6
/# gdb /fluent-bit/bin/fluent-bit 1 GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.
For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /fluent-bit/bin/fluent-bit... Attaching to program: /fluent-bit/bin/fluent-bit, process 1 [New LWP 7] [New LWP 8] [New LWP 9] [New LWP 10] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007f01183e3561 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7ffefa0ba090, rem=rem@entry=0x7ffefa0ba090) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48 48 ../sysdeps/unix/sysv/linux/clock_nanosleep.c: No such file or directory. (gdb) bt
0 0x00007f01183e3561 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7ffefa0ba090, rem=rem@entry=0x7ffefa0ba090)
1 0x00007f01183e8d43 in __GI___nanosleep (requested_time=requested_time@entry=0x7ffefa0ba090, remaining=remaining@entry=0x7ffefa0ba090) at nanosleep.c:27
2 0x00007f01183e8c7a in __sleep (seconds=0) at ../sysdeps/posix/sleep.c:55
3 0x0000562b77343999 in flb_main (argc=3, argv=0x7ffefa0ba248) at /src/fluent-bit/src/fluent-bit.c:1245
4 0x0000562b77343a20 in main (argc=3, argv=0x7ffefa0ba248) at /src/fluent-bit/src/fluent-bit.c:1264
(gdb) info threads Id Target Id Frame
0 __libc_read (nbytes=5, buf=0x7f0110123e33, fd=79) at ../sysdeps/unix/sysv/linux/read.c:26
26 ../sysdeps/unix/sysv/linux/read.c: No such file or directory. (gdb) bt
0 __libc_read (nbytes=5, buf=0x7f0110123e33, fd=79) at ../sysdeps/unix/sysv/linux/read.c:26
1 __libc_read (fd=79, buf=0x7f0110123e33, nbytes=5) at ../sysdeps/unix/sysv/linux/read.c:24
2 0x00007f0118660545 in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
3 0x00007f011865b75a in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
4 0x00007f011865a604 in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
5 0x00007f011865abd3 in BIO_read () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
6 0x00007f01188b56d1 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
7 0x00007f01188b98a2 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
8 0x00007f01188b7210 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
9 0x00007f01188ea019 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
10 0x00007f01188dfb45 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
11 0x0000562b774106fd in tls_net_handshake (tls=0x7f0110116d70, vhost=0x7f01101169e0 "kubernetes.default.svc", ptr_session=0x7f0110051f40) at /src/fluent-bit/src/tls/openssl.c:529
12 0x0000562b774113d4 in flb_tls_session_create (tls=0x7f0110116d70, connection=0x7f0110138c20, co=0x0) at /src/fluent-bit/src/tls/flb_tls.c:529
13 0x0000562b77446784 in flb_io_net_connect (connection=0x7f0110138c20, coro=0x0) at /src/fluent-bit/src/flb_io.c:162
14 0x0000562b773c195c in create_conn (u=0x7f0110116da0) at /src/fluent-bit/src/flb_upstream.c:533
15 0x0000562b773c1e6a in flb_upstream_conn_get (u=0x7f0110116da0) at /src/fluent-bit/src/flb_upstream.c:682
16 0x0000562b777c0f08 in get_meta_info_from_request (ctx=0x7f01100ee2a0, namespace=0x7f011011eec0 "kube-system", podname=0x7f011011eee0 "canal-99clh", buffer=0x7f0117881298,
size=0x7f0117881290, root_type=0x7f01178816a4, uri=0x7f01178812a0 "/api/v1/namespaces/kube-system/pods/canal-99clh") at /src/fluent-bit/plugins/filter_kubernetes/kube_meta.c:365
17 0x0000562b777c15ea in get_api_server_info (ctx=0x7f01100ee2a0, namespace=0x7f011011eec0 "kube-system", podname=0x7f011011eee0 "canal-99clh", out_buf=0x7f01178816f0,
out_size=0x7f01178816e8) at /src/fluent-bit/plugins/filter_kubernetes/kube_meta.c:487
18 0x0000562b777c3c8f in get_and_merge_meta (ctx=0x7f01100ee2a0, meta=0x7f0117881820, out_buf=0x7f0117881778, out_size=0x7f0117881768)
at /src/fluent-bit/plugins/filter_kubernetes/kube_meta.c:1347
19 0x0000562b777c4794 in flb_kube_meta_get (ctx=0x7f01100ee2a0,
tag=0x7f0110139730 "kubernetes.var.log.containers.canal-99clh_kube-system_calico-node-22bbed8f24e1ea1bf7237b97343760d6c272dd8a0f2eea578bd4cf3823570dbe.log", tag_len=134, data=0x7f0110121e20 "\222\327", data_size=632, out_buf=0x7f0117881918, out_size=0x7f0117881910, meta=0x7f0117881820, props=0x7f0117881800) at /src/fluent-bit/plugins/filter_kubernetes/kube_meta.c:1556
20 0x0000562b777b831e in cb_kube_filter (data=0x7f0110121e20, bytes=632,
tag=0x7f0110139730 "kubernetes.var.log.containers.canal-99clh_kube-system_calico-node-22bbed8f24e1ea1bf7237b97343760d6c272dd8a0f2eea578bd4cf3823570dbe.log", tag_len=134, out_buf=0x7f0117881a10, out_bytes=0x7f0117881a00, f_ins=0x562b79f07830, i_ins=0x562b79f0a4e0, filter_context=0x7f01100ee2a0, config=0x562b79ee2270) at /src/fluent-bit/plugins/filter_kubernetes/kubernetes.c:471
21 0x0000562b7737bacf in flb_filter_do (ic=0x7f011011eda0, data=0x7f0110121e20, bytes=632,
tag=0x7f0110051f60 "kubernetes.var.log.containers.canal-99clh_kube-system_calico-node-22bbed8f24e1ea1bf7237b97343760d6c272dd8a0f2eea578bd4cf3823570dbe.log", tag_len=134, config=0x562b79ee2270) at /src/fluent-bit/src/flb_filter.c:138
22 0x0000562b7743ebf6 in input_chunk_append_raw (in=0x562b79f0a4e0, event_type=0, n_records=2,
tag=0x7f0110051f60 "kubernetes.var.log.containers.canal-99clh_kube-system_calico-node-22bbed8f24e1ea1bf7237b97343760d6c272dd8a0f2eea578bd4cf3823570dbe.log", tag_len=134, buf=0x7f0110121e20, buf_size=632) at /src/fluent-bit/src/flb_input_chunk.c:1624
23 0x0000562b7743f319 in flb_input_chunk_append_raw (in=0x562b79f0a4e0, event_type=0, records=2,
tag=0x7f0110051f60 "kubernetes.var.log.containers.canal-99clh_kube-system_calico-node-22bbed8f24e1ea1bf7237b97343760d6c272dd8a0f2eea578bd4cf3823570dbe.log", tag_len=134, buf=0x7f0110121e20, buf_size=632) at /src/fluent-bit/src/flb_input_chunk.c:1881
24 0x0000562b77442cdd in input_log_append (ins=0x562b79f0a4e0, records=2,
tag=0x7f0110051f60 "kubernetes.var.log.containers.canal-99clh_kube-system_calico-node-22bbed8f24e1ea1bf7237b97343760d6c272dd8a0f2eea578bd4cf3823570dbe.log", tag_len=134, buf=0x7f0110121e20, buf_size=632) at /src/fluent-bit/src/flb_input_log.c:33
25 0x0000562b77442d92 in flb_input_log_append_records (ins=0x562b79f0a4e0, records=2,
tag=0x7f0110051f60 "kubernetes.var.log.containers.canal-99clh_kube-system_calico-node-22bbed8f24e1ea1bf7237b97343760d6c272dd8a0f2eea578bd4cf3823570dbe.log", tag_len=134, buf=0x7f0110121e20, buf_size=632) at /src/fluent-bit/src/flb_input_log.c:60
26 0x0000562b77515718 in process_content (file=0x7f011004a2d0, bytes=0x7f0117881e28) at /src/fluent-bit/plugins/in_tail/tail_file.c:558
27 0x0000562b77517b60 in flb_tail_file_chunk (file=0x7f011004a2d0) at /src/fluent-bit/plugins/in_tail/tail_file.c:1367
28 0x0000562b7750257f in in_tail_collect_event (file=0x7f011004a2d0, config=0x562b79ee2270) at /src/fluent-bit/plugins/in_tail/tail.c:328
29 0x0000562b77506cc4 in tail_fs_event (ins=0x562b79f0a4e0, config=0x562b79ee2270, in_context=0x7f01100167b0) at /src/fluent-bit/plugins/in_tail/tail_fs_inotify.c:267
30 0x0000562b77372857 in flb_input_collector_fd (fd=28, config=0x562b79ee2270) at /src/fluent-bit/src/flb_input.c:1881
31 0x0000562b773a4d20 in flb_engine_handle_event (config=0x562b79ee2270, mask=1, fd=28) at /src/fluent-bit/src/flb_engine.c:490
32 flb_engine_start (config=0x562b79ee2270) at /src/fluent-bit/src/flb_engine.c:853
33 0x0000562b7734cbda in flb_lib_worker (data=0x562b79ee2240) at /src/fluent-bit/src/flb_lib.c:629
34 0x00007f0118b4cea7 in start_thread (arg=) at pthread_create.c:477
35 0x00007f011841ca2f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) thread 3 [Switching to thread 3 (Thread 0x7f011708a700 (LWP 8))]
0 0x00007f011841cd56 in epoll_wait (epfd=11, events=0x7f0110006180, maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
30 ../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory. (gdb) bt
0 0x00007f011841cd56 in epoll_wait (epfd=11, events=0x7f0110006180, maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
1 0x0000562b77db7476 in _mk_event_wait_2 (loop=0x7f0110006310, timeout=-1) at /src/fluent-bit/lib/monkey/mk_core/mk_event_epoll.c:439
2 0x0000562b77db788e in mk_event_wait (loop=0x7f0110006310) at /src/fluent-bit/lib/monkey/mk_core/mk_event.c:194
3 0x0000562b7734d369 in log_worker_collector (data=0x7f0110006080) at /src/fluent-bit/src/flb_log.c:131
4 0x0000562b773c66bb in step_callback (data=0x7f0110006d00) at /src/fluent-bit/src/flb_worker.c:43
5 0x00007f0118b4cea7 in start_thread (arg=) at pthread_create.c:477
6 0x00007f011841ca2f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) thread 4 [Switching to thread 4 (Thread 0x7f0116865700 (LWP 9))]
0 0x00007f011841cd56 in epoll_wait (epfd=52, events=0x7f01101198c0, maxevents=64, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
30 in ../sysdeps/unix/sysv/linux/epoll_wait.c (gdb) bt
0 0x00007f011841cd56 in epoll_wait (epfd=52, events=0x7f01101198c0, maxevents=64, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
1 0x0000562b77db7476 in _mk_event_wait_2 (loop=0x7f011012cde0, timeout=-1) at /src/fluent-bit/lib/monkey/mk_core/mk_event_epoll.c:439
2 0x0000562b77db788e in mk_event_wait (loop=0x7f011012cde0) at /src/fluent-bit/lib/monkey/mk_core/mk_event.c:194
3 0x0000562b7738796b in output_thread (data=0x7f0110047e40) at /src/fluent-bit/src/flb_output_thread.c:248
4 0x0000562b773c66bb in step_callback (data=0x7f011012ac90) at /src/fluent-bit/src/flb_worker.c:43
5 0x00007f0118b4cea7 in start_thread (arg=) at pthread_create.c:477
6 0x00007f011841ca2f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) thread 5 [Switching to thread 5 (Thread 0x7f0116064700 (LWP 10))]
0 0x00007f011841cd56 in epoll_wait (epfd=55, events=0x7f011011ade0, maxevents=64, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
30 in ../sysdeps/unix/sysv/linux/epoll_wait.c (gdb) bt
0 0x00007f011841cd56 in epoll_wait (epfd=55, events=0x7f011011ade0, maxevents=64, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
1 0x0000562b77db7476 in _mk_event_wait_2 (loop=0x7f011012f2a0, timeout=-1) at /src/fluent-bit/lib/monkey/mk_core/mk_event_epoll.c:439
2 0x0000562b77db788e in mk_event_wait (loop=0x7f011012f2a0) at /src/fluent-bit/lib/monkey/mk_core/mk_event.c:194
3 0x0000562b7738796b in output_thread (data=0x7f011012aa60) at /src/fluent-bit/src/flb_output_thread.c:248
4 0x0000562b773c66bb in step_callback (data=0x7f011011cba0) at /src/fluent-bit/src/flb_worker.c:43
5 0x00007f0118b4cea7 in start_thread (arg=) at pthread_create.c:477
6 0x00007f011841ca2f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb)