Skip to content

Conversation

@0pcom
Copy link
Collaborator

@0pcom 0pcom commented Sep 18, 2025

  • fix panic on dmsgweb invoked with no flags
  • update code deps
go get -u ./... ; go mod tidy ; go mod vendor

@0pcom
Copy link
Collaborator Author

0pcom commented Sep 18, 2025

A data race appears - which is not related to anything done on this PR - as far as I'm aware

@mrpalide

WARNING: DATA RACE
Read at 0x00c0000cb900 by goroutine 1467:
  github.com/skycoin/dmsg/pkg/dmsg.(*SessionCommon).Close()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/session_common.go:186 +0x92
  github.com/skycoin/dmsg/pkg/dmsg.(*ServerSession).Close()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server_session.go:41 +0x12c
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).handleSession.func1()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:225 +0x116
Previous write at 0x00c0000cb900 by goroutine 1417:
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).handleSession()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:240 +0xb66
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).Serve.func4()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:168 +0x9b
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).Serve.gowrap1()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:170 +0x4f
Goroutine 1467 (running) created at:
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).handleSession()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:223 +0x56a
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).Serve.func4()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:168 +0x9b
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).Serve.gowrap1()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:170 +0x4f
Goroutine 1417 (running) created at:
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).Serve()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:161 +0x657
  github.com/skycoin/dmsg/pkg/dmsgtest.(*Env).newServer.func1()
      /home/runner/work/dmsg/dmsg/pkg/dmsgtest/env.go:104 +0x7e
==================
==================
WARNING: DATA RACE
Write at 0x00c0001c6808 by goroutine 1467:
  sync/atomic.CompareAndSwapInt32()
      /opt/hostedtoolcache/go/1.25.1/x64/src/runtime/race_amd64.s:361 +0xb
  sync/atomic.CompareAndSwapInt32()
      <autogenerated>:1 +0x18
  sync.(*Mutex).Lock()
      /opt/hostedtoolcache/go/1.25.1/x64/src/sync/mutex.go:46 +0x28
  github.com/hashicorp/yamux.(*Session).Close()
      /home/runner/work/dmsg/dmsg/vendor/github.com/hashicorp/yamux/session.go:273 +0x57
  github.com/skycoin/dmsg/pkg/dmsg.(*SessionCommon).Close()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/session_common.go:187 +0xc4
  github.com/skycoin/dmsg/pkg/dmsg.(*ServerSession).Close()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server_session.go:41 +0x12c
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).handleSession.func1()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:225 +0x116
Previous write at 0x00c0001c6808 by goroutine 1417:
  github.com/hashicorp/yamux.newSession()
      /home/runner/work/dmsg/dmsg/vendor/github.com/hashicorp/yamux/session.go:99 +0x36a
  github.com/hashicorp/yamux.Server()
      /home/runner/work/dmsg/dmsg/vendor/github.com/hashicorp/yamux/mux.go:104 +0x1f3
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).handleSession()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:240 +0xb2b
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).Serve.func4()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:168 +0x9b
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).Serve.gowrap1()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:170 +0x4f
Goroutine 1467 (running) created at:
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).handleSession()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:223 +0x56a
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).Serve.func4()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:168 +0x9b
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).Serve.gowrap1()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:170 +0x4f
Goroutine 1417 (running) created at:
  github.com/skycoin/dmsg/pkg/dmsg.(*Server).Serve()
      /home/runner/work/dmsg/dmsg/pkg/dmsg/server.go:161 +0x657
  github.com/skycoin/dmsg/pkg/dmsgtest.(*Env).newServer.func1()
      /home/runner/work/dmsg/dmsg/pkg/dmsgtest/env.go:104 +0x7e
==================
    testing.go:1617: race detected during execution of test
=== RUN   TestEnv/restart_client
=== RUN   TestEnv/discovery_entry_timeout
--- FAIL: TestEnv (18.40s)
    --- FAIL: TestEnv/startup_shutdown (15.09s)
    --- PASS: TestEnv/restart_client (1.73s)
    --- PASS: TestEnv/discovery_entry_timeout (1.58s)
FAIL
coverage: 78.6% of statements
FAIL	github.com/skycoin/dmsg/pkg/dmsgtest	32.426s

will make a ticket for it as I think it's due to the new multiplexing library. merging this PR.

@0pcom 0pcom merged commit fc77fc1 into skycoin:develop Sep 18, 2025
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant