Re: Reproducible deadlock? with VND on NetBSD 10.0_BETA Dom0 on Xen 4.15

2023-05-22 Thread Rhialto
On Thu 18 May 2023 at 07:37:38 +0200, Matthias Petermann wrote:
> 1) Create the image file as sparse file:

I seem to remember that vnds don't like sparse files. Maybe you can try
with a non-sparse (dense?) file.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert
\X/ There is no AI. There is just someone else's work.   --I. Rose


signature.asc
Description: PGP signature


Reproducible deadlock? with VND on NetBSD 10.0_BETA Dom0 on Xen 4.15

2023-05-17 Thread Matthias Petermann

Hello all,

I just wanted to create a custom filesystem image on a Xen Dom0 and 
encountered a possible deadlock:


1) Create the image file as sparse file:

  $ bytes=$(echo "(16*1024*1024*1024)-1"|bc)
  $ doas dd if=/dev/zero of=/data/vhd/net.img bs=1 count=1 seek=$bytes

2) Configure and mount the image:

  $ doas vndconfig vnd0 /data/vhd/net.img 


  $ doas newfs -O2 -I /dev/vnd0
  2$ doas mount -o log /dev/vnd0 /mnt/

3) Extract the base system components

  $ cd /mnt/
  $ sets="kern-GENERIC.tar.xz base.tar.xz comp.tar.xz etc.tar.xz 
man.tar.xz misc.tar.xz modules.tar.xz rescue.tar.xz test.tar.xz text.tar.xz"

  $ setsdir=/data/install/NetBSD-10.0_BETA/amd64/binary/sets
  $ for set in $sets;do doas tar xvfz $setsdir/$set;done

Observation: during the last command (tar xvfz), after it seems to work 
for a while, it suddenly comes to a freeze. In a second terminal 
interaction and inspection with top is still possible. The CPU is in 
100% idle in this state, also RAM does not seem to be an obvious 
problem. This goes well until I start an operation with disk-i/o in the 
second terminal, then everything comes to a halt here too.


This is the top output from the freeze situation:

```
load averages:  0.00,  0.00,  0.00;   up 0+00:16:04 
  15:05:06

25 processes: 24 sleeping, 1 on CPU
CPU states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% 
idle

Memory: 244M Act, 119M Inact, 5904K Wired, 13M Exec, 274M File, 24M Free
Swap: 8192M Total, 8192M Free / Pools: 73M Used

  PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPUCPU COMMAND
  433 root  950   100M   68M vndpc   0:03  0.00%  0.00% tar
0 root  960 0K   31M uvnfp1  0:02  0.00%  0.00% 
[system]

```

Maybe the following context is relevant:

 - the hosts filesystem is FFSv2 with WAPBL enabled
 - the VNDs filesystem is FFSv2 with WAPBL enabled
 - the DOM0 has 512 MB RAM and 1 CPU Core configured (pin)
 - the freeze doesn't occur on the exact same system when I boot into a 
native NetBSD kernel without the hypervisor (in this case there are both 
CPU cores available as well as the full 8192 MB RAM)


Is there anything I could try to investigate this in more detail? 
Unfortunately on the Xen side I have no console available (the system 
has no serial port and the graphical console turns black when the 
hypervisor hands over control to the netbsd kernel).


Many thanks in advance!

Kind regards
Matthias


smime.p7s
Description: S/MIME Cryptographic Signature