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 the remoted deadlock that causes the keyentries structure can not be updated #2956

Merged
merged 1 commit into from Mar 28, 2019

Conversation

bah07
Copy link
Contributor

@bah07 bah07 commented Mar 27, 2019

Related issue

#2954

It has been verified that adding the call to key_unlock() and causing in the same case of use that in the issue previously indicated, the blocking condition is not entered.
As you can see in the following messages the agent registered after the message of:

Sending message to disconnected agent '002'.

The agent connects and the keyentries structure is updated correctly.

ossec-remoted[18061] manager.c:945 at read_controlmsg(): WARNING: (1246): Unable to send file 'merged.mg' to agent ID '002'.
ossec-remoted[18061] sendmsg.c:73 at send_msg(): WARNING: (1245): Sending message to disconnected agent '002'.
ossec-remoted[18061] sendmsg.c:73 at send_msg(): WARNING: (1245): Sending message to disconnected agent '002'.
ossec-remoted[18061] manager.c:932 at read_controlmsg(): DEBUG: Sending file 'default/merged.mg' to agent '002'.
ossec-remoted[18061] sendmsg.c:73 at send_msg(): WARNING: (1245): Sending message to disconnected agent '002'.
ossec-remoted[18061] sendmsg.c:73 at send_msg(): WARNING: (1245): Sending message to disconnected agent '002'.
ossec-remoted[18061] manager.c:945 at read_controlmsg(): WARNING: (1246): Unable to send file 'merged.mg' to agent ID '002'.
ossec-remoted[18061] secure.c:323 at HandleSecureMessage(): WARNING: (1213): Message from '10.0.0.51' not allowed.
ossec-remoted[18061] manager.c:932 at read_controlmsg(): DEBUG: Sending file 'default/merged.mg' to agent '002'.
ossec-remoted[18061] secure.c:323 at HandleSecureMessage(): WARNING: (1213): Message from '10.0.0.51' not allowed.
ossec-remoted[18061] secure.c:323 at HandleSecureMessage(): WARNING: (1213): Message from '10.0.0.51' not allowed.
ossec-remoted[18061] keys.c:409 at OS_UpdateKeys(): DEBUG: Reloading keys
ossec-remoted[18061] keys.c:419 at OS_UpdateKeys(): INFO: (1410): Reading authentication keys file.
ossec-remoted[18061] msgs.c:79 at OS_StartCounter(): DEBUG: OS_StartCounter: keysize: 2
ossec-remoted[18061] msgs.c:135 at OS_StartCounter(): DEBUG: Assigning counter for agent agentubuntu18: '0:4014'.
ossec-remoted[18061] msgs.c:130 at OS_StartCounter(): DEBUG: Assigning sender counter: 0:3750
ossec-remoted[18061] keys.c:431 at OS_UpdateKeys(): DEBUG: Key reloading completed
ossec-remoted[18061] sendmsg.c:45 at check_keyupdate(): INFO: (1409): Authentication file changed. Updating.

@albertomn86 albertomn86 merged commit 5c054ce into 3.9 Mar 28, 2019
@albertomn86 albertomn86 deleted the fix-deadlock-remoted branch March 28, 2019 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants