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

Installation hangs while writing to stdout #22

Closed
SandiyosDev opened this issue Nov 3, 2022 · 6 comments
Closed

Installation hangs while writing to stdout #22

SandiyosDev opened this issue Nov 3, 2022 · 6 comments

Comments

@SandiyosDev
Copy link

After running 'Tailscale up --accept-dns=false --advertise-routes=10.0.0.0/24', the download operation hangs after writing to stdout;

Downloading 'https://pkgs.tailscale.com/stable/'

Connecting to 167.172.11.40:443
Writing to stdout

Download completed (24496 bytes)
Downloading Tailscale 1.32.2_mipsle ..
Downloading 'https://pkgs.tailscale.com/stable/tailscale_1.32.2_mipsle.tgz'
Connecting to 167.172.11.40:443
Writing to stdout
tailscale_1.32.2_mipsle/tailscale
-                     24% |*******                        |  4640k  0:00:00 ETAKilled
tar: unexpected end of file
tar: short read

This behavior appear to be documented on this blog.
The router is running a fresh installation of OpenWrt on the most recent firmware, other info below:

Model | Asus RT-AC51U
Architecture | MediaTek MT7620A ver:2 eco:6
Target Platform | ramips/mt7620
Firmware Version | OpenWrt 22.03.2 r19803-9a599fee93 / LuCI openwrt-22.03 branch git-22.288.45147-96ec0cd
Kernel Version | 5.10.146
@adyanth
Copy link
Owner

adyanth commented Nov 3, 2022

That does not look to be the issue in the blog. For some reason, tar is not able to extract the downloaded file.

Can you download "https://pkgs.tailscale.com/stable/tailscale_1.32.2_mipsle.tgz" on your machine and use tar to extract it successfully? If so, can you run the bowl commands manually on your router and share the output? How much RAM (free) does your router have?

du -sh /tmp
df -h
mount
free -mh
wget -O- https://pkgs.tailscale.com/stable/ | grep tailscale_ | head -1 | cut -d'_' -f 2
echo -e "tailscale_1.32.2_mipsle/tailscale" > /tmp/tailscale_1.32.2_mipsle_files.txt
wget -O- https://pkgs.tailscale.com/stable/tailscale_1.32.2_mipsle.tgz | tar x -zvf - -C /tmp -T /tmp/tailscale_1.32.2_mipsle_files.txt

@adyanth
Copy link
Owner

adyanth commented Nov 3, 2022

That is correct behavior. It can start extracting files when the rest is still being piped, it will cause wget to pause for a while. But tar should not say unexpected end of file.

@SandiyosDev
Copy link
Author

That does not look to be the issue in the blog. For some reason, tar is not able to extract the downloaded file.

Can you download "https://pkgs.tailscale.com/stable/tailscale_1.32.2_mipsle.tgz" on your machine and use tar to extract it successfully? If so, can you run the bowl commands manually on your router and share the output? How much RAM (free) does your router have?

du -sh /tmp
df -h
mount
free -mh
wget -O- https://pkgs.tailscale.com/stable/ | grep tailscale_ | head -1 | cut -d'_' -f 2
echo -e "tailscale_1.32.2_mipsle/tailscale" > /tmp/tailscale_1.32.2_mipsle_files.txt
wget -O- https://pkgs.tailscale.com/stable/tailscale_1.32.2_mipsle.tgz | tar x -zvf - -C /tmp -T /tmp/tailscale_1.32.2_mipsle_files.txt

It seems when running wget -O- https://pkgs.tailscale.com/stable/tailscale_1.32.2_mipsle.tgz | tar x -zvf - -C /tmp -T /tmp/tailscale_1.32.2_mipsle_files.txt, tar reads the output directly from the stdout, sees the binary "tailscale_1.32.2_mipsle/tailscale" and begins extraction while "tailscale_1.32.2_mipsle/tailscaled" is still being outputted, and hangs from that point on.

I'll test what you mentioned above and will get back asap.

@SandiyosDev
Copy link
Author

That is correct behavior. It can start extracting files when the rest is still being piped, it will cause wget to pause for a while. But tar should not say unexpected end of file.

Running the command above several times does complete without problems, but when running the single line 'wget' command, it does still hang.
I'll include the commands above into the script, I appreciate your help.

@SandiyosDev
Copy link
Author

It seems like the problem still occurs when running as a shell script.

@SandiyosDev SandiyosDev reopened this Nov 3, 2022
@adyanth
Copy link
Owner

adyanth commented May 4, 2024

Is this occasional or happens everytime? I havent had this problem in quite a while.

@adyanth adyanth closed this as completed May 4, 2024
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

2 participants