raphaelsc_ has quit [Remote host closed the connection]
raphaelsc has quit [Ping timeout: 480 seconds]
raphaelsc has joined #io_uring
raphaelsc has quit [Remote host closed the connection]
raphaelsc has joined #io_uring
<raphaelsc>
axboe, the error is indeed being communicated through io_uring when handling completion: "io_uring_complete: ring 00000000e52339b8, req 0000000065b91cd1, user_data 0x50f0001e4000, result -12, cflags 0x0 extra1 0 extra2 0". yet I am having a hard time finding where in XFS returns it or if it's an allocation failure in I/O ring itself if GFP_NOWAIT is used somewhere. I will keep looking :-)
<raphaelsc>
I am now running './src/retsnoop -e "iocb_bio_iopoll"'. I think the ENOMEM might potentially come from blk layer, since I was unable to find ENOMEM coming from XFS path.
<Ne02ptzero>
I've encountered a weird issue, and I'm not sure if its a uring bug, a linux bug or expected behavior:
<Ne02ptzero>
I have an HTTP server, that serves files using uring. In order to do so, I am using splice with a pipe from the local file descriptor to the socket.
<Ne02ptzero>
The HTTP client is written in golang and sometime, the client would do a whole request (Give me the entire file) but stop reading after a desired offset.
<Ne02ptzero>
The request is made with http.Request.Close = true, which closes the TCP connections after the request. Since I'm using big splices server-side (65k) to avoid too many operations, this cut can happen mid-splice.
<Ne02ptzero>
Here's the weird thing: _Sometimes_, I do not receive a "Broken pipe" nor "Closed connection" on my splice, even though the socket is effectively closed by the kernel (Cannot see it with netstat/ss).
<Ne02ptzero>
BUT if I list the file-descriptor of my running server, I can see a [socket] being opened. And uring never returns anything, ever on that splice, making it hang forever.
<Ne02ptzero>
Its like the kernel is aware that a TCP RST has been received on that connection, but the information is never proxied to splice that is writting to that connection.
<Ne02ptzero>
Side note: When I'm saying splice, I of course mean 'io_uring_prep_splice' and the cqe->ret for the return of the operation.
<Ne02ptzero>
I've worked around the bug by forcing the client to always read the full buffer that it asked, even though it will be discarded. So nothing major, but still a bit weird.
raphaelsc has quit [Remote host closed the connection]
raphaelsc has joined #io_uring
raphaelsc has quit [Remote host closed the connection]
raphaelsc has joined #io_uring
<raphaelsc>
axboe, actually it happens in xfs's iomap_file_buffered_write path.