Bug 41486 - Listener sometimes skips transactions during a listener restart - 3.2-8 backport
Listener sometimes skips transactions during a listener restart - 3.2-8 backport
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Listener (univention-directory-listener)
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 3.2-8-errata
Assigned To: Philipp Hahn
Arvid Requate
:
Depends on: 41261
Blocks: 41657
  Show dependency treegraph
 
Reported: 2016-06-07 18:04 CEST by Philipp Hahn
Modified: 2016-10-04 13:27 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 7: Crash: Bug causes crash or data loss
Who will be affected by this bug?: 5: Will affect all installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.600
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
Add two additional essential debug messages. (791 bytes, patch)
2016-07-13 12:52 CEST, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2016-06-07 18:04:31 CEST
+++ This bug was initially created as a clone of Bug #41261 +++

Package: univention-directory-listener
Version: 8.0.4-2.316.201606071758
Branch: ucs_3.2-0
Scope: errata3.2-8

r69920 | Bug #41261 UDL: Write notifier ID atomically YAML
 univention-directory-listener.yaml
Comment 1 Philipp Hahn univentionstaff 2016-06-07 18:05:56 CEST
r69921 | Bug #41261 -> Bug #41486 UDL: Write notifier ID atomically YAML
 univention-directory-listener.yaml
Comment 2 Arvid Requate univentionstaff 2016-07-12 21:16:47 CEST
Code review: Ok
Advisory: Ok (typo fixed)


But I don't see that this fixes the issue: The test case noted in Bug 41261#c2 still reproduces the problem:

=============================================================
 1698tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1699tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1700tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1701tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1702tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1703tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1704tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1705tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1706tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1707tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1708tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1712
1708 1712 cn=nscd003,cn=groups,dc=ar323i2,dc=qa m

tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
Restarting univention-directory-listener daemon.
timeout: finish: univention-directory-listener: (pid 19126) 13s, normally down
done.
Restarting univention-directory-listener daemon.
timeout: finish: univention-directory-listener: (pid 19126) 25s, normally down
done.
Restarting univention-directory-listener daemon.
timeout: finish: univention-directory-listener: (pid 19126) 38s, normally down
done.
Restarting univention-directory-listener daemon.
ok: run: univention-directory-listener: (pid 19240) 0s, normally down
done.
 1716
1712 1716 cn=nscd0033,cn=uid,cn=temporary,cn=univention,dc=ar323i2,dc=qa a

tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1717tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1718tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1719tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1720tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
 1721tail: /var/lib/univention-ldap/listener/listener: Datei abgeschnitten
=============================================================
Comment 3 Arvid Requate univentionstaff 2016-07-13 12:52:58 CEST
Created attachment 7797 [details]
Add two additional essential debug messages.

With the attached patch I can confirm that the new version actually fixes the issue. The test case of Bug 41261 Comment 2 is simply bogus. With the attached patch and the following procedure I was able to reproduce the original problem and confirm that the new version fixes the issue:

while sleep 10; do /etc/init.d/univention-directory-listener restart; done &
tail -f /var/log/univention/listener.log | while read line; do tid=$(sed -n 's/.* Last Notifier ID: //p' <<<"$line"); if [ -n "$tid" ]; then if [ -n "${lid:-}" ] && [ $((lid + 1)) -ne "$tid" ] && [ "$lid" -ne "$tid" ] ; then echo;echo "$lid $tid $dn";echo;fi;lid=$tid; fi; done
Comment 4 Janek Walkenhorst univentionstaff 2016-07-21 14:01:51 CEST
<http://errata.software-univention.de/ucs/3.2/444.html>