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

运行naive客户端失败用户名和密码有 逗号 #671

Closed
Ngwind opened this issue Sep 21, 2024 · 12 comments
Closed

运行naive客户端失败用户名和密码有 逗号 #671

Ngwind opened this issue Sep 21, 2024 · 12 comments

Comments

@Ngwind
Copy link

Ngwind commented Sep 21, 2024

现象:
运行客户端打印"Illegal instruction"后退出了, 相同的config.json配置文件,在debian12 x64系统中可以正常运行。
image

系统信息:

root@OpenWrt:~# cat /etc/os-release
NAME="OpenWrt"
VERSION="23.05.4"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt 23.05.4"
VERSION_ID="23.05.4"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="r24012-d8dd03c46f"
OPENWRT_BOARD="bcm27xx/bcm2711"
OPENWRT_ARCH="aarch64_cortex-a72"
OPENWRT_TAINTS=""
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt 23.05.4 r24012-d8dd03c46f"

(从release页面下载的)naive二进制版本:
naiveproxy-v123.0.6312.40-1-openwrt-aarch64_cortex-a72-static
naiveproxy-v128.0.6613.40-1-openwrt-aarch64_cortex-a72-static
naiveproxy-v128.0.6613.40-1-openwrt-aarch64_cortex-a72

客户端config.json配置文件:

{
  "listen": "socks://127.0.0.1:1082",
  "proxy": "https://******:******@***.***.top:443",
  "log": "./naive.log"
}

请问是什么原因呢?有没有进一步排查的手动和建议? 谢谢!

@klzgrad
Copy link
Owner

klzgrad commented Oct 6, 2024

用gdb看一下哪个instruction是illegal,来判断是否有指令集不匹配的情况

@Chilledheart
Copy link
Contributor

根据 https://openwrt.org/toh/raspberry_pi_foundation/raspberry_pi wiki 上最接近4b的openwrt 目标应该是 bcm27xx/bcm2711,你也许可以试试 arm_arm1176jzf-s_vfp (bcm27xx/bcm2708) 而不是cortex a72

@Chilledheart
Copy link
Contributor

截屏2024-10-07 10 55 20

@Chilledheart
Copy link
Contributor

截屏2024-10-07 10 56 09

@hisuwj
Copy link

hisuwj commented Oct 14, 2024

在openwrt-mips32el和ubuntu-x64,v126.0.6478.40-2版本以及以后的版本会有Illegal instruction提示。windows也是v126.0.6478.40-2版本以及以后的版本会自动退出,之前的版本都是正常的。

@klzgrad
Copy link
Owner

klzgrad commented Oct 14, 2024

openwrt-mips32el和ubuntu-x64

无法重现,需要coredump

@hisuwj
Copy link

hisuwj commented Oct 16, 2024

openwrt-mips32el和ubuntu-x64

无法重现,需要coredump

我自己分析了coredump,终于找到原因了,原因是因为用户名和密码有 逗号 和 点 。用户名、密码使用逗号和点在v126.0.6478.40-2之前是可以的,v126.0.6478.40-2之后就会提示Illegal instruction

@klzgrad klzgrad changed the title 树莓派4B,openwrt系统运行naive客户端失败 树莓派4B,openwrt系统运行naive客户端失败用户名和密码有 逗号 Oct 16, 2024
@klzgrad klzgrad changed the title 树莓派4B,openwrt系统运行naive客户端失败用户名和密码有 逗号 运行naive客户端失败用户名和密码有 逗号 Oct 16, 2024
@klzgrad
Copy link
Owner

klzgrad commented Oct 16, 2024

@klzgrad klzgrad closed this as completed Oct 16, 2024
@Chilledheart
Copy link
Contributor

截屏2024-10-18 23 09 53

std::string::back()是带assertions的。如果能提供一个带assertions的版本,这种内存问题很容易抓的。

一般看挂掉的日志就可以了,会详细打印断言的函数和具体触发断言的原因。

最简单,跑一遍debug 版本也足够了。

@Chilledheart
Copy link
Contributor

截屏2024-10-18 23 31 11 截屏2024-10-18 23 33 49

提一嘴 chromium 项目里有一个叫 libcxx_hardening 的profile,是默认启用的,可以引入就会默认启用STL的断言。你可以看看为什么是中了断言崩掉了,还是这个profile压根没起作用。

@Chilledheart
Copy link
Contributor

截屏2024-10-18 23 37 09

vs

截屏2024-10-18 23 37 29

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

No branches or pull requests

4 participants