Skip to content

[9.1](backport #47585) libbeat/processors/translate_ldap_attribute: fix double locking and improve logging#47591

Merged
efd6 merged 2 commits into9.1from
mergify/bp/9.1/pr-47585
Nov 12, 2025
Merged

[9.1](backport #47585) libbeat/processors/translate_ldap_attribute: fix double locking and improve logging#47591
efd6 merged 2 commits into9.1from
mergify/bp/9.1/pr-47585

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Nov 12, 2025

Proposed commit message

libbeat/processors/translate_ldap_attribute: fix double locking and improve logging

Previously, when findObjectBy was called and the connection was closing,
the reconnect method would both hold the lock and call connect which
attempts to then gain the lock, resulting in a deadlock. Reduce the
level of locking; I believe this can be reduced further, but the
concurrent use protections here are unclear, so I have not gone further.

Also improve debug logging during dial and query.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • I have added an entry in ./changelog/fragments using the changelog tool.

Disruptive User Impact

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs


This is an automatic backport of pull request #47585 done by [Mergify](https://mergify.com).
…mprove logging (#47585)

Previously, when findObjectBy was called and the connection was closing,
the reconnect method would both hold the lock and call connect which
attempts to then gain the lock, resulting in a deadlock. Reduce the
level of locking; I believe this can be reduced further, but the
concurrent use protections here are unclear, so I have not gone further.

Also improve debug logging during dial and query.

(cherry picked from commit c2e6257)

# Conflicts:
#	libbeat/processors/translate_ldap_attribute/translate_ldap_attribute.go
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Nov 12, 2025
@mergify mergify bot requested review from a team as code owners November 12, 2025 11:42
@mergify mergify bot added the backport label Nov 12, 2025
@mergify mergify bot assigned efd6 Nov 12, 2025
@mergify mergify bot removed the request for review from a team November 12, 2025 11:42
@mergify mergify bot added the conflicts There is a conflict in the backported pull request label Nov 12, 2025
@mergify mergify bot requested a review from khushijain21 November 12, 2025 11:42
@mergify
Copy link
Contributor Author

mergify bot commented Nov 12, 2025

Cherry-pick of c2e6257 has failed:

On branch mergify/bp/9.1/pr-47585
Your branch is up to date with 'origin/9.1'.

You are currently cherry-picking commit c2e6257e3.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   changelog/fragments/1762903519-s6615-ldap_logging.yaml
	modified:   libbeat/processors/translate_ldap_attribute/ldap.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   libbeat/processors/translate_ldap_attribute/translate_ldap_attribute.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot requested a review from VihasMakwana November 12, 2025 11:42
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 12, 2025
@github-actions
Copy link
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)
@github-actions github-actions bot added enhancement Filebeat Filebeat bugfix Team:Security-Service Integrations Security Service Integrations Team Team:Security-Windows Platform Windows Platform Team in Security Solution labels Nov 12, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/sec-windows-platform (Team:Security-Windows Platform)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 12, 2025
The 9.1 branch does not have the preferred behaviour, but the existing
behaviour is retained to avoid conflating changes.
@efd6 efd6 enabled auto-merge (squash) November 12, 2025 19:57
@efd6 efd6 merged commit 6a3ceae into 9.1 Nov 12, 2025
251 checks passed
@efd6 efd6 deleted the mergify/bp/9.1/pr-47585 branch November 12, 2025 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport bugfix conflicts There is a conflict in the backported pull request enhancement Filebeat Filebeat Team:Security-Service Integrations Security Service Integrations Team Team:Security-Windows Platform Windows Platform Team in Security Solution

2 participants