mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #6813] [Bug]: update and installation fail #4536
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#4536
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
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
@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
.logfiles from here. Please paste the last 40–50 lines of each log into a comment as text, inside a code block. The exactERROR:line will show which step failed.What the source does show: your symptom ("the old version is gone and
x-uisays nothing is installed") matches the order of steps inupdate.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 oldx-uibinary,x-ui.sh, Xray, mtg and tuic binaries are removedupdate.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 fromraw.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:
update.logandinstall.logas text (theERROR:line and about 30 lines before it).amd64with 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.shremoves 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.shafter 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-765Not 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.
@Rise0x00 commented on GitHub (Oct 13, 2026):
update.log:
install.log:
@github-actions[bot] commented on GitHub (Oct 13, 2026):
This is not a 3x-ui bug. Your logs show that the
mvcommand on your server crashes with a segmentation fault every time it runs. That includes plain one-linemvcalls that do nothing unusual. Both installers depend onmv, 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
mvprocess crashing:update.sh). The crash is in the step that installsx-ui.sh: This isupdate.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 isupdate.sh:53:mv -f "${tmp_file}" "${xui_update_status_file}" > /dev/null 2>&1. That is amvof a small JSON file inside/etc/x-ui, and it segfaulted too.mvcrashed twice: when backing upbin/(install.sh:1817,if ! mv "${xui_folder}/bin" "${custom_bin_backup}"; then) and again when installingx-ui.sh(install.sh:1904,mv -f "${xui_script_temp}" /usr/bin/x-ui).In the same runs,
curl,tar,rm,apt-getand checksum verification all worked. Onlymvcrashes. Neither script replaces or wrapsmv. There is nomvfunction or alias and noLD_PRELOAD. The only packages the scripts install arecron curl tar tzdata socat openssl(plusca-certificatesin the installer) (update.sh:140,install.sh:99), andcoreutils, which ships/usr/bin/mv, is not one of them.What to check on the server
If
dpkg -V coreutilsflagsmv, reinstall the package.dpkgreplaces files on its own and does not callmv, so this works even with a brokenmv:If
dmesgshows 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 --versionruns cleanly, run the installer again: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
mvbinary on the reporter's host segfaults when run. Every failing step in both logs is amvprocess crashing (update.sh:665,update.sh:53,install.sh:1817,install.sh:1904), whilecurl/tar/rm/apt-getsucceed in the same runs.Same class: None found. The scripts do not define, alias or preload anything around
mvand do not install or modifycoreutils(update.sh:140,install.sh:99).Already fixed: Not applicable
Duplicate of: None. No other report of a
mvsegfault 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 faultinside_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
mvcrashes on this host (a corrupt binary, an/etc/ld.so.preloadlibrary, or failing disk/RAM).dpkg -V coreutilspluscat /etc/ld.so.preloadsettles 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
bugtoquestion, 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.