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

Small files (962 bytes) get transferred as 0 byte files #8

Open
razeh opened this issue Apr 1, 2019 · 2 comments
Open

Small files (962 bytes) get transferred as 0 byte files #8

razeh opened this issue Apr 1, 2019 · 2 comments

Comments

@razeh
Copy link

razeh commented Apr 1, 2019

If I transfer a 962 byte file, the file is created on the server, but it is 0 size:

ls -l foo 
-rwxr-xr-x 1 razeh btt 962 Apr  1 15:39 foo*
ls -l foo
-rw------- 1 razeh btt 0 Apr  1 15:40 foo

The log on the server is:

verbose
created cm_id 0x8e6330
rdma_bind_addr successful
rdma_listen
cma_event type RDMA_CM_EVENT_CONNECT_REQUEST cma_id 0x2aaab4000a30 (remote)
child cma 0x2aaab4000a30
created pd 0x8e5e90
created channel 0x8e5eb0
created cq 0x8e8860
created qp 0x8e93a0
rdcp_setup_buffers called on cb 0x8d9290
allocated & registered buffers...
accepting client connection request
cq_thread started.
wait for cq event
cma_event type RDMA_CM_EVENT_ESTABLISHED cma_id 0x2aaab4000a30 (remote)
ESTABLISHED
handle cq event
poll
recv completion
Got metadata, replying
open fd 7
wait for cq event
handle cq event
poll
send completion
wait for cq event
cma_event type RDMA_CM_EVENT_DISCONNECTED cma_id 0x2aaab4000a30 (remote)
server DISCONNECT EVENT...
handle cq event
poll
post disconnect
@razeh
Copy link
Author

razeh commented Apr 1, 2019

After looking at this with strace, and adding some logging, I believe this is caused by accessing the file with fdopen and open. Removing the FILE pointer, and using stat to get the file size, fixes the problem for me.

@roidayan
Copy link
Owner

roidayan commented Jul 2, 2019

want to add a pull request and i'll merge it?

This was referenced Nov 15, 2021
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

2 participants