Bug 15401 - Azure AD Sync infinite loop in initial user sync phase
Summary: Azure AD Sync infinite loop in initial user sync phase
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: 4.18.3
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-26 05:59 UTC by Andrew Bartlett
Modified: 2024-08-28 04:14 UTC (History)
3 users (show)

See Also:


Attachments
Patch in master backported to Samba 4.19 (59.01 KB, patch)
2023-08-15 19:43 UTC, Andrew Bartlett
no flags Details
Patch in master backported to Samba 4.17, 4.18, 4.19 (v2) (59.12 KB, patch)
2023-08-17 20:33 UTC, Andrew Bartlett
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Bartlett 2023-06-26 05:59:40 UTC
Azure AD will do a sequence of (roughly)

* Normal replication (objects 1..100)
* REPL_OBJ (of 1 object)
* Normal replication (objects 101..200)

However, if there are more than 100 (in this example) objects in the domain, and the second replication is required, the objects 1..100 are sent, as the replication state was invalidated by the REPL_OBJ call.
Comment 1 Samba QA Contact 2023-08-13 22:55:05 UTC
This bug was referenced in samba master:

0d9ea6c559317e19642662220c089e2d59ef3ecd
d0c1ce53add2fd3b3a4186581f4e214029cbcf1a
a12bcce89d26ae05bbaeed560cf8fcc7b5bcfdab
63843a22c8db73d459bee61e73bb1f0d31e3d427
0550e469eda4022659718ae9a56f5deaa9f9a307
c30bb8769ff2c4eba2d8f8a2bd3a56946b7d9d5e
628eab11b3c2e82875bf602e363b781d3e5eb96d
40f831e67e1f312b1db52c74c119899245d03e32
db16366b0bbefcdb91a0b36c903ed63456a081b8
b323169d6ff8357f7c999ae346137166c98218ac
87414955212143b8502b4c02aca150bc72cb8de5
99579e706312192f46df33d55949db7f1475d0d0
fe7418e1765b79f60945b787536b4d84a548fe02
548f141f11e89d335d8f9d74ab6925fa6b90fb84
2ed9815eeacfcf3a58871bafe0212398cc34c39e
2aba9e230ea62efcbd829f6f073894dfa3180c91
17359afa627a3086ec8d6862f007a3479574a8b4
79ca6ef28a6f94965cb030c4a7da8c1b9db7150b
Comment 2 Andrew Bartlett 2023-08-15 19:43:20 UTC
Created attachment 18057 [details]
Patch in master backported to Samba 4.19
Comment 3 Andrew Bartlett 2023-08-17 20:33:53 UTC
Created attachment 18063 [details]
Patch in master backported to Samba 4.17, 4.18, 4.19 (v2)

This second patch adds a RN tag for the release notes.
Comment 4 Andrew Bartlett 2023-08-17 21:10:05 UTC
Comment on attachment 18063 [details]
Patch in master backported to Samba 4.17, 4.18, 4.19 (v2)

I've checked a subset of tests locally and this patch is correct for all supported releases, 4.17, 4.18 and 4.19.
Comment 5 Jule Anger 2023-08-18 08:10:53 UTC
Pushed to autobuild-v4-{19,18,17}-test.
Comment 6 Samba QA Contact 2023-08-18 10:34:11 UTC
This bug was referenced in samba v4-19-test:

0bd2f592217fe643571d1fdf3d4f8928b4bc758a
85abc2852c47f4b7b5c5721bfdf350bccd74aced
2ecb53d5079b1504e948f8baa8d87d5d92a80bdd
f23c0d54a9b07b9a184b055ad32ae6011a0fbcf0
f8defe00366c96746290fcfe36623cba3f4d167b
d1cdcf27571db5a4f1f183da2205cb531405fab0
eeda4c3b5cda5a5876789b03a357a2cef56b9f3a
c2b69e4278016c04bc472686f2dc5fd881d4b952
75197f528ff1f5bd78ecd2ca0e0d94a00d80cfc3
5243f55ee1c7fecf9aad309ddb38ac417e2a3d4c
bd4ce52564846b686b515a8a40952d4aff37c333
91c7c77af143cfe39c08ecb7bc73a1a842a71a24
a596e4cdb9f4e83a740befe1e7bb81cd00d38da7
a33689ad82c87500a550a003cc9b938c4111c147
de10a323c6ff4ab75cd532c7252db3c723093434
e5dc7e82a5a33114b5cdffc2738bed8673bd65e0
7310afa34df397736c900aed04996f84b752dd1f
fd2fdecdec0b0eef03ac67fcb05faa675566beb6
Comment 7 Samba QA Contact 2023-08-18 11:21:37 UTC
This bug was referenced in samba v4-19-stable (Release samba-4.19.0rc3):

0bd2f592217fe643571d1fdf3d4f8928b4bc758a
85abc2852c47f4b7b5c5721bfdf350bccd74aced
2ecb53d5079b1504e948f8baa8d87d5d92a80bdd
f23c0d54a9b07b9a184b055ad32ae6011a0fbcf0
f8defe00366c96746290fcfe36623cba3f4d167b
d1cdcf27571db5a4f1f183da2205cb531405fab0
eeda4c3b5cda5a5876789b03a357a2cef56b9f3a
c2b69e4278016c04bc472686f2dc5fd881d4b952
75197f528ff1f5bd78ecd2ca0e0d94a00d80cfc3
5243f55ee1c7fecf9aad309ddb38ac417e2a3d4c
bd4ce52564846b686b515a8a40952d4aff37c333
91c7c77af143cfe39c08ecb7bc73a1a842a71a24
a596e4cdb9f4e83a740befe1e7bb81cd00d38da7
a33689ad82c87500a550a003cc9b938c4111c147
de10a323c6ff4ab75cd532c7252db3c723093434
e5dc7e82a5a33114b5cdffc2738bed8673bd65e0
7310afa34df397736c900aed04996f84b752dd1f
fd2fdecdec0b0eef03ac67fcb05faa675566beb6
Comment 8 Samba QA Contact 2023-08-21 08:43:11 UTC
This bug was referenced in samba v4-17-test:

133ff9c289492e03e91d821502d03c5a6f166ccc
89dfbd8c85876a699e4bdb134401c58485b582d3
f7b1325b819961501a750b754b620b3df2fa0b2e
957c794891b31741ca2aef21f7fcba655a1c0040
5bddbe2ca6df85aa9291c1bbaa4bd511e35f4dd6
aa155ccb5fda76607b261b939d183c60cda2594f
6442c8c3defcd8b937ff677344344f6233f3ffbc
fc282cbdc790065fafadc2f237dd12ee8a3b8482
1f5b6ef931c93333f2f7ab37bda7ba36de1f18ff
6452398ed83dc3adb3e06c9a27da907409b23f9a
d4927a5dc0c45cf1491b6f4080cf482454bc4435
35cdcef4d1ab936087434c4b24036804ccc4e080
c72b5f25eb07659d9afd80df71dab02bd7561d39
7c63aa69594c41f302acfb85dba332b45388869f
0a269490b68ee510f775d5f901dbc040429ee602
ee8dafa103bc55f58cccda0d0724cc919b42f91f
4ae4d2ac3b3dc139923143ead82353d8183dfe06
89231620287d8ad4cb8684c2adec185690fe043e
Comment 9 Samba QA Contact 2023-08-21 09:13:03 UTC
This bug was referenced in samba v4-18-test:

2fe39b167aca1cd08dfc04cde9297de85b664d29
251e3cd8c8d5a0435344caf55a6d627ecc201e31
e8fdc72b22e27420d624609cbc312db6ffed0978
2eae9fa21831f0ef2e3e8962c6abefd7a15f4fe2
958ae0038d62fbee811e425f2b8ea6f33ff8ee38
4b30611733ef9465c58593b073851b053737661f
c6801832cb3d59fba635c630a6450e905e942716
473cb476cdff88a780e332ea7cd1dd50e809b87b
69eac697606b5ab7c8d70062cb6e58a29235f5be
1fa63e6de9d251d8acb270aa804aafe6b573cc84
dba337929d6b668f1111c62af50e429072305087
e43ea61cdd29779bf6202b5138d6af44451563d2
7da93e9a92f87e9f6071f5cb2e107737d0a9f977
21628e1f536702aa42875726f07d35a4115f76a8
cb83e9dbad896961e9711d86916ca5247904dddc
9d3b0af9db7ddf567d6fa420a0e58ae2fa932200
50bba4925e0cd47fd0419c242e66ff9220d1ae7a
794ce23b3503fa6c1b892854f86c4de9de42c31d
Comment 10 Jule Anger 2023-08-21 09:18:35 UTC
Closing out bug report.

Thanks!
Comment 11 Samba QA Contact 2023-09-07 09:03:07 UTC
This bug was referenced in samba v4-17-stable (Release samba-4.17.11):

133ff9c289492e03e91d821502d03c5a6f166ccc
89dfbd8c85876a699e4bdb134401c58485b582d3
f7b1325b819961501a750b754b620b3df2fa0b2e
957c794891b31741ca2aef21f7fcba655a1c0040
5bddbe2ca6df85aa9291c1bbaa4bd511e35f4dd6
aa155ccb5fda76607b261b939d183c60cda2594f
6442c8c3defcd8b937ff677344344f6233f3ffbc
fc282cbdc790065fafadc2f237dd12ee8a3b8482
1f5b6ef931c93333f2f7ab37bda7ba36de1f18ff
6452398ed83dc3adb3e06c9a27da907409b23f9a
d4927a5dc0c45cf1491b6f4080cf482454bc4435
35cdcef4d1ab936087434c4b24036804ccc4e080
c72b5f25eb07659d9afd80df71dab02bd7561d39
7c63aa69594c41f302acfb85dba332b45388869f
0a269490b68ee510f775d5f901dbc040429ee602
ee8dafa103bc55f58cccda0d0724cc919b42f91f
4ae4d2ac3b3dc139923143ead82353d8183dfe06
89231620287d8ad4cb8684c2adec185690fe043e
Comment 12 Samba QA Contact 2023-09-27 08:15:04 UTC
This bug was referenced in samba v4-18-stable (Release samba-4.18.7):

2fe39b167aca1cd08dfc04cde9297de85b664d29
251e3cd8c8d5a0435344caf55a6d627ecc201e31
e8fdc72b22e27420d624609cbc312db6ffed0978
2eae9fa21831f0ef2e3e8962c6abefd7a15f4fe2
958ae0038d62fbee811e425f2b8ea6f33ff8ee38
4b30611733ef9465c58593b073851b053737661f
c6801832cb3d59fba635c630a6450e905e942716
473cb476cdff88a780e332ea7cd1dd50e809b87b
69eac697606b5ab7c8d70062cb6e58a29235f5be
1fa63e6de9d251d8acb270aa804aafe6b573cc84
dba337929d6b668f1111c62af50e429072305087
e43ea61cdd29779bf6202b5138d6af44451563d2
7da93e9a92f87e9f6071f5cb2e107737d0a9f977
21628e1f536702aa42875726f07d35a4115f76a8
cb83e9dbad896961e9711d86916ca5247904dddc
9d3b0af9db7ddf567d6fa420a0e58ae2fa932200
50bba4925e0cd47fd0419c242e66ff9220d1ae7a
794ce23b3503fa6c1b892854f86c4de9de42c31d