Public bug reported:

In version 1.6.1 of the delve golang debugger, a 'dump' feature was added.
https://github.com/go-delve/delve/pull/2173

Since that time, arm64 autopkgtest of delve has been failing like so:

https://autopkgtest.ubuntu.com/results/autopkgtest-impish/impish/arm64/d/delve/20210707_003312_d3699@/log.gz
=== RUN   TestDump
    proc_test.go:5117: testing normal dump
    proc_test.go:5029: bad DumpState &proc.DumpState{Mutex:sync.Mutex{state:0, 
sema:0x0}, Dumping:false, AllDone:true, Canceled:false, DoneChan:(chan struct 
{})(nil), ThreadsDone:5, ThreadsTotal:5, MemDone:0x657b000, MemTotal:0x657d000, 
Err:error(nil)}
--- FAIL: TestDump (0.98s)

The test fails becaue MemDone != MemTotal.
The decision on what to dump or not is based on smaps.
The failing item is vvar.
err when attempting to read is
error(syscall.Errno) golang.org/x/sys/unix.EIO (5)

Notably however, this test passes in debian CI. (kernel 4.19)
Also, running on older series such as bionic/focal does pass.

vvar section from vm with kernel 5.4 (test pass):
ffff924a4000-ffff924a5000 r--p 00000000 00:00 0                          [vvar]
Size:                  4 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Rss:                   0 kB
Pss:                   0 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:         0 kB
Referenced:            0 kB
Anonymous:             0 kB
LazyFree:              0 kB
AnonHugePages:         0 kB
ShmemPmdMapped:        0 kB
FilePmdMapped:        0 kB
Shared_Hugetlb:        0 kB
Private_Hugetlb:       0 kB
Swap:                  0 kB
SwapPss:               0 kB
Locked:                0 kB
THPeligible:            0
VmFlags: rd mr de

vvar from failing case
ffffac144000-ffffac146000 r--p 00000000 00:00 0                          [vvar]
Size:                  8 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Rss:                   0 kB
Pss:                   0 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:         0 kB
Referenced:            0 kB
Anonymous:             0 kB
LazyFree:              0 kB
AnonHugePages:         0 kB
ShmemPmdMapped:        0 kB
FilePmdMapped:         0 kB
Shared_Hugetlb:        0 kB
Private_Hugetlb:       0 kB
Swap:                  0 kB
SwapPss:               0 kB
Locked:                0 kB
THPeligible:    0
VmFlags: rd mr pf de

Two noticible differences
1) 4kB vs 8kB size
2) Failing case adds the "pf" flag ("pure PFN range")

Open questions:
1) Would we expect that a debugger could read vvar on arm64?
2) Any thoughts on why this seems to work on older kernels?
3) Do we believe this to be a kernel bug,
   or should the delve debugger not expect to read vvar?
4) Is it sensible for a debugger to attempt to read things with the "pf"
   flag?  Note that the "dd" ("do not include area into core dump")
   flag is not set.

ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: linux-image-5.11.0-20-generic 5.11.0-20.21+21.10.1
ProcVersionSignature: Ubuntu 5.11.0-20.21+21.10.1-generic 5.11.21
Uname: Linux 5.11.0-20-generic aarch64
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116,  1 Jul 29 21:21 seq
 crw-rw---- 1 root audio 116, 33 Jul 29 21:21 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
ApportVersion: 2.20.11-0ubuntu67
Architecture: arm64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', 
'/dev/snd/timer'] failed with exit code 1:
CasperMD5CheckResult: pass
Date: Thu Jul 29 21:34:34 2021
InstallationDate: Installed on 2021-07-29 (0 days ago)
InstallationMedia: Ubuntu-Server 21.10 "Impish Indri" - Alpha arm64 (20210729)
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Lsusb-t:
 /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 5000M
 /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 480M
MachineType: QEMU QEMU Virtual Machine
PciMultimedia:

ProcEnviron:
 TERM=screen-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.11.0-20-generic 
root=/dev/mapper/username--vg-username--lv ro
RelatedPackageVersions:
 linux-restricted-modules-5.11.0-20-generic N/A
 linux-backports-modules-5.11.0-20-generic  N/A
 linux-firmware                             1.199
RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 02/06/2015
dmi.bios.release: 0.0
dmi.bios.vendor: EFI Development Kit II / OVMF
dmi.bios.version: 0.0.0
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: virt-5.2
dmi.modalias: 
dmi:bvnEFIDevelopmentKitII/OVMF:bvr0.0.0:bd02/06/2015:br0.0:svnQEMU:pnQEMUVirtualMachine:pvrvirt-5.2:cvnQEMU:ct1:cvrvirt-5.2:
dmi.product.name: QEMU Virtual Machine
dmi.product.version: virt-5.2
dmi.sys.vendor: QEMU

** Affects: delve (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug arm64 impish uec-images

** Also affects: delve (Ubuntu)
   Importance: Undecided
       Status: New

** Description changed:

  In version 1.6.1 of the delve golang debugger, a 'dump' feature was added.
  https://github.com/go-delve/delve/pull/2173
  
  Since that time, arm64 autopkgtest of delve has been failing like so:
  
  
https://autopkgtest.ubuntu.com/results/autopkgtest-impish/impish/arm64/d/delve/20210707_003312_d3699@/log.gz
  === RUN   TestDump
-     proc_test.go:5117: testing normal dump
-     proc_test.go:5029: bad DumpState 
&proc.DumpState{Mutex:sync.Mutex{state:0, sema:0x0}, Dumping:false, 
AllDone:true, Canceled:false, DoneChan:(chan struct {})(nil), ThreadsDone:5, 
ThreadsTotal:5, MemDone:0x657b000, MemTotal:0x657d000, Err:error(nil)}
+     proc_test.go:5117: testing normal dump
+     proc_test.go:5029: bad DumpState 
&proc.DumpState{Mutex:sync.Mutex{state:0, sema:0x0}, Dumping:false, 
AllDone:true, Canceled:false, DoneChan:(chan struct {})(nil), ThreadsDone:5, 
ThreadsTotal:5, MemDone:0x657b000, MemTotal:0x657d000, Err:error(nil)}
  --- FAIL: TestDump (0.98s)
  
  The test fails becaue MemDone != MemTotal.
  The decision on what to dump or not is based on smaps.
  The failing item is vvar.
  err when attempting to read is
  error(syscall.Errno) golang.org/x/sys/unix.EIO (5)
  
- Notably however, this test passes in debian CI.
+ Notably however, this test passes in debian CI. (kernel 4.19)
  Also, running on older series such as bionic/focal does pass.
  
  vvar section from vm with kernel 5.4 (test pass):
  ffff924a4000-ffff924a5000 r--p 00000000 00:00 0                          
[vvar]
  Size:                  4 kB
  KernelPageSize:        4 kB
  MMUPageSize:           4 kB
  Rss:                   0 kB
  Pss:                   0 kB
  Shared_Clean:          0 kB
  Shared_Dirty:          0 kB
  Private_Clean:         0 kB
  Private_Dirty:         0 kB
  Referenced:            0 kB
  Anonymous:             0 kB
  LazyFree:              0 kB
  AnonHugePages:         0 kB
  ShmemPmdMapped:        0 kB
  FilePmdMapped:        0 kB
  Shared_Hugetlb:        0 kB
  Private_Hugetlb:       0 kB
  Swap:                  0 kB
  SwapPss:               0 kB
  Locked:                0 kB
  THPeligible:            0
  VmFlags: rd mr de
  
  vvar from failing case
  ffffac144000-ffffac146000 r--p 00000000 00:00 0                          
[vvar]
  Size:                  8 kB
  KernelPageSize:        4 kB
  MMUPageSize:           4 kB
  Rss:                   0 kB
  Pss:                   0 kB
  Shared_Clean:          0 kB
  Shared_Dirty:          0 kB
  Private_Clean:         0 kB
  Private_Dirty:         0 kB
  Referenced:            0 kB
  Anonymous:             0 kB
  LazyFree:              0 kB
  AnonHugePages:         0 kB
  ShmemPmdMapped:        0 kB
  FilePmdMapped:         0 kB
  Shared_Hugetlb:        0 kB
  Private_Hugetlb:       0 kB
  Swap:                  0 kB
  SwapPss:               0 kB
  Locked:                0 kB
  THPeligible:    0
  VmFlags: rd mr pf de
  
  Two noticible differences
  1) 4kB vs 8kB size
  2) Failing case adds the "pf" flag ("pure PFN range")
  
  Open questions:
  1) Would we expect that a debugger could read vvar on arm64?
  2) Any thoughts on why this seems to work on older kernels?
  3) Do we believe this to be a kernel bug,
-    or should the delve debugger not expect to read vvar?
- 4) Is it sensible for a debugger to attempt to read things with the "pf" flag?
-    Note that the "dd" ("do not include area into core dump") flag is not set.
+    or should the delve debugger not expect to read vvar?
+ 4) Is it sensible for a debugger to attempt to read things with the "pf"
+    flag?  Note that the "dd" ("do not include area into core dump")
+    flag is not set.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 21.10
  Package: linux-image-5.11.0-20-generic 5.11.0-20.21+21.10.1
  ProcVersionSignature: Ubuntu 5.11.0-20.21+21.10.1-generic 5.11.21
  Uname: Linux 5.11.0-20-generic aarch64
  AlsaDevices:
-  total 0
-  crw-rw---- 1 root audio 116,  1 Jul 29 21:21 seq
-  crw-rw---- 1 root audio 116, 33 Jul 29 21:21 timer
+  total 0
+  crw-rw---- 1 root audio 116,  1 Jul 29 21:21 seq
+  crw-rw---- 1 root audio 116, 33 Jul 29 21:21 timer
  AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
  ApportVersion: 2.20.11-0ubuntu67
  Architecture: arm64
  ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
  AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', 
'/dev/snd/timer'] failed with exit code 1:
  CasperMD5CheckResult: pass
  Date: Thu Jul 29 21:34:34 2021
  InstallationDate: Installed on 2021-07-29 (0 days ago)
  InstallationMedia: Ubuntu-Server 21.10 "Impish Indri" - Alpha arm64 (20210729)
  IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
  Lsusb:
-  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
-  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
+  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
+  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  Lsusb-t:
-  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 5000M
-  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 480M
+  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 5000M
+  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 480M
  MachineType: QEMU QEMU Virtual Machine
  PciMultimedia:
-  
+ 
  ProcEnviron:
-  TERM=screen-256color
-  PATH=(custom, no user)
-  XDG_RUNTIME_DIR=<set>
-  LANG=C.UTF-8
-  SHELL=/bin/bash
+  TERM=screen-256color
+  PATH=(custom, no user)
+  XDG_RUNTIME_DIR=<set>
+  LANG=C.UTF-8
+  SHELL=/bin/bash
  ProcFB:
-  
+ 
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.11.0-20-generic 
root=/dev/mapper/username--vg-username--lv ro
  RelatedPackageVersions:
-  linux-restricted-modules-5.11.0-20-generic N/A
-  linux-backports-modules-5.11.0-20-generic  N/A
-  linux-firmware                             1.199
+  linux-restricted-modules-5.11.0-20-generic N/A
+  linux-backports-modules-5.11.0-20-generic  N/A
+  linux-firmware                             1.199
  RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
  SourcePackage: linux
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 02/06/2015
  dmi.bios.release: 0.0
  dmi.bios.vendor: EFI Development Kit II / OVMF
  dmi.bios.version: 0.0.0
  dmi.chassis.type: 1
  dmi.chassis.vendor: QEMU
  dmi.chassis.version: virt-5.2
  dmi.modalias: 
dmi:bvnEFIDevelopmentKitII/OVMF:bvr0.0.0:bd02/06/2015:br0.0:svnQEMU:pnQEMUVirtualMachine:pvrvirt-5.2:cvnQEMU:ct1:cvrvirt-5.2:
  dmi.product.name: QEMU Virtual Machine
  dmi.product.version: virt-5.2
  dmi.sys.vendor: QEMU

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1938474

Title:
  delve golang debugger can't read vvar on arm64

Status in delve package in Ubuntu:
  New
Status in linux package in Ubuntu:
  New

Bug description:
  In version 1.6.1 of the delve golang debugger, a 'dump' feature was added.
  https://github.com/go-delve/delve/pull/2173

  Since that time, arm64 autopkgtest of delve has been failing like so:

  
https://autopkgtest.ubuntu.com/results/autopkgtest-impish/impish/arm64/d/delve/20210707_003312_d3699@/log.gz
  === RUN   TestDump
      proc_test.go:5117: testing normal dump
      proc_test.go:5029: bad DumpState 
&proc.DumpState{Mutex:sync.Mutex{state:0, sema:0x0}, Dumping:false, 
AllDone:true, Canceled:false, DoneChan:(chan struct {})(nil), ThreadsDone:5, 
ThreadsTotal:5, MemDone:0x657b000, MemTotal:0x657d000, Err:error(nil)}
  --- FAIL: TestDump (0.98s)

  The test fails becaue MemDone != MemTotal.
  The decision on what to dump or not is based on smaps.
  The failing item is vvar.
  err when attempting to read is
  error(syscall.Errno) golang.org/x/sys/unix.EIO (5)

  Notably however, this test passes in debian CI. (kernel 4.19)
  Also, running on older series such as bionic/focal does pass.

  vvar section from vm with kernel 5.4 (test pass):
  ffff924a4000-ffff924a5000 r--p 00000000 00:00 0                          
[vvar]
  Size:                  4 kB
  KernelPageSize:        4 kB
  MMUPageSize:           4 kB
  Rss:                   0 kB
  Pss:                   0 kB
  Shared_Clean:          0 kB
  Shared_Dirty:          0 kB
  Private_Clean:         0 kB
  Private_Dirty:         0 kB
  Referenced:            0 kB
  Anonymous:             0 kB
  LazyFree:              0 kB
  AnonHugePages:         0 kB
  ShmemPmdMapped:        0 kB
  FilePmdMapped:        0 kB
  Shared_Hugetlb:        0 kB
  Private_Hugetlb:       0 kB
  Swap:                  0 kB
  SwapPss:               0 kB
  Locked:                0 kB
  THPeligible:            0
  VmFlags: rd mr de

  vvar from failing case
  ffffac144000-ffffac146000 r--p 00000000 00:00 0                          
[vvar]
  Size:                  8 kB
  KernelPageSize:        4 kB
  MMUPageSize:           4 kB
  Rss:                   0 kB
  Pss:                   0 kB
  Shared_Clean:          0 kB
  Shared_Dirty:          0 kB
  Private_Clean:         0 kB
  Private_Dirty:         0 kB
  Referenced:            0 kB
  Anonymous:             0 kB
  LazyFree:              0 kB
  AnonHugePages:         0 kB
  ShmemPmdMapped:        0 kB
  FilePmdMapped:         0 kB
  Shared_Hugetlb:        0 kB
  Private_Hugetlb:       0 kB
  Swap:                  0 kB
  SwapPss:               0 kB
  Locked:                0 kB
  THPeligible:    0
  VmFlags: rd mr pf de

  Two noticible differences
  1) 4kB vs 8kB size
  2) Failing case adds the "pf" flag ("pure PFN range")

  Open questions:
  1) Would we expect that a debugger could read vvar on arm64?
  2) Any thoughts on why this seems to work on older kernels?
  3) Do we believe this to be a kernel bug,
     or should the delve debugger not expect to read vvar?
  4) Is it sensible for a debugger to attempt to read things with the "pf"
     flag?  Note that the "dd" ("do not include area into core dump")
     flag is not set.

  ProblemType: Bug
  DistroRelease: Ubuntu 21.10
  Package: linux-image-5.11.0-20-generic 5.11.0-20.21+21.10.1
  ProcVersionSignature: Ubuntu 5.11.0-20.21+21.10.1-generic 5.11.21
  Uname: Linux 5.11.0-20-generic aarch64
  AlsaDevices:
   total 0
   crw-rw---- 1 root audio 116,  1 Jul 29 21:21 seq
   crw-rw---- 1 root audio 116, 33 Jul 29 21:21 timer
  AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
  ApportVersion: 2.20.11-0ubuntu67
  Architecture: arm64
  ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
  AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', 
'/dev/snd/timer'] failed with exit code 1:
  CasperMD5CheckResult: pass
  Date: Thu Jul 29 21:34:34 2021
  InstallationDate: Installed on 2021-07-29 (0 days ago)
  InstallationMedia: Ubuntu-Server 21.10 "Impish Indri" - Alpha arm64 (20210729)
  IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
  Lsusb:
   Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  Lsusb-t:
   /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 5000M
   /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 480M
  MachineType: QEMU QEMU Virtual Machine
  PciMultimedia:

  ProcEnviron:
   TERM=screen-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=C.UTF-8
   SHELL=/bin/bash
  ProcFB:

  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.11.0-20-generic 
root=/dev/mapper/username--vg-username--lv ro
  RelatedPackageVersions:
   linux-restricted-modules-5.11.0-20-generic N/A
   linux-backports-modules-5.11.0-20-generic  N/A
   linux-firmware                             1.199
  RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
  SourcePackage: linux
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 02/06/2015
  dmi.bios.release: 0.0
  dmi.bios.vendor: EFI Development Kit II / OVMF
  dmi.bios.version: 0.0.0
  dmi.chassis.type: 1
  dmi.chassis.vendor: QEMU
  dmi.chassis.version: virt-5.2
  dmi.modalias: 
dmi:bvnEFIDevelopmentKitII/OVMF:bvr0.0.0:bd02/06/2015:br0.0:svnQEMU:pnQEMUVirtualMachine:pvrvirt-5.2:cvnQEMU:ct1:cvrvirt-5.2:
  dmi.product.name: QEMU Virtual Machine
  dmi.product.version: virt-5.2
  dmi.sys.vendor: QEMU

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/delve/+bug/1938474/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to