Code Monkey home page Code Monkey logo

gofs's People

Contributors

capric98 avatar dependabot[bot] avatar mstmdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gofs's Issues

Found data race in the "Remote Disk Server" and "Remote Disk Client" mode

Running command (Windows 10)

cd E:/workspace/gowork/src/github.com/no-src/gofs
mkdir rs\src rs\target rc\src rc\target
# server
go run -race ./cmd/gofs -src="rs://127.0.0.1:9016?mode=server&local_sync_disabled=true&path=./rs/src" -target=./rs/target -tls_cert_file=./gofs.pem -tls_key_file=./gofs.key -users="u1234|p4321"
# client
go run -race ./cmd/gofs -src="rs://127.0.0.1:9016" -target=./rc/target -users="u1234|p4321"

Server error info

==================
WARNING: DATA RACE
Write at 0x00c000078650 by goroutine 24:
  github.com/no-src/gofs/tran.(*Conn).MarkAuthorized()
      E:/workspace/gowork/src/github.com/no-src/gofs/tran/conn.go:32 +0x6d
  github.com/no-src/gofs/sync.(*remoteServerSync).authCommand()
      E:/workspace/gowork/src/github.com/no-src/gofs/sync/remote_server_sync.go:277 +0x1d3
  github.com/no-src/gofs/sync.(*remoteServerSync).start.func1()
      E:/workspace/gowork/src/github.com/no-src/gofs/sync/remote_server_sync.go:226 +0x604
  github.com/no-src/gofs/tran.(*tcpServer).Accept.func1()
      E:/workspace/gowork/src/github.com/no-src/gofs/tran/tcpserver.go:104 +0x1dd

Previous read at 0x00c000078650 by goroutine 23:
  github.com/no-src/gofs/tran.(*Conn).authCheck.func1()
      E:/workspace/gowork/src/github.com/no-src/gofs/tran/conn.go:63 +0x96

Goroutine 24 (running) created at:
  github.com/no-src/gofs/tran.(*tcpServer).Accept()
      E:/workspace/gowork/src/github.com/no-src/gofs/tran/tcpserver.go:93 +0x1d8
  github.com/no-src/gofs/sync.(*remoteServerSync).start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/sync/remote_server_sync.go:211 +0x59

Goroutine 23 (running) created at:
  github.com/no-src/gofs/tran.(*Conn).authCheck()
      E:/workspace/gowork/src/github.com/no-src/gofs/tran/conn.go:58 +0x90
  github.com/no-src/gofs/tran.(*Conn).StartAuthCheck()
      E:/workspace/gowork/src/github.com/no-src/gofs/tran/conn.go:48 +0x95
  github.com/no-src/gofs/tran.(*tcpServer).addClient()
      E:/workspace/gowork/src/github.com/no-src/gofs/tran/tcpserver.go:117 +0x56
  github.com/no-src/gofs/tran.(*tcpServer).Accept()
      E:/workspace/gowork/src/github.com/no-src/gofs/tran/tcpserver.go:91 +0xea
  github.com/no-src/gofs/sync.(*remoteServerSync).start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/sync/remote_server_sync.go:211 +0x59
==================
==================
WARNING: DATA RACE
Write at 0x00c00002a4d8 by main goroutine:
  container/list.(*List).insert()
      c:/go/src/container/list/list.go:98 +0x6b2
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x38d
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Previous read at 0x00c00002a4d8 by goroutine 19:
  container/list.(*List).Front()
      c:/go/src/container/list/list.go:70 +0x7d
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:133 +0x3e
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Goroutine 19 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c00002a4b0 by goroutine 19:
  container/list.(*List).Front()
      c:/go/src/container/list/list.go:73 +0x95
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:133 +0x3e
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c00002a4b0 by main goroutine:
  container/list.(*List).insert()
      c:/go/src/container/list/list.go:95 +0x5b3
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x38d
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 19 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c00002a588 by goroutine 19:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:134 +0xba
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c00002a588 by main goroutine:
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x467
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 19 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c00002a4b8 by goroutine 19:
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0xab8
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:164 +0x978
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c00002a4b8 by main goroutine:
  container/list.(*List).insert()
      c:/go/src/container/list/list.go:96 +0x611
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x38d
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 19 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c000502900 by goroutine 19:
  container/list.(*List).insert()
      c:/go/src/container/list/list.go:94 +0xbc4
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x9f0
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0xaaa
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:164 +0x978
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c000502900 by main goroutine:
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x467
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 19 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c00002a630 by goroutine 19:
  container/list.(*List).remove()
      c:/go/src/container/list/list.go:109 +0xf24
  container/list.(*List).Remove()
      c:/go/src/container/list/list.go:141 +0xf1d
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:185 +0xecc
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c00002a630 by main goroutine:
  container/list.(*List).insert()
      c:/go/src/container/list/list.go:95 +0x5b3
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x38d
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 19 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Write at 0x00c00002a668 by goroutine 19:
  container/list.(*List).remove()
      c:/go/src/container/list/list.go:110 +0xfd6
  container/list.(*List).Remove()
      c:/go/src/container/list/list.go:141 +0xf1d
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:185 +0xecc
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c00002a668 by main goroutine:
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x467
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 19 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c00002a670 by goroutine 19:
  container/list.(*List).Remove()
      c:/go/src/container/list/list.go:138 +0xf05
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:185 +0xecc
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c00002a670 by main goroutine:
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x467
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 19 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c00002a660 by goroutine 19:
  container/list.(*List).remove()
      c:/go/src/container/list/list.go:109 +0xf24
  container/list.(*List).Remove()
      c:/go/src/container/list/list.go:141 +0xf1d
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:185 +0xecc
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c00002a660 by main goroutine:
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x467
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 19 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================

Client error info

==================
WARNING: DATA RACE
Write at 0x00c0002be2f8 by goroutine 11:
  container/list.(*List).insert()
      c:/go/src/container/list/list.go:98 +0xa95
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x844
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x821
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).receive.func1()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:196 +0x456

Previous read at 0x00c0002be2f8 by goroutine 15:
  container/list.(*List).Front()
      c:/go/src/container/list/list.go:70 +0x7d
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).processingMessage()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:212 +0x3e
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start·dwrap·7()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:120 +0x39

Goroutine 11 (running) created at:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).receive()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:153 +0x11d
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:102 +0xa4
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 15 (running) created at:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:120 +0x2d2
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c0002be2d0 by goroutine 15:
  container/list.(*List).Front()
      c:/go/src/container/list/list.go:73 +0x95
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).processingMessage()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:212 +0x3e
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start·dwrap·7()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:120 +0x39

Previous write at 0x00c0002be2d0 by goroutine 11:
  [failed to restore the stack]

Goroutine 15 (running) created at:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:120 +0x2d2
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 11 (running) created at:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).receive()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:153 +0x11d
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:102 +0xa4
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c0002be918 by goroutine 15:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).processingMessage()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:213 +0xbd
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start·dwrap·7()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:120 +0x39

Previous write at 0x00c0002be918 by goroutine 11:
  [failed to restore the stack]

Goroutine 15 (running) created at:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:120 +0x2d2
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 11 (running) created at:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).receive()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:153 +0x11d
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:102 +0xa4
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c0002be2d8 by goroutine 11:
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x82f
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).receive.func1()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:196 +0x456

Previous write at 0x00c0002be2d8 by goroutine 15:
  container/list.(*List).remove()
      c:/go/src/container/list/list.go:110 +0x1693
  container/list.(*List).Remove()
      c:/go/src/container/list/list.go:141 +0x15d0
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).processingMessage()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:267 +0x1579
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start·dwrap·7()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:120 +0x39

Goroutine 11 (running) created at:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).receive()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:153 +0x11d
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:102 +0xa4
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 15 (running) created at:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:120 +0x2d2
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c0002bff98 by goroutine 15:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).processingMessage()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:213 +0xbd
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start·dwrap·7()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:120 +0x39

Previous write at 0x00c0002bff98 by goroutine 11:
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x85e
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x821
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).receive.func1()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:196 +0x456

Goroutine 15 (running) created at:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:120 +0x2d2
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 11 (running) created at:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).receive()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:153 +0x11d
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:102 +0xa4
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c00038dc62 by goroutine 15:
  runtime.slicebytetostring()
      c:/go/src/runtime/string.go:80 +0x0
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).processingMessage()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:221 +0x3ea
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start·dwrap·7()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:120 +0x39

Previous write at 0x00c00038dc62 by goroutine 11:
  runtime.slicecopy()
      c:/go/src/runtime/slice.go:284 +0x0
  github.com/no-src/gofs/tran.(*tcpClient).ReadAll()
      E:/workspace/gowork/src/github.com/no-src/gofs/tran/tcpclient.go:132 +0x58a
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).receive.func1()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:159 +0xa5

Goroutine 15 (running) created at:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:120 +0x2d2
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 11 (running) created at:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).receive()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:153 +0x11d
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:102 +0xa4
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c00038dc64 by goroutine 15:
  runtime.slicebytetostring()
      c:/go/src/runtime/string.go:80 +0x0
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).processingMessage()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:221 +0x3ea
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start·dwrap·7()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:120 +0x39

Previous write at 0x00c00038dc64 by goroutine 11:
  runtime.slicecopy()
      c:/go/src/runtime/slice.go:284 +0x0
  github.com/no-src/gofs/tran.(*tcpClient).ReadAll()
      E:/workspace/gowork/src/github.com/no-src/gofs/tran/tcpclient.go:133 +0x68e
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).receive.func1()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:159 +0xa5

Goroutine 15 (running) created at:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:120 +0x2d2
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 11 (running) created at:
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).receive()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:153 +0x11d
  github.com/no-src/gofs/monitor.(*remoteClientMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/remote_client_monitor.go:102 +0xa4
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================

remote_client_sync模式当同步路径中包含#,数据不同步

当同步路径中包含#时,数据被截断,无法同步文件:
client 日志:

[2023-08-03 11:10:55] [INFO] start execute cron task, spec=[*/5 * * * * *]
[2023-08-03 11:10:55] [ERROR] sync remote file to local disk error => [syncPath=https://10.80.77.253/source/test1#2/test#1.txt?atime=1691031070&ctime=1691031065&dir=0&hash=00000000&mtime=1691030467&size=0]. file does not exist
[2023-08-03 11:10:55] [ERROR] sync remote file to local disk error => [syncPath=https://10.80.77.253/source/test1#2/123#test.txt?atime=1691031400&ctime=1691031400&dir=0&hash=00000000&mtime=1690971348&size=0]. file does not exist

server 日志:

[2023-08-03 11:11:30] [GIN] | 404 |     194.394µs |      10.80.76.7 | GET      "/source/test1"
[2023-08-03 11:11:30] [GIN] | 404 |     218.218µs |      10.80.76.7 | GET      "/source/test1"

server 目录:

[root@77253 /home/test/source]# ll *
-rw-r--r-- 1 root root 1720475571 Aug  2 14:51 nohup.out.tmp

test1#2:
total 0
-rw-r--r-- 1 root root 0 Aug  2 18:15 123#test.txt
-rw-r--r-- 1 root root 0 Aug  3 10:41 test#1.txt
[root@77253 /home/test/source]# ll
total 1680152
-rw-r--r-- 1 root root 1720475571 Aug  2 14:51 nohup.out.tmp
drwxr-xr-x 2 root root         44 Aug  3 10:56 test1#2

是否可以直接打包一个可执行文件

都用go了,生产环境就没必要安装go环境了吧
是否可以直接打包一个可执行文件,直接在生产环境上运行呢
经过测试,通过下面方式打包,没有打包出可执行文件,还请指教

cd cmd/gofs/
env GOOS=linux GOARCH=386 go build main.go

Found data race in the "Local Disk" mode

Running command (Windows 10)

cd E:/workspace/gowork/src/github.com/no-src/gofs
mkdir src target
go run -race ./cmd/gofs -src=./src -target=./target

Error info

==================
WARNING: DATA RACE
Write at 0x00c000302e08 by main goroutine:
  container/list.(*List).insert()
      c:/go/src/container/list/list.go:98 +0x6b2
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x38d
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Previous read at 0x00c000302e08 by goroutine 30:
  container/list.(*List).Front()
      c:/go/src/container/list/list.go:70 +0x7d
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:133 +0x3e
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Goroutine 30 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c000302de0 by goroutine 30:
  container/list.(*List).Front()
      c:/go/src/container/list/list.go:73 +0x95
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:133 +0x3e
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c000302de0 by main goroutine:
  container/list.(*List).insert()
      c:/go/src/container/list/list.go:95 +0x5b3
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x38d
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 30 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c0001b8528 by goroutine 30:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:134 +0xba
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c0001b8528 by main goroutine:
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x467
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 30 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c0000b2127 by goroutine 30:
  runtime.slicecopy()
      c:/go/src/runtime/slice.go:284 +0x0
  strings.(*Builder).WriteString()
      c:/go/src/strings/builder.go:124 +0x155
  strings.Join()
      c:/go/src/strings/strings.go:438 +0x26f
  path/filepath.joinNonEmpty()
      c:/go/src/path/filepath/path_windows.go:175 +0xbc
  path/filepath.join()
      c:/go/src/path/filepath/path_windows.go:152 +0xcc
  path/filepath.Join()
      c:/go/src/path/filepath/path.go:213 +0x26b
  github.com/no-src/gofs/sync.(*diskSync).buildTargetAbsFile()
      E:/workspace/gowork/src/github.com/no-src/gofs/sync/disk_sync.go:258 +0x99
  github.com/no-src/gofs/sync.(*diskSync).Create()
      E:/workspace/gowork/src/github.com/no-src/gofs/sync/disk_sync.go:62 +0x70
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:150 +0x766
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c0000b2127 by goroutine 10:
  runtime.slicecopy()
      c:/go/src/runtime/slice.go:284 +0x0
  strings.(*Builder).WriteString()
      c:/go/src/strings/builder.go:124 +0x155
  strings.Join()
      c:/go/src/strings/strings.go:438 +0x26f
  path/filepath.joinNonEmpty()
      c:/go/src/path/filepath/path_windows.go:175 +0xbc
  path/filepath.join()
      c:/go/src/path/filepath/path_windows.go:152 +0xcc
  path/filepath.Join()
      c:/go/src/path/filepath/path.go:213 +0xb6f
  github.com/fsnotify/fsnotify.(*Watcher).readEvents()
      E:/workspace/gowork/pkg/mod/github.com/fsnotify/[email protected]/windows.go:457 +0xaf2
  github.com/fsnotify/fsnotify.NewWatcher·dwrap·1()
      E:/workspace/gowork/pkg/mod/github.com/fsnotify/[email protected]/windows.go:47 +0x39

Goroutine 30 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 10 (running) created at:
  github.com/fsnotify/fsnotify.NewWatcher()
      E:/workspace/gowork/pkg/mod/github.com/fsnotify/[email protected]/windows.go:47 +0x390
  github.com/no-src/gofs/monitor.NewFsNotifyMonitor()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:27 +0x64
  github.com/no-src/gofs/monitor.NewMonitor()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/monitor.go:28 +0x376
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:110 +0xff2
==================
==================
WARNING: DATA RACE
Read at 0x00c0001b8520 by goroutine 30:
  container/list.(*List).Remove()
      c:/go/src/container/list/list.go:138 +0xf05
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:185 +0xecc
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c0001b8520 by main goroutine:
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x467
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 30 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c0001b8510 by goroutine 30:
  container/list.(*List).remove()
      c:/go/src/container/list/list.go:109 +0xf24
  container/list.(*List).Remove()
      c:/go/src/container/list/list.go:141 +0xf1d
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:185 +0xecc
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c0001b8510 by main goroutine:
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x467
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 30 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Read at 0x00c0001b8518 by goroutine 30:
  container/list.(*List).remove()
      c:/go/src/container/list/list.go:109 +0xf45
  container/list.(*List).Remove()
      c:/go/src/container/list/list.go:141 +0xf1d
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:185 +0xecc
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c0001b8518 by main goroutine:
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x467
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 30 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Write at 0x00c0001b85a8 by goroutine 30:
  container/list.(*List).remove()
      c:/go/src/container/list/list.go:110 +0xfd6
  container/list.(*List).Remove()
      c:/go/src/container/list/list.go:141 +0xf1d
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:185 +0xecc
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c0001b85a8 by main goroutine:
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x467
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 30 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================
==================
WARNING: DATA RACE
Write at 0x00c000302de8 by goroutine 30:
  container/list.(*List).remove()
      c:/go/src/container/list/list.go:110 +0xfd6
  container/list.(*List).Remove()
      c:/go/src/container/list/list.go:141 +0xf1d
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).processEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:185 +0xecc
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x39

Previous write at 0x00c000302de8 by main goroutine:
  container/list.(*List).insert()
      c:/go/src/container/list/list.go:96 +0x611
  container/list.(*List).insertValue()
      c:/go/src/container/list/list.go:104 +0x38d
  container/list.(*List).PushBack()
      c:/go/src/container/list/list.go:155 +0x42a
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).listenEvents()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:110 +0x328
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:98 +0x404
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2

Goroutine 30 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:96 +0x3f7
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:127 +0x11e2
==================

实际使用方法

您好,我想将Linux服务器上的文件同步至windows服务器上,从您这说明文档上,没太看懂具体的实现方式,能展开详细说说吗?

​Build Dockerfile successfully, but failed to run​

Build the Dockerfile successfully with the script, but I get an error like this when I run the container:

$ ./scripts/build-docker.sh
standard_init_linux.go:228: exec user process caused: no such file or directory

List what dependency shared libraries by the following command:

$ docker run -it --rm --name running-gofs-version nosrc/gofs:latest ldd /app/gofs 
	/lib64/ld-linux-x86-64.so.2 (0x7ff5fae2f000)
	libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7ff5fae2f000)
	libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7ff5fae2f000)

Consider moving fsctl to a new standalone project

The fsctl is a configuration-based file operation and validation tool, currently used in gofs to implement integration testing.
It is an auxiliary tool for gofs and independent of each other.
Consider creating a new repository to manage fsctl as a separate project.

Found data race in the "tcpServer"

Running command (Windows 10)

$ go version
go version go1.17.6 windows/amd64
$ cd E:/workspace/gowork/src/github.com/no-src/gofs
$ mkdir rs\source rs\dest rc\source rc\dest
# server
$ go run -race ./cmd/gofs -source="rs://127.0.0.1:9016?mode=server&local_sync_disabled=true&path=./rs/source" -dest=./rs/dest -tls_cert_file=./gofs.pem -tls_key_file=./gofs.key -users="u1234|p4321"
# client
$ go run -race ./cmd/gofs -source="rs://127.0.0.1:9016" -dest=./rc/dest -users="u1234|p4321"

Server error info

==================
WARNING: DATA RACE
Write at 0x00c00002c690 by goroutine 15:
  runtime.mapassign_faststr()
      C:/Go/src/runtime/map_faststr.go:202 +0x0
  github.com/no-src/gofs/tran.(*tcpServer).addClient()
      E:/workspace/gowork/src/github.com/no-src/gofs/tran/tcpserver.go:120 +0x107
  github.com/no-src/gofs/tran.(*tcpServer).Accept()
      E:/workspace/gowork/src/github.com/no-src/gofs/tran/tcpserver.go:91 +0xea
  github.com/no-src/gofs/sync.(*remoteServerSync).start·dwrap·3()
      E:/workspace/gowork/src/github.com/no-src/gofs/sync/remote_server_sync.go:209 +0x59

Previous read at 0x00c00002c690 by goroutine 20:
  runtime.mapiterinit()
      C:/Go/src/runtime/map.go:802 +0x0
  github.com/no-src/gofs/tran.(*tcpServer).Send()
      E:/workspace/gowork/src/github.com/no-src/gofs/tran/tcpserver.go:147 +0xa7
  github.com/no-src/gofs/sync.(*remoteServerSync).send()
      E:/workspace/gowork/src/github.com/no-src/gofs/sync/remote_server_sync.go:189 +0x7b2
  github.com/no-src/gofs/sync.(*remoteServerSync).Write()
      E:/workspace/gowork/src/github.com/no-src/gofs/sync/remote_server_sync.go:90 +0x7d
  github.com/no-src/gofs/monitor.(*baseMonitor).startSyncWrite.func1()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/base_monitor.go:121 +0x67
  github.com/no-src/gofs/retry.(*defaultRetry).DoWithContext()
      E:/workspace/gowork/src/github.com/no-src/gofs/retry/default_retry.go:40 +0x161
  github.com/no-src/gofs/retry.(*defaultRetry).Do()
      E:/workspace/gowork/src/github.com/no-src/gofs/retry/default_retry.go:29 +0x6b
  github.com/no-src/gofs/monitor.(*baseMonitor).startSyncWrite()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/base_monitor.go:120 +0x241
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start·dwrap·2()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:97 +0x39

Goroutine 15 (running) created at:
  github.com/no-src/gofs/sync.(*remoteServerSync).start()
      E:/workspace/gowork/src/github.com/no-src/gofs/sync/remote_server_sync.go:209 +0x23b
  github.com/no-src/gofs/sync.NewRemoteServerSync()
      E:/workspace/gowork/src/github.com/no-src/gofs/sync/remote_server_sync.go:72 +0x6ce
  github.com/no-src/gofs/sync.NewRemoteSync()
      E:/workspace/gowork/src/github.com/no-src/gofs/sync/remote_sync.go:11 +0x164
  github.com/no-src/gofs/sync.NewSync()
      E:/workspace/gowork/src/github.com/no-src/gofs/sync/sync.go:36 +0x464
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:118 +0x10b9

Goroutine 20 (running) created at:
  github.com/no-src/gofs/monitor.(*fsNotifyMonitor).Start()
      E:/workspace/gowork/src/github.com/no-src/gofs/monitor/fsnotify_monitor.go:97 +0x377
  main.main()
      E:/workspace/gowork/src/github.com/no-src/gofs/cmd/gofs/main.go:157 +0x1631
==================

Is gofs send all files or only the difference ?

One question,

Suppose I have a large folder that frequently changes in my local machine, and some file are huge (1gb+).

Is gofs send whole files on each changes, or just the diff — like git ?

A suggestion about product design

First of all, thank you very much for developing such a good tool with rich functions.
I have an idea for a product design.

  1. A client only needs to configure the connection address of the server, and the client will be registered in the server.
  2. On the server side, the registered client can be tagged.
  3. On the server side, multiple file synchronization policies can be created.
  4. On the server side, file synchronization policies can be associated with one or more tagged clients.
  5. On the client side,The client will receive the file synchronization policy from the server and execute the actions of this policy

How to use gofs as a library

Hi.

Looks like gofs is a big project. How do I use this as a library for synchronizing directory in my local machine to ssh server ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.