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

Fix segmentation fault in Logcollector #3995

Merged
merged 3 commits into from
Sep 23, 2019
Merged

Conversation

vikman90
Copy link
Member

@vikman90 vikman90 commented Sep 20, 2019

Related issue
#3992

Description

We changed the method to prevent Logcollector from monitoring multiple hard links to the same file.

Instead of finding duplicate files on startup and removing one of the entries, now Logcollector searches for duplicate files on file checking. This stage is performed every logcollector.vcheck_files seconds.

Since two different devices may have the same inode, Logcollector finds duplicate "device:inode" pairs.

Tests

We tested file creation and deletion, including soft and hard links, on these setting combinations:

  1. A wildcarded <location>.
  2. Multiple hardcoded <location> stanzas.
  3. Combining wildcarded and time pattern-based <location> stanzas.
  • Compilation without warnings in every supported platform
    • Linux
    • Windows
    • MAC OS X
  • Source installation
  • Package installation
  • Source upgrade
  • Package upgrade
  • Review logs syntax and correct language
  • QA templates contemplate the added capabilities
  • Memory tests for Linux
    • Scan-build report
    • Coverity
    • Valgrind (memcheck and descriptor leaks check)
    • Dr. Memory
    • AddressSanitizer
  • Memory tests for Windows
    • Scan-build report
    • Coverity
    • Dr. Memory
  • Memory tests for macOS
    • Scan-build report
    • Leaks
    • AddressSanitizer
  • Stress test for affected components

@vikman90 vikman90 added type/bug Something isn't working module/logcollector type/bug/regression Breaks functionality known to work in previous releases labels Sep 20, 2019
@vikman90 vikman90 self-assigned this Sep 20, 2019
@chemamartinez chemamartinez merged commit 491c262 into 3.10 Sep 23, 2019
@chemamartinez chemamartinez deleted the 3.10-fix-logcollector-3992 branch September 23, 2019 13:46
@vikman90 vikman90 restored the 3.10-fix-logcollector-3992 branch September 27, 2019 11:24
@vikman90 vikman90 deleted the 3.10-fix-logcollector-3992 branch July 14, 2020 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/logcollector type/bug/regression Breaks functionality known to work in previous releases type/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants