Giter Site home page Giter Site logo

nps-mux's People

Contributors

cnlh avatar ffdfgdfg avatar

Stargazers

 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

nps-mux's Issues

Remove pointer in map

GC will check all the pointers in map
We use it in map.go
Maybe we should use uintptr instead of pointer
sync map instead of map and RWmutex, atomic value provides Len method, range a list and delete outside

树莓派3b+ ssh 一连就报错

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x4 pc=0x12464]

goroutine 34 [running]:
ehang.io/nps/lib/mux.(*ReceiveWindowQueue).Pop(0x21aa0d8, 0x513eb0, 0x216c2d0, 0xe716f753)
/home/travis/gopath/src/github.com/ehang-io/nps/lib/mux/queue.go:254 +0x48
ehang.io/nps/lib/mux.(*ReceiveWindow).readFromQueue(0x21aa0c0, 0x21ca024, 0x4, 0x4, 0x1, 0x26214, 0xa48388, 0x0)
/home/travis/gopath/src/github.com/ehang-io/nps/lib/mux/conn.go:346 +0x230
ehang.io/nps/lib/mux.(*ReceiveWindow).Read(0x21aa0c0, 0x21ca024, 0x4, 0x4, 0x1, 0xa48388, 0x1, 0x32)
/home/travis/gopath/src/github.com/ehang-io/nps/lib/mux/conn.go:329 +0x58
ehang.io/nps/lib/mux.(*conn).Read(0x20fa060, 0x21ca024, 0x4, 0x4, 0x1b3d4, 0x0, 0x76f8cdf8)
/home/travis/gopath/src/github.com/ehang-io/nps/lib/mux/conn.go:63 +0xb0
ehang.io/nps/lib/conn.(*Conn).Read(0x20d80a0, 0x21ca024, 0x4, 0x4, 0x3f888, 0x1309e4, 0x4)
/home/travis/gopath/src/github.com/ehang-io/nps/lib/conn/conn.go:269 +0x128
io.ReadAtLeast(0x6a61a8, 0x20d80a0, 0x21ca024, 0x4, 0x4, 0x4, 0x0, 0x1b8a0, 0x19138)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/io/io.go:310 +0x6c
io.ReadFull(...)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/io/io.go:329
encoding/binary.Read(0x6a61a8, 0x20d80a0, 0x6ad940, 0xa51b50, 0x5167c8, 0x21ca020, 0x6, 0x14)
/home/travis/.gimme/versions/go1.13.linux.amd64/src/encoding/binary/binary.go:165 +0x378
ehang.io/nps/lib/conn.(*Conn).GetLen(...)
/home/travis/gopath/src/github.com/ehang-io/nps/lib/conn/conn.go:101
ehang.io/nps/lib/conn.(*Conn).getInfo(0x20d80a0, 0x50f978, 0x20dc008, 0x0, 0x0)
/home/travis/gopath/src/github.com/ehang-io/nps/lib/conn/conn.go:238 +0x100
ehang.io/nps/lib/conn.(*Conn).GetLinkInfo(...)
/home/travis/gopath/src/github.com/ehang-io/nps/lib/conn/conn.go:148
ehang.io/nps/client.(*TRPClient).handleChan(0x20f6140, 0x6ae030, 0x20fa060)
/home/travis/gopath/src/github.com/ehang-io/nps/client/client.go:169 +0x78
created by ehang.io/nps/client.(*TRPClient).newChan
/home/travis/gopath/src/github.com/ehang-io/nps/client/client.go:164 +0xe8

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots or logs
Add screenshots or logs to help explain your problem.

Server (please complete the following information):

  • OS: [e.g. Centos, Windows]
  • ARCH: [e.g. Amd64, Arm]
  • Tunnel [e.g. TCP, HTTP]
  • Version [e.g. 0.24.0]

Client (please complete the following information):

  • OS: [e.g. Centos, Windows]
  • ARCH: [e.g. Amd64, Arm]
  • Tunnel [e.g. TCP, HTTP]
  • Version [e.g. 0.24.0]

Additional context
Add any other context about the problem here.

[bug]: panic: runtime error: slice bounds out of range [90:72]

nps[19933]: panic: runtime error: slice bounds out of range [90:72]
nps[19933]: goroutine 1050459 [running]:
nps[19933]: ehang.io/nps-mux.(*sendWindow).WriteTo(0xc000818480, 0xc000341e20, 0x14, 0x1, 0xc000521548, 0x4042d0, 0xc000521728)
nps[19933]: /home/runner/go/pkg/mod/ehang.io/[email protected]/conn.go:554 +0x2f2
nps[19933]: ehang.io/nps-mux.(*sendWindow).WriteFull(0xc000818480, 0xc000735100, 0x48, 0x688, 0xc0000002be, 0x40a37f, 0xc000010000, 0xaa0b00)
nps[19933]: /home/runner/go/pkg/mod/ehang.io/[email protected]/conn.go:608 +0x8e
nps[19933]: ehang.io/nps-mux.(*conn).Write(0xc000a69b30, 0xc000735100, 0x48, 0x688, 0xc000521638, 0x40b905, 0xaa0b00)
nps[19933]: /home/runner/go/pkg/mod/ehang.io/[email protected]/conn.go:63 +0x8e
nps[19933]: ehang.io/nps/lib/rate.(*rateConn).Write(0xc000ad41a0, 0xc000735100, 0x48, 0x688, 0xc000ad41a0, 0x1, 0xc0005216e8)
nps[19933]: /home/runner/work/nps/nps/lib/rate/conn.go:28 +0x55
nps[19933]: ehang.io/nps/server/proxy.(*UdpModeServer).process(0xc000490bd0, 0xc00011ac00, 0xc000735100, 0x48, 0x688)
nps[19933]: /home/runner/work/nps/nps/server/proxy/udp.go:59 +0x8e3
nps[19933]: created by ehang.io/nps/server/proxy.(*UdpModeServer).Start
nps[19933]: /home/runner/work/nps/nps/server/proxy/udp.go:50 +0x2cc

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.