-
Notifications
You must be signed in to change notification settings - Fork 263
Enhance synctrace logging #980
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
Open
IDisposable
wants to merge
5
commits into
jetkvm:dev
Choose a base branch
from
IDisposable:faster-synctracing
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
979b32b
Enhance synctrace logging.
IDisposable 5964077
Switch to traceable sync for most everything
IDisposable 8fbd4f2
More documentation
IDisposable afca8c3
Update internal/sync/log.go
IDisposable f6ebdba
Update DEVELOPMENT.md
IDisposable File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,12 +112,16 @@ tail -f /var/log/jetkvm.log | |
| │ │ ├── cgo/ # C files for the native library (HDMI, Touchscreen, etc.) | ||
| │ │ └── eez/ # EEZ Studio Project files (for Touchscreen) | ||
| │ ├── network/ # Network implementation | ||
| │ ├── sync/ # Synchronization primatives with automatic logging (if synctrace enabled) | ||
| │ ├── timesync/ # Time sync/NTP implementation | ||
| │ ├── tzdata/ # Timezone data and generation | ||
| │ ├── udhcpc/ # DHCP implementation | ||
| │ ├── usbgadget/ # USB gadget | ||
| │ ├── utils/ # SSH handling | ||
| │ └── websecure/ # TLS certificate management | ||
| ├── pkg/ # External packages that have customizations | ||
| │ ├── myip/ # Get public IP information | ||
| │ └── nmlite/ # Network link manager | ||
| ├── resource/ # netboot iso and other resources | ||
| ├── scripts/ # Bash shell scripts for building and deploying | ||
| └── static/ # (react client build output) | ||
|
|
@@ -162,7 +166,7 @@ tail -f /var/log/jetkvm.log | |
|
|
||
| ```bash | ||
| cd ui | ||
| npm install | ||
| npm ci | ||
| ./dev_device.sh <YOUR_DEVICE_IP> | ||
| ``` | ||
|
|
||
|
|
@@ -195,9 +199,11 @@ ssh [email protected] ps aux | grep jetkvm | |
|
|
||
| ### View live logs | ||
|
|
||
| The file `/var/log/jetkvm*` contains the JetKVM logs. You can view live logs with: | ||
|
|
||
| ```bash | ||
| ssh [email protected] | ||
| tail -f /var/log/jetkvm.log | ||
| tail -f /var/log/jetkvm* | ||
| ``` | ||
|
|
||
| ### Reset everything (if stuck) | ||
|
|
@@ -322,6 +328,28 @@ Or if you want to manually create the symlink use: | |
| mklink /d ui ..\eez\src\ui | ||
| ``` | ||
|
|
||
| ### Build is unstable even before you changed anything | ||
|
|
||
| Make sure you clean up your _node_ modules and do an `npm ci` (**not** `npm i`) to ensure that you get the exact packages required by _package-lock.json_. This is especially important when switching branches! | ||
|
|
||
| ```bash | ||
| cd ui && rm -rf node_modules/ && npm ci && cd .. | ||
| ``` | ||
|
|
||
| If you are working on upgrades to the UI packages use this command to wipe the slate clean and get a new valid _package-lock.json_: | ||
|
|
||
| ```bash | ||
| cd ui && rm -rf node_modules/ package-lock.json && npm i && cd .. | ||
| ``` | ||
|
|
||
| ### Device panics or becomes unresponsive | ||
|
|
||
| You can also run the device-side _go_ code under a debug session to view the logs as the device is booting up and being used. To do this use the following command in your development command-line (where the IP is the JetKVM device's IP on your network) to see a very detailed `synctrace` of all mutex activity: | ||
|
|
||
| ```bash | ||
| ./dev_deploy.sh -r <IP> --enable-sync-trace | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Next Steps | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,8 @@ import ( | |
| "fmt" | ||
| "os" | ||
| "strings" | ||
| "sync" | ||
|
|
||
| "github.com/jetkvm/kvm/internal/sync" | ||
| ) | ||
|
|
||
| const ( | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| package native | ||
|
|
||
| import "sync" | ||
| import "github.com/jetkvm/kvm/internal/sync" | ||
|
|
||
| var ( | ||
| instance *Native | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.