Skip to content
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

[Bug] 使用tuic时Go标准库中atomic原子操作int64有崩溃bug #783

Closed
6 tasks done
sshpem opened this issue Oct 5, 2023 · 1 comment
Closed
6 tasks done
Labels
bug Something isn't working priority: high

Comments

@sshpem
Copy link

sshpem commented Oct 5, 2023

Verify steps

  • 确保你使用的是本仓库最新的的 clash 或 clash Alpha 版本 Ensure you are using the latest version of Clash or Clash Premium from this repository.
  • 如果你可以自己 debug 并解决的话,提交 PR 吧 Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
  • 我已经在 Issue Tracker 中找过我要提出的问题 I have searched on the issue tracker for a related issue.
  • 我已经使用 Alpha 分支版本测试过,问题依旧存在 I have tested using the dev branch, and the issue still exists.
  • 我已经仔细看过 Documentation 并无法自行解决问题 I have read the documentation and was unable to solve the issue.
  • 这是 Clash 核心的问题,并非我所使用的 Clash 衍生版本(如 OpenClash、KoolClash 等)的特定问题 This is an issue of the Clash core per se, not to the derivatives of Clash, like OpenClash or KoolClash.

Clash version

Clash Meta v1.16.0 linux arm with go1.21.1 Mon Sep 25 11:37:47 UTC 2023

What OS are you seeing the problem on?

Linux

Clash config

- name: node-tuic
    type: tuic
    server: xxxx.xxxx.com
    port: 18011
    uuid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    password: this is password
    congestion-controller: bbr

Clash log

Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: panic: unaligned 64-bit atomic operation
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: goroutine 1824 [running]:
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: runtime/internal/atomic.panicUnaligned()
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       runtime/internal/atomic/unaligned.go:8 +0x24
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: runtime/internal/atomic.Load64(0x2fded34)
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       runtime/internal/atomic/atomic_arm.s:280 +0x14
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: github.com/puzpuzpuz/xsync/v2.(*MapOf[...]).resizeInProgress(...)
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/puzpuzpuz/xsync/v2@v2.5.0/mapof.go:431
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: github.com/puzpuzpuz/xsync/v2.(*MapOf[...]).doCompute(0x11afb80, 0xa5cf, 0x2d85a10, 0x1, 0x0)
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/puzpuzpuz/xsync/v2@v2.5.0/mapof.go:310 +0x1bc
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: github.com/puzpuzpuz/xsync/v2.(*MapOf[...]).LoadOrStore(0x11afb80, 0xa5cf, {0x11a6c3c, 0x2e04820})
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/puzpuzpuz/xsync/v2@v2.5.0/mapof.go:199 +0x80
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: github.com/Dreamacro/clash/transport/tuic/v5.(*clientImpl).ListenPacketWithDialer(0x2fded00, {0x11a26e0, 0x2f9f2c0}, 0x2ffb900, {0x119c048, 0x2fb7d70}, 0x2c23470)
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/Dreamacro/clash/transport/tuic/v5/client.go:355 +0x1a8
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: github.com/Dreamacro/clash/transport/tuic/v5.(*Client).ListenPacketWithDialer(0x2c851b8, {0x11a26e0, 0x2f9f2c0}, 0x2ffb900, {0x119c048, 0x2fb7d70}, 0x2c23470)
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/Dreamacro/clash/transport/tuic/v5/client.go:393 +0x50
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: github.com/Dreamacro/clash/transport/tuic.(*PoolClient).ListenPacketWithDialer(0x2d7d900, {0x11a26e0, 0x2f9f2c0}, 0x2ffb900, {0x119c048, 0x2fb7d70}, 0x2c851a8)
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/Dreamacro/clash/transport/tuic/pool_client.go:54 +0xc8
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: github.com/Dreamacro/clash/adapter/outbound.(*Tuic).ListenPacketWithDialer(0x2c930a0, {0x11a26e0, 0x2f9f2c0}, {0x119c048, 0x2fb7d70}, 0x2ffb900)
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/Dreamacro/clash/adapter/outbound/tuic.go:114 +0x464
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: github.com/Dreamacro/clash/adapter/outbound.(*Tuic).ListenPacketContext(0x2c930a0, {0x11a26e0, 0x2f9f2c0}, 0x2ffb900, {0x0, 0x0, 0x0})
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/Dreamacro/clash/adapter/outbound/tuic.go:83 +0xc0
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: github.com/Dreamacro/clash/adapter.(*Proxy).ListenPacketContext(0x2d7d940, {0x11a26e0, 0x2f9f2c0}, 0x2ffb900, {0x0, 0x0, 0x0})
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/Dreamacro/clash/adapter/adapter.go:80 +0x58
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: github.com/Dreamacro/clash/adapter/outboundgroup.(*Selector).ListenPacketContext(0x2c937c0, {0x11a26e0, 0x2f9f2c0}, 0x2ffb900, {0x0, 0x0, 0x0})
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/Dreamacro/clash/adapter/outboundgroup/selector.go:31 +0xa4
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: github.com/Dreamacro/clash/adapter.(*Proxy).ListenPacketContext(0x2d7dca0, {0x11a26e0, 0x2f9f2c0}, 0x2ffb900, {0x0, 0x0, 0x0})
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/Dreamacro/clash/adapter/adapter.go:80 +0x58
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: github.com/Dreamacro/clash/tunnel.handleUDPConn.func2.2({0x11a26e0, 0x2f9f2c0})
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/Dreamacro/clash/tunnel/tunnel.go:363 +0x11c
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: github.com/Dreamacro/clash/tunnel.retry[...]({0x11a26e0, 0x2f9f2c0}, 0x2d85eb8, 0x2d85f74)
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/Dreamacro/clash/tunnel/tunnel.go:653 +0xb0
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: github.com/Dreamacro/clash/tunnel.handleUDPConn.func2()
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/Dreamacro/clash/tunnel/tunnel.go:362 +0x27c
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]: created by github.com/Dreamacro/clash/tunnel.handleUDPConn in goroutine 5
Thu Oct  5 21:07:15 2023 daemon.err clash[32465]:       github.com/Dreamacro/clash/tunnel/tunnel.go:337 +0x40c

Description

openwrt 21.02.7,armv7,一旦切换到tuic节点就报错,然后crash,其他类型节点(比如ss、trojan-go)都运行正常。

@stevejohnson7 stevejohnson7 added bug Something isn't working priority: high labels Oct 23, 2023
@Cl-He-O
Copy link

Cl-He-O commented Dec 6, 2023

这是一个上游的问题(github.com/puzpuzpuz/xsync)

@wwqgtxx wwqgtxx closed this as completed Dec 6, 2023
chen08209 pushed a commit to chen08209/Clash.Meta that referenced this issue Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: high
Projects
None yet
Development

No branches or pull requests

4 participants