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

sbtn 1.8.1 regression on Debian 11 with glibc 2.31 #7118

Closed
Locke opened this issue Jan 4, 2023 · 6 comments · Fixed by #7122
Closed

sbtn 1.8.1 regression on Debian 11 with glibc 2.31 #7118

Locke opened this issue Jan 4, 2023 · 6 comments · Fixed by #7122
Labels
area/linux Linux distro related issues area/sbtn thin client issues Bug
Milestone

Comments

@Locke
Copy link

Locke commented Jan 4, 2023

steps

I just updated sbt on two Debian 11 ("bullseye" / "stable") x86_64 machines from 1.8.0 to 1.8.1 (a local machine and a vm used for GitHub Actions hosted-runner).

problem

On both I can no longer start sbtn and receive the following output instead.
This happens not only in a project folder which I compiled successfully just before the update, but also in a completely empty folder.
It happens with both sbt --client and manually downloaded sbtn.

ci@vm03:/tmp/foo$ sbt --client clean
/usr/bin/sbt: line 174: local: `=': not a valid identifier
/home/ci/.cache/sbt/boot/sbtn/1.8.1/sbtn: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/ci/.cache/sbt/boot/sbtn/1.8.1/sbtn)
/home/ci/.cache/sbt/boot/sbtn/1.8.1/sbtn: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/ci/.cache/sbt/boot/sbtn/1.8.1/sbtn)
locke@latitude:~/Downloads/sbtn-x86_64-pc-linux$ file sbtn 
sbtn: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=d14b2409d54f5d2b1a0cfbe9475a5b938a2b2479, for GNU/Linux 3.2.0, with debug_info, not stripped
locke@latitude:~/Downloads/sbtn-x86_64-pc-linux$ ./sbtn 
./sbtn: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./sbtn)
./sbtn: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./sbtn)

expectation

sbt and sbtn should work on Debian 11 ("bullseye" / "stable") with glibc 2.31, as this is the current supported release.
Otherwise, it has to be clearly stated somewhere (e.g. https://www.scala-sbt.org/download.html), that systems with an older glibc like Debian 11 are no longer supported.

notes

full log on a vm

Linux vm03 5.10.0-20-amd64 #1 SMP Debian 5.10.158-2 (2022-12-13) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Dec 31 12:31:23 2022 from 2a02:908:1867:f140:226:18ff:fefd:ef7
locke@vm03:~$ sudo aptitude upgrade 
[sudo] password for locke: 
The following packages will be upgraded: 
  sbt 
1 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/20.0 kB of archives. After unpacking 1,024 B will be used.
Do you want to continue? [Y/n/?] v

Versions will be shown.

The following packages will be upgraded:
  sbt [1.8.0 -> 1.8.1]  
1 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/20.0 kB of archives. After unpacking 1,024 B will be used.
Do you want to continue? [Y/n/?] 
Reading changelogs... Done               
(Reading database ... 58821 files and directories currently installed.)
Preparing to unpack .../apt/archives/sbt_1.8.1_all.deb ...
Unpacking sbt (1.8.1) over (1.8.0) ...
Setting up sbt (1.8.1) ...
Processing triggers for man-db (2.9.4-2) ...
                                         
Current status: 0 (-1) upgradable.
locke@vm03:~$ cat /etc/debian_version 
11.6
locke@vm03:~$ uname -a
Linux vm03 5.10.0-20-amd64 #1 SMP Debian 5.10.158-2 (2022-12-13) x86_64 GNU/Linux
locke@vm03:~$ apt-cache policy libc-bin 
libc-bin:
  Installed: 2.31-13+deb11u5
  Candidate: 2.31-13+deb11u5
  Version table:
 *** 2.31-13+deb11u5 500
        500 http://ftp2.de.debian.org/debian bullseye/main amd64 Packages
        500 http://ftp2.de.debian.org/debian bullseye-updates/main amd64 Packages
        100 /var/lib/dpkg/status
locke@vm03:~$ cat /etc/apt/sources.list.d/sbt.list 
# 2021-07-31
deb [signed-by=/usr/local/share/keyrings/scalasbt-release.gpg] https://repo.scala-sbt.org/scalasbt/debian all main
deb [signed-by=/usr/local/share/keyrings/scalasbt-release.gpg] https://repo.scala-sbt.org/scalasbt/debian /


locke@vm03:~$ sudo -u ci -s
ci@vm03:/home/locke$ cd /tmp/
ci@vm03:/tmp$ mkdir foo
ci@vm03:/tmp$ cd foo/
ci@vm03:/tmp/foo$ sbt --client clean
/usr/bin/sbt: line 174: local: `=': not a valid identifier
/home/ci/.cache/sbt/boot/sbtn/1.8.1/sbtn: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/ci/.cache/sbt/boot/sbtn/1.8.1/sbtn)
/home/ci/.cache/sbt/boot/sbtn/1.8.1/sbtn: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/ci/.cache/sbt/boot/sbtn/1.8.1/sbtn)

after downgrading to 1.8.0, sbtn works

locke@vm03:~$ sudo aptitude install sbt=1.8.0
The following packages will be DOWNGRADED:
  sbt 
0 packages upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 0 B/19.9 kB of archives. After unpacking 1,024 B will be freed.
dpkg: warning: downgrading sbt from 1.8.1 to 1.8.0
(Reading database ... 58821 files and directories currently installed.)
Preparing to unpack .../apt/archives/sbt_1.8.0_all.deb ...
Unpacking sbt (1.8.0) over (1.8.1) ...
Setting up sbt (1.8.0) ...
Processing triggers for man-db (2.9.4-2) ...
                                         
Current status: 1 (+1) upgradable.
locke@vm03:~$ sudo -u ci -s
ci@vm03:/home/locke$ cd /tmp/foo/
ci@vm03:/tmp/foo$ sbt --client clean
downloading sbtn 1.7.0
[info] entering *experimental* thin client - BEEP WHIRR
[info] server was not detected. starting an instance
[warn] No sbt.version set in project/build.properties, base directory: /tmp/foo
[info] welcome to sbt 1.8.0 (Debian Java 11.0.16)
[info] set current project to foo (in build file:/tmp/foo/)
[info] sbt server started at local:///home/ci/.sbt/1.0/server/4c0c08c28ca021b53943/sock
[info] terminate the server with `shutdown`
> clean
[success] Total time: 1 s, completed Jan 4, 2023, 6:43:14 PM
ci@vm03:/tmp/foo$ sbt --client shutdown
[info] entering *experimental* thin client - BEEP WHIRR
[info] terminate the server with `shutdown`
> shutdown
[info] disconnected

other systems

I manually downloaded sbt from the GitHub Release onto Debian 12 ("bookworm" / "testing", using glibc 2.36-7) on my RaspberryPI 4 (aarch64) and had no problem with the simple clean smoketest.

@Locke Locke added the Bug label Jan 4, 2023
@eed3si9n eed3si9n added the area/linux Linux distro related issues label Jan 4, 2023
@eed3si9n
Copy link
Member

eed3si9n commented Jan 4, 2023

@Locke Thanks for the detailed report!

I guess this could be caused by ipcsocket build (https://github.com/sbt/ipcsocket) or the GraalVM native-image build for sbtn. In general, any part of the sbt that requires native integration is somewhat finicky, and if the compatibility is not enforced by CI (often set to "ubuntu-latest") we won't notice when it slips.

@mkurz Do you know if this is mostly due to whatever the glibc lying around in the Github Actions image we use to build sbtn? If so using slightly older ubuntu would restore the Debian 11 compatibility?

@eed3si9n eed3si9n added the area/sbtn thin client issues label Jan 4, 2023
@eed3si9n
Copy link
Member

eed3si9n commented Jan 4, 2023

https://repology.org/project/glibc/versions says Ubuntu 22.04 uses glibc 2.35, and Ubuntu 20.04 uses glibc 2.31. I'd be happy to try to downgrade the Ubuntu machine and see if this might get fixed.

@mkurz
Copy link
Member

mkurz commented Jan 4, 2023

If so using slightly older ubuntu would restore the Debian 11 compatibility?

I'd be happy to try to downgrade the Ubuntu machine and see if this might get fixed.

I am pretty sure that should fix the problem. You used ubuntu-latest to build sbtn 1.7.0 in July 2022, so back then effectively ubuntu-20.04 was used. Since beginning of November 2022 however ubuntu-latest points to ubuntu-22.04: https://github.blog/changelog/2022-11-09-github-actions-ubuntu-latest-workflows-will-use-ubuntu-22-04/

eed3si9n added a commit to eed3si9n/sbt that referenced this issue Jan 4, 2023
@eed3si9n
Copy link
Member

eed3si9n commented Jan 4, 2023

Thankfully this was fairly easy to reproduce on Github Actions as well using ubuntu-20.04 - #7119

@mkurz
Copy link
Member

mkurz commented Jan 4, 2023

👍 IMHO that bug basically was more or less unavoidable, and it was just waiting till a new ipcsocket release gets cut 😉 Guess we stay on ubuntu 20.04 for a bit longer.

@eed3si9n eed3si9n added this to the 1.8.2 milestone Jan 4, 2023
eed3si9n added a commit to eed3si9n/sbt that referenced this issue Jan 4, 2023
Fixes sbt#7118

Problem
-------
sbtn 1.8.1 was built using ubuntu-latest, which meant picking up newer
glibc.

Solution
--------
This downgraded the ubuntu machine to build sbtn.
eed3si9n added a commit to eed3si9n/sbt that referenced this issue Jan 5, 2023
Fixes sbt#7118

Problem
-------
sbtn 1.8.1 was built using ubuntu-latest, which meant picking up newer
glibc.

Solution
--------
This downgraded the ubuntu machine to build sbtn.
@eed3si9n
Copy link
Member

eed3si9n commented Jan 5, 2023

sbt 1.8.2 is out - https://eed3si9n.com/sbt-1.8.2

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/linux Linux distro related issues area/sbtn thin client issues Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants