Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lux_0.24.0_Linux_arm64 extremely slow start #1340

Open
mzhboy opened this issue Apr 22, 2024 · 18 comments
Open

lux_0.24.0_Linux_arm64 extremely slow start #1340

mzhboy opened this issue Apr 22, 2024 · 18 comments

Comments

@mzhboy
Copy link

mzhboy commented Apr 22, 2024

lux_0.24.0_Linux_arm64 can't run.
0.23.0 works

file lux

lux: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=gV_PsgOoRpL2mjKxWZkd/qOClEr0V4B7CCz5BQ0fT/MsmnJdSRlyCprsgIn-bd/QxfxfylUYMMFUg-IZEwZ, stripped

@iawia002
Copy link
Owner

I don't have a Linux arm64 machine, what's the output of lux -v?

@mzhboy
Copy link
Author

mzhboy commented Apr 22, 2024

I don't have a Linux arm64 machine, what's the output of lux -v?

木有输出,挂那里了,没有下一步

@iawia002
Copy link
Owner

What's your OS (name and version)? I tested it on a Ubuntu 20.04.6 LTS (GNU/Linux 5.4.0-99-generic aarch64) machine, and it works fine:

root@master:~# ./lux -v

lux: version 0.24.0, A fast and simple video downloader.

root@master:~# file lux
lux: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=gV_PsgOoRpL2mjKxWZkd/qOClEr0V4B7CCz5BQ0fT/MsmnJdSRlyCprsgIn-bd/QxfxfylUYMMFUg-IZEwZ, stripped

@mzhboy
Copy link
Author

mzhboy commented Apr 22, 2024

root@rpi4b2:/tmp/24# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy

@mzhboy

This comment was marked as outdated.

@mzhboy
Copy link
Author

mzhboy commented Apr 22, 2024

测量 0.24 首次输出时间,花费 2m24.369s

root@rpi4b1:/tmp/24# time ./lux -v

lux: version 0.24.0, A fast and simple video downloader.

real 2m24.369s
user 0m3.819s
sys 0m0.760s
root@rpi4b1:/tmp/24# time ./lux -v

lux: version 0.24.0, A fast and simple video downloader.

real 0m0.027s
user 0m0.016s
sys 0m0.013s

@mzhboy mzhboy changed the title lux_0.24.0_Linux_arm64 can not run lux_0.24.0_Linux_arm64 extremely slow start Apr 23, 2024
@tqfx
Copy link

tqfx commented Apr 26, 2024

strace lux on termux 1340.log

~ $ time lux
Run lux failed: too few arguments

real    0m0.034s
user    0m0.005s
sys     0m0.035s
~ $ rm $TMPDIR/fake_useragent_0.2.0.json
~ $ time lux
Run lux failed: too few arguments

real    0m1.813s
user    0m0.064s
sys     0m0.085s
~ $ time lux
Run lux failed: too few arguments

real    0m0.032s
user    0m0.006s
sys     0m0.030s

@truboxl
Copy link

truboxl commented Apr 27, 2024

Absolute worst case after repeating running lux

$ strace -c ./lux
Run lux failed: too few arguments
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- -------------------
 95.78    1.099493          74     14813     10519 rt_sigreturn
  1.10    0.012603         157        80         7 futex
  0.48    0.005493          23       229           mmap
  0.25    0.002862          21       133           mprotect
  0.22    0.002509         418         6         4 epoll_ctl
  0.20    0.002250          33        67         9 openat
  0.19    0.002222          21       104           prctl
  0.18    0.002117          23        91           munmap
  0.18    0.002042          68        30           rt_sigprocmask
  0.18    0.002026          33        60           read
  0.15    0.001699          65        26           fcntl
  0.12    0.001390          21        65         5 newfstatat
  0.11    0.001265          31        40           readlinkat
  0.11    0.001224        1224         1           timer_delete
  0.10    0.001174          21        55           close
  0.10    0.001133          20        55           fstat
  0.09    0.001063         265         4           clone
  0.08    0.000930           7       124           rt_sigaction
  0.08    0.000903         150         6           sched_yield
  0.06    0.000701          25        28        23 faccessat
  0.06    0.000659         659         1           execve
  0.05    0.000520          30        17           pread64
  0.03    0.000371          23        16           mremap
  0.02    0.000252         126         2           epoll_pwait
  0.02    0.000192          21         9           fstatfs
  0.01    0.000133         133         1           ioctl
  0.01    0.000123         123         1           setitimer
  0.01    0.000112         112         1           prlimit64
  0.01    0.000088          88         1           nanosleep
  0.01    0.000061          20         3         2 madvise
  0.00    0.000051          51         1           pipe2
  0.00    0.000047          47         1           epoll_create1
  0.00    0.000045          22         2           getrandom
  0.00    0.000039          39         1           timer_settime
  0.00    0.000038          38         1           timer_create
  0.00    0.000026          26         1           getpid
  0.00    0.000023          23         1           set_tid_address
  0.00    0.000020          20         1           sched_getscheduler
  0.00    0.000020          20         1           sched_getaffinity
  0.00    0.000019           9         2           sigaltstack
  0.00    0.000019          19         1           getuid
  0.00    0.000000           0         1           gettid
------ ----------- ----------- --------- --------- -------------------
100.00    1.147957          71     16083     10569 total

Note the high amount of rt_sigreturn

Others strace logs also pointing to a lot of SIGURG. But I can't point where is it coming from. v0.23.0...v0.24.0

@mzhboy
Copy link
Author

mzhboy commented Apr 29, 2024

test after reboot

root@rpi4b2:/tmp/24# strace -c ./lux -v

lux: version 0.24.0, A fast and simple video downloader.

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ------------------
 84.55    3.735430          83     44718           rt_sigreturn
 15.19    0.671139         697       962        75 futex
  0.09    0.003980          34       114           rt_sigaction
  0.06    0.002470          39        62           write
  0.03    0.001150          52        22           mmap
  0.02    0.000837         139         6           sched_yield
  0.01    0.000644         214         3           clone
  0.01    0.000375          28        13           fcntl
  0.01    0.000354          44         8           rt_sigprocmask
  0.01    0.000338          42         8           pread64
  0.00    0.000186         186         1           readlinkat
  0.00    0.000179          44         4         2 epoll_ctl
  0.00    0.000160          40         4           openat
  0.00    0.000113          56         2         1 newfstatat
  0.00    0.000107          53         2           madvise
  0.00    0.000094          94         1           pipe2
  0.00    0.000083          41         2           prlimit64
  0.00    0.000068          68         1           epoll_create1
  0.00    0.000066          33         2           sigaltstack
  0.00    0.000047          47         1           ioctl
  0.00    0.000047          15         3           close
  0.00    0.000043          43         1           fstat
  0.00    0.000030          30         1           gettid
  0.00    0.000000           0         2           epoll_pwait
  0.00    0.000000           0         1           read
  0.00    0.000000           0         1           sched_getaffinity
  0.00    0.000000           0         1           execve
------ ----------- ----------- --------- --------- ------------------
100.00    4.417940          96     45946        78 total
root@rpi4b2:/tmp/24# strace -c ./lux -v

lux: version 0.24.0, A fast and simple video downloader.

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ------------------
 16.29    0.001315        1315         1           execve
 13.96    0.001127          53        21           rt_sigreturn
 12.66    0.001022           8       114           rt_sigaction
  9.91    0.000800          36        22           mmap
  6.49    0.000524         174         3           clone
  5.92    0.000478          59         8           rt_sigprocmask
  5.15    0.000416          32        13           fcntl
  4.71    0.000380          47         8           futex
  4.04    0.000326          40         8           pread64
  3.99    0.000322          80         4           openat
  3.87    0.000312         156         2           sched_yield
  2.32    0.000187         187         1           readlinkat
  2.23    0.000180          45         4         2 epoll_ctl
  1.41    0.000114          38         3           close
  1.31    0.000106         106         1           pipe2
  1.00    0.000081          40         2           prlimit64
  0.83    0.000067          22         3           read
  0.76    0.000061          61         1           epoll_create1
  0.67    0.000054          27         2           madvise
  0.56    0.000045          22         2           sigaltstack
  0.53    0.000043          21         2           fstat
  0.47    0.000038          38         1           sched_getaffinity
  0.33    0.000027          27         1           ioctl
  0.33    0.000027          13         2           newfstatat
  0.25    0.000020          20         1           gettid
  0.00    0.000000           0         1           write
------ ----------- ----------- --------- --------- ------------------
100.00    0.008072          34       231         2 total

@iawia002
Copy link
Owner

iawia002 commented May 6, 2024

Please try with v0.24.1, I have bumped the go version to 1.22, hope this is a cross-compile issue

@arthurqiao
Copy link

Please try with v0.24.1, I have bumped the go version to 1.22, hope this is a cross-compile issue

I updated the v0.24.1 version, and it still takes 2-3 minutes to start for the first time, and the version number is still incorrect, it shows v0.0.0.

截屏2024-05-06 15 03 46

@iawia002
Copy link
Owner

iawia002 commented May 6, 2024

Which binary did you download? From https://github.com/iawia002/lux/releases/tag/v0.24.1 here?

NOTE: The version number will only be displayed in the binary file from the release page

@arthurqiao
Copy link

Which binary did you download? From https://github.com/iawia002/lux/releases/tag/v0.24.1 here?

NOTE: The version number will only be displayed in the binary file from the release page

The early version was installed via Homebrew and updated to v0.24.1 today in the terminal with "brew upgrade lux".

@arthurqiao
Copy link

Which binary did you download? From https://github.com/iawia002/lux/releases/tag/v0.24.1 here?
NOTE: The version number will only be displayed in the binary file from the release page

The early version was installed via Homebrew and updated to v0.24.1 today in the terminal with "brew upgrade lux".

Through the following operations, lux can start quickly, but the version number is still incorrect.

  1. brew uninstall lux
  2. restart MacBook
  3. brew install lux
截屏2024-05-06 20 42 46

@HXHGTS
Copy link

HXHGTS commented May 6, 2024

升级0.24.1以后,还是同样的问题😂

@arthurqiao
Copy link

Which binary did you download? From https://github.com/iawia002/lux/releases/tag/v0.24.1 here?
NOTE: The version number will only be displayed in the binary file from the release page

The early version was installed via Homebrew and updated to v0.24.1 today in the terminal with "brew upgrade lux".

Through the following operations, lux can start quickly, but the version number is still incorrect.

  1. brew uninstall lux
  2. restart MacBook
  3. brew install lux
截屏2024-05-06 20 42 46

Regarding the version display, I installed older versions one by one until v0.20.0 would print the correct version number.

Last login: Mon May 6 21:59:16 on ttys001
➜ Safari brew install lux.rb
==> Downloading https://formulae.brew.sh/api/formula.jws.json
##O#- #
Error: Failed to load cask: lux.rb
Cask 'lux' is unreadable: wrong constant name #Class:0x0000000108ae6ad8
Warning: Treating lux.rb as a formula.
==> Downloading https://ghcr.io/v2/homebrew/core/lux/manifests/0.20.0
######################################################################### 100.0%
==> Fetching lux
==> Downloading https://ghcr.io/v2/homebrew/core/lux/blobs/sha256:a9891989617cc3
######################################################################### 100.0%
Warning: lux 0.24.1 is available and more recent than version 0.20.0.
==> Pouring lux--0.20.0.arm64_sonoma.bottle.tar.gz
==> Downloading https://formulae.brew.sh/api/cask.jws.json
#=#=#
🍺 /opt/homebrew/Cellar/lux/0.20.0: 5 files, 23.2MB
==> Running brew cleanup lux...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew).
Removing: /Users/arthurqiao/Library/Caches/Homebrew/lux--0.20.0... (10.9MB)
➜ Safari lux -v

lux: version v0.20.0, A fast and simple video downloader.

@tqfx
Copy link

tqfx commented May 6, 2024

$ strace -c lux -v

lux: version v0.0.0, A fast and simple video downloader.

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- -------------------
 98.88    2.697803          16    165303           rt_sigreturn
  0.20    0.005570          28       198           mmap
  0.15    0.004005          32       124           rt_sigaction
  0.10    0.002689          76        35         2 futex
  0.09    0.002514          20       121           mprotect
  0.09    0.002369          29        79           munmap
  0.07    0.001995          32        62         5 openat
  0.06    0.001660          25        66         5 newfstatat
  0.05    0.001485          14       106           prctl
  0.05    0.001366          35        38           readlinkat
  0.05    0.001271          22        56           close
  0.05    0.001238          22        54           fstat
  0.04    0.001192          49        24           rt_sigprocmask
  0.02    0.000655          34        19           fcntl
  0.02    0.000526           8        62           read
  0.01    0.000398          39        10           mremap
  0.01    0.000376          26        14           pread64
  0.01    0.000297          99         3           clone
  0.01    0.000174          29         6           fstatfs
  0.00    0.000109          27         4         2 epoll_ctl
  0.00    0.000099          33         3           madvise
  0.00    0.000076           2        28        22 faccessat
  0.00    0.000057          57         1           prlimit64
  0.00    0.000053          53         1           ioctl
  0.00    0.000042          21         2           sigaltstack
  0.00    0.000039          39         1           pipe2
  0.00    0.000038          38         1           sched_getaffinity
  0.00    0.000032          32         1           getuid
  0.00    0.000031          15         2           getrandom
  0.00    0.000029          29         1           epoll_pwait
  0.00    0.000026          26         1           gettid
  0.00    0.000026          26         1           epoll_create1
  0.00    0.000021          21         1           write
  0.00    0.000009           9         1           sched_yield
  0.00    0.000000           0         1           set_tid_address
  0.00    0.000000           0         1           sched_getscheduler
  0.00    0.000000           0         1           getpid
  0.00    0.000000           0         1           execve
------ ----------- ----------- --------- --------- -------------------
100.00    2.728270          16    166433        36 total

@iawia002
Copy link
Owner

iawia002 commented May 7, 2024

The early version was installed via Homebrew and updated to v0.24.1 today in the terminal with "brew upgrade lux".

Got it, the install script in homebrew needs an update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants