forked from buildbarn/bb-deployments
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reproduce the /proc error in chroot runners.
This works fine for regular runners that uses the docker image user-space. But the next commit enables chroot runners and it starts to fail. bazel build \ --remote_executor=grpc://localhost:8980 \ --remote_instance_name=fuse \ --remote_default_exec_properties OSFamily=linux \ --remote_default_exec_properties container-image="docker://ghcr.io/catthehacker/ubuntu:act-22.04@sha256:5f9c35c25db1d51a8ddaae5c0ba8d3c163c5e9a4a6cc97acd409ac7eae239448" \ @//:introspection This is step one of three to verify the solution to: buildbarn/bb-remote-execution#115
- Loading branch information
1 parent
07901a9
commit 4ba26f1
Showing
5 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") | ||
|
||
go_library( | ||
name = "go_default_library", | ||
srcs = ["main.go"], | ||
importpath = "github.com/buildbarn/bb-deployments/cmd/ls-proc", | ||
visibility = ["//visibility:private"], | ||
) | ||
|
||
go_binary( | ||
name = "ls-proc", | ||
embed = [":go_default_library"], | ||
visibility = ["//visibility:public"], | ||
pure = "on", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
"log" | ||
) | ||
|
||
func main() { | ||
entries, err := os.ReadDir("/proc/self") | ||
if err != nil { | ||
log.Fatal("Reading /proc/self:", err) | ||
} | ||
|
||
max := 10 | ||
for i, e := range entries { | ||
if i > max { | ||
break | ||
} | ||
fmt.Println(e.Name()) | ||
} | ||
|
||
os.Create(os.Args[1]) | ||
} |
Binary file not shown.