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

Bootstrap does not work on 3.6.0.1865 due to segmentation fault #731

Closed
ghost opened this issue Aug 28, 2023 · 15 comments · Fixed by toltec-dev/bootstrap#2, #872 or #877 · May be fixed by #860
Closed

Bootstrap does not work on 3.6.0.1865 due to segmentation fault #731

ghost opened this issue Aug 28, 2023 · 15 comments · Fixed by toltec-dev/bootstrap#2, #872 or #877 · May be fixed by #860
Labels
bug Something isn't working install Installation scripts
Milestone

Comments

@ghost
Copy link

ghost commented Aug 28, 2023

To Reproduce
Steps to reproduce the behaviour:

  1. SSH into Remarkable 2
  2. Run Toltec installation command: wget http://toltec-dev.org/bootstrap echo "04a28483286f88c5c7f39e352afb62adc57f6162a29fd7e124d832205bb0980e bootstrap" | sha256sum -c && bash bootstrap
  3. Get the following error: INFO: Fetching secure wget INFO: Bootstrapping Opkg bootstrap: line 119: 400 Segmentation fault wget --no-verbose "$entware_remote/opkg" --output-document "$opkg_path" ERROR: Could not fetch opkg, make sure you have a stable Wi-Fi connection

Expected behaviour
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Device information (please complete the following information):

  • Device: Remarkable 2
  • OS version: 5.4.70-v1.3.4-rm11x

Additional context

The Wifi-connection of the RM2 is perfectly working, I was able to download Bootstrap.

@ghost ghost added bug Something isn't working install Installation scripts labels Aug 28, 2023
@Eeems
Copy link
Member

Eeems commented Aug 28, 2023

What is your OS version? You have only listed the kernel version. You can find your OS version in the settings menu.

@ghost
Copy link
Author

ghost commented Aug 28, 2023

Version 3.6.0.1865

@Eeems
Copy link
Member

Eeems commented Aug 28, 2023

Toltec does not support this version, please read the warning right before the installation instructions: https://toltec-dev.org/#install-toltec

You can find more information about why here: https://remarkable.guide/faqs.html#can-i-install-toltec-before-my-os-version-is-supported

@ghost
Copy link
Author

ghost commented Aug 28, 2023

I've downgrade my Remarkable version and was able to install Toltec. Is it possible for me to install genie and iago and then remove toltec and upgrade again?

@Eeems
Copy link
Member

Eeems commented Aug 28, 2023

I've downgrade my Remarkable version and was able to install Toltec. Is it possible for me to install genie and iago and then remove toltec and upgrade again?

You can downgrade/upgrade whenever you want. Uninstalling toltec will remove anything you installed with toltec.

@dev-zero
Copy link

dev-zero commented Sep 2, 2023

I see the exact same error on the reMarkable 1 with software version 3.6.0.1865.

@Eeems
Copy link
Member

Eeems commented Sep 2, 2023

I see the exact same error on the reMarkable 1 with software version 3.6.0.1865.

Please read this message: #731 (comment)

@dev-zero
Copy link

dev-zero commented Sep 7, 2023

@Eeems yes, I've noticed afterwards that the warning

⚠️ Warning: Toltec does not support OS builds newer than 2.15.1.1189.
You will soft-brick your device if you install before support is released.
See [remarkable2-recovery](https://github.com/ddvk/remarkable2-recovery) for information on how to recover your device if you have done this.

not only applies to the rM2 as one could understand from the last line, but is actually independent of the hardware.

@Jayy001
Copy link

Jayy001 commented Sep 13, 2023

It clearly states

⚠️ Warning: Toltec does not support OS builds newer than 2.15.1.1189.

Specifying that toltec does not support it.

@Eeems
Copy link
Member

Eeems commented Sep 13, 2023

I've changed the link to be more generic in toltec-dev/web@ae2a2df

@Eeems Eeems changed the title Unable to install Toltec Toltec does not work on 3.6.0.1865 due to segmentation fault Sep 13, 2023
@Eeems
Copy link
Member

Eeems commented Sep 13, 2023

toltec-dev/toolchain#27 will be needed to resolve this, which will probably require dropping support for older OS versions, or maintaining two different repositories for the different OS versions.

@Eeems Eeems changed the title Toltec does not work on 3.6.0.1865 due to segmentation fault Bootstrap does not work on 3.6.0.1865 due to segmentation fault Oct 5, 2023
@timower
Copy link

timower commented Nov 7, 2023

I don't think this is a toolchain issue necessarily. The bootstrap wget is build with the oldest toolchain, so glibc being backwards compatible, it should just work.
Looking at the crash, glibc has some issue with NSS:

--2023-11-07 21:55:51--  http://google.com/
Resolving google.com... 

Program received signal SIGSEGV, Segmentation fault.
0xb6b12a28 in __nss_readline () from /lib/libc.so.6

Looking online, it seems glibc uses dlopen to implement some of the NSS functions.

When I patch the bootsrap script to use a musl libc wget (from https://github.com/Azathothas/Static-Binaries/tree/main/wget), it finishes without issue.
Installing some simple stuff like htop (entware) and 7zip (toltec) seems to work.

Also, not statically linking glibc into the bootstrap wget fixes the crash: toltec-dev/bootstrap#2

@Eeems
Copy link
Member

Eeems commented Nov 7, 2023

Installing some simple stuff like htop (entware) and 7zip (toltec) seems to work.

These run off of the entware libraries, so they would continue to work when OS library changes happen. I would expect there to be issues with packages in the toltec repositories.

@timower
Copy link

timower commented Nov 8, 2023

Installing some simple stuff like htop (entware) and 7zip (toltec) seems to work.

These run off of the entware libraries, so they would continue to work when OS library changes happen. I would expect there to be issues with packages in the toltec repositories.

Ah, I choose 7zip as it's packaged by toltec, but evtest also works. Of course there can be differences in stuff like Qt, but solving the bootstrap issue would be nice.

@Eeems
Copy link
Member

Eeems commented Nov 8, 2023

The 7zip package is just using a prebuilt binary, so I assume it's mostly static compiled. evtest is using the toltec build system, so it would be using the OS libraries if it's linked against any. You are right, the Qt related items are more likely to be the problem though.

@Eeems Eeems reopened this Nov 8, 2023
@Eeems Eeems linked a pull request Nov 8, 2023 that will close this issue
@Eeems Eeems added this to the 3.x support milestone Nov 25, 2023
@Eeems Eeems pinned this issue Dec 27, 2023
@Eeems Eeems mentioned this issue Jan 7, 2024
@Eeems Eeems unpinned this issue Jan 29, 2024
This was linked to pull requests May 24, 2024
@Eeems Eeems removed a link to a pull request May 24, 2024
timower added a commit to timower/toltec that referenced this issue May 30, 2024
Uses a partially statically compiled version, which resolves crashes on newer
xochitl versions.

Fixes toltec-dev#731
Eeems added a commit that referenced this issue May 30, 2024
Use wget v1.21.1-1 to fix incompatible libc

Uses a partially statically compiled version, which resolves crashes on newer
xochitl versions.

Fixes #731
---------

Co-authored-by: Nathaniel van Diepen <[email protected]>
Eeems added a commit that referenced this issue Jun 2, 2024
Use wget v1.21.1-1 to fix incompatible libc

Uses a partially statically compiled version, which resolves crashes on newer
xochitl versions.

Fixes #731
---------

Co-authored-by: Nathaniel van Diepen <[email protected]>
@Eeems Eeems closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment