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

Dry run memoy error and abort - freeing unallocated pointer #7283

Closed
ccampo133 opened this issue Apr 28, 2023 · 10 comments
Closed

Dry run memoy error and abort - freeing unallocated pointer #7283

ccampo133 opened this issue Apr 28, 2023 · 10 comments
Labels
bug macOS Issues on macOS targets. Stale

Comments

@ccampo133
Copy link

ccampo133 commented Apr 28, 2023

Bug Report

Describe the bug
Any call to dry run seems to fail, even when the configuration test is successful. Example using the default configuration:

$ fluent-bit --dry-run
Fluent Bit v2.1.1
* Copyright (C) 2015-2022 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

configuration test is successful
fluent-bit(37664,0x7ff85dc37340) malloc: *** error for object 0x7ff85dc37340: pointer being freed was not allocated
fluent-bit(37664,0x7ff85dc37340) malloc: *** set a breakpoint in malloc_error_break to debug
[1]    37664 abort      fluent-bit --dry-run

$ echo $?
134

The dry run feature is non-functional as a result.

Edit: seems to be confined to MacOS - I do not see the issue on Linux versions. I have not tested Windows versions.

To Reproduce

Run the above example using Fluent Bit 2.1.1 on MacOS.

Expected behavior

Fluent Bit should not abort and instead should exit successfully (code 0).

Your Environment

  • Version used: 2.1.1
  • Configuration: the default config
  • Operating System and version: MacOS Ventura 13.3.1
@leonardo-albertovich
Copy link
Collaborator

This is legit, I saw it before but couldn't get to it. Do you want to try to fix it or would you rather wait for someone from the team to do it?

The easiest way to pinpoint it (and it should be fairly simple) would be building fluent-bit with address sanitizer. If you decide you want to give it a try but don't know how to let me know and I'll guide you through the process.

@patrick-stephens
Copy link
Contributor

FYI, it doesn't fail on container builds so guessing it's a macOS thing:

$ docker run --rm -it fluent/fluent-bit:2.1.1 --dry-run
Fluent Bit v2.1.1
* Copyright (C) 2015-2022 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

configuration test is successful
$ docker run --rm -it fluent/fluent-bit:2.1.2 --dry-run
Fluent Bit v2.1.2
* Copyright (C) 2015-2022 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

configuration test is successful

@ccampo133
Copy link
Author

Confirmed that the Linux version does not appear to be affected. I also tested the Docker versions and do not see this error.

@leonardo-albertovich I can't promise that this is something I'll have the time to fix myself, but if I do get around to it, I'll post a PR here. If I do take a look, I'll probably ping you for some guidance, so I appreciate the offer. I'm not that familiar with the C ecosystem.

@patrick-stephens patrick-stephens added bug macOS Issues on macOS targets. and removed status: waiting-for-triage labels Apr 28, 2023
@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot added the Stale label Aug 12, 2023
@ccampo133
Copy link
Author

Haven't got a chance to look at this but I assume it still exists.

@github-actions github-actions bot removed the Stale label Aug 21, 2023
Copy link
Contributor

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.

Copy link
Contributor

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.

@github-actions github-actions bot added the Stale label Feb 21, 2024
@ccampo133
Copy link
Author

Still an issue as of v2.2.2

$ fluent-bit --version
Fluent Bit v2.2.2
Git commit:

$ fluent-bit --dry-run
Fluent Bit v2.2.2
* Copyright (C) 2015-2024 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

____________________
< Fluent Bit v2.2.2 >
 -------------------
          \
           \
            \          __---__
                    _-       /--______
               __--( /     \ )XXXXXXXXXXX\v.
             .-XXX(   O   O  )XXXXXXXXXXXXXXX-
            /XXX(       U     )        XXXXXXX\
          /XXXXX(              )--_  XXXXXXXXXXX\
         /XXXXX/ (      O     )   XXXXXX   \XXXXX\
         XXXXX/   /            XXXXXX   \__ \XXXXX
         XXXXXX__/          XXXXXX         \__---->
 ---___  XXX__/          XXXXXX      \__         /
   \-  --__/   ___/\  XXXXXX            /  ___--/=
    \-\    ___/    XXXXXX              '--- XXXXXX
       \-\/XXX\ XXXXXX                      /XXXXX
         \XXXXXXXXX   \                    /XXXXX/
          \XXXXXX      >                 _/XXXXX/
            \XXXXX--__/              __-- XXXX/
             -XXXXXXXX---------------  XXXXXX-
                \XXXXXXXXXXXXXXXXXXXXXXXXXX/
                  ""VXXXXXXXXXXXXXXXXXXV""

configuration test is successful
fluent-bit(57344,0x7ff84cd197c0) malloc: *** error for object 0x7ff84cd197c0: pointer being freed was not allocated
fluent-bit(57344,0x7ff84cd197c0) malloc: *** set a breakpoint in malloc_error_break to debug
[1]    57344 abort      fluent-bit --dry-run

Copy link
Contributor

github-actions bot commented Jun 3, 2024

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.

@github-actions github-actions bot added the Stale label Jun 3, 2024
Copy link
Contributor

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug macOS Issues on macOS targets. Stale
Projects
None yet
Development

No branches or pull requests

3 participants