Opened 11 years ago

Closed 7 years ago

Last modified 6 years ago

#548 closed defect (worksforme)

Exceeding data transfer limit sometimes makes server block indefinitely.

Reported by: Jiří Zárevúcky Owned by: Jakub Jermář
Priority: major Milestone: 0.7.2
Component: helenos/kernel/generic Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

Encountered when asking EXT4 for a big data read (> DATA_XFER_LIMIT). The client side receives error properly, but server side blocks even after the exchange was closed.

At a glance, I don't see any problem in EXT4 code, which makes me suspect problem in the kernel.

Attachments (2)

screenshot.png (182.0 KB ) - added by Jiří Zárevúcky 11 years ago.
screenshot2.png (198.9 KB ) - added by Jiří Zárevúcky 11 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Jakub Jermář, 11 years ago

Can you apply the ipc <task_id> kconsole command on the hung task and take a screenshot?

by Jiří Zárevúcky, 11 years ago

Attachment: screenshot.png added

comment:2 by Jiří Zárevúcky, 11 years ago

I was mistaken. The call actually never reaches EXT4 server. In the screenshot, there are debug printouts at the beginning of libfs handler, which isn't called at all. It just hangs on async_data_read_forward().

by Jiří Zárevúcky, 11 years ago

Attachment: screenshot2.png added

comment:3 by Jakub Jermář, 11 years ago

I think this is because the kernel refused to make the IPC_M_DATA_READ call with transfer size greater than DATA_XFER_LIMIT and returned an error.

The app detected the error and is now waiting in libc's read() for the reply to the initial VFS_IN_READ.

VFS, on the other hand, is waiting in async_data_read_forward() (called from vfs_rdwr()) for the IPC_M_DATA_READ call.

Neither can continue.

comment:4 by Jakub Jermář, 7 years ago

Resolution: worksforme
Status: newclosed

I am closing this as vfs_read_short() will now no longer wait for the answer to the first message, but will rather forget it. Also the transfer size is checked by vfs_read_short().

Also note that now there is a mechanism (answer→flags & IPC_CALL_AUTO_REPLY) that allows the client to learn about an IPC error which was auto-replied by the kernel (and so the server never saw it).

comment:5 by Jakub Jermář, 6 years ago

Milestone: 0.7.2
Note: See TracTickets for help on using tickets.