Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task timeouts are not respected while reconnecting in iscsi_tcp_service #282

Open
theaugy opened this issue Dec 3, 2018 · 1 comment
Open

Comments

@theaugy
Copy link

theaugy commented Dec 3, 2018

Immediately after checking that iscsi->fd is valid, iscsi_tcp_service will check if there is a pending reconnect:

	if (iscsi->pending_reconnect) {
		if (time(NULL) >= iscsi->next_reconnect) {
			return iscsi_reconnect(iscsi);
		} else {
			if (iscsi->old_iscsi) {
				return 0;
			}
		}
	}

If it finds one, it will either attempt a reconnect and return, or just return (my reading of the code tells me old_iscsi is non-NULL for essentially the entire time we are disconnected).

This is problematic for use cases where the task timeout has been set, as tasks which should be timing out during the disconnect are unable to do so.

I wonder if either moving the call to iscsi_timeout_scan(iscsi); before the pending reconnect block, or adding a call before each return statement, would solve this issue safely.

@theaugy
Copy link
Author

theaugy commented Dec 19, 2018

I was able to address this issue by:

  1. moving iscsi_timeout_scan before the pending_reconnect check, as suggested in the issue
  2. having iscsi_timeout_scan "recurse" into old_iscsi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant