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

Layer/Agent can't handle large PUT request #1063

Closed
aviramha opened this issue Feb 14, 2023 · 2 comments
Closed

Layer/Agent can't handle large PUT request #1063

aviramha opened this issue Feb 14, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@aviramha
Copy link
Member

aviramha commented Feb 14, 2023

User runs steal on a rest service written in Go + macOS that receives a big PUT request.
The request gets stuck and rest of the stuff gets timeout (kafka, etc).

Possible issues:

  1. maybe we have some blocking logic so it can't answer health check / do anything else while accepting?
  2. maybe it's writing/receiving a lot of data causing a busy loop not giving time for other threads to run?
  3. ??
@t4lz t4lz self-assigned this Feb 14, 2023
@t4lz
Copy link
Member

t4lz commented Feb 15, 2023

Is it possible to get the logs from that failure?
Is there any information about the application?
Does sending small PUT requests work?

So far I can't reproduce this bug. I can send huge PUT requests and they go through:

% cat target/universal-apple-darwin/debug/libmirrord_layer.dylib | curl -T - localhost:30001/                                                                                                                           
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  206M    0     3    0  206M      0  2272k --:--:--  0:01:33 --:--:--     0
PUT%                                                                                                                                                                                                                                                                                                                       

I printed the layer's binary and uploaded that with PUT, while stealing with mirrord.

In the logs/output of the app running with mirrord I can see all the data coming in:

2023-02-15T14:06:42.119425Z TRACE ThreadId(06) handle_daemon_message: mirrord_layer: enter daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 }))
2023-02-15T14:06:42.119441Z TRACE ThreadId(06) handle_daemon_message:handle_daemon_message: mirrord_layer::tcp: enter daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 })) Data(TcpData { connection_id: 1, bytes (length): 4096 })
2023-02-15T14:06:42.119459Z TRACE ThreadId(06) handle_daemon_message:handle_daemon_message:handle_new_data: mirrord_layer::tcp_steal: enter daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 })) Data(TcpData { connection_id: 1, bytes (length): 4096 }) data=1
2023-02-15T14:06:42.119501Z TRACE ThreadId(06) handle_daemon_message:handle_daemon_message:handle_new_data: mirrord_layer::tcp_steal: handle_new_data -> writing 4096 bytes to id 1 daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 })) Data(TcpData { connection_id: 1, bytes (length): 4096 }) data=1
2023-02-15T14:06:42.119541Z TRACE ThreadId(06) handle_daemon_message:handle_daemon_message:handle_new_data: mirrord_layer::tcp_steal: exit daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 })) Data(TcpData { connection_id: 1, bytes (length): 4096 }) data=1
2023-02-15T14:06:42.119565Z DEBUG ThreadId(06) handle_daemon_message:handle_daemon_message: mirrord_layer::tcp: handle_incoming_message -> handled Ok(
    (),
) daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 })) Data(TcpData { connection_id: 1, bytes (length): 4096 })
2023-02-15T14:06:42.119595Z TRACE ThreadId(06) handle_daemon_message:handle_daemon_message: mirrord_layer::tcp: exit daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 })) Data(TcpData { connection_id: 1, bytes (length): 4096 })
2023-02-15T14:06:42.119619Z TRACE ThreadId(06) handle_daemon_message: mirrord_layer: exit daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 }))
2023-02-15T14:06:42.119640Z TRACE ThreadId(06) next: mirrord_layer::tcp_steal: enter
2023-02-15T14:06:42.119654Z TRACE ThreadId(06) next: mirrord_layer::tcp_steal: exit
2023-02-15T14:06:42.119682Z TRACE ThreadId(06) handle_daemon_message: mirrord_layer: enter daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 }))
2023-02-15T14:06:42.119703Z TRACE ThreadId(06) handle_daemon_message:handle_daemon_message: mirrord_layer::tcp: enter daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 })) Data(TcpData { connection_id: 1, bytes (length): 4096 })
2023-02-15T14:06:42.119729Z TRACE ThreadId(06) handle_daemon_message:handle_daemon_message:handle_new_data: mirrord_layer::tcp_steal: enter daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 })) Data(TcpData { connection_id: 1, bytes (length): 4096 }) data=1
2023-02-15T14:06:42.119750Z TRACE ThreadId(06) handle_daemon_message:handle_daemon_message:handle_new_data: mirrord_layer::tcp_steal: handle_new_data -> writing 4096 bytes to id 1 daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 })) Data(TcpData { connection_id: 1, bytes (length): 4096 }) data=1
2023-02-15T14:06:42.119782Z TRACE ThreadId(06) handle_daemon_message:handle_daemon_message:handle_new_data: mirrord_layer::tcp_steal: exit daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 })) Data(TcpData { connection_id: 1, bytes (length): 4096 }) data=1
2023-02-15T14:06:42.119807Z DEBUG ThreadId(06) handle_daemon_message:handle_daemon_message: mirrord_layer::tcp: handle_incoming_message -> handled Ok(
    (),
) daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 })) Data(TcpData { connection_id: 1, bytes (length): 4096 })
2023-02-15T14:06:42.119823Z TRACE ThreadId(06) handle_daemon_message:handle_daemon_message: mirrord_layer::tcp: exit daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 })) Data(TcpData { connection_id: 1, bytes (length): 4096 })
2023-02-15T14:06:42.119840Z TRACE ThreadId(06) handle_daemon_message: mirrord_layer: exit daemon_message=TcpSteal(Data(TcpData { connection_id: 1, bytes (length): 4096 }))

...

And the local app prints all that data.
I get back a response and can keep sending requests.

Do we have some more information to work with on this issue?

@aviramha
Copy link
Member Author

aviramha commented Feb 22, 2023

Solved with #1092

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants