| |
@@ -931,7 +931,7 @@
|
| |
#define CONN_DONE 3
|
| |
#define CONN_TIMEDOUT 4
|
| |
|
| |
- #define CONN_TURBO_TIMEOUT_INTERVAL 400 /* milliseconds */
|
| |
+ #define CONN_TURBO_TIMEOUT_INTERVAL 100 /* milliseconds */
|
| |
#define CONN_TURBO_TIMEOUT_MAXIMUM 5 /* attempts * interval IE 2000ms with 400 * 5 */
|
| |
#define CONN_TURBO_CHECK_INTERVAL 5 /* seconds */
|
| |
#define CONN_TURBO_PERCENTILE 50 /* proportion of threads allowed to be in turbo mode */
|
| |
@@ -1187,7 +1187,9 @@
|
| |
pr_pd.fd = (PRFileDesc *)conn->c_prfd;
|
| |
pr_pd.in_flags = PR_POLL_READ;
|
| |
pr_pd.out_flags = 0;
|
| |
+ PR_Lock(conn->c_pdumutex);
|
| |
ret = PR_Poll(&pr_pd, 1, timeout);
|
| |
+ PR_Unlock(conn->c_pdumutex);
|
| |
waits_done++;
|
| |
/* Did we time out ? */
|
| |
if (0 == ret) {
|
| |
Bug Description:
nspr IO is not multi-threaded safe.
389-ds should not be in a situation where several threads are polling
a same connection at the same time.
The scenario is a worker send back an operation result at the same time
another worker wants to read an incoming request.
Fix Description:
The fix consist in synchonizing polling with c_pdumutex.
https://pagure.io/389-ds-base/issue/50389
Reviewed by: ?
Platforms tested: F28
Flag Day: no
Doc impact: no