[GH-ISSUE #6813] [Bug]: update and installation fail #4536

Closed
opened 2026-10-31 20:40:20 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @Rise0x00 on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6813

Describe the bug

When attempting to update the panel, the installer crashed with an error after removing the existing version.
The x-ui command output indicates that nothing is installed, yet a new installation attempt results in an error.
Logs:

How to reproduce the problem

  1. Update the panel from version 3.9.0 to 3.10.0.

Expected behavior

Successful operation of the installer

Actual behavior

Crush of the installer

Relevant logs


Screenshots

No response

3x-ui version

3.10.0

Xray-core version

No response

How did you install 3x-ui?

install.sh script

Operating system

Ubuntu 24.04

Which parts of the panel are affected?

Install / upgrade script

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

No response

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @Rise0x00 on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6813 ### Describe the bug When attempting to update the panel, the installer crashed with an error after removing the existing version. The x-ui command output indicates that nothing is installed, yet a new installation attempt results in an error. Logs: * [update.log](https://github.com/user-attachments/files/33396609/update.log) * [install.log](https://github.com/user-attachments/files/33396623/install.log) ### How to reproduce the problem 1. Update the panel from version 3.9.0 to 3.10.0. ### Expected behavior Successful operation of the installer ### Actual behavior Crush of the installer ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.10.0 ### Xray-core version _No response_ ### How did you install 3x-ui? install.sh script ### Operating system Ubuntu 24.04 ### Which parts of the panel are affected? Install / upgrade script ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? _No response_ ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:40:20 +07:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@github-actions[bot] commented on GitHub (Oct 13, 2026):

I can't name the cause yet because I wasn't able to open the two attached .log files from here. Please paste the last 40–50 lines of each log into a comment as text, inside a code block. The exact ERROR: line will show which step failed.

What the source does show: your symptom ("the old version is gone and x-ui says nothing is installed") matches the order of steps in update.sh. The update removes the old service unit and binaries before it unpacks and installs the new release. Any failure after the removal step therefore leaves the server with no panel installed:

  • update.sh:586: rm ${xui_service}/x-ui.service -f (the old unit is removed)
  • update.sh:599-615: the old x-ui binary, x-ui.sh, Xray, mtg and tuic binaries are removed
  • The steps after that which can stop the script, each printing its own message:
    • update.sh:625: ERROR: Failed to extract the x-ui release archive -- the previous installation has already been removed ...
    • update.sh:630: ERROR: Extracted x-ui archive is missing the x-ui binary ...
    • update.sh:659 / :663 / :668: ERROR: Failed to download x-ui.sh script ... / Downloaded x-ui.sh script is empty / Failed to install x-ui.sh script (downloaded from raw.githubusercontent.com)
    • update.sh:714 / :762: Failed to copy x-ui.service / Failed to install x-ui.service from GitHub ...

A fresh install also failed for you, so the cause is probably something that persists across both runs. Two candidates are the server reaching github.com / raw.githubusercontent.com, and the existing database in /etc/x-ui/, which a reinstall keeps. That is an inference; only the log lines can confirm it.

Please send:

  1. The final lines of update.log and install.log as text (the ERROR: line and about 30 lines before it).
  2. The output of these commands, to show what is still on disk and whether the release download works from your server:
    ls -la /usr/local/x-ui /usr/local/x-ui/bin /etc/x-ui
    curl -sIL -o /dev/null -w '%{http_code}\n' https://raw.githubusercontent.com/MHSanaei/3x-ui/v3.10.0/x-ui.sh
    curl -sIL -o /dev/null -w '%{http_code}\n' https://github.com/MHSanaei/3x-ui/releases/download/v3.10.0/x-ui-linux-amd64.tar.gz
    
    (Replace amd64 with your architecture if it is different.)

Your database is in /etc/x-ui/, and neither the update nor the install path above removes that folder. Your inbounds and clients should still be there once the install succeeds.

Verdict: Insufficient information
Severity: N/A
Confidence: Low
Root cause: Not yet identified. The failing step is in the attached logs, which could not be read. update.sh removes the old install (update.sh:586, :599-615) before extracting the new one (update.sh:622), which explains why nothing is installed after a failed update, but not why the update failed.
Same class: Not determined until the failing step is known
Already fixed: Not applicable. No commit touching install.sh/update.sh after v3.10.0 addresses a failure like this (latest: 257559c3 fix(update): leave TLS alone during panel updates).
Duplicate of: None. Related but probably a different cause: #6800 / #6796 (Xray fails to start after 3.10.0 because of the systemd sandbox and rp_filter; the install itself succeeds in those reports).
Evidence: update.sh:586, update.sh:599-615, update.sh:622-631, update.sh:656-669, update.sh:711-765
Not determined: Which step failed in both runs. The ERROR: line in the two logs settles it.

This reply was generated automatically by an issue analyst; a maintainer may follow up.

<!-- gh-comment-id:6151348377 --> @github-actions[bot] commented on GitHub (Oct 13, 2026): I can't name the cause yet because I wasn't able to open the two attached `.log` files from here. Please paste the last 40–50 lines of each log into a comment as text, inside a code block. The exact `ERROR:` line will show which step failed. What the source does show: your symptom ("the old version is gone and `x-ui` says nothing is installed") matches the order of steps in `update.sh`. The update removes the old service unit and binaries **before** it unpacks and installs the new release. Any failure after the removal step therefore leaves the server with no panel installed: - `update.sh:586`: `rm ${xui_service}/x-ui.service -f` (the old unit is removed) - `update.sh:599-615`: the old `x-ui` binary, `x-ui.sh`, Xray, mtg and tuic binaries are removed - The steps after that which can stop the script, each printing its own message: - `update.sh:625`: `ERROR: Failed to extract the x-ui release archive -- the previous installation has already been removed ...` - `update.sh:630`: `ERROR: Extracted x-ui archive is missing the x-ui binary ...` - `update.sh:659` / `:663` / `:668`: `ERROR: Failed to download x-ui.sh script ...` / `Downloaded x-ui.sh script is empty` / `Failed to install x-ui.sh script` (downloaded from `raw.githubusercontent.com`) - `update.sh:714` / `:762`: `Failed to copy x-ui.service` / `Failed to install x-ui.service from GitHub ...` A fresh install also failed for you, so the cause is probably something that persists across both runs. Two candidates are the server reaching `github.com` / `raw.githubusercontent.com`, and the existing database in `/etc/x-ui/`, which a reinstall keeps. That is an inference; only the log lines can confirm it. Please send: 1. The final lines of `update.log` and `install.log` as text (the `ERROR:` line and about 30 lines before it). 2. The output of these commands, to show what is still on disk and whether the release download works from your server: ```bash ls -la /usr/local/x-ui /usr/local/x-ui/bin /etc/x-ui curl -sIL -o /dev/null -w '%{http_code}\n' https://raw.githubusercontent.com/MHSanaei/3x-ui/v3.10.0/x-ui.sh curl -sIL -o /dev/null -w '%{http_code}\n' https://github.com/MHSanaei/3x-ui/releases/download/v3.10.0/x-ui-linux-amd64.tar.gz ``` (Replace `amd64` with your architecture if it is different.) Your database is in `/etc/x-ui/`, and neither the update nor the install path above removes that folder. Your inbounds and clients should still be there once the install succeeds. Verdict: Insufficient information Severity: N/A Confidence: Low Root cause: Not yet identified. The failing step is in the attached logs, which could not be read. `update.sh` removes the old install (`update.sh:586`, `:599-615`) before extracting the new one (`update.sh:622`), which explains why nothing is installed after a failed update, but not why the update failed. Same class: Not determined until the failing step is known Already fixed: Not applicable. No commit touching `install.sh`/`update.sh` after v3.10.0 addresses a failure like this (latest: `257559c3 fix(update): leave TLS alone during panel updates`). Duplicate of: None. Related but probably a different cause: #6800 / #6796 (Xray fails to start after 3.10.0 because of the systemd sandbox and `rp_filter`; the install itself succeeds in those reports). Evidence: `update.sh:586`, `update.sh:599-615`, `update.sh:622-631`, `update.sh:656-669`, `update.sh:711-765` Not determined: Which step failed in both runs. The `ERROR:` line in the two logs settles it. *This reply was generated automatically by an issue analyst; a maintainer may follow up.* <!-- claude-issue:analyst -->
Author
Owner

@Rise0x00 commented on GitHub (Oct 13, 2026):

update.log:

Oct 13 06:15:32 Sweden systemd[1]: Started x-ui-web-update-1791872132.service - /usr/bin/bash -lc "set -e; trap 'rm -f '/tmp/3x-ui-update-3308513047.sh'' EXIT; '/usr/bin/bash' '/tmp/3x-ui-update-3308513047.sh'".
Oct 13 06:15:33 Sweden bash[39528]: The OS release is: ubuntu
Oct 13 06:15:33 Sweden bash[39528]: Arch: amd64
Oct 13 06:15:33 Sweden bash[39528]: Running...
Oct 13 06:15:33 Sweden bash[39528]: Updating and install dependency packages...
Oct 13 06:15:55 Sweden bash[39528]: Current x-ui version: 3.9.0
Oct 13 06:15:55 Sweden bash[39528]: Downloading new x-ui version...
Oct 13 06:15:56 Sweden bash[39528]: Got x-ui latest version: v3.10.0, beginning the installation...
Oct 13 06:15:59 Sweden bash[39528]: Checksum verified: b647a3e7d6695600bdd18cbfd34959991be09d4b1ad1e05efa790c0cf69ca40d
Oct 13 06:15:59 Sweden bash[39528]: Stopping x-ui...
Oct 13 06:16:38 Sweden bash[39528]: Removing old systemd unit version...
Oct 13 06:16:38 Sweden bash[39528]: Removing old x-ui version...
Oct 13 06:16:38 Sweden bash[39528]: Removing old mtg version...
Oct 13 06:16:38 Sweden bash[39528]: Removing old xray version...
Oct 13 06:16:39 Sweden bash[39528]: Removing old README and LICENSE file...
Oct 13 06:16:39 Sweden bash[39528]: Installing new x-ui version...
Oct 13 06:16:44 Sweden bash[39528]: Downloading and installing x-ui.sh script...
Oct 13 06:16:45 Sweden bash[39528]: /tmp/3x-ui-update-3308513047.sh: line 501: 39999 Segmentation fault      (core dumped) mv -f "${xui_script_temp}" /usr/bin/x-ui
Oct 13 06:16:45 Sweden bash[39528]: ERROR: Failed to install x-ui.sh script
Oct 13 06:16:45 Sweden bash[39528]: /tmp/3x-ui-update-3308513047.sh: line 44: 40007 Segmentation fault      (core dumped) exit 2
Oct 13 06:16:45 Sweden systemd[1]: x-ui-web-update-1791872132.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Oct 13 06:16:45 Sweden systemd[1]: x-ui-web-update-1791872132.service: Failed with result 'exit-code'.
Oct 13 06:16:45 Sweden systemd[1]: x-ui-web-update-1791872132.service: Consumed 24.695s CPU time, 467.2M memory peak, 0B memory swap peak.

install.log:

The OS release is: ubuntu
Arch: amd64
Running...
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease
Get:2 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Get:3 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Get:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
Get:5 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Components [181 kB]
Get:6 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [1,702 kB]
Get:7 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Components [388 kB]
Get:8 http://archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Components [940 B]
Get:9 http://archive.ubuntu.com/ubuntu noble-backports/main amd64 Components [5,760 B]
Get:10 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 Components [12.6 kB]
Get:11 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [1,144 kB]
Get:12 http://security.ubuntu.com/ubuntu noble-security/main Translation-en [230 kB]
Get:13 http://security.ubuntu.com/ubuntu noble-security/main amd64 Components [46.3 kB]
Get:14 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [1,713 kB]
Get:15 http://security.ubuntu.com/ubuntu noble-security/restricted Translation-en [392 kB]
Get:16 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [1,221 kB]
Get:17 http://security.ubuntu.com/ubuntu noble-security/universe Translation-en [246 kB]
Get:18 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Components [76.2 kB]
Fetched 7,737 kB in 4s (2,097 kB/s) 
Reading package lists... Done
Reading package lists...
Building dependency tree...
Reading state information...
cron is already the newest version (3.0pl1-184ubuntu2).
curl is already the newest version (8.5.0-2ubuntu10.15).
tar is already the newest version (1.35+dfsg-3ubuntu0.4).
tzdata is already the newest version (2026c-0ubuntu0.24.04.1).
socat is already the newest version (1.8.0.0-4ubuntu0.1).
ca-certificates is already the newest version (20260601~24.04.1).
openssl is already the newest version (3.0.13-0ubuntu3.16).
0 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.
Got x-ui latest version: v3.10.0, beginning the installation...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 79.3M  100 79.3M    0     0  32.4M      0  0:00:02  0:00:02 --:--:-- 40.9M
Checksum verified: b647a3e7d6695600bdd18cbfd34959991be09d4b1ad1e05efa790c0cf69ca40d
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  136k  100  136k    0     0   504k      0 --:--:-- --:--:-- --:--:--  506k
Failed to stop x-ui.service: Unit x-ui.service not loaded.
/dev/fd/63: line 1709: 51409 Segmentation fault      (core dumped) mv "${xui_folder}/bin" "${custom_bin_backup}"
Could not back up bin/ -- custom files there will not be preserved across this update
x-ui/
x-ui/x-ui
x-ui/x-ui.sh
x-ui/x-ui.service.rhel
x-ui/x-ui.service.arch
x-ui/x-ui.service.debian
x-ui/bin/
x-ui/bin/geosite_IR.dat
x-ui/bin/mtg-linux-amd64
x-ui/bin/xray-linux-amd64
x-ui/bin/geosite.dat
x-ui/bin/geoip_IR.dat
x-ui/bin/LICENSE
x-ui/bin/geosite_RU.dat
x-ui/bin/geoip.dat
x-ui/bin/geoip_RU.dat
x-ui/bin/README.md
/dev/fd/63: line 1709: 51440 Segmentation fault      (core dumped) mv -f "${xui_script_temp}" /usr/bin/x-ui
Failed to install x-ui.sh
<!-- gh-comment-id:6151405232 --> @Rise0x00 commented on GitHub (Oct 13, 2026): update.log: ``` Oct 13 06:15:32 Sweden systemd[1]: Started x-ui-web-update-1791872132.service - /usr/bin/bash -lc "set -e; trap 'rm -f '/tmp/3x-ui-update-3308513047.sh'' EXIT; '/usr/bin/bash' '/tmp/3x-ui-update-3308513047.sh'". Oct 13 06:15:33 Sweden bash[39528]: The OS release is: ubuntu Oct 13 06:15:33 Sweden bash[39528]: Arch: amd64 Oct 13 06:15:33 Sweden bash[39528]: Running... Oct 13 06:15:33 Sweden bash[39528]: Updating and install dependency packages... Oct 13 06:15:55 Sweden bash[39528]: Current x-ui version: 3.9.0 Oct 13 06:15:55 Sweden bash[39528]: Downloading new x-ui version... Oct 13 06:15:56 Sweden bash[39528]: Got x-ui latest version: v3.10.0, beginning the installation... Oct 13 06:15:59 Sweden bash[39528]: Checksum verified: b647a3e7d6695600bdd18cbfd34959991be09d4b1ad1e05efa790c0cf69ca40d Oct 13 06:15:59 Sweden bash[39528]: Stopping x-ui... Oct 13 06:16:38 Sweden bash[39528]: Removing old systemd unit version... Oct 13 06:16:38 Sweden bash[39528]: Removing old x-ui version... Oct 13 06:16:38 Sweden bash[39528]: Removing old mtg version... Oct 13 06:16:38 Sweden bash[39528]: Removing old xray version... Oct 13 06:16:39 Sweden bash[39528]: Removing old README and LICENSE file... Oct 13 06:16:39 Sweden bash[39528]: Installing new x-ui version... Oct 13 06:16:44 Sweden bash[39528]: Downloading and installing x-ui.sh script... Oct 13 06:16:45 Sweden bash[39528]: /tmp/3x-ui-update-3308513047.sh: line 501: 39999 Segmentation fault (core dumped) mv -f "${xui_script_temp}" /usr/bin/x-ui Oct 13 06:16:45 Sweden bash[39528]: ERROR: Failed to install x-ui.sh script Oct 13 06:16:45 Sweden bash[39528]: /tmp/3x-ui-update-3308513047.sh: line 44: 40007 Segmentation fault (core dumped) exit 2 Oct 13 06:16:45 Sweden systemd[1]: x-ui-web-update-1791872132.service: Main process exited, code=exited, status=2/INVALIDARGUMENT Oct 13 06:16:45 Sweden systemd[1]: x-ui-web-update-1791872132.service: Failed with result 'exit-code'. Oct 13 06:16:45 Sweden systemd[1]: x-ui-web-update-1791872132.service: Consumed 24.695s CPU time, 467.2M memory peak, 0B memory swap peak. ``` install.log: ``` The OS release is: ubuntu Arch: amd64 Running... Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease Get:2 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB] Get:3 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB] Get:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB] Get:5 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Components [181 kB] Get:6 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [1,702 kB] Get:7 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Components [388 kB] Get:8 http://archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Components [940 B] Get:9 http://archive.ubuntu.com/ubuntu noble-backports/main amd64 Components [5,760 B] Get:10 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 Components [12.6 kB] Get:11 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [1,144 kB] Get:12 http://security.ubuntu.com/ubuntu noble-security/main Translation-en [230 kB] Get:13 http://security.ubuntu.com/ubuntu noble-security/main amd64 Components [46.3 kB] Get:14 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [1,713 kB] Get:15 http://security.ubuntu.com/ubuntu noble-security/restricted Translation-en [392 kB] Get:16 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [1,221 kB] Get:17 http://security.ubuntu.com/ubuntu noble-security/universe Translation-en [246 kB] Get:18 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Components [76.2 kB] Fetched 7,737 kB in 4s (2,097 kB/s) Reading package lists... Done Reading package lists... Building dependency tree... Reading state information... cron is already the newest version (3.0pl1-184ubuntu2). curl is already the newest version (8.5.0-2ubuntu10.15). tar is already the newest version (1.35+dfsg-3ubuntu0.4). tzdata is already the newest version (2026c-0ubuntu0.24.04.1). socat is already the newest version (1.8.0.0-4ubuntu0.1). ca-certificates is already the newest version (20260601~24.04.1). openssl is already the newest version (3.0.13-0ubuntu3.16). 0 upgraded, 0 newly installed, 0 to remove and 33 not upgraded. Got x-ui latest version: v3.10.0, beginning the installation... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 79.3M 100 79.3M 0 0 32.4M 0 0:00:02 0:00:02 --:--:-- 40.9M Checksum verified: b647a3e7d6695600bdd18cbfd34959991be09d4b1ad1e05efa790c0cf69ca40d % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 136k 100 136k 0 0 504k 0 --:--:-- --:--:-- --:--:-- 506k Failed to stop x-ui.service: Unit x-ui.service not loaded. /dev/fd/63: line 1709: 51409 Segmentation fault (core dumped) mv "${xui_folder}/bin" "${custom_bin_backup}" Could not back up bin/ -- custom files there will not be preserved across this update x-ui/ x-ui/x-ui x-ui/x-ui.sh x-ui/x-ui.service.rhel x-ui/x-ui.service.arch x-ui/x-ui.service.debian x-ui/bin/ x-ui/bin/geosite_IR.dat x-ui/bin/mtg-linux-amd64 x-ui/bin/xray-linux-amd64 x-ui/bin/geosite.dat x-ui/bin/geoip_IR.dat x-ui/bin/LICENSE x-ui/bin/geosite_RU.dat x-ui/bin/geoip.dat x-ui/bin/geoip_RU.dat x-ui/bin/README.md /dev/fd/63: line 1709: 51440 Segmentation fault (core dumped) mv -f "${xui_script_temp}" /usr/bin/x-ui Failed to install x-ui.sh ```
Author
Owner

@github-actions[bot] commented on GitHub (Oct 13, 2026):

This is not a 3x-ui bug. Your logs show that the mv command on your server crashes with a segmentation fault every time it runs. That includes plain one-line mv calls that do nothing unusual. Both installers depend on mv, so both fail. The cause is the server's system binary or environment, not the scripts. Thank you for pasting the logs; my earlier comment could only list possible causes, and the logs settle it.

Every failure in your two logs is the mv process crashing:

  • Update (the panel's web updater runs update.sh). The crash is in the step that installs x-ui.sh:
    line 501: 39999 Segmentation fault (core dumped) mv -f "${xui_script_temp}" /usr/bin/x-ui
    ERROR: Failed to install x-ui.sh script
    
    This is update.sh:665 (mv -f "${xui_script_temp}" /usr/bin/x-ui). After that, the exit handler also crashed (line 44: ... Segmentation fault exit 2). Line 44 is _write_update_status, and the only external command it runs is update.sh:53: mv -f "${tmp_file}" "${xui_update_status_file}" > /dev/null 2>&1. That is a mv of a small JSON file inside /etc/x-ui, and it segfaulted too.
  • Install. mv crashed twice: when backing up bin/ (install.sh:1817, if ! mv "${xui_folder}/bin" "${custom_bin_backup}"; then) and again when installing x-ui.sh (install.sh:1904, mv -f "${xui_script_temp}" /usr/bin/x-ui).

In the same runs, curl, tar, rm, apt-get and checksum verification all worked. Only mv crashes. Neither script replaces or wraps mv. There is no mv function or alias and no LD_PRELOAD. The only packages the scripts install are cron curl tar tzdata socat openssl (plus ca-certificates in the installer) (update.sh:140, install.sh:99), and coreutils, which ships /usr/bin/mv, is not one of them.

What to check on the server

type -a mv                      # is mv an alias/function, or /usr/bin/mv?
ls -l /usr/bin/mv /bin/mv
mv --version
cat /etc/ld.so.preload 2>/dev/null   # a preloaded library can crash every binary that loads it
dpkg -V coreutils               # any output line for /usr/bin/mv means the file is modified/corrupt
dmesg | grep -i -E 'segfault|I/O error|EXT4-fs error' | tail -20

If dpkg -V coreutils flags mv, reinstall the package. dpkg replaces files on its own and does not call mv, so this works even with a broken mv:

apt-get install --reinstall coreutils

If dmesg shows disk I/O or filesystem errors, or other programs start segfaulting at random, the server may have disk or RAM problems. Ask your provider in that case. This is an inference from the symptom; I can't see your host.

Once mv --version runs cleanly, run the installer again:

bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)

Your database in /etc/x-ui/ is still there. Neither script deletes that folder, so your inbounds and clients will come back once the install succeeds.

Verdict: Not a bug (user configuration)
Severity: N/A
Confidence: High
Root cause: The mv binary on the reporter's host segfaults when run. Every failing step in both logs is a mv process crashing (update.sh:665, update.sh:53, install.sh:1817, install.sh:1904), while curl/tar/rm/apt-get succeed in the same runs.
Same class: None found. The scripts do not define, alias or preload anything around mv and do not install or modify coreutils (update.sh:140, install.sh:99).
Already fixed: Not applicable
Duplicate of: None. No other report of a mv segfault was found.
Evidence: Reporter's logs: Segmentation fault (core dumped) mv -f "${xui_script_temp}" /usr/bin/x-ui (= update.sh:665, install.sh:1904); Segmentation fault ... mv "${xui_folder}/bin" "${custom_bin_backup}" (= install.sh:1817); line 44: ... Segmentation fault inside _write_update_status (update.sh:44-53). The line numbers in the logs (501, 1709) come from the copy of each script the reporter's run downloaded, but the quoted commands match the lines above.
Not determined: Why mv crashes on this host (a corrupt binary, an /etc/ld.so.preload library, or failing disk/RAM). dpkg -V coreutils plus cat /etc/ld.so.preload settles it.

Earlier analysis: it asked for the logs because the cause was unknown. The reporter's pasted logs now settle it, and they rule out the network and database theories it raised.

I changed the label from bug to question, because the failure comes from the host and not from the scripts.

This reply was generated automatically by an issue analyst; a maintainer may follow up.

<!-- gh-comment-id:6156043371 --> @github-actions[bot] commented on GitHub (Oct 13, 2026): This is not a 3x-ui bug. Your logs show that the `mv` command on your server crashes with a segmentation fault every time it runs. That includes plain one-line `mv` calls that do nothing unusual. Both installers depend on `mv`, so both fail. The cause is the server's system binary or environment, not the scripts. Thank you for pasting the logs; my earlier comment could only list possible causes, and the logs settle it. Every failure in your two logs is the `mv` process crashing: - **Update** (the panel's web updater runs `update.sh`). The crash is in the step that installs `x-ui.sh`: ``` line 501: 39999 Segmentation fault (core dumped) mv -f "${xui_script_temp}" /usr/bin/x-ui ERROR: Failed to install x-ui.sh script ``` This is `update.sh:665` (`mv -f "${xui_script_temp}" /usr/bin/x-ui`). After that, the exit handler also crashed (`line 44: ... Segmentation fault exit 2`). Line 44 is `_write_update_status`, and the only external command it runs is `update.sh:53`: `mv -f "${tmp_file}" "${xui_update_status_file}" > /dev/null 2>&1`. That is a `mv` of a small JSON file inside `/etc/x-ui`, and it segfaulted too. - **Install**. `mv` crashed twice: when backing up `bin/` (`install.sh:1817`, `if ! mv "${xui_folder}/bin" "${custom_bin_backup}"; then`) and again when installing `x-ui.sh` (`install.sh:1904`, `mv -f "${xui_script_temp}" /usr/bin/x-ui`). In the same runs, `curl`, `tar`, `rm`, `apt-get` and checksum verification all worked. Only `mv` crashes. Neither script replaces or wraps `mv`. There is no `mv` function or alias and no `LD_PRELOAD`. The only packages the scripts install are `cron curl tar tzdata socat openssl` (plus `ca-certificates` in the installer) (`update.sh:140`, `install.sh:99`), and `coreutils`, which ships `/usr/bin/mv`, is not one of them. ### What to check on the server ```bash type -a mv # is mv an alias/function, or /usr/bin/mv? ls -l /usr/bin/mv /bin/mv mv --version cat /etc/ld.so.preload 2>/dev/null # a preloaded library can crash every binary that loads it dpkg -V coreutils # any output line for /usr/bin/mv means the file is modified/corrupt dmesg | grep -i -E 'segfault|I/O error|EXT4-fs error' | tail -20 ``` If `dpkg -V coreutils` flags `mv`, reinstall the package. `dpkg` replaces files on its own and does not call `mv`, so this works even with a broken `mv`: ```bash apt-get install --reinstall coreutils ``` If `dmesg` shows disk I/O or filesystem errors, or other programs start segfaulting at random, the server may have disk or RAM problems. Ask your provider in that case. This is an inference from the symptom; I can't see your host. Once `mv --version` runs cleanly, run the installer again: ```bash bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) ``` Your database in `/etc/x-ui/` is still there. Neither script deletes that folder, so your inbounds and clients will come back once the install succeeds. Verdict: Not a bug (user configuration) Severity: N/A Confidence: High Root cause: The `mv` binary on the reporter's host segfaults when run. Every failing step in both logs is a `mv` process crashing (`update.sh:665`, `update.sh:53`, `install.sh:1817`, `install.sh:1904`), while `curl`/`tar`/`rm`/`apt-get` succeed in the same runs. Same class: None found. The scripts do not define, alias or preload anything around `mv` and do not install or modify `coreutils` (`update.sh:140`, `install.sh:99`). Already fixed: Not applicable Duplicate of: None. No other report of a `mv` segfault was found. Evidence: Reporter's logs: `Segmentation fault (core dumped) mv -f "${xui_script_temp}" /usr/bin/x-ui` (= `update.sh:665`, `install.sh:1904`); `Segmentation fault ... mv "${xui_folder}/bin" "${custom_bin_backup}"` (= `install.sh:1817`); `line 44: ... Segmentation fault` inside `_write_update_status` (`update.sh:44-53`). The line numbers in the logs (501, 1709) come from the copy of each script the reporter's run downloaded, but the quoted commands match the lines above. Not determined: Why `mv` crashes on this host (a corrupt binary, an `/etc/ld.so.preload` library, or failing disk/RAM). `dpkg -V coreutils` plus `cat /etc/ld.so.preload` settles it. Earlier analysis: it asked for the logs because the cause was unknown. The reporter's pasted logs now settle it, and they rule out the network and database theories it raised. I changed the label from `bug` to `question`, because the failure comes from the host and not from the scripts. *This reply was generated automatically by an issue analyst; a maintainer may follow up.* <!-- claude-issue:analyst -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#4536
No description provided.