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

Issue 5984 - Crash when paged result search are abandoned - fix2 #5987

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

progier389
Copy link
Contributor

@progier389 progier389 commented Nov 20, 2023

Chasing several rabbits at the same time is a bad idea !
and I mixed branches and unwillingly pushed one commit for #5980 in #5984
just before the PR #5985 merge ! -:(
Hopefully it does not break anything but just logs some useless crap if instance fails to starts.
Anyway This commit reverts the change about __init.py
and also do a minor code cleanup (removed a trailing space) in abandon.c

Issue #5984

Reviewed by: @tbordaz Thanks !

@progier389 progier389 linked an issue Nov 20, 2023 that may be closed by this pull request
Copy link
Contributor

@tbordaz tbordaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -1048,24 +1048,6 @@ def close(self):

self.state = DIRSRV_STATE_OFFLINE

def dump_errorlog(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This helper function looks valid Are you sure you want to revert that change ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, The fix is incomplete (a test is inverted) and had a side effect on CI tests
(because it change an exception type in some cases )
I plan to create a clean PR for this improvement.

@progier389 progier389 self-assigned this Nov 21, 2023
@progier389 progier389 merged commit df7dd83 into 389ds:main Nov 21, 2023
178 of 195 checks passed
progier389 added a commit that referenced this pull request Nov 21, 2023
Chasing several rabbits at the same time is a bad idea !
and I mixed branches and unwillingly pushed one commit for #5980 in #5984
just before the PR #5985 merge ! -:(
Hopefully it does not break anything but just logs some useless crap if instance fails to starts.
Anyway This commit reverts the change about __init.py
and also do a minor code cleanup (removed a trailing space) in abandon.c

Issue #5984

Reviewed by: @tbordaz Thanks !

(cherry picked from commit df7dd83)
progier389 added a commit that referenced this pull request Nov 21, 2023
Chasing several rabbits at the same time is a bad idea !
and I mixed branches and unwillingly pushed one commit for #5980 in #5984
just before the PR #5985 merge ! -:(
Hopefully it does not break anything but just logs some useless crap if instance fails to starts.
Anyway This commit reverts the change about __init.py
and also do a minor code cleanup (removed a trailing space) in abandon.c

Issue #5984

Reviewed by: @tbordaz Thanks !

(cherry picked from commit df7dd83)
progier389 added a commit that referenced this pull request Nov 21, 2023
Chasing several rabbits at the same time is a bad idea !
and I mixed branches and unwillingly pushed one commit for #5980 in #5984
just before the PR #5985 merge ! -:(
Hopefully it does not break anything but just logs some useless crap if instance fails to starts.
Anyway This commit reverts the change about __init.py
and also do a minor code cleanup (removed a trailing space) in abandon.c

Issue #5984

Reviewed by: @tbordaz Thanks !

(cherry picked from commit df7dd83)
progier389 added a commit that referenced this pull request Nov 21, 2023
Chasing several rabbits at the same time is a bad idea !
and I mixed branches and unwillingly pushed one commit for #5980 in #5984
just before the PR #5985 merge ! -:(
Hopefully it does not break anything but just logs some useless crap if instance fails to starts.
Anyway This commit reverts the change about __init.py
and also do a minor code cleanup (removed a trailing space) in abandon.c

Issue #5984

Reviewed by: @tbordaz Thanks !

(cherry picked from commit df7dd83)
progier389 added a commit that referenced this pull request Nov 21, 2023
Chasing several rabbits at the same time is a bad idea !
and I mixed branches and unwillingly pushed one commit for #5980 in #5984
just before the PR #5985 merge ! -:(
Hopefully it does not break anything but just logs some useless crap if instance fails to starts.
Anyway This commit reverts the change about __init.py
and also do a minor code cleanup (removed a trailing space) in abandon.c

Issue #5984

Reviewed by: @tbordaz Thanks !

(cherry picked from commit df7dd83)
progier389 added a commit that referenced this pull request Nov 21, 2023
Chasing several rabbits at the same time is a bad idea !
and I mixed branches and unwillingly pushed one commit for #5980 in #5984
just before the PR #5985 merge ! -:(
Hopefully it does not break anything but just logs some useless crap if instance fails to starts.
Anyway This commit reverts the change about __init.py
and also do a minor code cleanup (removed a trailing space) in abandon.c

Issue #5984

Reviewed by: @tbordaz Thanks !

(cherry picked from commit df7dd83)
progier389 added a commit that referenced this pull request Nov 21, 2023
Chasing several rabbits at the same time is a bad idea !
and I mixed branches and unwillingly pushed one commit for #5980 in #5984
just before the PR #5985 merge ! -:(
Hopefully it does not break anything but just logs some useless crap if instance fails to starts.
Anyway This commit reverts the change about __init.py
and also do a minor code cleanup (removed a trailing space) in abandon.c

Issue #5984

Reviewed by: @tbordaz Thanks !

(cherry picked from commit df7dd83)
progier389 added a commit that referenced this pull request Dec 13, 2023
#5985 and #5987)

Notice: This cherry-pick include two commit:
df7dd83 Issue 5984 - Crash when paged result search are abandoned - fix2 (#5987)
06bd086 Issue 5984 - Crash when paged result search are abandoned (#5985)
The reason is that cherry pick of #5985 generates lots of conflict in __init.py
 and #5987 only revert that file ==> So it is easier and safer to keep the original
  file.

* Issue 5984 - Crash when paged result search are abandoned

Problem:
  Fix #4551 has changed the lock that protects the paged result data
  within a connection. But the abandon operation attempts to free
  the paged search result with the connection lock.
  This leads to race condition and double free causing an heap
  corruption and a SIGSEGV.

  Solution:
   - Get a copy of the operation data that needs to be logged.
   - Unlock the connection mutex (to avoid deadlock risk)
   - Free the paged result while holding the paged result lock.

Issue: 5984

Reviewed by: @tbordaz (Thanks!)

(cherry picked from commit 06bd086)
@progier389 progier389 deleted the i5984fix2 branch March 28, 2024 13:34
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.

Crash when paged result search are abandoned
2 participants