Comments (2)
Seems that syncrepl_config() has a race.
@hyc?
diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c
index eaedc61..fc615e9 100644
--- a/servers/slapd/syncrepl.c
+++ b/servers/slapd/syncrepl.c
@@ -5815,6 +5815,7 @@ syncrepl_config( ConfigArgs *c )
* happen when running on the cn=config DB.
*/
if ( si->si_re ) {
+ ldap_pvt_thread_mutex_lock( &slapd_rq.rq_mutex );
if ( ldap_pvt_thread_mutex_trylock( &si->si_mutex )) {
isrunning = 1;
} else {
@@ -5832,7 +5833,6 @@ syncrepl_config( ConfigArgs *c )
si->si_conn = NULL;
}
- ldap_pvt_thread_mutex_lock( &slapd_rq.rq_mutex );
if ( ldap_pvt_runqueue_isrunning( &slapd_rq, re ) ) {
ldap_pvt_runqueue_stoptask( &slapd_rq, re );
isrunning = 1;
@@ -5842,10 +5842,10 @@ syncrepl_config( ConfigArgs *c )
isrunning = 0;
ldap_pvt_runqueue_remove( &slapd_rq, re );
- ldap_pvt_thread_mutex_unlock( &slapd_rq.rq_mutex );
ldap_pvt_thread_mutex_unlock( &si->si_mutex );
}
+ ldap_pvt_thread_mutex_unlock( &slapd_rq.rq_mutex );
}
if ( !isrunning ) {
syncinfo_free( si, 0 );
from reopenldap.
I've seen this once on Windows. But I don't see why holding the runq mutex fixes it, since the do_syncrepl thread runs out of the connection dispatcher, not the runqueue. ??
Ah, a scheduled refresh. never mind the question.
Eh, no. Your stack trace shows a do_syncrepl from the connection dispatcher, not from the runqueue. So back to my first question.
from reopenldap.
Related Issues (20)
- Refactoring API of libreldap to avoid false-positives from Coverity
- Migrate to the libuv / libev / libevent or similar ones
- Install ReOpenLDAP HOT 2
- Segmentation fault in ServerSideSort overlay HOT 10
- Add --enable-backtrace to configure HOT 1
- Destination directory for backtrace-logs should be configurable in runtime
- configure doesn't know --runstatedir option HOT 1
- current devel: test039-glue-ldap-concurrency-mdb-DQD-KFA.core
- current devel: tests/progs/slapd_bind use after free
- Directory inconsistency in multi-master mode with 3 servers when updating/deleting entries HOT 6
- Update man-pages for idclip and jitter flags
- Typo - SIGHUB
- Complete bash script for install on Centos 7 HOT 1
- Error while do make HOT 6
- 'lazysync' mode should be man-documented for mdb-backend
- Merge-in WiredTiger backend from https://github.com/osstech-jp/openldap
- Memory corruption in connection-handling code
- Question: Drop in replacement for existing openldap 2.4.44? HOT 1
- Proper way for event handling HOT 1
- Infinite delta-MMR (accesslog) synchronization (syncrepl drawback)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reopenldap.