forked from skycoin/dmsg
-
Notifications
You must be signed in to change notification settings - Fork 0
test #1
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
0pcom
wants to merge
215
commits into
master
Choose a base branch
from
develop
base: master
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.
Conversation
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
Update dmsgpty-ui
Cli improvements
Fix dmsgget secret key error
Add `smux` lib
update skywire 2025-08-30
* update skycoin & other vendor deps * fix dmsgweb * update test workflow * update release workflow * make format
…exing-session Fix/data race on multiplexing session
* update skycoin & other vendor deps * Improve signal handling for graceful shutdown on Ctrl+C Address issues where DMSG client utilities would not respond to Ctrl+C: - Use signal-aware context for dmsgC.Serve() instead of context.Background() in internal/cli, pkg/direct, and dmsgpty-host - Add context cancellation check in dmsg-socks5 accept loop to properly exit on signal - Implement graceful HTTP server shutdown with 5-second timeout in dmsghttp - Ensure dmsgC.Close() is called via defer in dmsgpty-host for proper cleanup - Add WaitGroup wait in direct client stop function for clean goroutine shutdown - Document temporary kill.go workaround for verification testing These changes ensure client utilities properly respond to interrupt signals without requiring multiple Ctrl+C presses. * Fix data race in SessionCommon Close() and Ping() methods Protect concurrent access to sm.yamux and sm.smux fields with sm.mutx lock to prevent data races when Close() or Ping() are called while session is being initialized. The race occurred when: - handleSession() writes to dSes.sm.yamux (server.go:242) while holding the lock - Close() reads sc.sm.yamux (session_common.go:187-188) without holding the lock - A goroutine can call Close() concurrently during session setup Changes: - Add sm.mutx.Lock() protection in Close() method - Add sm.mutx.RLock() protection in Ping() method for consistency * update skywire & skycoin vendor deps
* update skycoin & other vendor deps * implement flags for detailed version info from runtime/debug * Fix race condition in dmsghttp discovery validation Add retry logic with exponential backoff when validating discovery server reachability via DMSG. This fixes the issue where some dmsg servers would fail with EOF errors immediately after session initialization. The race condition occurred because the Ready() signal indicated the dmsg session was established, but the session was still initializing (accepting streams). HTTP requests made immediately after Ready() would fail with EOF. Changes: - Add 5 retry attempts with 200ms, 400ms, 600ms, 800ms backoff delays (total 2s) - Log retry attempts at debug level for troubleshooting - Import time package for sleep functionality This allows all dmsg servers sufficient time to complete session initialization before declaring the connection invalid. * Add synthetic discovery entry support for dialing discovery server Enable regular dmsg clients to dial the discovery server even though it doesn't register itself in discovery. The discovery server uses a direct client and isn't listed in its own database. Solution for dmsghttp mode: Implement a caching discovery client wrapper that intercepts Entry() requests for the discovery server's public key and returns a synthetic entry with all known dmsg servers as delegated servers. Solution for -Z (HTTP) mode: Use a direct client with pre-populated entries for all dmsg servers, the discovery server, and the local client. This avoids the chicken-and-egg problem of needing dmsg transport to query discovery before having a dmsg client. Changes: - Add StartDmsgWithSyntheticDiscovery() for dmsghttp mode - Add StartDmsgWithDirectClient() for -Z HTTP mode - Implement cachingDiscClient wrapper for dmsghttp mode - Direct client includes synthetic entries for discovery server and local client This allows commands like 'dmsg curl -Z dmsg://discovery-pk:80/health' to work.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #
Changes:
How to test this PR: