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

[tperf] socket write error on wireless networks #329

Open
junkai0531 opened this issue Jan 29, 2024 · 4 comments
Open

[tperf] socket write error on wireless networks #329

junkai0531 opened this issue Jan 29, 2024 · 4 comments

Comments

@junkai0531
Copy link

junkai0531 commented Jan 29, 2024

I run tperf on wired and wireless networks, it works well on wired networks but fails on wireless networks.
It seems that, onConnectionError() in quic\tools\tperf\tperf.cpp prints the error message, flushInternal() in quic\api\IoBufQuicBatch.cpp throws the error. Does it have something to do with folly?

server's command is:
tperf -mode server -host 192.168.2.1 -port 9001 -congestion cubic --v=4

server's output is:
I0129 17:13:29.629806 5206 QuicServer.cpp:274] No valid takenover fd found for address=192.168.2.1:9001. binding on worker=0xaaab04550740 workerId=0 processId=0
I0129 17:13:29.630307 5206 QuicServer.cpp:285] Initialized all workers in the eventbase
I0129 17:13:29.630574 5206 tperf.cpp:171] TPerfAcceptObserver attached
I0129 17:13:29.630636 5205 tperf.cpp:533] tperf server started at: 192.168.2.1:9001
I0129 17:13:44.463753 5206 QuicServerWorker.cpp:870] Creating new connection for client=192.168.3.1:41198, routingInfo=CID=d94f4fa19aa2b4f1, cidVersion=1, workerId=0, processId=0, hostId=0, threadId=281473521771904, cidVersion in packet=3, workerId in packet=162, processId in packet=1, hostId in packet=1330618778,
I0129 17:13:44.480093 5206 QuicServerWorker.cpp:1269] Adding into connectionIdMap_ for CID=4000001971171151 client CID= server CID=4000001971171151 peer address=192.168.3.1:41198
I0129 17:13:44.480290 5206 tperf.cpp:243] Starting sends to client.
I0129 17:13:44.480788 5206 QuicPacketScheduler.cpp:814] Wrote crypto frame offset=0 bytesWritten=90 client CID= server CID=4000001971171151 peer address=192.168.3.1:41198
I0129 17:13:44.483676 5206 QuicPacketScheduler.cpp:814] Wrote crypto frame offset=0 bytesWritten=714 client CID= server CID=4000001971171151 peer address=192.168.3.1:41198
I0129 17:13:44.484714 5206 QuicPacketScheduler.cpp:556] Wrote stream frame stream=3 offset=0 bytesWritten=1429 finWritten=0 client CID= server CID=4000001971171151 peer address=192.168.3.1:41198
I0129 17:13:44.485170 5206 QuicPacketScheduler.cpp:556] Wrote stream frame stream=3 offset=1429 bytesWritten=1427 finWritten=0 client CID= server CID=4000001971171151 peer address=192.168.3.1:41198
I0129 17:13:44.485388 5206 QuicPacketScheduler.cpp:556] Wrote stream frame stream=3 offset=2856 bytesWritten=1427 finWritten=0 client CID= server CID=4000001971171151 peer address=192.168.3.1:41198
I0129 17:13:44.485599 5206 QuicPacketScheduler.cpp:556] Wrote stream frame stream=3 offset=4283 bytesWritten=1427 finWritten=0 client CID= server CID=4000001971171151 peer address=192.168.3.1:41198
I0129 17:13:44.485882 5206 QuicPacketScheduler.cpp:556] Wrote stream frame stream=3 offset=5710 bytesWritten=1427 finWritten=0 client CID= server CID=4000001971171151 peer address=192.168.3.1:41198
I0129 17:13:44.486230 5206 QuicPacketScheduler.cpp:556] Wrote stream frame stream=3 offset=7137 bytesWritten=1427 finWritten=0 client CID= server CID=4000001971171151 peer address=192.168.3.1:41198
I0129 17:13:44.486543 5206 QuicPacketScheduler.cpp:556] Wrote stream frame stream=3 offset=8564 bytesWritten=1427 finWritten=0 client CID= server CID=4000001971171151 peer address=192.168.3.1:41198
I0129 17:13:44.486864 5206 IoBufQuicBatch.cpp:154] Error writing to the socket Input/output error, 192.168.3.1:41198
I0129 17:13:44.487277 5206 QuicTransportBase.cpp:3198] writeSocketDataAndCatchError on socket write Input/output error, client CID= server CID=4000001971171151 peer address=192.168.3.1:41198
I0129 17:13:44.487398 5206 QuicTransportBase.cpp:2882] Clearing datagram callback
I0129 17:13:44.487425 5206 QuicTransportBase.cpp:2885] Clearing ping callback
I0129 17:13:44.487445 5206 QuicTransportBase.cpp:2888] Clearing 0 peek callbacks
E0129 17:13:44.487555 5206 tperf.cpp:235] Conn errorCoded=Internal Error, errorMsg=Error on socket write Input/output error,
F0129 17:13:44.488060 5206 tperf.cpp:269] Connection closed
*** Check failure stack trace: ***
*** Aborted at 1706519624 (Unix time, try 'date -d @1706519624') ***
*** Signal 6 (SIGABRT) (0x3e800001455) received by PID 5205 (pthread TID 0xffffa9476580) (linux TID 5206) (maybe from PID 5205, UID 1000) (code: -6), stack trace: ***
(error retrieving stack trace)
Aborted (core dumped)

@jbeshay
Copy link
Contributor

jbeshay commented Feb 27, 2024

Is this issue still occurring? I have not been able to reproduce the issue. Could you share more about the specific setup you are using?

@junkai0531
Copy link
Author

junkai0531 commented Feb 28, 2024

Thanks @jbeshay.
The problem remains unresolved, and the specific setup is listed as follows.
commit hash: 70eb82f
operation system: Ubuntu 22.04.1 LTS Mate
hardware: Raspberry Pi 4B, 4GB RAM
network: wireless, IBSS, 2412Hz, 2 hop (with 1 relay node)

@junkai0531 junkai0531 reopened this Feb 28, 2024
@jbeshay
Copy link
Contributor

jbeshay commented Feb 28, 2024

I don't have a raspberry pi to try to reproduce the issue at the moment but the "Input/output error" indicates that the link may have been down momentarily.

Given it works fine on a wired connection, I suspect this could be related to power issues in the RPi. Could you check dmesg output around the time of the failure?

@junkai0531
Copy link
Author

junkai0531 commented Feb 29, 2024

@jbeshay, thanks for advice.
The dmesg output at tperf server seems all about reconnecting the keyboard.
Below is dmesg output at tperf server aroud the time of the failure.

[ 1100.515913] usb 1-1.3: new full-speed USB device number 5 using xhci_hcd
[ 1105.641923] usb 1-1.3: New USB device found, idVendor=05ac, idProduct=0256, bcdDevice= 1.17
[ 1105.641961] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1105.641978] usb 1-1.3: Product: USB DEVICE
[ 1105.641992] usb 1-1.3: Manufacturer: hfd.cn
[ 1105.651070] input: hfd.cn USB DEVICE as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:05AC:0256.0004/input/input7
[ 1105.709225] hid-generic 0003:05AC:0256.0004: input,hidraw0: USB HID v1.11 Keyboard [hfd.cn USB DEVICE] on usb-0000:01:00.0-1.3/input0
[ 1105.716299] input: hfd.cn USB DEVICE Consumer Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0256.0005/input/input8
[ 1105.776457] input: hfd.cn USB DEVICE System Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0256.0005/input/input9
[ 1105.777045] input: hfd.cn USB DEVICE Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0256.0005/input/input10
[ 1105.777405] input: hfd.cn USB DEVICE Mouse as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0256.0005/input/input11
[ 1105.777921] input: hfd.cn USB DEVICE as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0256.0005/input/input12
[ 1105.778608] hid-generic 0003:05AC:0256.0005: input,hiddev0,hidraw1: USB HID v1.11 Keyboard [hfd.cn USB DEVICE] on usb-0000:01:00.0-1.3/input1
[ 1290.011097] usb 1-1.3: USB disconnect, device number 5
[ 1305.339917] usb 1-1.3: new full-speed USB device number 6 using xhci_hcd
[ 1310.697888] usb 1-1.3: New USB device found, idVendor=05ac, idProduct=0256, bcdDevice= 1.17
[ 1310.697927] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1310.697941] usb 1-1.3: Product: USB DEVICE
[ 1310.697953] usb 1-1.3: Manufacturer: hfd.cn
[ 1310.707503] input: hfd.cn USB DEVICE as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:05AC:0256.0006/input/input13
[ 1310.765125] hid-generic 0003:05AC:0256.0006: input,hidraw0: USB HID v1.11 Keyboard [hfd.cn USB DEVICE] on usb-0000:01:00.0-1.3/input0
[ 1310.772355] input: hfd.cn USB DEVICE Consumer Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0256.0007/input/input14
[ 1310.832420] input: hfd.cn USB DEVICE System Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0256.0007/input/input15
[ 1310.832851] input: hfd.cn USB DEVICE Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0256.0007/input/input16
[ 1310.833272] input: hfd.cn USB DEVICE Mouse as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0256.0007/input/input17
[ 1310.833829] input: hfd.cn USB DEVICE as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0256.0007/input/input18
[ 1310.834509] hid-generic 0003:05AC:0256.0007: input,hiddev0,hidraw1: USB HID v1.11 Keyboard [hfd.cn USB DEVICE] on usb-0000:01:00.0-1.3/input1

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