Thanks for this Jarkko.. I have a different way of reproducing this
right now, and a candidate fix, but this acutally will probably let me
reproduce what you are doing in order to try it if need be.

In the future remember that if you are using something outside of base
and run into a crash, it is very helpful to include the details of
your setup
to reproduce it like this. Don't assume a developer can magically
figure out how you have it set up and what is triggering it.

-Bob

On Sun, Sep 30, 2018 at 9:17 AM Jarkko Oranen <[email protected]> wrote:
>
> In this case I though this is upstream-relevant since resflash's
> configuration merely happens to trigger a crash rather than causing it,
> since there's no modification to OpenBSD components besides the rather
> nonstandard mounts.
>
> I *was* able to trigger the issue on a standard OpenBSD installation
> though, with the following procedure:
>
> 1) Install a standard OpenBSD VM with 10g root disk using automatic
> partitioning
> 2) Log in, create /etc/rc.readonly containing the following (hopefully
> it renders correctly:
> -------------------------------------------
> #!/bin/sh
> RELOCDIRS='dev etc var'
> mfssizemb=64
>
> # Replace dev, etc and var with mfs
> RELOCPATH=$(mktemp -t -d test.XXXXXXXXXXXX)
>
> for dir in $RELOCDIRS; do
>   echo "replacing /$dir with mfs"
>   mount -t mfs -o async,noatime,nodev,noexec,-s${mfssizemb}M swap
> $RELOCPATH
>   tar cf ${RELOCPATH}/${dir}.tar -C /${dir} .
>   case ${dir} in
>     dev) mount -t mfs -o async,noatime,noexec,-b4096,-f512,-
> s${mfssizemb}M swap /${dir}
> ;;
>     etc) mount -t mfs -o async,noatime,nodev,nosuid,-s${mfssizemb}M
> swap /${dir}
> ;;
>     var) mount -t mfs -o async,noatime,nodev,nosuid,-s${mfssizemb}M
> swap /${dir}
> ;;
>   esac
>   tar xpf ${RELOCPATH}/${dir}.tar -C /${dir}
>   rm ${RELOCPATH}/${dir}.tar
>   umount ${RELOCPATH}
> done
> rm -rf ${RELOCPATH}
>
> # We're done, so make root readonly
> mount -ur /
>
> -------------------------------------------
>
> 4) edit /etc/rc so that the script is executed immediately after rm -f
> /fastboot
>
> 5) after also editing /etc/fstab such that /var is configured readonly
> on boot, I started seeing crashes. It seems if / is readonly but /var
> isn't, nothing bad happens. on resflash images there is no separate
> /var partition, but / is mounted readonly, so I suppose it would
> trigger this.
>
> The crash still triggers if /etc and /dev are NOT relocated to mfs.
>
> --
> Jarkko Oranen <[email protected]>
>
> On Sun, 2018-09-30 at 08:10 -0600, Theo de Raadt wrote:
> > But crashing isn't a desired outcome either
> >
> > you have missed the point.
> >
> >
> > Brian Conway <[email protected]> wrote:
> >
> > > Per the README of the project in question: "Resflash is not a
> > > supported OpenBSD configuration. Please do not email misc@ asking
> > > for
> > > help. If you have a question or a bug to report, please post to the
> > > mailing list, submit an issue on GitLab, or email me directly."
> > >
> > > Please reproduce the issue with a standard OpenBSD installation.
> > > Like
> > > this report:
> > > https://marc.info/?l=openbsd-bugs&m=153523500410594&w=2
> > >
> > > Brian Conway
> > >
> > > On Sun, Sep 30, 2018 at 2:30 AM, Jarkko Oranen <[email protected]>
> > > wrote:
> > > > On Sat, 2018-09-29 at 14:21 -0600, Bob Beck wrote:
> > > > > Please give me some details of your setup to reproduce this.
> > > > > (since I
> > > > > don't use "resflash")
> > > >
> > > > What do you need?
> --
> Jarkko Oranen <[email protected]>
>

Reply via email to