https://bugs.openldap.org/show_bug.cgi?id=9878
Issue ID: 9878 Summary: test043 failures in 2.5/2.6 Product: OpenLDAP Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: slapd Assignee: bugs@openldap.org Reporter: ondra@mistotebe.net Target Milestone: ---
With test043 update for ITS#9823, we manage to introduce a scenario where the server is completely idle except for a runqueue change.
This is partly identical with ITS#9642 and a similar approach would work. Except that changes our module facing ABI so might not be something we can backport. For the streams we can't, we might have to change the test to make the server not idle.
https://bugs.openldap.org/show_bug.cgi?id=9878
--- Comment #1 from Ondřej Kuzník ondra@mistotebe.net --- In terms of master/2.7, we should probably revert 07e79471f94037cc60b860a740f99a8016c14270 to not have syncrepl stuck in ldap_result() for no reason (ITS#9534 carries no hints as to why this wait should be needed if our event loop implementation itself isn't buggy) and stabilise the semantics of the runqueue interval to mean "run this again in <interval> seconds after last schedule or at the earliest opportunity afterwards".
This lets us avoid the current busy-loop for dispatcher thread with interval == 0. A trivial change in the implementation of our dispatcher makes the duration of each cycle from infinity to O(n^2) steps if we have n non-deferred tasks in the queue. More invasive changes of the API might be required to make this O(n) or faster.
Alternatively, we could make interval == 0 mean "do not reschedule automatically" and make it the task's responsibility to decide when the next call is appropriate. This would avoid several hacks in back_mdb/etc. where a ridiculously large interval is chosen to avoid being rescheduled.
https://bugs.openldap.org/show_bug.cgi?id=9878
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.openldap.org/s | |how_bug.cgi?id=9534
https://bugs.openldap.org/show_bug.cgi?id=9878
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.7.0 Keywords|needs_review |
https://bugs.openldap.org/show_bug.cgi?id=9878
--- Comment #2 from Quanah Gibson-Mount quanah@openldap.org --- RE26 workaround commit:
• 856b7a33 by Ondřej Kuzník at 2022-07-06T15:27:02+01:00 ITS#9878 Workaround for streams that won't receive the fix
RE25 workaround commit:
• 97f7ebcf by Ondřej Kuzník at 2022-07-06T15:23:06+01:00 ITS#9878 Workaround for streams that won't receive the fix
https://bugs.openldap.org/show_bug.cgi?id=9878
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |IN_PROGRESS
--- Comment #3 from Ondřej Kuzník ondra@mistotebe.net --- For master, a proposal redefining a part of the rq API: https://git.openldap.org/openldap/openldap/-/merge_requests/558
https://bugs.openldap.org/show_bug.cgi?id=9878
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |TEST
--- Comment #4 from Quanah Gibson-Mount quanah@openldap.org --- head:
• 29c3a443 by Ondřej Kuzník at 2022-09-08T08:31:22+01:00 ITS#9878 Treat tasks with interval == 0 as one-shot
• fa8cb31e by Ondřej Kuzník at 2022-09-08T08:31:22+01:00 ITS#9878 One-shot tasks are now possible with interval == 0
• 3ad71958 by Ondřej Kuzník at 2022-09-08T08:31:22+01:00 ITS#9878 We no longer have to trigger li->li_conn_expire_task twice
https://bugs.openldap.org/show_bug.cgi?id=9878
--- Comment #5 from Quanah Gibson-Mount quanah@openldap.org --- • a779f148 by Ondřej Kuzník at 2022-09-26T17:34:21+00:00 ITS#9878 Have refint use interval 0 to schedule its task