-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
pasta: timeout again (rawhide) #20170
Comments
Another one from a test PR. Four runs total, two failures. |
cc @dgibson |
And again, same story (rawhide). |
...from f38 + f37. Requires one minor e2e test change, to handle an error logging change in conmon 2.1.8. Also, this is important, requires crun-1.9.1 because of a kernel symlink change; see containers/crun#1309 The VM images here were carefully built to include that. By the time the next VM images get built, it should be default. Since we've bumped crun, remove two obsolete skips And, skip a flaky pasta test, containers#20170 Signed-off-by: Ed Santiago <[email protected]>
Hrm, not much to go on here. It's possible this is a new version of #17598, but it's equally possible it's some entirely unrelated timeout. Since we've had what I believe should be a pretty robust fix for the #17598 aliasing problem, I'm inclined to suspect it's something else. @edsantiago do you have a recipe for creating a VM with the f40 snapshot where the problem is appearing? |
Hangs on my very first try just now, rawhide, $ 1minutetip -n 1MT-Fedora-Rawhide
....
ssh into it...
git clone podman, install dependencies
...
# loginctl enable-linger fedora
# su - fedora
$ cd /path/to/podman
$ vim test/system/505* <----- search for 20170, remove the skip
$ hack/bats --rootless 505:"TCP/IPv4 large transfer, tap"
chcon: failed to change context of '/root/go/podman/bin/podman' to ‘unconfined_u:object_r:container_runtime_exec_t:s0’: Operation not permitted
--------------------------------------------------
$ bats --filter TCP/IPv4 large transfer, tap test/system/505-networking-pasta.bats
505-networking-pasta.bats
podman networking with pasta(1) - TCP/IPv4 large transfer, tap After ^C:
|
One-line reproducer: $ bin/podman run --net=pasta -p '[127.0.0.1]':5799:5799/tcp quay.io/libpod/testimage:20221018 date
Error: pasta failed with exit code 1:
No external routable interface for IPv6
Failed to bind any port for '-t 127.0.0.1/5799-5799:5799-5799', exiting Fails the same way in f38 with In f38, after
|
This message looks like a good clue:
Usually this means that pasta was unable to bind the specified ports on the host side, which suggests the port is already in use. Are there any stale pasta processes on the host where podman is running? Or is there something else using port 5788? |
Same message no matter what port number I specify |
That looks like one of the SELinux problems we already fixed. As for the Does the problem occur if you disable selinux enforcement? |
OK, yeah, it's SELinux; |
Yep, still broken with $ while :;do echo;date;hack/bats --rootless 505:"TCP/IPv4 large transfer, tap"||break;done
Mon Oct 16 10:19:20 AM EDT 2023
--------------------------------------------------
$ bats --filter TCP/IPv4 large transfer, tap test/system/505-networking-pasta.bats
505-networking-pasta.bats
✓ podman networking with pasta(1) - TCP/IPv4 large transfer, tap
1 test, 0 failures
Mon Oct 16 10:19:23 AM EDT 2023
--------------------------------------------------
$ bats --filter TCP/IPv4 large transfer, tap test/system/505-networking-pasta.bats
505-networking-pasta.bats
✓ podman networking with pasta(1) - TCP/IPv4 large transfer, tap
1 test, 0 failures
Mon Oct 16 10:19:49 AM EDT 2023
--------------------------------------------------
$ bats --filter TCP/IPv4 large transfer, tap test/system/505-networking-pasta.bats
505-networking-pasta.bats
✓ podman networking with pasta(1) - TCP/IPv4 large transfer, tap
1 test, 0 failures
Mon Oct 16 10:20:16 AM EDT 2023
--------------------------------------------------
$ bats --filter TCP/IPv4 large transfer, tap test/system/505-networking-pasta.bats
505-networking-pasta.bats
✓ podman networking with pasta(1) - TCP/IPv4 large transfer, tap
1 test, 0 failures
Mon Oct 16 10:20:42 AM EDT 2023
--------------------------------------------------
$ bats --filter TCP/IPv4 large transfer, tap test/system/505-networking-pasta.bats
505-networking-pasta.bats
podman networking with pasta(1) - TCP/IPv4 large transfer, tap <<<<<<---------- HANG After 5 minutes I ^Ced and got:
Twiddle thumbs five more minutes, ^C again, nothing useful. Test terminates but without a backtrace. |
Here's # ps auxww --forest
...
fedora 34534 0.0 1.2 76220 24632 ? Ss 11:39 0:00 /usr/bin/pasta --config-net -t 10.0.184.181/5304-5304:5304-5304 -u none -T none -U none --no-map-gw --netns /run/user/1000/netns/netns-320bc153-dbe7-1873-fde9-23aa349d29da
fedora 34536 0.0 0.1 9776 2332 ? Ss 11:39 0:00 /usr/bin/conmon [....]
fedora 34538 0.0 0.0 1616 896 ? Ss 11:39 0:00 \_ sh -c for port in $(seq 5304 5304); do socat -u TCP4-LISTEN:${port},bind=[10.0.184.181] EXEC:md5sum & done; wait
fedora 34542 0.0 0.1 4916 2432 ? S 11:39 0:00 \_ socat -u TCP4-LISTEN:5304,bind=[10.0.184.181] EXEC:md5sum
fedora 34544 0.0 0.0 1616 640 ? S 11:39 0:00 \_ md5sum FWIW it reproduces pretty easily, within 15 minutes at most. |
Unfortunately those additional reproduces don't have any additional clues. @edsantiago, again, do you have an easy way to set up an fc40 VM? It looks like I'm going to have to reproduce this myself to investigate. |
Yeah, it's just a 1minutetip VM with podman from git + dependencies. It takes seconds. Do you have 1minutetip? If not, PM me on a secure channel and I'll set one up for you. 1mt VMs have a limited lifetime, 6 hours or so, so it's much better if you set up your own. |
With @edsantiago 's assistance, I've now reproduced the problem both on a VM he set up, and one I set up. I've simplified the reproducing case down a bit, but still don't have a lot in the way of clues about what's going on. Because the client/sending I expect to continue digging into this tomorrow and make some more substantial progress. |
Ok, through yesterday I've discovered some interesting new things.
Continuing to investigate. |
Investigated further today. The mechanics here seem to be very similar to upstream bug 74.
Our analysis indicated that bug 74 was caused by a kernel bug: it appears that our heavy use of My working theory is that that workaround isn't as robust as we'd hoped, and even with the As an aside, I tried replacing our |
Forgot to mention, I now have a reproducer with pasta alone, not using podman. I'm using this script (which will need some tweaking for anyone using it on a different system):
|
There are actually two symtpoms we see, both with the original podman reproducer and the pasta alone reproducer.
I've been focusing on case (1), but (2) is seen as well. As an experiment I tried entirely disabling use of |
Tried a different experiment of not using |
I tried double checking that we're not somehow missing epoll events: I added instrumentation on a timer that ran did a |
Hi @edsantiago , Sorry there have been no updates for a while. I've been looking into this with assistance from @sbrivio-rh and Paolo Abeni, and we think we finally figured it out. It seems the cause of the stall is a kernel bug, where calling We have a draft fix here. Could you try that out and see if works for you? |
Nice work! I'd be happy to give it a spin, but is there any chance you could give me a scratch rpm? It's a lot easier for me to (Also, I don't work Fridays. I will be home part of tomorrow, though, and will be glad to instrument a test PR during a free moment). |
There you go: By the way:
no dependencies other than a standard C library.
|
Thanks. I ended up running my above reproducer in a 1mt, it ran fine for the lifetime of the VM. And each time I checked, it was O(5s), not 30. Your code LGTM, thank you! |
This is now included in passt-0^20231110.g5ec3634-1.fc40 for Fedora Rawhide. Debian update is still pending. |
Unfortunately, today's VM build picked up 2023-11-07 so the test continues to remain skipped. |
On the L2 tap side, we see TCP headers and know the TCP window that the ultimate receiver is advertising. In order to avoid unnecessary buffering within passt/pasta (or by the kernel on passt/pasta's behalf) we attempt to advertise that window back to the original sock-side sender using TCP_WINDOW_CLAMP. However, TCP_WINDOW_CLAMP just doesn't work like this. Prior to kernel commit 3aa7857fe1d7 ("tcp: enable mid stream window clamp"), it simply had no effect on established sockets. After that commit, it does affect established sockets but doesn't behave the way we need: * It appears to be designed only to shrink the window, not to allow it to re-expand. * More importantly, that commit has a serious bug where if the setsockopt() is made when the existing kernel advertised window for the socket happens to be zero, it will now become locked at zero, stopping any further data from being received on the socket. Since this has never worked as intended, simply remove it. It might be possible to re-implement the intended behaviour by manipulating SO_RCVBUF, so we leave a comment to that effect. This kernel bug is the underlying cause of both the linked passt bug and the linked podman bug. We attempted to fix this before with passt commit d3192f6 ("tcp: Force TCP_WINDOW_CLAMP before resetting STALLED flag"). However while that commit masked the bug for some cases, it didn't really address the problem. Fixes: d3192f6 ("tcp: Force TCP_WINDOW_CLAMP before resetting STALLED flag") Link: containers/podman#20170 Link: https://bugs.passt.top/show_bug.cgi?id=74 Signed-off-by: David Gibson <[email protected]> Signed-off-by: Stefano Brivio <[email protected]>
A friendly reminder that this issue had no activity for 30 days. |
@edsantiago any update on this one? |
This is believed to be fixed in pasta-2023-11-10 but the CI VMs are still on 11-07 (even though they have been respun twice in the past few weeks). All we're doing is waiting for the new pasta rpm to propagate. |
Not sure I understand but this looks like it is 2023-12-08 Or are you talking about something else? |
Something else. That string is the date/time the VMs were built. The string I mentioned is the pasta version (it's confusing because pasta versions are YMD, not semantic. This table might help. This is my new little thing that displays package versions on all VM builds. Find the (Sorry about the dash in fedora. Long story short, the way my script finds versions is by looking for dnf/apt updates, and this OS is apparently keeping the default version, and I have no way to find out what that is). HTH. |
Ah, yes, for Fedora 39 I waited a couple of weeks before submitting this update -- there's always the risk of obsoleting previous updates which are still in I suppose it should be sorted on Debian too in a bit -- |
Thanks for the update! Who wants me to spin up new VMs and cycle them into CI juuuuuust before a long holiday break? Anyone? Anyone? |
I can remind you on Friday evening. Today... I don't know, it wouldn't feel professional enough. |
PR #21129 merged today, with pasta 2012-12-04 in all VMs and the |
Resurrecting #17598. Pasta test timing out again. Seen in rawhide with
passt-0^20230908.g05627dc-1.fc40-x86_64
:This is f40 rawhide, not f39; and it is an in-progress PR. Podman is not yet testing f40 rawhide, so we are unlikely to see this flake often... until that PR merges.
The text was updated successfully, but these errors were encountered: