fluent-bit icon indicating copy to clipboard operation
fluent-bit copied to clipboard

Remove corrupted input chunk on flush

Open bgaifullin opened this issue 3 years ago • 4 comments

The error CIO_CORRUPTED does not handle in flush method and fluent-bit stops processing logs if it meets corrupted file. The patch tries to handle this case by silently removing corrupted chunk.

Addresses #4278


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
  • [ ] Debug log output from testing the change
  • [ ] Attached Valgrind output that shows no leaks or memory corruption was found

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

  • [ ] Attached local packaging test output showing all targets (including any new ones) build.

Documentation

  • [ ] 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.

bgaifullin avatar Aug 09 '22 08:08 bgaifullin

I'm kinda confused as the CIO_CORRUPTED is checked when the function sb_segregate_chunks is executed: https://sourcegraph.com/github.com/fluent/fluent-bit@0336dc63d3358db77c1f35dd15dc87ad368d2edb/-/blob/plugins/in_storage_backlog/sb.c?L354. Do you mind sharing your chunk to reproduce the issue?

Edit: Went back and found that you're referring to a different error than I thought about could not segregate backlog chunk but https://github.com/fluent/fluent-bit/issues/4278#issuecomment-1209024100.

JeffLuoo avatar Sep 01 '22 14:09 JeffLuoo

Unfortunately I cannot share chunk. I can try to collect another kind of information, if you need.

bgaifullin avatar Sep 05 '22 07:09 bgaifullin

There was a recent chunkio refactor (#5753 for details). @bgaifullin can you check if this issue is still relevant?

tarruda avatar Sep 09 '22 14:09 tarruda

Ok, I will check. Thank you.

bgaifullin avatar Sep 09 '22 21:09 bgaifullin

Seems like version 1.9.9 works fine. Thank you

bgaifullin avatar Oct 05 '22 18:10 bgaifullin

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Jan 04 '23 02:01 github-actions[bot]