Package: mmdebstrap
Version: 1.5.7-1+deb13u1
Severity: minor

Hi josch,

while debugging mmdebstrap, I observed an odd behavior I'd like to 
report separately. I'm not sure it is fixable in a sane way or worth 
fixing at all (as opposed to documenting it maybe). I also reproduce it 
on 1.5.7 (sid).

| $ mmdebstrap --variant=apt sid /dev/null --chrooted-essential-hook=bash
| I: automatically chosen mode: unshare
| I: chroot architecture amd64 is equal to the host's architecture
| I: finding correct signed-by value...
| done
| I: automatically chosen format: null
| I: using /tmp/mmdebstrap.Ti_tmTJfJt as tempdir
| I: running apt-get update...
| done
| I: downloading packages with apt...
| done
| I: extracting archives...
| done
| I: installing essential packages...
| done
| I: running --chrooted-essential-hook in shell: sh -c 'bash'
| root@debian:/#

At this point, I have a shell in the essential hook just as expected. It 
seems to be important to be interactive as I cannot reproduce this with 
say --chrooted-essential-hook=true. I won't do anything here and just 
press ctrl-d.

| root@debian:/# exit
| I: installing remaining packages inside the chroot...
| done
| installing:    0.00 [>                                                        
]
| [1]+  Stopped                 mmdebstrap --variant=apt sid /dev/null 
--chrooted-essential-hook=bash

Somehow mmdebstrap stopped here. If I use --variant=essential instead, I 
cannot reproduce this. Let's try continuing.

| $ fg
| mmdebstrap --variant=apt sid /dev/null --chrooted-essential-hook

This looks very hung. How about ctrl-c?

| ^CI: run_progress() received signal INT: waiting for child...
| I: main() received signal INT: waiting for setup...
| I: main() received signal INT: waiting for setup...
| done
| Reading package lists...
| Building dependency tree...
| The following additional packages will be installed:
|   debian-archive-keyring libapt-pkg7.0 libhogweed6t64 liblz4-1 libnettle8t64
|   libseccomp2 libstdc++6 libxxhash0 sqv
| Suggested packages:
|   apt-doc aptitude | synaptic | wajig dpkg-dev gnupg | gnupg2 | gnupg1
|   powermgmt-base
| Recommended packages:
|   ca-certificates
| The following NEW packages will be installed:
|   apt debian-archive-keyring libapt-pkg7.0 libhogweed6t64 liblz4-1
|   libnettle8t64 libseccomp2 libstdc++6 libxxhash0 sqv
| 0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
| Need to get 5118 kB of archives.
| After this operation, 15.9 MB of additional disk space will be used.
| Get:1 http://deb.debian.org/debian sid/main amd64 libnettle8t64 amd64 
3.10.2-1 [307 kB]
| Get:2 http://deb.debian.org/debian sid/main amd64 libhogweed6t64 amd64 
3.10.2-1 [336 kB]
| Get:3 http://deb.debian.org/debian sid/main amd64 sqv amd64 1.3.0-3 [661 kB]
| Get:4 http://deb.debian.org/debian sid/main amd64 libxxhash0 amd64 0.8.3-2 
[27.1 kB]
| Get:5 http://deb.debian.org/debian sid/main amd64 liblz4-1 amd64 1.10.0-6 
[70.5 kB]
| Get:6 http://deb.debian.org/debian sid/main amd64 libstdc++6 amd64 15.2.0-8 
[736 kB]
| Get:7 http://deb.debian.org/debian sid/main amd64 libapt-pkg7.0 amd64 3.1.12 
[1229 kB]
| Get:8 http://deb.debian.org/debian sid/main amd64 debian-archive-keyring all 
2025.1 [179 kB]
| Get:9 http://deb.debian.org/debian sid/main amd64 libseccomp2 amd64 2.6.0-2 
[51.7 kB]
| Get:10 http://deb.debian.org/debian sid/main amd64 apt amd64 3.1.12 [1520 kB]
| Fetched 5118 kB in 0s (163 MB/s)
| Chrooting into /tmp/mmdebstrap.Ti_tmTJfJt/
| E: Sub-process env exited unexpectedly
| W: Operation was interrupted before it could finish
| E: setup failed: E: apt-get -o Dir::Bin::dpkg=env -o 
DPkg::Options::=--unset=TMPDIR -o DPkg::Options::=dpkg --yes install 
-oAPT::Status-Fd=<$fd> -oDpkg::Use-Pty=false apt failed: process exited with 
100 and error in console output
| W: hooklistener errored out: E: received eof on socket
| 
| I: main() received signal PIPE: waiting for setup...
| I: removing tempdir /tmp/mmdebstrap.Ti_tmTJfJt...
| E: mmdebstrap failed to run

Given the signal, the behavior feels ok-ish. I'm more wondering about 
why it stops in the first place.

I am aware that --chrooted hooks are undocumented. You may also 
reproduce this via --essential-hook="sh -c bash".

I hope that I don't nerd snipe you now. This is not important and not 
blocking my work. Maybe just leaving it in the bug tracker to document 
it as known-problem is good enough. I haven't dug any deeper to avoid 
leveling up the yak I'm shaving.

Helmut

Reply via email to