Comments (7)
Yeah noticed this too.
Thanks for putting up a patch for this @nhanb!
from gokrazy.
I consistently get this error when running gok update
over tailscale (it works fine using direct LAN IP):
Transferred root file system (47 MiB) at 26.01 MiB/s (total: 2s)s
Transferred boot file system (16 MiB) at 26.20 MiB/s (total: 1s)s
Triggering reboot
[update boot file system] 0.00% of 16 MiB, uploading at 0 B/s 2023/05/18 15:00:50 reboot: Post "https://gokrazy:***@junk/reboot": read tcp 100.95.42.78:45338->100.90.227.60:443: read: connection reset by peer
To be more specific, it got stuck for some time at [update boot file system] 0.00% of 16 MiB, uploading at 0 B/s
, then the rest of the log followed. However, the appliance has actually been updated and rebooted correctly.
I'm using latest gok and tailscale 1.40.1 on both machines. My appliance is an amd64 mini pc, if that matters.
from gokrazy.
Not sure yet what the trigger is, but maybe we need to programmatically ignore this error in the updater for now.
Given that you can reproduce it reliably, could you send a PR to ignore this error in the updater? Thanks!
from gokrazy.
I'll try!
from gokrazy.
I dug into the gokrazy/*
repos and found this snippet which could be a race condition:
Lines 353 to 362 in a764954
/reboot
handler assumes the response always finishes successfully within 1 second before rebooting, which may not always be the case (maybe tailscale just adds enough latency for this bug to surface more easily). If we instead allow the http server to gracefully shut down before rebooting, we might solve this bug without any workaround.
On that note, how do I tell gokrazy/tools
to use the gokrazy/gokrazy
repo from my local disk instead of github.com/gokrazy/gokrazy? Apparently gokrazy/tools/go.mod
does not list gokrazy/gokrazy
, so I can't replace
it. Consequently, I can't test my local changes to the /reboot
handler inside the gokrazy/gokrazy
repo.
from gokrazy.
the
/reboot
handler assumes the response always finishes successfully within 1 second before rebooting, which may not always be the case (maybe tailscale just adds enough latency for this bug to surface more easily).
Hmm. Can you try bumping this to 10s to see if that works around the issue?
On that note, how do I tell
gokrazy/tools
to use thegokrazy/gokrazy
repo from my local disk instead of github.com/gokrazy/gokrazy? Apparentlygokrazy/tools/go.mod
does not listgokrazy/gokrazy
, so I can'treplace
it. Consequently, I can't test my local changes to the/reboot
handler inside thegokrazy/gokrazy
repo.
You can just gok add .
in your gokrazy/gokrazy working copy, that should set up the replace directive in the corresponding build directory within your gokrazy instance. See also https://gokrazy.org/development/modules/#building-local-code-the-replace-directive
from gokrazy.
Bumping the wait time to 10s doesn't seem to do anything. I wanted to try gracefully shutting down the http server too, but honestly couldn't figure out how to do that in the gokrazy codebase. I'll sleep on it for now :(
Meanwhile I've pushed gokrazy/tools#55 to simply ignore the error.
from gokrazy.
Related Issues (20)
- Mount namespaces? HOT 1
- Add a way to read `PackageConfig` config from an appended partition HOT 5
- Huge cpu and mem load on gok update HOT 11
- Windows not supported? (gok CLI) HOT 4
- Document 'GOKRAZY_PARENT_DIR' environment variable HOT 1
- Add support for the Raspberry Pi 5 HOT 8
- store the password only in hashed form HOT 2
- command not found HOT 6
- Executing on demand HOT 2
- GPIO / periph.io Edge detection / sysfs not working HOT 2
- support for mounting additional devices (as /perm, or separately) HOT 3
- Kernel panic - not syncing HOT 7
- How to compile this project on mac HOT 2
- continuous integration: add kexec test cycle HOT 2
- Go web application fails to load template file HOT 4
- Support installing microcode HOT 3
- WebAuthN authentication HOT 3
- MBR bootloader: fix 15/16 MB kernel limit HOT 1
- Documentation how to set sysctl HOT 8
- Feature request: Use Tailscale for gokrazy API authorization HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gokrazy.