[LU-15137] socklnd: decrement typed connection counters on close Created: 20/Oct/21 Updated: 19/Jan/24 Resolved: 06/Jan/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.15.0, Lustre 2.12.10 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Serguei Smirnov | Assignee: | Serguei Smirnov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Severity: | 3 | ||||
| Rank (Obsolete): | 9223372036854775807 | ||||
| Description |
|
There appears to be a possibility that if some connections are being closed while some are still being created for the same control block, the race may result in LBUG inĀ ksocknal_connect: if ((wanted & BIT(SOCKLND_CONN_ANY)) != 0) { type = SOCKLND_CONN_ANY; } else if ((wanted & BIT(SOCKLND_CONN_CONTROL)) != 0) { type = SOCKLND_CONN_CONTROL; } else if ((wanted & BIT(SOCKLND_CONN_BULK_IN)) != 0 && conn_cb->ksnr_blki_conn_count <= conn_cb->ksnr_blko_conn_count) { type = SOCKLND_CONN_BULK_IN; } else { LASSERT ((wanted & BIT(SOCKLND_CONN_BULK_OUT)) != 0); type = SOCKLND_CONN_BULK_OUT; } This may happen if the previously created BULK_IN connection got closed, no more BULK_OUT connections are needed, but ksocknal_connect is trying again to create a BULK_IN connection. BecauseĀ ksnr_blki_conn_count didn't get decremented on close, the assertion will fail. Fix this by making sure counters are decremented on close. |
| Comments |
| Comment by Gerrit Updater [ 30/Oct/21 ] |
|
"Serguei Smirnov <ssmirnov@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45422 |
| Comment by Gerrit Updater [ 04/Nov/21 ] |
|
"Serguei Smirnov <ssmirnov@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45461 |
| Comment by Gerrit Updater [ 23/Dec/21 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45461/ |
| Comment by Gerrit Updater [ 06/Jan/22 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45422/ |
| Comment by Peter Jones [ 06/Jan/22 ] |
|
Landed for 2.15 |
| Comment by Gerrit Updater [ 09/May/22 ] |
|
"Cyril Bordage <cbordage@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/47253 |
| Comment by Gerrit Updater [ 09/May/22 ] |
|
"Cyril Bordage <cbordage@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/47254 |
| Comment by Gerrit Updater [ 20/Sep/22 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/47253/ |
| Comment by Gerrit Updater [ 20/Sep/22 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/47254/ |