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

/proc/<pid>/maps is incorrect #5090

Closed
csweichel opened this issue Aug 6, 2021 · 51 comments
Closed

/proc/<pid>/maps is incorrect #5090

csweichel opened this issue Aug 6, 2021 · 51 comments
Labels
feature: docker in workspaces priority: highest (user impact) Directly user impacting team: workspace Issue belongs to the Workspace team type: bug Something isn't working

Comments

@csweichel
Copy link
Contributor

csweichel commented Aug 6, 2021

Bug description

The /proc/<pid>/maps file is incorrect. It's unclear what causes this.
When running a Docker container in Gitpod, /proc/<pid>/maps is correct.

This is a possible cause of #5064

Possibly relevant issues:

Steps to reproduce

cat /proc/self/maps

contains paths that don't really exist or make sense in the workspace.

Expected behavior

It should show the proper maps.

Example repository

https://github.com/ghuntley/gitpod-dotnet-csharp-breakpoints

@csweichel csweichel added type: bug Something isn't working component: ws-daemon priority: highest (user impact) Directly user impacting labels Aug 6, 2021
@csweichel
Copy link
Contributor Author

/schedule

@csweichel csweichel changed the title mountinfo is incorrect /proc/<pid>/maps is incorrect Aug 12, 2021
@csweichel
Copy link
Contributor Author

/assign @mrsimonemms

@mrsimonemms
Copy link
Contributor

/assign

@aledbf
Copy link
Member

aledbf commented Aug 23, 2021

@csweichel there is nothing to fix here besides upgrading the kernel.
From production:

gitpod /workspace/gitpod-dotnet-csharp-breakpoints $ cat /proc/self/maps
55bf8c5f7000-55bf8c5f9000 r--p 00000000 00:21a 4647938                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/bin/cat
55bf8c5f9000-55bf8c5fe000 r-xp 00002000 00:21a 4647938                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/bin/cat
55bf8c5fe000-55bf8c601000 r--p 00007000 00:21a 4647938                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/bin/cat
55bf8c601000-55bf8c602000 r--p 00009000 00:21a 4647938                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/bin/cat
55bf8c602000-55bf8c603000 rw-p 0000a000 00:21a 4647938                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/bin/cat
55bf8e116000-55bf8e137000 rw-p 00000000 00:00 0                          [heap]
7fea50d2c000-7fea50d4e000 rw-p 00000000 00:00 0 
7fea50d4e000-7fea51034000 r--p 00000000 00:21a 4650679                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/lib/locale/locale-archive
7fea51034000-7fea51059000 r--p 00000000 00:21a 4903663                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/lib/x86_64-linux-gnu/libc-2.31.so
7fea51059000-7fea511d1000 r-xp 00025000 00:21a 4903663                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/lib/x86_64-linux-gnu/libc-2.31.so
7fea511d1000-7fea5121b000 r--p 0019d000 00:21a 4903663                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/lib/x86_64-linux-gnu/libc-2.31.so
7fea5121b000-7fea5121c000 ---p 001e7000 00:21a 4903663                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/lib/x86_64-linux-gnu/libc-2.31.so
7fea5121c000-7fea5121f000 r--p 001e7000 00:21a 4903663                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/lib/x86_64-linux-gnu/libc-2.31.so
7fea5121f000-7fea51222000 rw-p 001ea000 00:21a 4903663                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/lib/x86_64-linux-gnu/libc-2.31.so
7fea51222000-7fea51228000 rw-p 00000000 00:00 0 
7fea51230000-7fea51231000 r--p 00000000 00:21a 4903468                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/lib/x86_64-linux-gnu/ld-2.31.so
7fea51231000-7fea51254000 r-xp 00001000 00:21a 4903468                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/lib/x86_64-linux-gnu/ld-2.31.so
7fea51254000-7fea5125c000 r--p 00024000 00:21a 4903468                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/lib/x86_64-linux-gnu/ld-2.31.so
7fea5125d000-7fea5125e000 r--p 0002c000 00:21a 4903468                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/lib/x86_64-linux-gnu/ld-2.31.so
7fea5125e000-7fea5125f000 rw-p 0002d000 00:21a 4903468                   /run/containerd/io.containerd.runtime.v2.task/k8s.io/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5/rootfs/usr/lib/x86_64-linux-gnu/ld-2.31.so
7fea5125f000-7fea51260000 rw-p 00000000 00:00 0 
7fff07af3000-7fff07b17000 rw-p 00000000 00:00 0                          [stack]
7fff07bd9000-7fff07bdc000 r--p 00000000 00:00 0                          [vvar]
7fff07bdc000-7fff07bdd000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

gitpod /workspace/gitpod-dotnet-csharp-breakpoints $ findmnt 
TARGET                                SOURCE                                                                                                                                          FSTYPE  OPTIONS
/                                     /.workspace/mark                                                                                                                                shiftfs rw,relatime
├─/dev                                tmpfs                                                                                                                                           tmpfs   rw,nosuid,size=65536k,mode=755
│ ├─/dev/pts                          devpts                                                                                                                                          devpts  rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666
│ ├─/dev/mqueue                       mqueue                                                                                                                                          mqueue  rw,nosuid,nodev,noexec,relatime
│ ├─/dev/termination-log              /dev/root[/var/lib/kubelet/pods/4756c1e9-9a86-4e00-8e1a-82fc30a66095/containers/workspace/54ee449a]                                             ext4    rw,relatime
│ └─/dev/shm                          shm                                                                                                                                             tmpfs   rw,nosuid,nodev,noexec,relatime,size=65536k
├─/sys                                sysfs                                                                                                                                           sysfs   ro,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/cgroup                    tmpfs                                                                                                                                           tmpfs   rw,nosuid,nodev,noexec,relatime,mode=755
│ │ ├─/sys/fs/cgroup/systemd          cgroup[/kubepods/burstable/pod4756c1e9-9a86-4e00-8e1a-82fc30a66095/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5]            cgroup  ro,nosuid,nodev,noexec,relatime,xattr,name=systemd
│ │ ├─/sys/fs/cgroup/freezer          cgroup[/kubepods/burstable/pod4756c1e9-9a86-4e00-8e1a-82fc30a66095/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5]            cgroup  ro,nosuid,nodev,noexec,relatime,freezer
│ │ ├─/sys/fs/cgroup/pids             cgroup[/kubepods/burstable/pod4756c1e9-9a86-4e00-8e1a-82fc30a66095/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5]            cgroup  ro,nosuid,nodev,noexec,relatime,pids
│ │ ├─/sys/fs/cgroup/net_cls,net_prio cgroup[/kubepods/burstable/pod4756c1e9-9a86-4e00-8e1a-82fc30a66095/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5]            cgroup  ro,nosuid,nodev,noexec,relatime,net_cls,net_prio
│ │ ├─/sys/fs/cgroup/memory           cgroup[/kubepods/burstable/pod4756c1e9-9a86-4e00-8e1a-82fc30a66095/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5]            cgroup  ro,nosuid,nodev,noexec,relatime,memory
│ │ ├─/sys/fs/cgroup/cpu,cpuacct      cgroup[/kubepods/burstable/pod4756c1e9-9a86-4e00-8e1a-82fc30a66095/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5]            cgroup  ro,nosuid,nodev,noexec,relatime,cpu,cpuacct
│ │ ├─/sys/fs/cgroup/perf_event       cgroup[/kubepods/burstable/pod4756c1e9-9a86-4e00-8e1a-82fc30a66095/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5]            cgroup  ro,nosuid,nodev,noexec,relatime,perf_event
│ │ ├─/sys/fs/cgroup/rdma             cgroup                                                                                                                                          cgroup  ro,nosuid,nodev,noexec,relatime,rdma
│ │ ├─/sys/fs/cgroup/blkio            cgroup[/kubepods/burstable/pod4756c1e9-9a86-4e00-8e1a-82fc30a66095/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5]            cgroup  ro,nosuid,nodev,noexec,relatime,blkio
│ │ ├─/sys/fs/cgroup/hugetlb          cgroup[/kubepods/burstable/pod4756c1e9-9a86-4e00-8e1a-82fc30a66095/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5]            cgroup  ro,nosuid,nodev,noexec,relatime,hugetlb
│ │ ├─/sys/fs/cgroup/cpuset           cgroup[/kubepods/burstable/pod4756c1e9-9a86-4e00-8e1a-82fc30a66095/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5]            cgroup  ro,nosuid,nodev,noexec,relatime,cpuset
│ │ └─/sys/fs/cgroup/devices          cgroup[/kubepods/burstable/pod4756c1e9-9a86-4e00-8e1a-82fc30a66095/c77e4146b103537770ce3571766d459690621291525b45939bd1eea44eb97ac5]            cgroup  ro,nosuid,nodev,noexec,relatime,devices
│ └─/sys/firmware                     tmpfs                                                                                                                                           tmpfs   ro,relatime
├─/workspace                          /dev/md42[/1655c160-4255-4b05-ac0b-5399930847b7]                                                                                                xfs     rw,noatime,attr2,inode64,logbufs=8,logbsize=32k,sunit=2048,swidth=6144,noquota
│ └─/workspace                        /dev/md42[/1655c160-4255-4b05-ac0b-5399930847b7]                                                                                                xfs     rw,noatime,attr2,inode64,logbufs=8,logbsize=32k,sunit=2048,swidth=6144,noquota
├─/etc/hosts                          /dev/root[/var/lib/kubelet/pods/4756c1e9-9a86-4e00-8e1a-82fc30a66095/etc-hosts]                                                                 ext4    rw,relatime
├─/etc/hostname                       /dev/root[/var/lib/containerd/io.containerd.grpc.v1.cri/sandboxes/f7d4a31c94e233fdc58fb8e3506bd51260da241d9753cdc828e69ba4e84aebf7/hostname]    ext4    rw,relatime
├─/etc/resolv.conf                    /dev/root[/var/lib/containerd/io.containerd.grpc.v1.cri/sandboxes/f7d4a31c94e233fdc58fb8e3506bd51260da241d9753cdc828e69ba4e84aebf7/resolv.conf] ext4    rw,relatime
├─/tmp                                tmpfs                                                                                                                                           tmpfs   rw,relatime,uid=33333,gid=33333
└─/proc                               proc                                                                                                                                            proc    rw,relatime
  ├─/proc/acpi                        tmpfs                                                                                                                                           tmpfs   ro,relatime
  ├─/proc/kcore                       tmpfs[/null]                                                                                                                                    tmpfs   rw,nosuid,size=65536k,mode=755
  ├─/proc/keys                        tmpfs[/null]                                                                                                                                    tmpfs   rw,nosuid,size=65536k,mode=755
  ├─/proc/timer_list                  tmpfs[/null]                                                                                                                                    tmpfs   rw,nosuid,size=65536k,mode=755
  ├─/proc/sched_debug                 tmpfs[/null]                                                                                                                                    tmpfs   rw,nosuid,size=65536k,mode=755
  ├─/proc/scsi                        tmpfs                                                                                                                                           tmpfs   ro,relatime
  ├─/proc/bus                         proc[/bus]                                                                                                                                      proc    ro,relatime
  ├─/proc/fs                          proc[/fs]                                                                                                                                       proc    ro,relatime
  ├─/proc/irq                         proc[/irq]                                                                                                                                      proc    ro,relatime
  ├─/proc/sys                         proc[/sys]                                                                                                                                      proc    ro,relatime
  └─/proc/sysrq-trigger               proc[/sysrq-trigger]                                                                                                                            proc    ro,relatime

From EKS (using kernel 4.13)

gitpod /workspace/gitpod-dotnet-csharp-breakpoints $ cat /proc/self/maps 
557452ac9000-557452acb000 r--p 00000000 00:f9 2824238                    /usr/bin/cat
557452acb000-557452ad0000 r-xp 00002000 00:f9 2824238                    /usr/bin/cat
557452ad0000-557452ad3000 r--p 00007000 00:f9 2824238                    /usr/bin/cat
557452ad3000-557452ad4000 r--p 00009000 00:f9 2824238                    /usr/bin/cat
557452ad4000-557452ad5000 rw-p 0000a000 00:f9 2824238                    /usr/bin/cat
557454006000-557454027000 rw-p 00000000 00:00 0                          [heap]
7f362bdf8000-7f362be1a000 rw-p 00000000 00:00 0 
7f362be1a000-7f362be3f000 r--p 00000000 00:f9 3077697                    /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f362be3f000-7f362bfb7000 r-xp 00025000 00:f9 3077697                    /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f362bfb7000-7f362c001000 r--p 0019d000 00:f9 3077697                    /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f362c001000-7f362c002000 ---p 001e7000 00:f9 3077697                    /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f362c002000-7f362c005000 r--p 001e7000 00:f9 3077697                    /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f362c005000-7f362c008000 rw-p 001ea000 00:f9 3077697                    /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f362c008000-7f362c00e000 rw-p 00000000 00:00 0 
7f362c016000-7f362c017000 r--p 00000000 00:f9 3077502                    /usr/lib/x86_64-linux-gnu/ld-2.31.so
7f362c017000-7f362c03a000 r-xp 00001000 00:f9 3077502                    /usr/lib/x86_64-linux-gnu/ld-2.31.so
7f362c03a000-7f362c042000 r--p 00024000 00:f9 3077502                    /usr/lib/x86_64-linux-gnu/ld-2.31.so
7f362c043000-7f362c044000 r--p 0002c000 00:f9 3077502                    /usr/lib/x86_64-linux-gnu/ld-2.31.so
7f362c044000-7f362c045000 rw-p 0002d000 00:f9 3077502                    /usr/lib/x86_64-linux-gnu/ld-2.31.so
7f362c045000-7f362c046000 rw-p 00000000 00:00 0 
7ffc0299e000-7ffc029c2000 rw-p 00000000 00:00 0                          [stack]
7ffc029f1000-7ffc029f5000 r--p 00000000 00:00 0                          [vvar]
7ffc029f5000-7ffc029f7000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0                  [vsyscall]

findmnt 
TARGET                   SOURCE                                                                                                                                               FSTYPE              OPTIONS
/                        fuse-overlayfs                                                                                                                                       fuse.fuse-overlayfs rw,nodev,noatime,user_id=0,group_id=0,default_permissions,allow_other
|-/dev                   tmpfs                                                                                                                                                tmpfs               rw,nosuid,size=65536k,mode=755,inode64
| |-/dev/pts             devpts                                                                                                                                               devpts              rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666
| |-/dev/mqueue          mqueue                                                                                                                                               mqueue              rw,nosuid,nodev,noexec,relatime
| |-/dev/termination-log /dev/nvme0n1p1[/var/lib/kubelet/pods/6800a29e-5804-4c6d-819c-21ec32c2fbd6/containers/workspace/f7b329ef]                                             ext4                rw,relatime,discard
| `-/dev/shm             shm                                                                                                                                                  tmpfs               rw,nosuid,nodev,noexec,relatime,size=65536k,inode64
|-/sys                   sysfs                                                                                                                                                sysfs               ro,nosuid,nodev,noexec,relatime
| |-/sys/fs/cgroup       cgroup                                                                                                                                               cgroup2             ro,nosuid,nodev,noexec,relatime
| `-/sys/firmware        tmpfs                                                                                                                                                tmpfs               ro,relatime,inode64
|-/workspace             /dev/nvme0n1p1[/mnt/workspaces/64c71b4b-6612-4868-a901-2bcff3ffaa6d]                                                                                 ext4                rw,relatime,discard
| `-/workspace           /dev/nvme0n1p1[/mnt/workspaces/64c71b4b-6612-4868-a901-2bcff3ffaa6d]                                                                                 ext4                rw,relatime,discard
|-/etc/hosts             /dev/nvme0n1p1[/var/lib/kubelet/pods/6800a29e-5804-4c6d-819c-21ec32c2fbd6/etc-hosts]                                                                 ext4                rw,relatime,discard
|-/etc/hostname          /dev/nvme0n1p1[/var/lib/containerd/io.containerd.grpc.v1.cri/sandboxes/f789ce2912b2e62472e8614b976fdda9aae4af1c6954cb987223fbfe831a9114/hostname]    ext4                rw,relatime,discard
|-/etc/resolv.conf       /dev/nvme0n1p1[/var/lib/containerd/io.containerd.grpc.v1.cri/sandboxes/f789ce2912b2e62472e8614b976fdda9aae4af1c6954cb987223fbfe831a9114/resolv.conf] ext4                rw,relatime,discard
|-/tmp                   tmpfs                                                                                                                                                tmpfs               rw,relatime,uid=33333,gid=33333,inode64
`-/proc                  proc                                                                                                                                                 proc                rw,relatime
  |-/proc/acpi           tmpfs                                                                                                                                                tmpfs               ro,relatime,inode64
  |-/proc/kcore          tmpfs[/null]                                                                                                                                         tmpfs               rw,nosuid,size=65536k,mode=755,inode64
  |-/proc/keys           tmpfs[/null]                                                                                                                                         tmpfs               rw,nosuid,size=65536k,mode=755,inode64
  |-/proc/timer_list     tmpfs[/null]                                                                                                                                         tmpfs               rw,nosuid,size=65536k,mode=755,inode64
  |-/proc/scsi           tmpfs                                                                                                                                                tmpfs               ro,relatime,inode64
  |-/proc/bus            proc[/bus]                                                                                                                                           proc                ro,relatime
  |-/proc/fs             proc[/fs]                                                                                                                                            proc                ro,relatime
  |-/proc/irq            proc[/irq]                                                                                                                                           proc                ro,relatime
  |-/proc/sys            proc[/sys]                                                                                                                                           proc                ro,relatime
  `-/proc/sysrq-trigger  proc[/sysrq-trigger]                                                                                                                                 proc                ro,relatime

@woehrl01
Copy link

@kreditor0815 this issue only persists on GKS. If you self hosted you'll likely have a different kernel.

@murratore
Copy link

Still a huge bummer as a first impression.

Heard loud and clear, I agree. Thank you very much for putting in the time to identify a workaround. A notice has been posted at #6460 and is now pinned on GitHub.

I've made some tweaks to your workaround (use command, not init as /tmp is not persistent in prebuilds). See gitpod-io/template-dotnet-core-cli-csharp@9d01b88 for the specifics.

When I start this Repo I got errors
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found. /workspace/template-dotnet-core-cli-csharp/dotnetcore.csproj

@woehrl01
Copy link

woehrl01 commented Nov 1, 2021

@murratore I just modified my proposed solution (see gitpod-samples/template-dotnet-core-cli-csharp#5) with this I don't receive the same error as you mentioned. Maybe this change solves your problem.

coderpatros added a commit to CycloneDX/cyclonedx-cli that referenced this issue Nov 1, 2021
coderpatros added a commit to CycloneDX/cyclonedx-cli that referenced this issue Nov 2, 2021
@bbartels
Copy link

Just tested the .NET 6 default template and it seems to work without the workaround!

@jchannon
Copy link

So just image: gitpod/workspace-dotnet in your gitpod.yml?

@bbartels
Copy link

bbartels commented Nov 10, 2021

Doesn't seem that way, have a look at https://github.com/gitpod-io/template-dotnet-core-cli-csharp, it uses a task to install .NET as a workaround.

EDIT: Oh my, I didn't see the comment by @woehrl01 that refers to the aforementioned workaround. I guess the kernel issue is still not fixed. Workaround seems good enough that it won't bother me going forward though!

@jchannon
Copy link

jchannon commented Nov 10, 2021 via email

@bbartels
Copy link

Yeah, if you have a look at the .gitpod.yml and .gitpod.Dockerfile in that repository it should make sense!

@jchannon
Copy link

Literally no idea what you're saying. There's an existing bug with a workaround which you linked to but your original comment says you've tried a template without the workaround so not sure what you're getting at

@bbartels
Copy link

I created a new Gitpod workspace with the predefined template-dotnet-core-cli-csharp template and the hello world project built without issues. This was not the case just two weeks ago. I thought this meant that the kernel issue was fixed as I didn't have to manually add the workaround. It turns out I missed the comment by @woehrl01 that modified the template-dotnet-core-cli-csharp template to include the workaround.

I think because you responded from email you didn't see the edit I made to the comment that should have cleared up the misunderstanding (At least was supposed to). Apologies for not being precise enough in my initial wording!

@jchannon
Copy link

jchannon commented Nov 10, 2021 via email

@danroot
Copy link

danroot commented Nov 11, 2021

I was able to use https://github.com/gitpod-io/template-dotnet-core-cli-csharp as suggested and run the hello world, after switching to .net6 in the csproj. When I attempted to create an ASP.NET app using dotnet new, I was never able to get port mapping correct. The app ran in the commandline and exposed 2 local ports, and a popup asked if I wanted to make them public. I did so, but when I attempted to open browser, it would send to localhost:. Going to - returned a 502.

Is there some other foo to control the port mapping? Let me know if I should open a separate issue for this - it's all related in my mind, but may be a separate issue or just me not understanding how the port mapping works.

@ghuntley
Copy link
Contributor

ghuntley commented Nov 28, 2021

Hey folks,

Have some great news. Gitpod has almost moved off GKE. We are currently running a canary deployment of new infrastructure and are at 40% load. Within the next couple days we will be 100% out of GKE. If your workspace opens in http://ws-prod-ws-us19.gitpod.io / http://ws-prod-ws-eu19.gitpod.io then you are on the new infrastructure which resolves this problem.

@aledbf
Copy link
Member

aledbf commented Nov 30, 2021

Closing. We are now 100% out of GKE. So this is not an issue anymore.
No workaround is needed.

Also, apologies for the time it took to fix this issue.

@nojaf
Copy link

nojaf commented Dec 18, 2021

Should this be working worldwide now? I think I still have the problem in ws-eu23.
I cannot run dotnet tool restore for example.

@aledbf
Copy link
Member

aledbf commented Dec 18, 2021

@nojaf please post the output of running cat /proc/self/maps in a workspace terminal

@nojaf
Copy link

nojaf commented Dec 18, 2021

gitpod /workspace/fantomas-tools $ cat /proc/self/maps
559f611bf000-559f611c1000 r--p 00000000 08:01 771762586                  /usr/bin/cat
559f611c1000-559f611c6000 r-xp 00002000 08:01 771762586                  /usr/bin/cat
559f611c6000-559f611c9000 r--p 00007000 08:01 771762586                  /usr/bin/cat
559f611c9000-559f611ca000 r--p 00009000 08:01 771762586                  /usr/bin/cat
559f611ca000-559f611cb000 rw-p 0000a000 08:01 771762586                  /usr/bin/cat
559f614ec000-559f6150d000 rw-p 00000000 00:00 0                          [heap]
7f3fff661000-7f3fff683000 rw-p 00000000 00:00 0 
7f3fff683000-7f3fff969000 r--p 00000000 08:01 2329936060                 /usr/lib/locale/locale-archive
7f3fff969000-7f3fff98e000 r--p 00000000 08:01 1170211017                 /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f3fff98e000-7f3fffb06000 r-xp 00025000 08:01 1170211017                 /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f3fffb06000-7f3fffb50000 r--p 0019d000 08:01 1170211017                 /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f3fffb50000-7f3fffb51000 ---p 001e7000 08:01 1170211017                 /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f3fffb51000-7f3fffb54000 r--p 001e7000 08:01 1170211017                 /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f3fffb54000-7f3fffb57000 rw-p 001ea000 08:01 1170211017                 /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f3fffb57000-7f3fffb5d000 rw-p 00000000 00:00 0 
7f3fffb65000-7f3fffb66000 r--p 00000000 08:01 1170210964                 /usr/lib/x86_64-linux-gnu/ld-2.31.so
7f3fffb66000-7f3fffb89000 r-xp 00001000 08:01 1170210964                 /usr/lib/x86_64-linux-gnu/ld-2.31.so
7f3fffb89000-7f3fffb91000 r--p 00024000 08:01 1170210964                 /usr/lib/x86_64-linux-gnu/ld-2.31.so
7f3fffb92000-7f3fffb93000 r--p 0002c000 08:01 1170210964                 /usr/lib/x86_64-linux-gnu/ld-2.31.so
7f3fffb93000-7f3fffb94000 rw-p 0002d000 08:01 1170210964                 /usr/lib/x86_64-linux-gnu/ld-2.31.so
7f3fffb94000-7f3fffb95000 rw-p 00000000 00:00 0 
7ffdd9259000-7ffdd927d000 rw-p 00000000 00:00 0                          [stack]
7ffdd932f000-7ffdd9333000 r--p 00000000 00:00 0                          [vvar]
7ffdd9333000-7ffdd9335000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Oh, one thing to confess, I am installed additional SDKs.

      curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version 3.1.402 --install-dir /home/gitpod/dotnet/
      curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version 5.0.401 --install-dir /home/gitpod/dotnet/

This might be related.
If the /proc/self/maps is correct, I'll open a new issue.

@aledbf
Copy link
Member

aledbf commented Dec 18, 2021

If the /proc/self/maps is correct, I'll open a new issue.

It is. Please open a new issue and include the error you get

@yellowsink
Copy link

I still have .NET issues on a fresh container, fresh empty repo, I just upgraded all default packages and installed .NET as per here, but get the following output:

I am simply using building default template for dotnet new classlib --language="F#"

Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
/usr/share/dotnet/sdk/6.0.201/FSharp/Microsoft.FSharp.Targets(317,9): error MSB6004: The specified task executable location "/run/containerd/io.containerd.runtime.v2.task/k8s.io/42026b77db65c64591c35b50d3e8f5b35c758b4e21ccaf63038352c208de4d10/rootfs/usr/share/dotnet/dotnet" is invalid. [/workspace/Fsharp.Data.Yaml/Fsharp.Data.Yaml.fsproj]

Build FAILED.

/usr/share/dotnet/sdk/6.0.201/FSharp/Microsoft.FSharp.Targets(317,9): error MSB6004: The specified task executable location "/run/containerd/io.containerd.runtime.v2.task/k8s.io/42026b77db65c64591c35b50d3e8f5b35c758b4e21ccaf63038352c208de4d10/rootfs/usr/share/dotnet/dotnet" is invalid. [/workspace/Fsharp.Data.Yaml/Fsharp.Data.Yaml.fsproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.92

@pawlean
Copy link
Contributor

pawlean commented Mar 18, 2022

@yellowsink Can you open a new issue, please?

@yellowsink
Copy link

Okay will do

@purkhusid
Copy link

I also encountered issues and I created a new Issue here: #8901

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: docker in workspaces priority: highest (user impact) Directly user impacting team: workspace Issue belongs to the Workspace team type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests