Repository navigation
Description
Describe the Bug
A 33-minute production outage caused by a fatal Go runtime fault inside newt. The forwarding (data plane) stopped completely, while the control plane stayed alive — so the site kept reporting online in the Pangolin panel and the Windows Service Control Manager logged no state change. Nothing anywhere indicated a problem.
Reported to Pangolin Support by email on 2026-10-24, ticket reference 518:4914845. Support asked us to open this issue so the engineering team can review the stack traces, and stated they will treat the "site reports online while the data plane is dead" behaviour as a critical issue for investigation once it is opened.
What happened
07:13:46 INFO: UDP Forwarder: Successfully created UDP socket for 10.0.200.77:50693
07:13:48 runtime: g 1118016 gp=0x2dfd37fa7680: unknown pc 0x1c5a2fbfdf
07:13:48 runtime: g 1118016 gp=0x2dfd37fa7680: unknown pc 0x1c5a2fbfdf
...
fatal error: unexpected signal during runtime execution
[signal 0xc0000005 code=0x0 addr=0xe8 pc=0x7ff75a258cc5]
runtime: g 1118016: unexpected return pc for sigtramp called from 0x7ff93753bfc2
0xc0000005 is a Windows access violation. The two unknown pc lines are the runtime failing while printing the traceback of that fault.
Packets forwarded per minute, counted directly in pangolin-site.log:
07:10 16,528
07:11 10,000
07:12 20,892
07:13 13,940
07:14-07:46 0 <-- 33 minutes, nothing forwarded
07:47 7,568 (after the host was rebooted)
Windows RDS confirms the consequence: all ~30 RDP sessions were disconnected between 07:14:03 and 07:14:11, 15 to 23 seconds after the fault. The RDP-Tcp listener then received zero inbound connections for 28 minutes, because newt is what delivers tunnel traffic to it.
The part we consider the real defect: the failure was invisible
- the Pangolin server never marked the site offline during the 33 minutes
- the Windows Service Control Manager logged no state change for the service. The only event in the whole 07:00-08:00 window is "entered the running state" at 07:47:19, after the reboot. No stop, no unexpected termination
- the RDP listener kept accepting and authenticating connections that arrived over a path outside the tunnel
- zero packets were forwarded
Something kept the control plane alive while forwarding was dead. We do not know which component survived — the service is started as pangolin.exe __pangolin-service-host pangolin-site up site, and we do not know that architecture.
Goroutine accumulation
The dump is one single dump containing 1,568 goroutines. Headers run continuously from line 6403 to line 36719 of the extracted window, with no second dump and no gap larger than one stack.
Goroutine IDs are above 1,118,000 after 7h 26min of process uptime, on a connector forwarding RDP for ~30 sessions. Stacks concentrate in netstack2/handlers.go: pipeTCP (lines 241, 242, 252) and pipeUDP (lines 397, 410), with goroutines blocked in sync.WaitGroup.Wait (4 minutes) and select (1 minute) at dump time.
Secondary issue: per-packet logging at INFO
UDP copyPacketData: Read/Wrote N bytes is written to disk at INFO for every forwarded packet — up to 35,000 lines per minute, producing 17 GB in 38 days with no rotation. Support pointed us to logLevel, which we will set to WARN.
Our concern is not disk space. It is synchronous disk I/O in the same hot path that faulted, and that the dump which explained the outage was buried under billions of packet lines; extracting it required a binary search by byte offset.
What we can provide
The full goroutine dump — 30,501 lines — has been sent to support by email. We are happy to provide it to the engineering team on request, and to run instrumented builds or collect GODEBUG output on this host.
Environment
- Pangolin: EE self-hosted 1.25.3 (
ee-postgresql-1.25.3), Oracle Cloud - newt: v1.19.0, embedded in pangolin-cli 0.19.0
- gVisor:
gvisor.dev/gvisor@v0.0.0-20250503011706-39ed1f5ac29c - Host: Windows Server 2022, build 20348.5761. Site connector runs as a Windows service under
LocalSystem:
"C:\Program Files\pangolin-cli\pangolin.exe" __pangolin-service-host pangolin-site up site - Workload: ~30 concurrent RDP users reaching this host through a private resource (TCP and UDP, port 50693)
- Path: this site is on a direct path, not relayed. The gerbil log shows no rate anomaly at the corresponding minute, and the site's public IP and newt ID appear zero times in 12 hours of gerbil log
- Host health during the outage: 198.8 GB volume with 71.3 GB free; no unexpected shutdown, no power event, no network adapter event and no session-service restart in the Windows logs
To Reproduce
We cannot reproduce this on demand. It happened once, on a production host, under real load. We are not able to run reproduction attempts against this host during business hours.
Conditions measured at the moment of the fault:
- ~31 active RDP sessions through a single private resource (TCP and UDP, port 50693)
- 10,000 to 21,000 packets per minute being forwarded in the minutes immediately before
- process uptime 7h 26min (
goroutine 1 [chan receive, 446 minutes]) - 1,568 goroutines alive, with IDs above 1,118,000
Counter-evidence against a simple uptime trigger: the replacement process has now run for more than two days without failure, across a weekend with low load. Throughput looks more relevant than uptime.
What we can do instead of reproducing: run an instrumented build on this host, collect GODEBUG output, or provide the full 30,501-line goroutine dump.
AI Disclosure
Yes — disclosed in full.
This report was written with the assistance of Claude (Anthropic). The model was used to analyse the connector log, locate and extract the goroutine dump from a 17 GB file by binary search on byte offset, correlate the Windows event logs with the connector log, and draft this text.
Every figure here is a measurement taken from the affected host by its operator — packet counts, timestamps, goroutine count, service-manager events, disk figures. None of them are generated or estimated by the model. Several hypotheses raised during the investigation, by the operator and by the model, were tested and discarded; they are not presented here. One claim made in our original email to support ("the process did not exit") was withdrawn after it failed verification.
The operator reviewed and approved this report before posting.
Expected Behavior
Two things.
1. On an unrecoverable runtime fault, the process should exit. Pangolin Support's own comment on this incident was: "Ideally the whole process crashes on an error and not just the packet forwarding." We agree. A hard exit would have been detected in about two minutes by the existing offline_checker and recovered by a service restart. The partial survival is precisely what turned a crash into a 33-minute blackout with no alert on either side.
2. Site status should reflect data plane health, not only control plane liveness. A site reporting online while forwarding nothing is, from an operations standpoint, worse than a site reporting offline — we cannot build an alert for a condition the platform does not expose.
Secondarily: packet-level forwarding detail should not be logged at INFO by default on a production connector.
Activity
oschwartz10612 commentedon Oct 26, 2026
[-]newt v1.19.0: data plane dies onewt v1.19.0: data plane dies on access violation while control plane keeps the site ONLINE (1,568 goroutines at crash)n access violation while control plane keeps the site ONLINE (1,568 goroutines at crash)[/-][+]newt v1.19.0: data plane dies onewt v1.19.0: data plane dies on access violation while control plane keeps the site ONLINE (1,568 goroutines at crash)n access violation while control plane keeps the site ONLINE (1,568 goroutines at newt v1.19.0: data plane dies on access violation while control plane keeps the site ONLINE (1,568 goroutines at crash)crash)[/+][-]newt v1.19.0: data plane dies onewt v1.19.0: data plane dies on access violation while control plane keeps the site ONLINE (1,568 goroutines at crash)n access violation while control plane keeps the site ONLINE (1,568 goroutines at newt v1.19.0: data plane dies on access violation while control plane keeps the site ONLINE (1,568 goroutines at crash)crash)[/-][+]newt v1.19.0: data plane dies on access violation while control plane keeps the site ONLINE (1,568 goroutines at crash)[/+]silvanocarnauba commentedon Oct 27, 2026
Correction and significant new data, from our own logs.
First, a retraction. In the "Counter-evidence against a simple uptime trigger" section above I wrote that "the replacement process has now run for more than two days without failure". That statement is false. I had only searched a narrow time window of the log. A full scan of the 17 GB
pangolin-site.log(38 days) has now been done on the affected host, and it changes the picture substantially. I apologise for having published an unverified claim.1. This is not a single event. It is roughly 22 fatal faults in 38 days.
Searching the whole log for
fatal error: unexpected signal during runtime executionreturns about 22 occurrences. Dated examples (host local time):All of them carry the same signature:
[signal 0xc0000005], a Windows access violation.2. It is not a v1.19.0 regression.
The
pangolin.exebinary on this host is dated 2026-10-20 14:39:20, which is when CLI 0.19.0 was installed. The faults on 14 and 19 October therefore predate that install. Whatever this is, it was already present in the previous CLI version. I withdraw the rollback-to-0.18.1 hypothesis I had been considering.3. The most serious finding: not one of these ~22 faults ever stopped the Windows service.
The Service Control Manager history for the last 40 days contains only four state changes for
pangolin-site, and all four are accounted for by planned maintenance and reboots performed by us (22/10 and 23/10 among them). The service never once entered a failed state as a result of these faults.Windows recovery actions are configured on the service (restart after 5s / 15s / 30s, reset counter 24h) and have never once had anything to recover, because from the SCM's point of view the service stayed running the whole time.
The practical consequence is that the supervisor process (
__pangolin-service-host) apparently survives while the worker faults. Every normal recovery mechanism — the Pangolinoffline_checker, the Windows SCM, our own monitoring of site status — is blind to it by construction. In 21 of the ~22 cases forwarding evidently resumed on its own and nobody noticed; in the one case reported above it did not, and ~30 users lost their sessions for 33 minutes with the site still showingonline.4. What this means operationally
This connector carries the Terminal Server access for an entire retail operation. A fault that can silently kill packet forwarding, is invisible to every status signal the product exposes, and occurs on average more than once every two days is a risk we cannot mitigate from outside the product. We can detect it with an external TCP probe through the tunnel alias, and we can recover it with
Restart-Service pangolin-site -Force, but both are workarounds for something that should fail loudly.We can provide: the dated list of all ~22 fault timestamps, the full goroutine dump already sent to support, the SCM history, and per-minute packet counts around any of the occurrences. We can also run an instrumented or
GODEBUG-enabled build on this host — it is production, but the fault is now frequent enough that an instrumented process would very likely capture one within a day or two.One further note: there is an older ticket of ours, "Pangolin EE 1.24.0 — widespread olm client disconnections", opened 14 October and closed 26 October without a cause being found. Faults occurred on 14 October. It may be the same defect, and may be worth reopening.
silvanocarnauba commentedon Oct 27, 2026
Final correction, with the full-file measurement. This supersedes my previous comment, which was also wrong.
I have now scanned the entire
pangolin-site.logon the affected host: 234,892,132 lines, 19,848,658,844 bytes, 38 days. Everything below is from that scan plus the Windows Service Control Manager records. Three things I previously stated are withdrawn, and the corrected picture is sharper than either of my earlier versions.Retractions
fatal error: unexpected signal, which matches only 2 of the events. The real count is higher.The measurement
Counting by signature across the whole file:
goroutine 1 gp=(one per dump, one dump per crash)0xc0000005fatal error: faultfatal error: unexpected signal during runtime executionpanic:unknown pc30 crashes in 38 days — one roughly every 30 hours. They are not all the same message, which is why a text filter undercounts; counting non-packet log lines per minute finds every dump regardless of its header.
The crashes recover by themselves — 29 times out of 30
Each dump carries the uptime of the process that died (
goroutine 1 ... [chan receive, N minutes]). Differentgpaddresses and a reset clock prove process replacement. Example, four crashes in 96 minutes on 14 October:29 of the 30 crashes were followed by a new worker within 0–3 minutes. Forwarding resumed and nobody noticed. I verified one of these directly by counting forwarded packets around the 14 October 21:46 crash: 12,521 packets at 21:50, 8,632 at 22:00, uninterrupted.
This uptime-derived timing is corroborated independently three times: SCM logged the service entering
runningat 22/10 03:25:39, 23/10 23:46:48 and 24/10 07:47:19, matching the derived replacement starts of 03:25, 23:47 and 07:48.The one that did not recover is the outage in this report
35 minutes without a worker, against a norm of about 1 minute. And the only shutdown event inside that window is the operator's manual reboot at 07:44:28 — thirty-one minutes after the crash. The supervisor did not bring the worker back; a human did.
The Service Control Manager never saw any of it
In the ~11 days the System log actually covers, 25 of the 30 crashes occurred. The SCM recorded 7 service state events in that period, and every one is accounted for by the operator's own planned maintenance: a reboot on 22/10 (00:26 stop, 01:22 start), a 27-second stop/start at 03:25 the same night, a reboot on 23/10 (23:43 stop, 23:46 start), and the start at 24/10 07:47 after the manual reboot.
Not one of the 25 crashes produced a service state change. The configured Windows recovery actions (restart after 5s / 15s / 30s, reset counter 24h) have therefore never once had anything to recover. There is also no SCM event at all on 20 October, when the CLI was upgraded to 0.19.0 — so worker replacement demonstrably happens inside the service, invisible to the service manager.
Two defects, not one
offline_checkersees a live control plane, the Windows SCM sees a running service, your panel shows the siteonline.A third, separate signature worth a look
Twice, byte-identical: 2026-10-21 16:59 and 2026-10-22 08:39.
120259084288is0x1C00000000— a pointer value being used as a count. This looks like a concrete netstack bug with a findable origin.Correction to the title and framing of this report
This is not a v1.19.0 regression. The
pangolin.exebinary on this host is dated 2026-10-20 14:39:20, when CLI 0.19.0 was installed, and crashes occurred on 11, 14, 16, 17, 18 and 19 October — all before it. The defect predates that version. I withdraw the rollback plan I had been considering, and the version in the title should not be read as the origin of the bug.What we can provide
The dated table of all 30 crashes with per-process uptime and recovery delay; the full goroutine dump; the SCM records with the log-coverage caveat stated; per-minute forwarded-packet counts around any crash. We can also run an instrumented or
GODEBUGbuild on this host — it is production, but at one crash per 30 hours an instrumented process would capture one within a day or two.I apologise for the two earlier incorrect counts. Both came from asserting over the whole file what I had only measured in part. Everything in this comment is from the complete scan, and I have stated explicitly where a source's coverage limits what can be claimed.
oschwartz10612 commentedon Oct 27, 2026
Thanks for the dump, it was enough to find the cause.
The crash is a bug in Go 1.26.0 and 1.26.1 on Windows, golang/go#77975, fixed in Go 1.26.2. When a UDP socket read has to wait for data,
ReadFromgives Windows a pointer to a variable on the goroutine's stack for the sender's address length. Windows fills it in when the packet arrives, by which point that stack memory is being used for something else. Our releases of newt and pangolin-cli (0.18.1 and 0.19.0 included) were built with Go 1.26.0.Your logs match this exactly. Newt's sockets to the target host are IPv6/IPv4 dual-stack, so the value Windows writes is 28 (
0x1c), the size of an IPv6 socket address:pipeUDP, which reads from the socket to 10.0.200.77:50693, and it was insideinternal/poll.(*FD).execIO. The faulting address,0x1c5a2fbfdf, is a return address intointernal/poll(0x7ff75a2fbfdf) whose upper 32 bits were replaced with0x1c.pushed=120259084288in the twopush(transportHead, 20)panics is0x1c00000000, the same 4-byte write landing in a gVisor packet buffer.This also explains the 33 minutes. The runtime faulted a second time while printing the dump, and your dump stops partway through a stack frame at 07:13:50. The process seems to have hung there instead of exiting. On Windows,
__pangolin-service-hostrunspangolin up siteas a child process and restarts it itself, which is why the SCM never saw anything. It only restarts the child when the child exits, though, and a hung process keeps its websocket open, so Pangolin kept the site online.What we changed:
pangolin-site, so you can alert on them.UDP copyPacketDatalines are now DEBUG.On your other points: agreed, this predates 0.19.0. The goroutine numbers aren't a leak. Each TCP connection and UDP flow uses three goroutines, UDP flows stay open until 60 seconds after their last packet, and goroutine IDs are never reused. Log rotation isn't done yet. Your olm disconnection ticket may be the same bug, since olm's Windows builds also use Go 1.26.0.
Two things that would help:
pangolin-site.log, is there anything between the last dump line at 07:13:50 and the next startup at about 07:48? If there isn't, that confirms the process hung instead of exiting.Merge pull request #473 from fosrl/fix-471
silvanocarnauba commentedon Oct 28, 2026
Thank you for the root cause, and for turning it around this fast. The Go 1.26.0
ReadFromexplanation accounts for every anomaly we had measured and could not explain, including the0x1cin the faulting address and inpushed=120259084288. We had flagged that constant as "a pointer used as a count" without understanding why — now it reads as a sockaddr length.Answer to your question 1: there is nothing. The process hung, it did not exit.
Full scan of the window in
pangolin-site.logon the affected host:33 minutes and 34 seconds with not a single line. No forwarded packet, no
ACCESS STARTorACCESS END, no error, no shutdown message. Packets per minute across the window:The new process at 07:47:20 only exists because the operator rebooted the machine at 07:44:28. Nothing restarted it before that.
Second: this is not one host, and there is a second silent failure.
We ran the same scan on all three of our Windows connectors:
62 crashes in 38 days across three independent connectors, and the rate tracks traffic volume — half the log, a quarter the crashes. That matches your point about UDP throughput driving the frequency.
We reconstructed recovery times from the uptime in each dump (
goroutine 1 ... [chan receive, N minutes]), which gives the start time of the process that died. Almost every crash is followed by a new worker within 0–3 minutes. Two are not:runningcontinuously from 05:36:50 until 23:13:20. Nobody reported it; sessions in progress were presumably unaffected and new connections simply failed for half an hour.So the silent-hang path has fired at least twice, on two different machines. The 30-second watchdog you added in the service host is exactly the right fix for it, and the warnings in the Windows Application log under
pangolin-sitegive us something to alert on, which we did not have.A note on the method, in case it is useful to you: the uptime in the
goroutine 1header is a reliable clock. It matched the SCM service-start records to the second on four separate occasions (22 Oct 03:25:39, 23 Oct 23:46:48, 24 Oct 07:47:19 on host A; 23 Oct 05:36:50 on host B). One case on host B does not reconcile — a crash at 25 Oct 11:54 reporting 474 minutes would imply a start at 04:00, but that machine booted at 05:35 — and we have not explained it.One request: which release carries these fixes, for both
pangolin-cliandnewt? We will upgrade all three connectors as soon as it is published and report back on whether the crashes stop, per your question 2.Finally, you may want to check the olm side: you mentioned its Windows builds also use Go 1.26.0, and our earlier ticket about widespread olm client disconnections was closed on 26 October without a cause. Four of host A's crashes fall on 14 October, the day that ticket was opened.
silvanocarnauba commentedon Oct 28, 2026
0.19.1 is installed on all three of our Windows connectors. Verified from the binaries:
go1.26.10andgithub.com/fosrl/newt@v1.19.1, with gVisor unchanged — which fits your explanation that thepush(transportHead, 20)panic was the same 4-byte write landing in a gVisor buffer rather than a bug of its own.The log level change is already measurable. On the busiest connector, with UDP forwarders active, the log grew 750 bytes in 60 seconds — it was averaging about 450 MB a day before, with peaks of 35,000 lines per minute. What is left scales with connections instead of packets, which is what a connector log should do.
We will report back on your question 2 once there are a few days of data on the new build.
Thank you, @oschwartz10612. You took an issue from a customer without a support contract, read 30,000 lines of goroutine dump, recognised a Go runtime bug behind it, and shipped a fix in about a day — and you did not stop at the crash. The 30-second watchdog in the service host and the warnings in the Windows Application log are the parts that actually close the operational hole we were reporting, and neither was required to fix the Go issue. That is not the response we expected, and it is appreciated.
Credit where it is due on the root cause as well: the underlying defect is
golang/go#77975, fixed in Go 1.26.2 by the Go team.Fix fosrl#471
Fix fosrl/newt#471
Fix updating site
silvanocarnauba commentedon Nov 1, 2026
Answer to your question 2: the crashes have stopped.
Four days on 0.19.1, on the two connectors that carried almost all of the failures. Both were upgraded on 2026-10-28 in the early hours.
Both windows start before the upgrade and run to now, so they cover four days including four business days. The count is of
goroutine 1 gp=lines, which is the signature-independent marker we settled on — it catches a dump whatever header text precedes it.The more interesting result is in the Windows Application log. Across the entire history of the
pangolin-siteprovider on both hosts there is not a single Warning. OnlyStarting pangolin-site (up site)andpangolin-site stopped, all accounted for by scheduled reboots and our own maintenance.That matters because it separates two things your release did. The 30-second watchdog is the safety net for a crash that hangs instead of exiting — and it has not had to fire once. So this is not the symptom being caught; the crash itself is gone. The Go 1.26.10 rebuild is doing the work.
The log level change is also confirmed, this time properly. On 28 October we reported 750 bytes in 60 seconds, but that was measured at 00:49 with two forwarders just created and almost no traffic — a weak measurement that happened to be right. Here is the real one:
copyPacketDataline in the entire file is 2026-10-28 00:46:43, seventeen seconds before the service was stopped for the upgrade. Nothing in four days. Growth measured over 60 seconds: 0 bytes.copyPacketDataline: 2026-10-28 00:07:54.What is left in the log is connection-level events, which scale with connections rather than packets. That is a connector log we can actually read.
Scope, stated plainly: this covers two of our three Windows connectors. The third (8 users, 8 crashes in the 38 days) is on 0.19.1 as well but we have not run the same count on it yet. We will report if it differs. One other note for completeness: Host A had its cloud instance shape changed on 1 November, after the observation window closed, so it is not a factor in these numbers.
Thank you again. From our side this is closed: cause identified, fix shipped, and verified in production.
oschwartz10612 commentedon Nov 2, 2026