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

在IPv6环境下gotox经常Segmentation fault #259

Open
performcanhe opened this issue Jan 19, 2023 · 6 comments
Open

在IPv6环境下gotox经常Segmentation fault #259

performcanhe opened this issue Jan 19, 2023 · 6 comments

Comments

@performcanhe
Copy link

performcanhe commented Jan 19, 2023

系统与版本信息:

===============================================================================
 GotoX 版 本 : 3.9.0post1 (python/3.9.2 gevent(libev-cext-4.33)/22.10.2 pyOpenSSL/23.0.0)
 CF  Workers : abc.abc.abc
 监 听 地 址 : 自动代理 - 127.0.0.1:8087
               CFW 代理 - 127.0.0.1:8086
 代 理 认 证 : 无需
 调 试 信 息 : INFO
 保 存 日 志 : 否
 网 络 配 置 : ipv46
               HTTP  - 直连
               HTTPS - 转发
 连 接 模 式 : 远程 - TLS
               本地 - TLS
 域 名 解 析 : 系统 - [192.168.2.1]:53
               远程 - [192.168.2.1]:53
               本地 - [114.114.114.114]:53 | [114.114.115.115]:53
                DoH - https://cloudflare-dns.com/dns-query
 解 析 顺 序 : 远程 >> DoH >> 系统
 IP 数 据 库 : CN IP from apnic-20221215/20221214 and 17mon-20221215, range count: 4246
 直 连 域 名 : 2022-12-15 12:08, domains count: 64825, IPs count: 0
 安 装 证 书 : 设置代理后访问 http://gotox.go/
===============================================================================

现象:

最近把IPv6配置好了。但是gotox也开始频繁出现 Segmentation fault 。用量比较厉害的时候,比如看youtube,用个二十几分钟就会出现一次。在 Segmentation fault 前面没有任何其他的错误日志。

寻求建议。

@SeaHOH
Copy link
Owner

SeaHOH commented Jan 19, 2023

尝试使用较低版本的 gevent 和 greenlet,或者直接升级到较新版本的 Python,因为 Python 3.11 变化很大,这种基础组件可能有兼容性问题。如果你的系统是 Windows,可以直接下载打包好的便携版,所有组件都是最新的。

我一般不会有长时间并发过于巨大的使用场景,所以没遇到过。有可能就是当前架构不和谐,这里就请谅解下我这个野狐禅,以后有时间会重构。

@performcanhe
Copy link
Author

我系统是 linux ,那升级到python 3.11试试看。

@performcanhe
Copy link
Author

先看看 gevent greenlet 版本:

abc@mypc: ~/.local/opt/gotox$ pip3 install gevent
Requirement already satisfied: gevent in /home/abc/.local/opt/venv/gotox/lib/python3.9/site-packages (22.10.2)
Requirement already satisfied: setuptools in /home/abc/.local/opt/venv/gotox/lib/python3.9/site-packages (from gevent) (44.1.1)
Requirement already satisfied: zope.interface in /home/abc/.local/opt/venv/gotox/lib/python3.9/site-packages (from gevent) (5.5.2)
Requirement already satisfied: zope.event in /home/abc/.local/opt/venv/gotox/lib/python3.9/site-packages (from gevent) (4.6)
Requirement already satisfied: greenlet>=2.0.0 in /home/abc/.local/opt/venv/gotox/lib/python3.9/site-packages (from gevent) (2.0.1)

gevent: 22.10.2 greenlet: 2.0.1 应该都是 3.9 配套的版本。

python 3.11 没有进debian 11官方仓库,我再看看手动安装。

@SeaHOH
Copy link
Owner

SeaHOH commented Jan 20, 2023

嗯,好的。
官方确实是没说不兼容,greenlet 2 是有专门为 Python 3.11 做适配,这个过程中会不会真的有导致与旧版 Python 的兼容性问题我也不清楚,提出来只是想让你确定下。

如果真的和其余组件无关,只是现在架构的问题,我就要尽量早些抽时间重构。

@Quantum2Bits
Copy link

Quantum2Bits commented Jan 26, 2023

我用3.9.0也是这样(linux),以为是没有更新云端的服务器。现在又退回到3.8.9了。

@SeaHOH
Copy link
Owner

SeaHOH commented Jan 26, 2023

请问,能确定是 Python 3.11 和 gevent 的问题吗,或者就是 GotoX 3.9.0 本身?

重构的话,会采用原生异步,不然内存使用容易失控。现在看了一圈没发现合意的框架 (包括官方的 asyncio),封装的都很严实,定制受限,所以打算自己写一个。

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

3 participants