Reported by Christof Schmitt <cs@samba.org> on samba-technical@lists.samba.org I found this while testing with a system where the actual write() system call returned an error. This led to Samba hanging and never continuing with the result of the write. The attached patch fixes the problem. From what i understand, errno was never passed correctly back to the callers. Christof Patch to follow.
Created attachment 13501 [details] Patch for Samba 4.6
Created attachment 13502 [details] Patch for Samba 4.7
Re-assigning to Karolin for inclusion in 4.7.0 and 4.6.next.
(In reply to Jeremy Allison from comment #3) Shouldn't this be also fixed in 4.5?
4.5.x doesn't have this problem. It uses the asys_XXX() code (no longer used in 4.6.x or above) and correctly sets vfs_aio_state.error inside: vfswrap_asys_finished() in: 903 state->ret = result->ret; 904 state->vfs_aio_state.error = result->err; 905 state->vfs_aio_state.duration = result->duration; So these patches are good to go to close this bug out. Jeremy.
Pushed to autobuild-v4-{7,6}-test.
Pushed to both branches. Closing out bug report. Thanks!