v2ray / v2ray-core

A platform for building proxies to bypass network restrictions.
https://www.v2ray.com/
MIT License
45.01k stars 8.95k forks source link

Seems panic for unknown reason #1431

Closed sleshep closed 5 years ago

sleshep commented 5 years ago

Please answer all the questions with enough information. All issues not following this template will be closed immediately. If you are not sure if your question is truely a bug in V2Ray, please discuss it here first.

1) What version of V2Ray are you using (If you deploy different version on server and client, please explicitly point out)? 4.5.0

2) What's your scenario of using V2Ray? E.g., Watching YouTube videos in Chrome via Socks/VMess proxy. Openvpn traffic

3) Please attach full panic log.

v2ray_1       | V2Ray 4.5.0 (Po) 20181116
v2ray_1       | A unified platform for anti-censorship.
v2ray_1       | panic: EOF
v2ray_1       |
v2ray_1       | goroutine 8794923 [running]:
v2ray_1       | v2ray.com/core/common.Must(...)
v2ray_1       |         /v2/src/v2ray.com/core/common/common.go:17
v2ray_1       | v2ray.com/core/common/buf.(*BufferedReader).Read(0xc000394120, 0xc00093b800, 0x1, 0x800, 0x20, 0xc000427440, 0xc)
v2ray_1       |         /v2/src/v2ray.com/core/common/buf/reader.go:64 +0x2d3
v2ray_1       | io.ReadAtLeast(0xc0fa40, 0xc000394120, 0xc00093b800, 0x1, 0x800, 0x1, 0x40b71f, 0xc000427440, 0x60)
v2ray_1       |         /usr/local/go/src/io/io.go:310 +0x88
v2ray_1       | io.ReadFull(0xc0fa40, 0xc000394120, 0xc00093b800, 0x1, 0x800, 0xc00089dd40, 0x10ddc80, 0x8)
v2ray_1       |         /usr/local/go/src/io/io.go:329 +0x58
v2ray_1       | v2ray.com/core/common/buf.(*Buffer).ReadFullFrom(0xc0006cbdc0, 0xc0fa40, 0xc000394120, 0x1, 0xc00053baa0, 0x40b71f, 0xc00089dd40)
v2ray_1       |         /v2/src/v2ray.com/core/common/buf/buffer.go:187 +0x9a
v2ray_1       | v2ray.com/core/common/protocol.(*addressParser).readAddress(0xc00012cb40, 0xc0006cbdc0, 0xc0fa40, 0xc000394120, 0xc00053baf0, 0x40bfa8, 0x30, 0xb1ca60)
v2ray_1       |         /v2/src/v2ray.com/core/common/protocol/address.go:176 +0x62
v2ray_1       | v2ray.com/core/common/protocol.portLastAddressParser.ReadAddressPort(0xc00012cb40, 0xc0006cbdc0, 0xc0fa40, 0xc000394120, 0x0, 0x0, 0xc000890000, 0x0, 0x0)
v2ray_1       |         /v2/src/v2ray.com/core/common/protocol/address.go:124 +0x78
v2ray_1       | v2ray.com/core/proxy/shadowsocks.ReadTCPSession(0xc000438120, 0xc0fa40, 0xc0003940c0, 0x0, 0x0, 0x0, 0x0, 0x0)
v2ray_1       |         /v2/src/v2ray.com/core/proxy/shadowsocks/protocol.go:62 +0x420
v2ray_1       | v2ray.com/core/proxy/shadowsocks.(*Server).handleConnection(0xc00040b0e0, 0xc1b9a0, 0xc000394090, 0x7f973d8b6880, 0xc000a2d1a8, 0xc1c1a0, 0xc0000779a0, 0xc06d40, 0xa30e00)
v2ray_1       |         /v2/src/v2ray.com/core/proxy/shadowsocks/server.go:158 +0x197
v2ray_1       | v2ray.com/core/proxy/shadowsocks.(*Server).Process(0xc00040b0e0, 0xc1b9a0, 0xc000394090, 0x2, 0x7f973d8b6880, 0xc000a2d1a8, 0xc1c1a0, 0xc0000779a0, 0xb88030, 0x500d90)
v2ray_1       |         /v2/src/v2ray.com/core/proxy/shadowsocks/server.go:66 +0x26c
v2ray_1       | v2ray.com/core/app/proxyman/inbound.(*tcpWorker).callback(0xc000160240, 0x7f973d8b6880, 0xc000a2d1a8)
v2ray_1       |         /v2/src/v2ray.com/core/app/proxyman/inbound/worker.go:94 +0x386
v2ray_1       | created by v2ray.com/core/app/proxyman/inbound.(*tcpWorker).Start.func1
v2ray_1       |         /v2/src/v2ray.com/core/app/proxyman/inbound/worker.go:110 +0x52

You may get panic log using command journalctl -u v2ray if your system is Linux (systemd).

4) Please attach your configuration file (Mask IP addresses before submit this issue).

{
  "log": {
    "access": "/data/log/access.log",
    "loglevel": "debug",
    "error": "/data/log/error.log"
  },
  "policy": {
    "levels": {
      "0": {
        "handshake": 6,
        "bufferSize": 1460,
        "statsUserUplink": true,
        "statsUserDownlink": true
      }
    }
  },
  "inbound": {
    "port": 1229,
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "alterId": 100,
          "security": "none",
          "id": "xxx-xxx-xxx-xxx-xxx",
          "level": 0
        }
      ],
      "udp": true
    },
    "streamSettings": {
      "network": "ws",
      "security": null,
      "wsSettings": {
        "path": "/network/",
        "headers": {
          "Host": "xxx.com"
        }
      }
    }
  },
  "inboundDetour": [
    {
      "protocol": "shadowsocks",
      "tag": "1",
      "port": 59999,
      "settings": {
        "email": "xxx@xxx.com",
        "method": "aes-256-gcm",
        "password": "xxx",
        "udp": false,
        "level": 0,
        "network": "tcp"
      }
    },
    {
      "protocol": "socks",
      "tag": "3",
      "listen": "10.233.0.1",
      "port": 1227,
      "settings": {
        "auth": "noauth",
        "udp": true,
        "timeout": 0,
        "userLevel": 0
      }
    },
    {
      "protocol": "shadowsocks",
      "tag": "2",
      "port": 1228,
      "settings": {
        "email": "xxxx@xxx",
        "method": "chacha20-poly1305",
        "password": "xxxxx",
        "udp": true,
        "level": 0,
        "network": "tcp"
      }
    }
  ],
  "outbound": {
    "protocol": "freedom",
    "settings": {}
  }
}

Please review your issue before submitting.

VictoriaRaymond commented 5 years ago

This has been fixed in 4.6.0