Skip to content

Lima get stuck when certain frequency of DNS resolution occurs #1285

@matsukaz

Description

@matsukaz

Description

Actual Behavior

When I continue to execute nslookup/ping/dig or any other DNS name resolution operations within Lima, Lima get stuck after a certain number of times (lasting about 4 minutes).
This issue also occurs inside Docker container when using Rancher Desktop, so this is critial issue for any system that uses container linking, like Apache+PHP and MySQL.

Steps to Reproduce

  1. Login to Lima and keep running nslookup.
$ rdctl shell
lima-rancher-desktop:/Users/xxx$ while true; do nslookup www.google.co.jp; done
  1. While the above process is running, show a list of UDP open files that qemu-system-aarch64 handles on host OS.
$ lsof -p $(pgrep qemu-system-aarch64) | grep "UDP"
...
qemu-syst 6788 xxxx  119u  IPv4 0x2c6ecf140850ff5f         0t0                 UDP *:63544
qemu-syst 6788 xxxx  120u  IPv4 0x2c6ecf140851762f         0t0                 UDP *:63398
  1. A number of UDP open files keep increasing and after it reaches to FD=1024u, Lima get stuck.
$ lsof -p $(pgrep qemu-system-aarch64) | grep "UDP"
...
qemu-syst 6788 xxxx  1023u  IPv4 0x2c6ecf14085191bf         0t0                 UDP *:54486
qemu-syst 6788 xxxx  1024u  IPv4 0x2c6ecf140852088f         0t0                 UDP *:62934
  1. If you wait about 4 minutes, all UDP open files get released and Lima starts running again.

Workaround

If you set hostResolver.enabled=false , this issue doesn't occur.

hostResolver:
  enabled: false

Versions

  • Lima 0.14.2
  • Rancher Desktop 1.7.0

Operating System / Build Version / CPU

  • MacOS Monterey 12.6 (M1 2020)
  • MacOS Ventura 13.0.1 (Intel Core i5, 2019)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions