Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#23812 closed defect (fixed)

json: cannot unmarshal array into Go struct field Process.capabilities of type specs.LinuxCapabilities

Reported by: kkuehl@… Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-rbm, TorBrowserTeam201710R
Cc: boklm, kv1835946 Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Similar to #23754 but the 23585.diff no longer applies cleanly.
$ sudo runc --version
runc version 1.0.0-rc4
spec: 1.0.0

make testbuild-linux-x86_64
Using file /home/kkuehl/Downloads/tor-browser-build/out/debootstrap-image/container-image_ubuntu-base-17.04-base-amd64.tar.gz
Error: Error starting remote:

json: cannot unmarshal array into Go struct field Process.capabilities of type specs.LinuxCapabilities

Makefile:69: recipe for target 'testbuild-linux-x86_64' failed
make: * [testbuild-linux-x86_64] Error 1

Child Tickets

Change History (11)

comment:1 Changed 2 years ago by gk

Cc: boklm added
Keywords: tbb-rbm added

comment:2 Changed 2 years ago by boklm

The patch from #23585 has been merged to master, which is why it doesn't apply anymore.

So it seems the patch from #23585 is fixing the problem with version 1.0.0-rc2, but break it with 1.0.0-rc4.

I see that your runc version prints its spec version with spec: , while other runc versions print it with runc version spec: , so we probably don't detect the spec version correctly.

This patch should fix that:
https://gitweb.torproject.org/user/boklm/tor-browser-build.git/commit/?h=bug_23812&id=d511fcb919b1cdf1f975f5923d45a1fb03c3086e

comment:3 Changed 2 years ago by kkuehl@…

Patch applied as shown:
~/Downloads/tor-browser-build$ git diff rbm.conf
diff --git a/rbm.conf b/rbm.conf
index c433f00..a18f80c 100644
--- a/rbm.conf
+++ b/rbm.conf
@@ -383,6 +383,7 @@ ENV:

# We will need to update this when there is a new spec version available
runc_spec100 => sub {

my ($out) = capture_exec('sudo', 'runc', '--version');

+ return 1 if $out =~ m/spec: 1\.0\.0$/;

return $out =~ m/runc version spec: 1\.0\.0$/;

},

},

Does not fix the issue.
git submodule update --init
./rbm/rbm build release --target testbuild --target torbrowser-linux-x86_64
Building project tor-browser - tor-browser-7.5a5-linux-x86_64-cb5c0b
Building project container-image - container-image_wheezy-amd64-df3a332e7b34.tar.gz
Building project debootstrap-image - container-image_wheezy-amd64.tar.gz
Using file /home/kkuehl/Downloads/tor-browser-build/out/debootstrap-image/container-image_ubuntu-base-17.04-base-amd64.tar.gz
Error: Error starting remote:

json: cannot unmarshal array into Go struct field Process.capabilities of type specs.LinuxCapabilities

Makefile:69: recipe for target 'testbuild-linux-x86_64' failed
make: * [testbuild-linux-x86_64] Error 1

comment:4 Changed 2 years ago by boklm

With the patch applied, what is the output of the command ./rbm/rbm showconf tor var_p/runc_spec100 ?

comment:5 Changed 2 years ago by kkuehl@…

$ ./rbm/rbm showconf tor var_p/runc_spec100

$

(No output)

comment:6 Changed 2 years ago by boklm

I created a new version of the patch in branch bug_23812_v2:
https://gitweb.torproject.org/user/boklm/tor-browser-build.git/commit/?h=bug_23812_v2&id=0b698f41ac88ef08b33d070a576c9f5649238af6

With this version of the patch, ./rbm/rbm showconf tor var_p/runc_spec100 should print 1.

comment:7 Changed 2 years ago by kkuehl@…

Your patch does in fact print 1
./rbm/rbm showconf tor var_p/runc_spec100
1

make testbuild-linux-x86_64
is starting to work, I think this fixes the issue.
Thanks!

comment:8 Changed 2 years ago by kkuehl@…

Everything worked but at the end I received
Error: File SHA512SUMS-52.4.0esr-build1 is not signed with a valid key
Makefile:69: recipe for target 'testbuild-linux-x86_64' failed
make: * [testbuild-linux-x86_64] Error 1

comment:9 Changed 2 years ago by boklm

Keywords: TorBrowserTeam201710R added
Status: newneeds_review

comment:10 Changed 2 years ago by gk

Resolution: fixed
Status: needs_reviewclosed

Applied to master with commit bfdc5bc5aecceb8ec713562f36134e6ec64cc845.

comment:11 Changed 2 years ago by gk

Cc: kv1835946 added
Note: See TracTickets for help on using tickets.