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

core: fix configuration type cast issue on big endian systems #8904

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

rightblank
Copy link

@rightblank rightblank commented Jun 2, 2024

Addresses #8828

It fixes two types configuration failure issues that only appear on big endian systems,

  • Plugin configurations with predefined int values are always zero, .e.g rotate_wait in tail plugin.
  • Boolean variables in plugin configuration cannot be turned on in configuration files, .e.g read_from_head in tail plugin and lowercase in systemd plugin.

Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
[INPUT]
    Name             tail
    Path             /var/log/dpkg.log
    Read_from_Head   True

[OUTPUT]
    Name   stdout
    Match  *
  • Debug log output from testing the change
fluent-bit/bin# ./fluent-bit -c fluent.conf 
Fluent Bit v3.0.4
* Copyright (C) 2015-2024 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

___________.__                        __    __________.__  __          ________  
\_   _____/|  |  __ __   ____   _____/  |_  \______   \__|/  |_  ___  _\_____  \ 
 |    __)  |  | |  |  \_/ __ \ /    \   __\  |    |  _/  \   __\ \  \/ / _(__  < 
 |     \   |  |_|  |  /\  ___/|   |  \  |    |    |   \  ||  |    \   / /       \
 \___  /   |____/____/  \___  >___|  /__|    |______  /__||__|     \_/ /______  /
     \/                     \/     \/               \/                        \/ 

[2024/06/13 07:49:45] [ info] [fluent bit] version=3.0.4, commit=, pid=36844
[2024/06/13 07:49:45] [ info] [storage] ver=1.5.2, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2024/06/13 07:49:45] [ info] [cmetrics] version=0.9.0
[2024/06/13 07:49:45] [ info] [ctraces ] version=0.5.1
[2024/06/13 07:49:45] [ info] [input:tail:tail.0] initializing
[2024/06/13 07:49:45] [ info] [input:tail:tail.0] storage_strategy='memory' (memory only)
[2024/06/13 07:49:45] [ info] [output:stdout:stdout.0] worker #0 started
[2024/06/13 07:49:45] [ info] [input:tail:tail.0] inotify_fs_add(): inode=27934660 watch_fd=1 name=/var/log/dpkg.log
[0] tail.0: [[1718264985.477004907, {}], {"log"=>"2023-10-04 02:05:44 startup archives install"}]
[1] tail.0: [[1718264985.477014492, {}], {"log"=>"2023-10-04 02:05:44 install base-passwd:s390x <none> 3.5.52build1"}]
[2] tail.0: [[1718264985.477016162, {}], {"log"=>"2023-10-04 02:05:44 status half-installed base-passwd:s390x 3.5.52build1"}]
[3] tail.0: [[1718264985.477017612, {}], {"log"=>"2023-10-04 02:05:44 status unpacked base-passwd:s390x 3.5.52build1"}]
[4] tail.0: [[1718264985.477018979, {}], {"log"=>"2023-10-04 02:05:44 configure base-passwd:s390x 3.5.52build1 3.5.52build1"}]
[5] tail.0: [[1718264985.477020322, {}], {"log"=>"2023-10-04 02:05:44 status half-configured base-passwd:s390x 3.5.52build1"}]
[6] tail.0: [[1718264985.477021651, {}], {"log"=>"2023-10-04 02:05:44 status installed base-passwd:s390x 3.5.52build1"}]
[7] tail.0: [[1718264985.477022937, {}], {"log"=>"2023-10-04 02:05:44 startup archives install"}]
[8] tail.0: [[1718264985.477024258, {}], {"log"=>"2023-10-04 02:05:44 install base-files:s390x <none> 12ubuntu4"}]

[7175] tail.0: [[1718264985.486439385, {}], {"log"=>"2024-06-13 07:33:40 status installed librdkafka-dev:s390x 1.8.0-1build1"}]
[7176] tail.0: [[1718264985.486440608, {}], {"log"=>"2024-06-13 07:33:40 trigproc libc-bin:s390x 2.35-0ubuntu3.4 <none>"}]
[7177] tail.0: [[1718264985.486441821, {}], {"log"=>"2024-06-13 07:33:40 status half-configured libc-bin:s390x 2.35-0ubuntu3.4"}]
[7178] tail.0: [[1718264985.486443057, {}], {"log"=>"2024-06-13 07:33:40 status installed libc-bin:s390x 2.35-0ubuntu3.4"}]

....

^C[2024/06/13 07:50:42] [engine] caught signal (SIGINT)
[2024/06/13 07:50:42] [ warn] [engine] service will shutdown in max 5 seconds
[2024/06/13 07:50:42] [ info] [input] pausing tail.0
[2024/06/13 07:50:43] [ info] [engine] service has stopped (0 pending tasks)
[2024/06/13 07:50:43] [ info] [input] pausing tail.0
[2024/06/13 07:50:43] [ info] [output:stdout:stdout.0] thread worker #0 stopping...
[2024/06/13 07:50:43] [ info] [output:stdout:stdout.0] thread worker #0 stopped

  • Attached Valgrind output that shows no leaks or memory corruption was found
fluent-bit/bin# valgrind ./fluent-bit -c fluent.conf 
==36999== Memcheck, a memory error detector
==36999== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==36999== Using Valgrind-3.23.0 and LibVEX; rerun with -h for copyright info
==36999== Command: ./fluent-bit -c fluent.conf
==36999== 
Fluent Bit v3.0.4-ibm
* Copyright (C) 2015-2024 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

___________.__                        __    __________.__  __          ________  
\_   _____/|  |  __ __   ____   _____/  |_  \______   \__|/  |_  ___  _\_____  \ 
 |    __)  |  | |  |  \_/ __ \ /    \   __\  |    |  _/  \   __\ \  \/ / _(__  < 
 |     \   |  |_|  |  /\  ___/|   |  \  |    |    |   \  ||  |    \   / /       \
 \___  /   |____/____/  \___  >___|  /__|    |______  /__||__|     \_/ /______  /
     \/                     \/     \/               \/                        \/ 

[2024/06/13 07:52:43] [ info] [fluent bit] version=3.0.4, commit=, pid=36999
[2024/06/13 07:52:43] [ info] [storage] ver=1.5.2, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2024/06/13 07:52:43] [ info] [cmetrics] version=0.9.0
[2024/06/13 07:52:43] [ info] [ctraces ] version=0.5.1
[2024/06/13 07:52:43] [ info] [input:tail:tail.0] initializing
[2024/06/13 07:52:43] [ info] [input:tail:tail.0] storage_strategy='memory' (memory only)
[2024/06/13 07:52:43] [ info] [output:stdout:stdout.0] worker #0 started
==36999== Warning: client switching stacks?  SP change: 0x77f80c8 --> 0x53f5ad8
==36999==          to suppress, use: --max-stackframe=37758448 or greater
==36999== Thread 4 flb-out-stdout.0:
==36999== Invalid write of size 8
==36999==    at 0x2A6680: output_pre_cb_flush (flb_output.h:552)
==36999==    by 0xF4FC15: springboard (sjlj.c:36)
==36999==    by 0x8000C796F: ??? (in /usr/local/libexec/valgrind/memcheck-s390x-linux)
==36999==  Address 0x53f5b08 is 21,448 bytes inside a block of size 24,576 alloc'd
==36999==    at 0x48404E0: malloc (vg_replace_malloc.c:446)
==36999==    by 0xF4FDD3: co_create (sjlj.c:61)
==36999==    by 0x2A8799: flb_output_flush_create (flb_output.h:888)
==36999==    by 0x2A8799: output_thread (flb_output_thread.c:290)
==36999==    by 0x303E49: step_callback (flb_worker.c:43)
==36999==    by 0x4F35295: start_thread (pthread_create.c:442)
==36999==    by 0x4FAEF8D: ??? (clone.S:66)
==36999==    by 0xFFFFFFFFFFFFFFFF: ???
==36999== 
==36999== Warning: client switching stacks?  SP change: 0x53f5830 --> 0x77f8168
==36999==          to suppress, use: --max-stackframe=37759288 or greater
==36999== Warning: client switching stacks?  SP change: 0x77f80c8 --> 0x53f58d0
==36999==          to suppress, use: --max-stackframe=37758968 or greater
==36999==          further instances of this message will not be shown.
[0] tail.0: [[1718265163.960652883, {}], {"log"=>"2023-10-04 02:05:44 startup archives install"}]
[1] tail.0: [[1718265163.984352851, {}], {"log"=>"2023-10-04 02:05:44 install base-passwd:s390x <none> 3.5.52build1"}]
[2] tail.0: [[1718265163.984560019, {}], {"log"=>"2023-10-04 02:05:44 status half-installed base-passwd:s390x 3.5.52build1"}]
[3] tail.0: [[1718265163.984657398, {}], {"log"=>"2023-10-04 02:05:44 status unpacked base-passwd:s390x 3.5.52build1"}]
[4] tail.0: [[1718265163.984752655, {}], {"log"=>"2023-10-04 02:05:44 configure base-passwd:s390x 3.5.52build1 3.5.52build1"}]
[5] tail.0: [[1718265163.984847608, {}], {"log"=>"2023-10-04 02:05:44 status half-configured base-passwd:s390x 3.5.52build1"}]
[6] tail.0: [[1718265163.984941561, {}], {"log"=>"2023-10-04 02:05:44 status installed base-passwd:s390x 3.5.52build1"}]
[7] tail.0: [[1718265163.985035225, {}], {"log"=>"2023-10-04 02:05:44 startup archives install"}]
[8] tail.0: [[1718265163.985125880, {}], {"log"=>"2023-10-04 02:05:44 install base-files:s390x <none> 12ubuntu4"}]
[9] tail.0: [[1718265163.985220335, {}], {"log"=>"2023-10-04 02:05:44 status half-installed base-files:s390x 12ubuntu4"}]
[10] tail.0: [[1718265163.985315302, {}], {"log"=>"2023-10-04 02:05:44 status unpacked base-files:s390x 12ubuntu4"}]
[11] tail.0: [[1718265163.985408302, {}], {"log"=>"2023-10-04 02:05:44 configure base-files:s390x 12ubuntu4 12ubuntu4"}]
[12] tail.0: [[1718265163.985501991, {}], {"log"=>"2023-10-04 02:05:44 status half-configured base-files:s390x 12ubuntu4"}]
[13] tail.0: [[1718265163.985595795, {}], {"log"=>"2023-10-04 02:05:44 status installed base-files:s390x 12ubuntu4"}]

......

[6739] tail.0: [[1718265164.926488724, {}], {"log"=>"2024-06-13 07:52:33 trigproc man-db:s390x 2.10.2-1 <none>"}]
[6740] tail.0: [[1718265164.926581033, {}], {"log"=>"2024-06-13 07:52:33 status half-configured man-db:s390x 2.10.2-1"}]
[6741] tail.0: [[1718265164.926674522, {}], {"log"=>"2024-06-13 07:52:33 status installed man-db:s390x 2.10.2-1"}]
[6742] tail.0: [[1718265164.926768316, {}], {"log"=>"2024-06-13 07:52:33 trigproc libc-bin:s390x 2.35-0ubuntu3.4 <none>"}]
[6743] tail.0: [[1718265164.926861738, {}], {"log"=>"2024-06-13 07:52:33 status half-configured libc-bin:s390x 2.35-0ubuntu3.4"}]
[6744] tail.0: [[1718265164.926955747, {}], {"log"=>"2024-06-13 07:52:33 status installed libc-bin:s390x 2.35-0ubuntu3.4"}]
^C[2024/06/13 07:52:50] [engine] caught signal (SIGINT)
[2024/06/13 07:52:50] [ warn] [engine] service will shutdown in max 5 seconds
[2024/06/13 07:52:50] [ info] [input] pausing tail.0
[2024/06/13 07:52:51] [ info] [engine] service has stopped (0 pending tasks)
[2024/06/13 07:52:51] [ info] [input] pausing tail.0
[2024/06/13 07:52:51] [ info] [output:stdout:stdout.0] thread worker #0 stopping...
[2024/06/13 07:52:51] [ info] [output:stdout:stdout.0] thread worker #0 stopped
[2024/06/13 07:52:51] [ info] [input:tail:tail.0] inotify_fs_remove(): inode=27934660 watch_fd=1
==36999== 
==36999== HEAP SUMMARY:
==36999==     in use at exit: 0 bytes in 0 blocks
==36999==   total heap usage: 45,140 allocs, 45,140 frees, 67,221,223 bytes allocated
==36999== 
==36999== All heap blocks were freed -- no leaks are possible
==36999== 
==36999== For lists of detected and suppressed errors, rerun with: -s
==36999== ERROR SUMMARY: 20 errors from 1 contexts (suppressed: 0 from 0)

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • [N/A] Documentation required for this feature

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

@rightblank
Copy link
Author

rightblank commented Jun 13, 2024

Hi, @cosmo0920 @edsiper , could you please help to review this PR, it fixes the issues reported in #8828

@rightblank rightblank changed the title core: fix configuration type cast issue on s390x core: fix configuration type cast issue on big endian systems Jun 14, 2024
@@ -649,10 +649,10 @@ int flb_config_map_set(struct mk_list *properties, struct mk_list *map, void *co
}
else if (m->type == FLB_CONFIG_MAP_TIME) {
m_i_num = (int *) (base + m->offset);
*m_i_num = m->value.val.s_num;
*m_i_num = m->value.val.i_num;
Copy link
Author

@rightblank rightblank Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value is stored in the first 4 byte of val, get it using s_num will add 4 bytes of zero on the higher address in memory, this gives different result on big endian systems and little endian systems, this can be proved using the below code

#include <stdio.h>
#include <stddef.h> // Include this header for size_t

int main() {
    printf("Size of size_t: %zu bytes\n", sizeof(size_t));    // 8
    printf("Size of int:    %zu bytes\n\n", sizeof(int));     // 4

    int a[2] = {1, 0};

    int *i_num = (int *)a;
    printf("Value of i_num: %d\n\n", *i_num);

    size_t *s_num = (size_t *)a;
    printf("Value of s_num: %zu\n", *s_num);
    printf("Cast s_num as int: %d\n", (int)(*s_num));

    return 0;
}

The output of the code on x86(little endian system):

Size of size_t: 8 bytes
Size of int:    4 bytes

Value of i_num: 1

Value of s_num: 1
Cast s_num as int: 1

On s390s system(big endian):

Size of size_t: 8 bytes
Size of int:    4 bytes

Value of i_num: 1

Value of s_num: 4294967296
Cast s_num as int: 0

Copy link
Author

@rightblank rightblank Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The s_num 4294967296 in the output of big endian system equals to 1<<32

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this.

@rightblank
Copy link
Author

rightblank commented Jun 17, 2024

Hi, @cosmo0920 @edsiper, could you please help to review this PR? I added 2 code snippet to show the issues.

It fixes two types configuration failure issues that only appear on big endian systems,

  • Plugin configurations with predefined int values are always zero, .e.g rotate_wait for tail plugin.
  • Plugin configuration cannot be turned on in configuration files, e.g. lowercase in systemd plugin.

@cosmo0920
Copy link
Contributor

Could you ensure DCO, that is, adding Signed-off ... line in your commit?

@rightblank
Copy link
Author

Could you ensure DCO, that is, adding Signed-off ... line in your commit?

Hi, @cosmo0920, could you please help to review again? I am from IBM and can assure DCO is complied, signed-off has been added to the commit.

@rightblank
Copy link
Author

Hi, @cosmo0920, could you help to get this PR merged?

cosmo0920
cosmo0920 previously approved these changes Jun 28, 2024
Copy link
Contributor

@cosmo0920 cosmo0920 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that this change should be nice. However, I didn't have BE byteorder systems. All of my having platforms are LE, i.e. x86_64 (Windows, Linux), aarch64 Linux on Chromebook and Windows on ARM64, and Linux on riscv64 . Before getting merged, should we confirm this PR effects on somewhere else of s390x systems on cloud?

@rightblank
Copy link
Author

rightblank commented Jul 2, 2024

I believe that this change should be nice. However, I didn't have BE byteorder systems. All of my having platforms are LE, i.e. x86_64 (Windows, Linux), aarch64 Linux on Chromebook and Windows on ARM64, and Linux on riscv64 . Before getting merged, should we confirm this PR effects on somewhere else of s390x systems on cloud?

Hi, @cosmo0920, the test log and the valgrind output in the PR description could help to double confirm this is done on s390x,

==36999== by 0x8000C796F: ??? (in /usr/local/libexec/valgrind/memcheck-s390x-linux)

but if you really want to, you can use the LinuxONE Community Cloud. The usage is free for Open-Source Developers:
https://developer.ibm.com/components/ibm-linuxone/gettingstarted/

@ScarletTanager
Copy link

ScarletTanager commented Jul 3, 2024

@cosmo0920 This is a really important change for us, so we'd like to see it merged as soon as feasibly possible. Do you think the test log and valgrind output supplied by @rightblank will be sufficient assurance that this has actually been tested on a BE system?

/cc @edsiper @fujimotos @koleini @leonardo-albertovich @agup006

Copy link
Collaborator

@leonardo-albertovich leonardo-albertovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't touch anything else, this is correct as it is right now.
I'll test this branch in my s390 vm when I start my work day.

Edit: The only thing we'll need you to address both in this PR and the other one is the DCO error.

@rightblank
Copy link
Author

Hi, @edsiper @leonardo-albertovich @cosmo0920 @pwhelan,
There are 5 PRs raised for supporting fluent bit on s390x, you might want to review them together,

And below is the test output after rebasing the code changes in above 5 PRs to master, currently there are 7 cases in failure.

	  1 - main (Not Run)
	  2 - failmalloc (Not Run)
	 28 - flb-rt-filter_aws (Failed)
	 44 - flb-rt-filter_wasm (Failed)
	 54 - flb-rt-out_opensearch (Failed)
	 67 - flb-rt-out_stackdriver (Failed)
	 73 - flb-rt-out_td (Failed)
test output
linux1@fluentbitvm:~$  cat /tmp/test.log 
Running tests...
Test project /home/linux1/code/fluent-bit/build
        Start   1: main
Could not find executable main
Looked in the following places:
main
main
Release/main
Release/main
Debug/main
Debug/main
MinSizeRel/main
MinSizeRel/main
RelWithDebInfo/main
RelWithDebInfo/main
Deployment/main
Deployment/main
Development/main
Development/main
  1/144 Test   #1: main .......................................***Not Run   0.00 sec
        Start   2: failmalloc
Could not find executable failmalloc
Looked in the following places:
failmalloc
failmalloc
Release/failmalloc
Release/failmalloc
Debug/failmalloc
Debug/failmalloc
MinSizeRel/failmalloc
MinSizeRel/failmalloc
RelWithDebInfo/failmalloc
RelWithDebInfo/failmalloc
Deployment/failmalloc
Deployment/failmalloc
Development/failmalloc
Development/failmalloc
  2/144 Test   #2: failmalloc .................................***Not Run   0.00 sec
        Start   3: flb-rt-core-timeout
  3/144 Test   #3: flb-rt-core-timeout ........................   Passed   10.89 sec
        Start   4: flb-rt-core_chunk_trace
  4/144 Test   #4: flb-rt-core_chunk_trace ....................   Passed   12.00 sec
        Start   5: flb-rt-in_cpu
  5/144 Test   #5: flb-rt-in_cpu ..............................   Passed    4.00 sec
        Start   6: flb-rt-in_disk
  6/144 Test   #6: flb-rt-in_disk .............................   Passed    3.00 sec
        Start   7: flb-rt-in_mem
  7/144 Test   #7: flb-rt-in_mem ..............................   Passed    4.00 sec
        Start   8: flb-rt-in_proc
  8/144 Test   #8: flb-rt-in_proc .............................   Passed    4.00 sec
        Start   9: flb-rt-in_netif
  9/144 Test   #9: flb-rt-in_netif ............................   Passed   10.00 sec
        Start  10: flb-rt-in_podman_metrics
 10/144 Test  #10: flb-rt-in_podman_metrics ...................   Passed   14.00 sec
        Start  11: flb-rt-in_docker
 11/144 Test  #11: flb-rt-in_docker ...........................   Passed    4.00 sec
        Start  12: flb-rt-in_head
 12/144 Test  #12: flb-rt-in_head .............................   Passed    3.01 sec
        Start  13: flb-rt-in_dummy
 13/144 Test  #13: flb-rt-in_dummy ............................   Passed   57.99 sec
        Start  14: flb-rt-in_http
 14/144 Test  #14: flb-rt-in_http .............................   Passed   23.00 sec
        Start  15: flb-rt-in_elasticsearch
 15/144 Test  #15: flb-rt-in_elasticsearch ....................   Passed   36.00 sec
        Start  16: flb-rt-in_mqtt
 16/144 Test  #16: flb-rt-in_mqtt .............................   Passed    4.00 sec
        Start  17: flb-rt-in_opentelemetry
 17/144 Test  #17: flb-rt-in_opentelemetry ....................   Passed   12.00 sec
        Start  18: flb-rt-in_random
 18/144 Test  #18: flb-rt-in_random ...........................   Passed    4.01 sec
        Start  19: flb-rt-in_statsd
 19/144 Test  #19: flb-rt-in_statsd ...........................   Passed    7.99 sec
        Start  20: flb-rt-in_splunk
 20/144 Test  #20: flb-rt-in_splunk ...........................   Passed   33.00 sec
        Start  21: flb-rt-in_syslog
 21/144 Test  #21: flb-rt-in_syslog ...........................   Passed   22.00 sec
        Start  22: flb-rt-in_tail
 22/144 Test  #22: flb-rt-in_tail .............................   Passed   72.05 sec
        Start  23: flb-rt-in_udp
 23/144 Test  #23: flb-rt-in_udp ..............................   Passed   11.95 sec
        Start  24: flb-rt-in_tcp
 24/144 Test  #24: flb-rt-in_tcp ..............................   Passed   20.00 sec
        Start  25: flb-rt-in_forward
 25/144 Test  #25: flb-rt-in_forward ..........................   Passed   15.00 sec
        Start  26: flb-rt-in_fluentbit_metrics
 26/144 Test  #26: flb-rt-in_fluentbit_metrics ................   Passed    3.01 sec
        Start  27: flb-rt-in_kubernetes_events
 27/144 Test  #27: flb-rt-in_kubernetes_events ................   Passed    3.99 sec
        Start  28: flb-rt-filter_aws
 28/144 Test  #28: flb-rt-filter_aws ..........................***Failed   30.00 sec
        Start  29: flb-rt-filter_checklist
 29/144 Test  #29: flb-rt-filter_checklist ....................   Passed   17.00 sec
        Start  30: flb-rt-filter_expect
 30/144 Test  #30: flb-rt-filter_expect .......................   Passed   10.00 sec
        Start  31: flb-rt-filter_stdout
 31/144 Test  #31: flb-rt-filter_stdout .......................   Passed    2.00 sec
        Start  32: flb-rt-filter_grep
 32/144 Test  #32: flb-rt-filter_grep .........................   Passed   22.99 sec
        Start  33: flb-rt-filter_throttle
 33/144 Test  #33: flb-rt-filter_throttle .....................   Passed    4.00 sec
        Start  34: flb-rt-filter_nest
 34/144 Test  #34: flb-rt-filter_nest .........................   Passed    8.00 sec
        Start  35: flb-rt-filter_rewrite_tag
 35/144 Test  #35: flb-rt-filter_rewrite_tag ..................   Passed   21.00 sec
        Start  36: flb-rt-filter_kubernetes
 36/144 Test  #36: flb-rt-filter_kubernetes ...................   Passed  199.04 sec
        Start  37: flb-rt-filter_parser
 37/144 Test  #37: flb-rt-filter_parser .......................   Passed   19.96 sec
        Start  38: flb-rt-filter_modify
 38/144 Test  #38: flb-rt-filter_modify .......................   Passed   76.00 sec
        Start  39: flb-rt-filter_lua
 39/144 Test  #39: flb-rt-filter_lua ..........................   Passed   23.00 sec
        Start  40: flb-rt-filter_type_converter
 40/144 Test  #40: flb-rt-filter_type_converter ...............   Passed   14.00 sec
        Start  41: flb-rt-filter_record_modifier
 41/144 Test  #41: flb-rt-filter_record_modifier ..............   Passed   15.00 sec
        Start  42: flb-rt-filter_multiline
 42/144 Test  #42: flb-rt-filter_multiline ....................   Passed   32.00 sec
        Start  43: flb-rt-filter_sysinfo
 43/144 Test  #43: flb-rt-filter_sysinfo ......................   Passed    6.00 sec
        Start  44: flb-rt-filter_wasm
 44/144 Test  #44: flb-rt-filter_wasm .........................***Failed   12.00 sec
        Start  45: flb-rt-filter_ecs
 45/144 Test  #45: flb-rt-filter_ecs ..........................   Passed   21.00 sec
        Start  46: flb-rt-filter_log_to_metrics
 46/144 Test  #46: flb-rt-filter_log_to_metrics ...............   Passed   32.00 sec
        Start  47: flb-rt-core_engine
 47/144 Test  #47: flb-rt-core_engine .........................   Passed   20.00 sec
        Start  48: flb-rt-core_log
 48/144 Test  #48: flb-rt-core_log ............................   Passed    8.00 sec
        Start  49: flb-rt-config_map_opts
 49/144 Test  #49: flb-rt-config_map_opts .....................   Passed    0.06 sec
        Start  50: flb-rt-out_counter
 50/144 Test  #50: flb-rt-out_counter .........................   Passed    4.94 sec
        Start  51: flb-rt-out_datadog
 51/144 Test  #51: flb-rt-out_datadog .........................   Passed    4.01 sec
        Start  52: flb-rt-out_skywalking
 52/144 Test  #52: flb-rt-out_skywalking ......................   Passed    2.99 sec
        Start  53: flb-rt-out_elasticsearch
 53/144 Test  #53: flb-rt-out_elasticsearch ...................   Passed   39.00 sec
        Start  54: flb-rt-out_opensearch
 54/144 Test  #54: flb-rt-out_opensearch ......................***Failed   51.00 sec
        Start  55: flb-rt-out_exit
 55/144 Test  #55: flb-rt-out_exit ............................   Passed   33.00 sec
        Start  56: flb-rt-out_flowcounter
 56/144 Test  #56: flb-rt-out_flowcounter .....................   Passed   15.00 sec
        Start  57: flb-rt-out_forward
 57/144 Test  #57: flb-rt-out_forward .........................   Passed   12.00 sec
        Start  58: flb-rt-out_http
 58/144 Test  #58: flb-rt-out_http ............................   Passed   30.00 sec
        Start  59: flb-rt-out_lib
 59/144 Test  #59: flb-rt-out_lib .............................   Passed   12.00 sec
        Start  60: flb-rt-out_loki
 60/144 Test  #60: flb-rt-out_loki ............................   Passed   36.00 sec
        Start  61: flb-rt-out_null
 61/144 Test  #61: flb-rt-out_null ............................   Passed    5.00 sec
        Start  62: flb-rt-out_plot
 62/144 Test  #62: flb-rt-out_plot ............................   Passed    9.00 sec
        Start  63: flb-rt-out_splunk
 63/144 Test  #63: flb-rt-out_splunk ..........................   Passed    6.00 sec
        Start  64: flb-rt-out_stdout
 64/144 Test  #64: flb-rt-out_stdout ..........................   Passed    6.00 sec
        Start  65: flb-rt-out_syslog
 65/144 Test  #65: flb-rt-out_syslog ..........................   Passed   52.00 sec
        Start  66: flb-rt-out_tcp
 66/144 Test  #66: flb-rt-out_tcp .............................   Passed   35.00 sec
        Start  67: flb-rt-out_stackdriver
 67/144 Test  #67: flb-rt-out_stackdriver .....................***Failed  300.00 sec
        Start  68: flb-rt-out_cloudwatch
 68/144 Test  #68: flb-rt-out_cloudwatch ......................   Passed   40.00 sec
        Start  69: flb-rt-out_firehose
 69/144 Test  #69: flb-rt-out_firehose ........................   Passed   20.00 sec
        Start  70: flb-rt-out_kinesis
 70/144 Test  #70: flb-rt-out_kinesis .........................   Passed   20.00 sec
        Start  71: flb-rt-out_file
 71/144 Test  #71: flb-rt-out_file ............................   Passed   28.00 sec
        Start  72: flb-rt-out_s3
 72/144 Test  #72: flb-rt-out_s3 ..............................   Passed   24.00 sec
        Start  73: flb-rt-out_td
 73/144 Test  #73: flb-rt-out_td ..............................***Failed    1.08 sec
        Start  74: flb-rt-custom_calyptia_test
 74/144 Test  #74: flb-rt-custom_calyptia_test ................   Passed    0.05 sec
        Start  75: flb-rt-processor_metrics_selector
 75/144 Test  #75: flb-rt-processor_metrics_selector ..........   Passed   15.87 sec
        Start  76: flb-rt-processor_content_modifier
 76/144 Test  #76: flb-rt-processor_content_modifier ..........   Passed   36.00 sec
        Start  77: in_dummy_expect.sh
 77/144 Test  #77: in_dummy_expect.sh .........................   Passed    3.13 sec
        Start  78: in_tail_expect.sh
 78/144 Test  #78: in_tail_expect.sh ..........................   Passed    2.07 sec
        Start  79: in_http_tls_expect.sh
 79/144 Test  #79: in_http_tls_expect.sh ......................   Passed    4.04 sec
        Start  80: in_syslog_tcp_tls_expect.sh
 80/144 Test  #80: in_syslog_tcp_tls_expect.sh ................   Passed    6.04 sec
        Start  81: in_syslog_tcp_plaintext_expect.sh
 81/144 Test  #81: in_syslog_tcp_plaintext_expect.sh ..........   Passed    5.03 sec
        Start  82: in_syslog_udp_plaintext_expect.sh
 82/144 Test  #82: in_syslog_udp_plaintext_expect.sh ..........   Passed    5.04 sec
        Start  83: in_syslog_uds_dgram_plaintext_expect.sh
 83/144 Test  #83: in_syslog_uds_dgram_plaintext_expect.sh ....   Passed    5.03 sec
        Start  84: in_syslog_uds_stream_plaintext_expect.sh
 84/144 Test  #84: in_syslog_uds_stream_plaintext_expect.sh ...   Passed    5.03 sec
        Start  85: flb-it-pack
 85/144 Test  #85: flb-it-pack ................................   Passed    0.06 sec
        Start  86: flb-it-pipe
 86/144 Test  #86: flb-it-pipe ................................   Passed    0.04 sec
        Start  87: flb-it-sds
 87/144 Test  #87: flb-it-sds .................................   Passed    0.04 sec
        Start  88: flb-it-sds_list
 88/144 Test  #88: flb-it-sds_list ............................   Passed    0.04 sec
        Start  89: flb-it-hmac
 89/144 Test  #89: flb-it-hmac ................................   Passed    0.03 sec
        Start  90: flb-it-crypto
 90/144 Test  #90: flb-it-crypto ..............................   Passed    0.05 sec
        Start  91: flb-it-hash
 91/144 Test  #91: flb-it-hash ................................   Passed    0.05 sec
        Start  92: flb-it-slist
 92/144 Test  #92: flb-it-slist ...............................   Passed    0.04 sec
        Start  93: flb-it-router
 93/144 Test  #93: flb-it-router ..............................   Passed    0.03 sec
        Start  94: flb-it-network
 94/144 Test  #94: flb-it-network .............................   Passed    0.04 sec
        Start  95: flb-it-unit_sizes
 95/144 Test  #95: flb-it-unit_sizes ..........................   Passed    0.04 sec
        Start  96: flb-it-hashtable
 96/144 Test  #96: flb-it-hashtable ...........................   Passed    0.04 sec
        Start  97: flb-it-http_client
 97/144 Test  #97: flb-it-http_client .........................   Passed    0.07 sec
        Start  98: flb-it-utils
 98/144 Test  #98: flb-it-utils ...............................   Passed    0.06 sec
        Start  99: flb-it-gzip
 99/144 Test  #99: flb-it-gzip ................................   Passed    0.04 sec
        Start 100: flb-it-random
100/144 Test #100: flb-it-random ..............................   Passed    0.03 sec
        Start 101: flb-it-config_map
101/144 Test #101: flb-it-config_map ..........................   Passed    0.05 sec
        Start 102: flb-it-mp
102/144 Test #102: flb-it-mp ..................................   Passed    0.05 sec
        Start 103: flb-it-input_chunk
103/144 Test #103: flb-it-input_chunk .........................   Passed   16.82 sec
        Start 104: flb-it-flb_time
104/144 Test #104: flb-it-flb_time ............................   Passed    0.06 sec
        Start 105: flb-it-file
105/144 Test #105: flb-it-file ................................   Passed    0.04 sec
        Start 106: flb-it-csv
106/144 Test #106: flb-it-csv .................................   Passed    0.03 sec
        Start 107: flb-it-multiline
107/144 Test #107: flb-it-multiline ...........................   Passed    0.57 sec
        Start 108: flb-it-typecast
108/144 Test #108: flb-it-typecast ............................   Passed    0.06 sec
        Start 109: flb-it-base64
109/144 Test #109: flb-it-base64 ..............................   Passed    0.03 sec
        Start 110: flb-it-bucket_queue
110/144 Test #110: flb-it-bucket_queue ........................   Passed    0.04 sec
        Start 111: flb-it-flb_event_loop
111/144 Test #111: flb-it-flb_event_loop ......................   Passed    8.49 sec
        Start 112: flb-it-ring_buffer
112/144 Test #112: flb-it-ring_buffer .........................   Passed    0.04 sec
        Start 113: flb-it-regex
113/144 Test #113: flb-it-regex ...............................   Passed    0.05 sec
        Start 114: flb-it-parser_json
114/144 Test #114: flb-it-parser_json .........................   Passed    0.03 sec
        Start 115: flb-it-parser_ltsv
115/144 Test #115: flb-it-parser_ltsv .........................   Passed    0.07 sec
        Start 116: flb-it-parser_regex
116/144 Test #116: flb-it-parser_regex ........................   Passed    0.06 sec
        Start 117: flb-it-parser_logfmt
117/144 Test #117: flb-it-parser_logfmt .......................   Passed    0.03 sec
        Start 118: flb-it-env
118/144 Test #118: flb-it-env .................................   Passed    0.03 sec
        Start 119: flb-it-log
119/144 Test #119: flb-it-log .................................   Passed   20.03 sec
        Start 120: flb-it-log_event_decoder
120/144 Test #120: flb-it-log_event_decoder ...................   Passed    0.03 sec
        Start 121: flb-it-log_event_encoder
121/144 Test #121: flb-it-log_event_encoder ...................   Passed    0.03 sec
        Start 122: flb-it-processor
122/144 Test #122: flb-it-processor ...........................   Passed    0.02 sec
        Start 123: flb-it-uri
123/144 Test #123: flb-it-uri .................................   Passed    0.01 sec
        Start 124: flb-it-msgpack_append_message
124/144 Test #124: flb-it-msgpack_append_message ..............   Passed    0.00 sec
        Start 125: flb-it-config_format
125/144 Test #125: flb-it-config_format .......................   Passed    0.00 sec
        Start 126: flb-it-config_format_fluentbit
126/144 Test #126: flb-it-config_format_fluentbit .............   Passed    0.01 sec
        Start 127: flb-it-config_format_yaml
127/144 Test #127: flb-it-config_format_yaml ..................   Passed    0.01 sec
        Start 128: flb-it-gelf
128/144 Test #128: flb-it-gelf ................................   Passed    0.00 sec
        Start 129: flb-it-fstore
129/144 Test #129: flb-it-fstore ..............................   Passed    0.01 sec
        Start 130: flb-it-reload
130/144 Test #130: flb-it-reload ..............................   Passed   11.17 sec
        Start 131: flb-it-parser
131/144 Test #131: flb-it-parser ..............................   Passed    0.01 sec
        Start 132: flb-it-stream_processor
132/144 Test #132: flb-it-stream_processor ....................   Passed   17.62 sec
        Start 133: flb-it-record_accessor
133/144 Test #133: flb-it-record_accessor .....................   Passed    0.02 sec
        Start 134: flb-it-metrics
134/144 Test #134: flb-it-metrics .............................   Passed    0.00 sec
        Start 135: flb-it-signv4
135/144 Test #135: flb-it-signv4 ..............................   Passed    0.04 sec
        Start 136: flb-it-aws_util
136/144 Test #136: flb-it-aws_util ............................   Passed    0.01 sec
        Start 137: flb-it-aws_compress
137/144 Test #137: flb-it-aws_compress ........................   Passed    0.01 sec
        Start 138: flb-it-aws_credentials
138/144 Test #138: flb-it-aws_credentials .....................   Passed    0.01 sec
        Start 139: flb-it-aws_credentials_ec2
139/144 Test #139: flb-it-aws_credentials_ec2 .................   Passed    0.01 sec
        Start 140: flb-it-aws_credentials_sts
140/144 Test #140: flb-it-aws_credentials_sts .................   Passed    0.01 sec
        Start 141: flb-it-aws_credentials_http
141/144 Test #141: flb-it-aws_credentials_http ................   Passed    0.01 sec
        Start 142: flb-it-aws_credentials_profile
142/144 Test #142: flb-it-aws_credentials_profile .............   Passed    0.01 sec
        Start 143: flb-it-aws_credentials_process
143/144 Test #143: flb-it-aws_credentials_process .............   Passed    0.04 sec
        Start 144: flb-it-lua
144/144 Test #144: flb-it-lua .................................   Passed    0.01 sec

95% tests passed, 7 tests failed out of 144

Label Time Summary:
internal    =  76.37 sec*proc (60 tests)
runtime     = 1825.86 sec*proc (74 tests)

Total Test time (real) = 1937.70 sec

The following tests FAILED:
	  1 - main (Not Run)
	  2 - failmalloc (Not Run)
	 28 - flb-rt-filter_aws (Failed)
	 44 - flb-rt-filter_wasm (Failed)
	 54 - flb-rt-out_opensearch (Failed)
	 67 - flb-rt-out_stackdriver (Failed)
	 73 - flb-rt-out_td (Failed)

cc @mirko-lazarevic

@leonardo-albertovich
Copy link
Collaborator

leonardo-albertovich commented Aug 14, 2024

These are the preliminary results of the tests in s390 :

	 13 - flb-rt-in_http (Failed)
	 27 - flb-rt-filter_aws (Failed)
	 38 - flb-rt-filter_lua (Failed)
	 43 - flb-rt-filter_wasm (Failed)
	 53 - flb-rt-out_opensearch (Failed)
	 66 - flb-rt-out_stackdriver (Failed)
	 72 - flb-rt-out_td (Failed)

I'll inspect each one of these while the arm tests run locally and follow up my comment with some insight on why these failed and if it's related to the PR or not.

@rightblank
Copy link
Author

@leonardo-albertovich
luajit and wasm is not supported on s390x yet, that's why flb-rt-filter_lua and flb-rt-filter_wasm are failing,
I opened #9172 for supporting luajit on s390x, installing luajit on s390x is described in this comment #9172 (comment)

@leonardo-albertovich
Copy link
Collaborator

I don't think that's the lua issue because I configured the project using -DFLB_PREFER_SYSTEM_LIB_LUAJIT=on which independently of your PR (which unless I'm missing something only adds a warning) should build fluent-bit with proper lua support.

@leonardo-albertovich
Copy link
Collaborator

leonardo-albertovich commented Aug 14, 2024

Plugins / tests and other files manually reviewed :

  1. plugins/custom_calyptia
  2. plugins/filter_aws
  3. plugins/filter_checklist
  4. plugins/filter_ecs
  5. plugins/filter_kubernetes
  6. plugins/filter_log_to_metrics
  7. plugins/filter_lua
  8. plugins/filter_multiline
  9. plugins/in_exec
  10. plugins/in_exec_wasi
  11. plugins/in_fluentbit_metrics
  12. plugins/in_head
  13. plugins/in_http
  14. plugins/in_kubernetes_events
  15. plugins/in_netif
  16. plugins/in_nginx_exporter_metrics
  17. plugins/in_node_exporter_metrics
  18. plugins/in_opentelemetry
  19. plugins/in_podman_metrics
  20. plugins/in_proc
  21. plugins/in_prometheus_remote_write
  22. plugins/in_splunk
  23. plugins/in_statsd
  24. plugins/in_systemd
  25. plugins/in_tail
  26. plugins/in_winevtlog
  27. plugins/in_vinlog
  28. plugins/in_azure
  29. plugins/in_azure_blob
  30. plugins/in_azure_kusto
  31. plugins/in_azure_logs_ingestion
  32. plugins/out_bigquery
  33. plugins/out_cloudwatch_logs
  34. plugins/out_datadog
  35. plugins/out_es
  36. plugins/out_file
  37. plugins/out_flowcounter
  38. plugins/out_forward
  39. plugins/out_gelf
  40. plugins/out_http
  41. plugins/out_influxdb
  42. plugins/out_kafka
  43. plugins/out_kafka_rest
  44. plugins/out_kinesis_firehose
  45. plugins/out_kinesis_streams
  46. plugins/out_loki
  47. plugins/out_opensearch
  48. plugins/out_opentelemetry
  49. plugins/out_oracle_log_analytics
  50. plugins/out_prometheus_exporter
  51. plugins/out_prometheus_remote_write
  52. plugins/out_s3
  53. plugins/out_splunk
  54. plugins/out_stackdriver
  55. plugins/out_syslog
  56. plugins/out_vivo_exporter
  57. tests/internal/config_map
  58. tests/internal/fuzzers
  59. flb_config_map.c
  60. flb_downstream.c
  61. flb_upstream.c

PRs opened to address the identified issues :

  1. flb-rt-in_http addressed with PR tests: in_http: replaced the failure trigger mechanism #9219
  2. flb-rt-filter_aws addressed with PR filter_aws: fixed group metadata fetch issue and addressed (CID 507941) #9220
  3. flb-rt-out_opensearch addressed with PR out_opensearch: fixed a wrong data type used for a boolean option #9221
  4. flb-rt-out_stackdriver addressed in PR out_stackdriver: fixed a wrong data type used for two boolean options #9222
  5. filter_tensorflow addressed with PR filter_tensorflow: fixed a wrong data type used for a boolean option #9224
  6. in_nginx_exporter_metrics addressed with PR in_nginx_exporter_metrics: fixed a wrong data type used for an option #9225
  7. in_opentelemetry addressed with PR in_opentelemetry: fixed a wrong data type used for an option #9226
  8. in_proc addressed with PR in_proc: fixed a wrong data type used for three options #9227
  9. out_es addressed with PR out_es: fixed a wrong data type used for an option #9228
  10. general networking settings addressed with PR network: fixed a wrong data type used for an option #9229
  11. config map internal test addressed with PR tests: config_map: fixed a wrong data type used for an option #9230

These PRs should be merged before this one or any of the related ones because they have no side effects.
Once these have been merged we need to merge #9213, #9205 and #8904 in that order to avoid issues.

Please do not make any modifications to this or any of the related PRs.

Thanks.

@edsiper
Copy link
Member

edsiper commented Aug 15, 2024

base code has been updated. @rightblank please fix the conflict that has been generated so we can run CI and proceed to the merge.

@rightblank
Copy link
Author

rightblank commented Aug 16, 2024

base code has been updated. @rightblank please fix the conflict that has been generated so we can run CI and proceed to the merge.

Done. @edsiper

Signed-off-by: YingJie Fu <fyjbj@cn.ibm.com>
@edsiper
Copy link
Member

edsiper commented Aug 19, 2024

thanks everyone for helping to troubleshoot and fix this bug :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants