[Bug 299488] fetch(1): fetch hangs with 100% CPU use while downloading a small port distfile

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 17 Oct 2026 04:17:55 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299488

            Bug ID: 299488
           Summary: fetch(1): fetch hangs with 100% CPU use while
                    downloading a small port distfile
           Product: Base System
           Version: 16.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: yuri@freebsd.org

I spotted 2 such fetch processes on an 16-CURRENT aarch64 system in a VM when
the host is tethered to a mobile phone which presumably makes a connection not
too stable.

fetch(1) should have no code path to loop with a 100% of CPU used, but
apparently it does have such path.

Arguments of one such process:
> $ hd /proc/3012/cmdline
> 00000000  2f 75 73 72 2f 62 69 6e  2f 66 65 74 63 68 00 2d  |/usr/bin/fetch.-|
> 00000010  46 70 72 00 2d 53 00 36  36 38 39 33 31 35 00 2d  |Fpr.-S.6689315.-|
> 00000020  6f 00 70 6c 6f 74 6c 79  2d 37 2e 31 2e 30 2e 74  |o.plotly-7.1.0.t|
> 00000030  61 72 2e 67 7a 00 68 74  74 70 73 3a 2f 2f 70 79  |ar.gz.https://py|
> 00000040  70 69 2e 6f 72 67 2f 70  61 63 6b 61 67 65 73 2f  |pi.org/packages/|
> 00000050  73 6f 75 72 63 65 2f 70  2f 70 6c 6f 74 6c 79 2f  |source/p/plotly/|
> 00000060  70 6c 6f 74 6c 79 2d 37  2e 31 2e 30 2e 74 61 72  |plotly-7.1.0.tar|
> 00000070  2e 67 7a 00                                       |.gz.|
> 00000074

-- 
You are receiving this mail because:
You are the assignee for the bug.