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

TCP Previous segment not captured #2746

Closed
JCzz opened this issue Sep 15, 2022 · 2 comments
Closed

TCP Previous segment not captured #2746

JCzz opened this issue Sep 15, 2022 · 2 comments
Labels

Comments

@JCzz
Copy link

JCzz commented Sep 15, 2022

ENV

multipass version
multipass   1.10.1+mac
multipassd  1.10.1+mac

Mac Apple M1
MacOS 12.5.1

I am using two Mac computers, both MacOS M1 client and server.

curl hangs half way through a large file(small file no problem) , if the server is running in multipass on different vlan/network(See step 7. )

curl <--> network <--> host computer <--> multipass vm

Steps

You need to install go on the computer on the different vlan/network and do the following:

  1. Create multipass vm and mount from the same folder:
multipass launch --name myvm --network=en0
multipass mount . myvm:~/speed
  1. Install go
multipass shell myvm
cd speed
sudo snap install go --classic
  1. Generate a large file:
base64 /dev/urandom | head -c 100000 > file.txt
echo "\The end" >> file.txt

Note: Using one zero less base64 /dev/urandom | head -c 10000 > file.txt then there is no problem.

  1. Create the following go file main.go in the same folder(you could also just do "python3 -m http.server"):
package main

import (
	"github.com/gorilla/mux"
	"log"
	"net/http"
)

func main() {
	handler := mux.NewRouter()
	handler.PathPrefix("/").Handler(http.StripPrefix("/", http.FileServer(http.Dir("."))))
	log.Fatal(http.ListenAndServe(":80", handler))
}
  1. Run go on multipass myvm on different vlan/network
go mod init test
go get
sudo go run main.go

From client machine on another vlan/network

  1. Curl to multipass mvm, IMPORTANT to multipass ip address, on the network(--network=en0), from "another" machine:
curl <ip>/file.txt
In my case: `curl 192.170.1.231/file`
7AVzmECVWNbcShP+TE+/6AM/KZWc12AzLKvtctv0pqeSW0SNDW3OSM82SkzF+/UExUUBH4dxlIcM
dObLOlLgz9WfoiEtvZ4Hbx/yq85C+WwnFr2Trhu75qmFrg8Ht8t/x+MyDfI0MyuGw91tKqFgHL4F

Now it hangs, what to do?

If you run this on the multipass host computer(same ip address) it works, just not from multipass vm - again between networks.

Note: multipass list:

Name                    State             IPv4             Image
mvm                     Running           192.168.64.132   Ubuntu 20.04 LTS
                                          192.170.1.231

If I use Wireshark I can see something standing out right about where it hangs:

10287	0.000580	0.000580	64	192.168.1.22	192.170.1.231	TCP	54	53941 → 80 [RST] Seq=1 Win=0 Len=0

4818	0.004338	0.004338	62	192.170.1.231	192.168.1.22	TCP	1514	[TCP Previous segment not captured] 80 → 50623 [ACK] Seq=84853 Ack=86 Win=65152 Len=1448 TSval=1019606200 TSecr=2732723127 [TCP segment of a reassembled PDU]

4820	0.000249	0.000249	64	192.168.1.22	192.170.1.231	TCP	78	[TCP Dup ACK 4817#1] 50623 → 80 [ACK] Seq=86 Ack=67477 Win=131072 Len=0 TSval=2732723132 TSecr=1019605978 SLE=84853 SRE=86301

4821	0.000057	0.000057	64	192.168.1.22	192.170.1.231	TCP	78	[TCP Dup ACK 4817#2] 50623 → 80 [ACK] Seq=86 Ack=67477 Win=131072 Len=0 TSval=2732723132 TSecr=1019605978 SLE=84853 SRE=87749

4822	0.002414	0.002414	62	192.170.1.231	192.168.1.22	TCP	1514	[TCP Fast Retransmission] 80 → 50623 [ACK] Seq=67477 Ack=86 Win=65152 Len=1448 TSval=1019606202 TSecr=2732723132 [TCP segment of a reassembled PDU]

4823	0.000001	0.000001	62	192.170.1.231	192.168.1.22	TCP	1514	[TCP Out-Of-Order] 80 → 50623 [ACK] Seq=68925 Ack=86 Win=65152 Len=1448 TSval=1019606203 TSecr=2732723132 [TCP segment of a reassembled PDU]

4827	0.002141	0.002141	62	192.170.1.231	192.168.1.22	TCP	1514	[TCP Out-Of-Order] 80 → 50623 [ACK] Seq=70373 Ack=86 Win=65152 Len=1448 TSval=1019606205 TSecr=2732723135 [TCP segment of a reassembled PDU]

4829	0.000165	0.000165	62	192.170.1.231	192.168.1.22	TCP	1514	[TCP Retransmission] 80 → 50623 [PSH, ACK] Seq=71821 Ack=86 Win=65152 Len=1448 TSval=1019606205 TSecr=2732723135

4830	0.000002	0.000002	62	192.170.1.231	192.168.1.22	TCP	1514	[TCP Retransmission] 80 → 50623 [ACK] Seq=73269 Ack=86 Win=65152 Len=1448 TSval=1019606205 TSecr=2732723135

4831	0.000000	0.000000	62	192.170.1.231	192.168.1.22	TCP	1514	[TCP Retransmission] 80 → 50623 [ACK] Seq=74717 Ack=86 Win=65152 Len=1448 TSval=1019606205 TSecr=2732723135

I have added this issue to:
Hyperkit: moby/hyperkit#338
Qemu: https://gitlab.com/qemu-project/qemu/-/issues/1584
stackoverflow.com: https://stackoverflow.com/questions/73753103/multipass-tcp-previous-segment-not-captured

Thanks

@JCzz JCzz added the bug label Sep 15, 2022
@JCzz JCzz changed the title --network not working from another computer(curl hangs halfway through) --network works... almost - curl hangs halfway through from another computer Sep 15, 2022
@JCzz JCzz closed this as completed Sep 15, 2022
@JCzz JCzz reopened this Sep 16, 2022
@JCzz JCzz changed the title --network works... almost - curl hangs halfway through from another computer --network - curl hangs halfway through from another computer - TCP Previous segment not captured Sep 16, 2022
@JCzz JCzz changed the title --network - curl hangs halfway through from another computer - TCP Previous segment not captured --network - curl hangs halfway through - TCP Previous segment not captured Feb 24, 2023
@JCzz JCzz changed the title --network - curl hangs halfway through - TCP Previous segment not captured TCP Previous segment not captured Feb 24, 2023
@JCzz
Copy link
Author

JCzz commented Apr 12, 2023

Is this really not an issue, and/or am I the only one with this issue?

@JCzz
Copy link
Author

JCzz commented Apr 13, 2023

Created a simplified issue: #3038

@JCzz JCzz closed this as completed Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant