Dear Maintainer,
just tried to have a look at the part where steal-ctty is crashing.

It looks like it may get called from [1].

    81  # Run the startup scripts once, using the preferred console
    82  cons=$(cat /var/run/console-preferred)
    83  # Some other session may have that console as ctty. Steal it from them
    84  /sbin/steal-ctty $cons "$@"

Due to the low memory situation there is no /var directory at all
and therefore the cons variable might have no content.

Therefore steal-ctty is called with just one parameter while
it unconditionally tries to execute the second command line parameter [2].

    35          if (-1 == execvp(argv[2], &argv[2])) {

As a "side effect" the now saved script to be executed in argv[1] gets
not executed, but that might fail anyway later in this case.

Maybe that situation could be detected when the initramfs was not
unpacked successfully, but has enough unpacked to attempt starting
the installer.

    [    0.564101] Unpacking initramfs...
    [    0.634972] Initramfs unpacking failed: write error

Also this might not be limited to xen install images.
I could reproduce this with debian-10.0.0-amd64-netinst.iso
inside a VM with just 300MB memory assigned.

Kind regards,
Bernhard


[1] 
https://salsa.debian.org/installer-team/rootskel/blob/master/src/sbin/reopen-console-linux#L82
[2] 
https://salsa.debian.org/installer-team/rootskel/blob/master/src/sbin/steal-ctty.c#L35

Reply via email to