• Need maintainer guide for debugging on i386

    From Bastien Roucaries@21:1/5 to Debian Debian Developers on Mon Apr 21 13:12:07 2025
    Hi,

    Now we could not install on i386, we need a wiki page for how to debug quickly on i386

    Using chroot is an option but in this case I could not get coredump that go to systemd-coredump wrapper that is blocked on simple chroot.

    The previous option to install a kvm machine was now not applicable, so a documented guidance on the wiki will be welcome.

    Docker/podman with workable coredump inside container is welcome.

    Bastien
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEXQGHuUCiRbrXsPVqADoaLapBCF8FAmgGKAcACgkQADoaLapB CF9uJQ/9GWb6WZI6/MUn32G/9JLs7SLJ4rpCI/SiOY3j6wwzoAGPJMqkLJ+uYjNe 7Vp6U6b6Yi5cmNjNxnlGo1GZoolCnU9zCq/hJ+xc/t77F6wq9XIvi91x4Bj4Xv/r Zc0DorDXMN9wl/etqCu/89bdEj9EgMtnL0H/EWHa99m9f5RTU+0gMH/grkWvTVRF ZD5UcsSIKrJrfPOOEsbkt1d8KwtnVmXW9FsGlkyAsotvDrwKUMEzcQaiPZ3mUvqF oelehi3gmdh/3vXqIWL3neE6+/nUrO6yL5f2FDn7y4ujvP+zEJ2Xa0tWHguLhxT1 JEMdDsO3Qic+tuG/NidueC2ATlhxpI/gNq59QBu6QD7eP549mpOuvmJVS9RVO/1V B0FyWYyEIJJ6mC+J9GS11exi8oMGqWweIcqmkodqpJhlY2SppqpBqvURubu/Xb+T a5BefiFVHJxbe/ufYcxMGOjujlm3Irm4RG8phJ0FYHEz3ENQzcqXUWjjoRc7+GIE ojC+ZVzlTGAPAzCZKdg3gWvRbKsz/BOd3VMLXMc73nbIpwfxbOvwFB3AnndBrE7m DGGyuBblZef+yQqTNQfa/4W2StOWnc77DGbUiw/zF4Uayt4bT+fFeWJgv6bsblIl eeMNACDX2CyYviNyHFsTsWr1swp8UKytTFR3hYIVK/o8robDnig=
    =NIlI
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mathias Gibbens@21:1/5 to Bastien Roucaries on Thu May 1 14:30:01 2025
    On Mon, 2025-04-21 at 13:12 +0200, Bastien Roucaries wrote:
    Now we could not install on i386, we need a wiki page for how to
    debug quickly on i386

    It's easy to setup an i386 container with Incus, which is how I've
    been running 32bit builds/debugging for the past few years. Assuming
    you've already got Incus configured to your liking:

    $ sudo apt install distrobuilder squashfs-tools-ng

    $ sudo distrobuilder build-incus /usr/share/distrobuilder-images/debian.yaml ./trixie.i386/ -o image.release=trixie -o image.architecture=i386
    $ incus image import --alias trixie.i386 ./trixie.i386/incus.tar.xz ./trixie.i386/rootfs.squashfs

    $ incus launch trixie.i386

    Mathias

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEE1Bp60H32xfynSJ8cKe7i1uz0QvkFAmgTaNoACgkQKe7i1uz0 QvmV8BAAkAm7w5FS/g3WuU8Ro9yXUHv8nx97k/NYQgC+CC1GBS47aotSIqkQFBE8 +q7ruVKeplbpSYZnpnaRlB5RlBSRFnhtFJjbhy09fVfC7A5Bp5WXteYub+wKGbrx jLiGzMofwdfPxqu385+TjgQKQc0SeHtbXSlISn1gaEM39+KPi+o1vQ2Z9+gffruo 58DsYyyJOMk54TeYoCM0sZBssbW4ZnWMbeZc7zKMM4hi+fkWzScA3fterNLeQNgy Ll78MkeHcx0jRMDNrBhW4RhQYNzmyplFvQM6y1v9y2Y759N5V0ir9s52s8Q7p4wb LdEiUiri1+Qh3A/Mm8lSBqlXLbCCrKTzZgOe3C+dC/O61JHFaxrKEwnxSVY19OiH hHCvps+JsaLqtOWgD02IEoZbdItqSGzHF/EtvT4cufopONCJIdoe+kq/2FHy8cu6 W1e3SbngDNUBs7BkploWkDirf9A0MJtY4YTbYgwS2A2CnpW41KzEz/RNv8FcISf/ M7Mi2RzXKHZZINgJQNwgGD/Wl6cJrs0A+7V8hnfgsJgK3GIPxpN+riGVblCzSb+S Y2hrpZeIkocvAOHNmWe+0aEqI/SV68jeBlm03G8pAFqzKFxUeCazbblycVPhDgt6 2uHyRSDV9bECJyMrmglAK53jmP2zpMSl8x31ZRFAUf9cMJog0S4=
    =MZcs
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Theodore Ts'o@21:1/5 to Mathias Gibbens on Thu May 1 15:40:01 2025
    On Thu, May 01, 2025 at 12:28:10PM +0000, Mathias Gibbens wrote:
    On Mon, 2025-04-21 at 13:12 +0200, Bastien Roucaries wrote:
    Now we could not install on i386, we need a wiki page for how to
    debug quickly on i386

    It's easy to setup an i386 container with Incus, which is how I've
    been running 32bit builds/debugging for the past few years. Assuming
    you've already got Incus configured to your liking:

    $ sudo apt install distrobuilder squashfs-tools-ng

    $ sudo distrobuilder build-incus /usr/share/distrobuilder-images/debian.yaml ./trixie.i386/ -o image.release=trixie -o image.architecture=i386
    $ incus image import --alias trixie.i386 ./trixie.i386/incus.tar.xz ./trixie.i386/rootfs.squashfs

    $ incus launch trixie.i386

    I just set up a schroot[1]. I have a handy-dandy schroot setup script
    which makes it super easy[2] to create an amd64, i386, and arm64
    (using qemu) build chroots. This was originally created to let random
    graduate students or kernel newbies set up a kernel file system test appliance[3][4], but these days I very often use this for general cross-architecture debian development.

    [1] https://wiki.debian.org/Schroot
    [2] https://github.com/tytso/xfstests-bld/blob/master/setup-buildchroot
    [3] https://thunk.org/gce-xfstests
    [4] https://github.com/tytso/xfstests-bld/blob/master/Documentation/building-xfstests.md

    I will also use sbuild with git-buildpackage when creating
    hermetically built packages for uploading, but that's a lot more
    complicated to set up.

    - Ted

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bastien Roucaries@21:1/5 to All on Thu May 1 17:40:22 2025
    Le jeudi 1 mai 2025, 17:26:34 heure d’été d’Europe centrale Jochen Sprickerhof
    a écrit :
    mmdebstrap --variant=apt --arch=i386 --chrooted-customize-hook=bash unstable /dev/null
    This one does not fully work for core dump....

    Try on the container:
    #include <stdlib.h> // C

    void main(void)
    {
    abort();
    }

    Do not get my core file in container /var/lib/systemd/coredump/ but in host / var/lib/systemd/coredump/

    It should be really documented.

    Bastien



    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEXQGHuUCiRbrXsPVqADoaLapBCF8FAmgTleYACgkQADoaLapB CF9bTw//SETrxE1GHekmXJ2+VVIYOd1VAYmKCzkNPSC+DhExWzfP1WSQMWsxBJwV zMgJB2nLt9Y3GTUJcx60pbmFc/vOCwJ9/zmBdyv0vMBRQrTlZJcQR6kJb9JgSAAl sxGXTjqn/GGDZRnQxFSkYyCMTO+bx/T2ZaJIPhknc6UzIf+VFjYy+VkTiALYT0JT DM2FDyEvd/GhLgpGtivxbOXdVp/c67ZcDnjnNVkviyVd9R3dm8QZC6jcEmGeehe3 9cocjF3WUWfatJ3ejmwaJta2vvM1GI1FW9HQ1OX2vCdEIsqWPTr9ohMW7Q9jRrxx loqJDNsoznLtWXcbF5iFfZvp6v3WyoCtc5k+hYtQCqD9wfWriISSWzzryjjmCGrx nDzZH25iM3g40uGls8mRAiR0P9SHgrkxugAXEbVj3jT/XTx+6KZAxW7+7CqjXzxN TGFp0FXrsF7AlvlSRcfSrHe1JDw6kaJiyfW9POFKdQx+Q1SyGgMiwW12S1qVl3gz mOGS42Ypo7VoRWGGAyn7hbTs6Muk6SkWjcBBO6jiW+Rf6PL+vbFX8Fh0f37GIQ5l kqxDBzk0jRKCSj8AUo9wWj/Jv+HW0EXBAkh/QRgtpxnhXJGQgDP3q3cCVM6FlizU OAx6ud4tJ6xrd4820aLLgSgKq6fUc2Qi0ju3JBvMYt7ic9dZXIE=
    =P+6Q
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jochen Sprickerhof@21:1/5 to All on Thu May 1 17:30:03 2025
    Hi,

    * Theodore Ts'o <tytso@mit.edu> [2025-05-01 09:24]:
    On Thu, May 01, 2025 at 12:28:10PM +0000, Mathias Gibbens wrote:
    On Mon, 2025-04-21 at 13:12 +0200, Bastien Roucaries wrote:
    Now we could not install on i386, we need a wiki page for how to
    debug quickly on i386

    It's easy to setup an i386 container with Incus, which is how I've
    been running 32bit builds/debugging for the past few years. Assuming
    you've already got Incus configured to your liking:

    $ sudo apt install distrobuilder squashfs-tools-ng

    $ sudo distrobuilder build-incus /usr/share/distrobuilder-images/debian.yaml ./trixie.i386/ -o image.release=trixie -o image.architecture=i386
    $ incus image import --alias trixie.i386 ./trixie.i386/incus.tar.xz ./trixie.i386/rootfs.squashfs

    $ incus launch trixie.i386

    I just set up a schroot[1]. I have a handy-dandy schroot setup script
    which makes it super easy[2] to create an amd64, i386, and arm64
    (using qemu) build chroots. This was originally created to let random >graduate students or kernel newbies set up a kernel file system test >appliance[3][4], but these days I very often use this for general >cross-architecture debian development.

    [1] https://wiki.debian.org/Schroot
    [2] https://github.com/tytso/xfstests-bld/blob/master/setup-buildchroot
    [3] https://thunk.org/gce-xfstests
    [4] https://github.com/tytso/xfstests-bld/blob/master/Documentation/building-xfstests.md

    I will also use sbuild with git-buildpackage when creating
    hermetically built packages for uploading, but that's a lot more
    complicated to set up.

    For trixie and bookworm-backports this is will drop you in a shell:

    mmdebstrap --variant=apt --arch=i386 --chrooted-customize-hook=bash unstable /dev/null

    Or if you want to debug a package build anyhow (replace hello by your package):

    sbuild --chroot-mode=unshare --dist=unstable --arch=i386 --starting-build-commands=%s hello

    Cheers Jochen

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEc7KZy9TurdzAF+h6W//cwljmlDMFAmgTkqcACgkQW//cwljm lDM+Tw//cWxOn3PbVIK4fmx08dmIHdtFvlNCYe+5jV2xkEaGt7FZriAm10uGUJ0f S1mF4wU9x3gP7UZgMiqa3JszeubFxNzUrYLtT+mERiFz+rM1oIaHapsPSckHcKEm iQ5vWIQ0Lchdzfg9WoPtWeRsckZNU3ms12HgQpUUEDvyHHyJY+43dIwpyHO8t1NP jES5ZQs1Ah+iBVxZi+EAObd8LoLXg5FQS09Z3++HbD1abIc3Mt40sZQ+CYEbxf3/ DrwwJYO3yuhVTAhQ3bdBUl68WkNoK16Gs3Udm8ijssBtvHegPTne8STWffFOJEut Lv7nkQeb8Q7ExRUCDyQ4WCsAPYdoyfirVbzxij6h1zT5lwR/HkfUQn0o1PlRaEbJ oqIH1p2ZORFaTF9cV4sl+0jLY8ORIeKBbvcEfqgmLYIP7YhzNKjByyuThOrVmIxG 5scxQQyjZlmVEz6w6EhBH9PoHvkF1DYoeqa31zGx9pF7JDNti+TIVmkjlF/zSUmH WQJOvSJY/sllUH1p0Z+LA090lsf0PeSQMS4USFP7oSlQdnbj4E2o+72hflbzysHP 3+rjmRic6KPLx5Fh11tHgYUJ3LA4AkDzxiNzqNcmUDvkvFhcJALqnRC9hCn7jL5Q iVJ7BE0EcgBgE7C95wGj9mdtEdzi2oZtNQM6QZAdSHBWVFDQHNo=
    =KX0R
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Hofstaedtler@21:1/5 to All on Thu May 1 18:10:04 2025
    * Bastien Roucaries <rouca@debian.org> [250501 17:41]:
    Le jeudi 1 mai 2025, 17:26:34 heure d’été d’Europe centrale Jochen Sprickerhof
    a écrit :
    mmdebstrap --variant=apt --arch=i386 --chrooted-customize-hook=bash unstable >> /dev/null
    Do not get my core file in container /var/lib/systemd/coredump/ but in host / >var/lib/systemd/coredump/

    It should be really documented.

    It already is: https://github.com/systemd/systemd/blob/main/docs/COREDUMP.md says:

    | ... taking comprehensive effect on all userspace.

    So yeah, once you install systemd-coredump and use the defaults, the system-wide coredump handler handles core dumps.

    Chris

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jochen Sprickerhof@21:1/5 to All on Thu May 1 18:10:04 2025
    * Bastien Roucaries <rouca@debian.org> [2025-05-01 17:40]:
    Le jeudi 1 mai 2025, 17:26:34 heure d’été d’Europe centrale Jochen Sprickerhof
    a écrit :
    mmdebstrap --variant=apt --arch=i386 --chrooted-customize-hook=bash unstable >> /dev/null
    This one does not fully work for core dump....

    Try on the container:
    #include <stdlib.h> // C

    void main(void)
    {
    abort();
    }

    Do not get my core file in container /var/lib/systemd/coredump/ but in host / >var/lib/systemd/coredump/

    That's a limitation of systemd-coredump or the kernel, depending on how
    you see it. From a quick look the pattern in
    /proc/sys/kernel/core_pattern is not namespaces so mmdebstrap can't
    change it but the kernel supports adding user namespaces to it:

    https://www.kernel.org/doc/html/latest/admin-guide/sysctl/kernel.html#core-pattern

    So systemd-coredump could do that but it would probably need to know the mmdebstrap internals to du so. So I guess disabling systemd-coredump
    would make the most sense.

    Cheers Jochen

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEc7KZy9TurdzAF+h6W//cwljmlDMFAmgTmsUACgkQW//cwljm lDP7dA//fk9Iox+lMFv8huNMJ8zhhJgAsbB+LUWg1a68QG0YI7PhTMZ7Z761ZPVs GpBqtAE2ZsGs+FVjP4BupKM2j5IiJfynOfGFyQiGXeasFGJBceQDqUaVLNLBjJFE F5VNkHYT2pfZZR8pP+aU3O9vq16Anz+E7buiBBbaISJq62m73KItNtRWIWcmGz1v sG4+2oioJqWBN+u6ozxRVIA3lH63vWmTJuXaz0Gc0OfvqRH4X2PL43yfb/if4bDF OuOS6uiZch8Zz/ukz08YlRyQ+V3ZJPlkt9ZI7ErNMuzB2ycsyqLymlDi78xT9SgI 5xrffVgWxruMzQnk3bRbstZMhXN5mlwlHcu4rHK0s51hgSmvJDRiWxjJKhb+VMXa 5UC1b6keSOBweDnNXMXhTBr3USPM9Czyi7Ztmx5HOfNCOL7Njd+uhNvi02hZLWn1 9SgbsaggZ7N9earOpeCNDL4KzehOJaKowSU5sEhDp+kebenRMyPnS8PsUYA4NfFH rFELqz6DYfIYEov6xuQ/fpysXPUYRPFyqEDm1jJlVz1nwIt8xz4vOrU5cDyCBgo1 Tkay9TlIvhdYcrcnat8RF/jdmnYLd9F52ZxZpfsU0K9/VyD9mnG0lFS33tcMfqDx soqwuRgBWG0AQ8am4mxaxxRfIki8I7S3VatbW5uzAhoycDyn+k0=
    =1jfQ
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bastien Roucaries@21:1/5 to Chris Hofstaedtler on Thu May 1 18:09:21 2025
    Copy: debian-devel@lists.debian.org

    Le jeudi 1 mai 2025, 18:00:17 heure d’été d’Europe centrale Chris Hofstaedtler
    a écrit :
    * Bastien Roucaries <rouca@debian.org> [250501 17:41]:
    Le jeudi 1 mai 2025, 17:26:34 heure d’été d’Europe centrale Jochen >Sprickerhof>
    a écrit :
    mmdebstrap --variant=apt --arch=i386 --chrooted-customize-hook=bash
    unstable /dev/null

    Do not get my core file in container /var/lib/systemd/coredump/ but in host >/ var/lib/systemd/coredump/

    It should be really documented.

    It already is: https://github.com/systemd/systemd/blob/main/docs/COREDUMP.md says:
    | ... taking comprehensive effect on all userspace.

    So yeah, once you install systemd-coredump and use the defaults, the system-wide coredump handler handles core dumps.

    And it is installed by default (not really a problem, i am not against systemd), under documented and need for me to pass from the host to the container the coredump in order to get the debug symbols.

    Here it is not really easy and we could do better

    And some simple solution like pbuilder chroot does not work...

    Bastien

    Chris


    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEXQGHuUCiRbrXsPVqADoaLapBCF8FAmgTnLEACgkQADoaLapB CF9htxAAm2f18cmq4ZnkqVxuaGZJEL/q2GzhGRb/k8bzqiDV1zcOpP+ShRO/kbOM tUHMdPx9SIAvQO8pOcSJZSVwGTHqMC6K0SM8McFCC+eX0HBBalggXRYhKS44V6wD Q+E3NIogeyaeuOW+KJw0JpuR/krSUw2AOdD0qXLf0Q+tfTblUDdJz0nRws8sbK5G Et3k4nGccB6Kje003iZdm0kQAbyURFXE4E3eanSNuBZn7oofYIjeosq+ZUTBNU5/ OpdKCxWexqWPd9T9CAib+qIDnkRPWNTZ2bqF2TuUy2J/6hIQWAEExydInU8fSa6s UE+CqRkAxpczJY+Bf8LZAOZJxRmsvMpRHaeK95IpyLOoaUe2TpL+vvmJUExzhMfo f49Ap3Q9f9MMUuGUrOdCmgLYfD83hTy701h1CfkVSFcl6Xup0OsFJZubCTX1DOSD ynroacO8hAtaj4dMOaUd8RbIAhkh159nOcozed3DirvcKy8wH04xW2pHyy/WQmrh cOTiUNliG6EsYZV1SAfyjyurocnTfLq3GaN3xymjZYw4f2tCNZhCwECiGxm1r6r0 zBQ5AUON/3CpSYU6PuaGEhRaDPQNufZ5h0v58ozV5m1CBHs1o4ELyG+wKDRxCn2P pxTUzzggRX8czsd22Qi+t7BQ3fAR++yDub26ChyBQs17gnrjnDs=
    =IpY+
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bastien Roucaries@21:1/5 to All on Thu May 1 18:13:36 2025
    Le jeudi 1 mai 2025, 18:01:13 heure d’été d’Europe centrale Jochen Sprickerhof
    a écrit :
    * Bastien Roucaries <rouca@debian.org> [2025-05-01 17:40]:
    Le jeudi 1 mai 2025, 17:26:34 heure d’été d’Europe centrale Jochen >Sprickerhof>
    a écrit :
    mmdebstrap --variant=apt --arch=i386 --chrooted-customize-hook=bash
    unstable /dev/null

    This one does not fully work for core dump....

    Try on the container:
    #include <stdlib.h> // C

    void main(void)
    {

    abort();

    }

    Do not get my core file in container /var/lib/systemd/coredump/ but in host >/ var/lib/systemd/coredump/

    That's a limitation of systemd-coredump or the kernel, depending on how
    you see it. From a quick look the pattern in
    /proc/sys/kernel/core_pattern is not namespaces so mmdebstrap can't
    change it but the kernel supports adding user namespaces to it:

    https://www.kernel.org/doc/html/latest/admin-guide/sysctl/kernel.html#core-p attern

    So systemd-coredump could do that but it would probably need to know the mmdebstrap internals to du so. So I guess disabling systemd-coredump
    would make the most sense.

    I suppose or pass the dump when you know the mechanism

    I do not ask a perfect solution, but a workable and documented on the wiki solution.

    For me long term, we need to have a user tagged bug chroot-arch problem and solve it in mmbootstrap

    If we want to have partial arch, chroot only arch, we need to document this kind of problem.

    Bastien

    Cheers Jochen


    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEXQGHuUCiRbrXsPVqADoaLapBCF8FAmgTnbAACgkQADoaLapB CF8ByQ/7BXFnu7pKycHAVcI5MgranKZbGjtszqBzO+usns7EYcF6MD1Rs3AY92+5 omud3iEnDpxvh2kdUZNTOsxhhRvTFNnAk4RcgatfzO13UQQV9i4bbsvBvyfXyjrr /Rwm6qaIcuiNo/5/4Fgywb43+mkWET1KqKk2vf4afM8poOVKxQbgV5dScXHollWL 89URB5nCzxWGWwu5gtEIet9Eh6y0i93x66eh52z42GOVn+7vYkDHHv7NaZlyKUhW VYMlR9wxIEn7Ib/yys9prwMs9j5sRsQyhoyrGCsCeB3JCWx0DHvtAvgZznCzNfdB xYNgnGFf6csVuO+/ksNAy1XWxb+dbumgMvSmUQzkT66Ysjw3g60/0EQ943ae7mkm BZs1Rh8F9dNI4Pf4VAG8QT+eU7haip4XGRGLEMiZIBatD6KmoOJEpKf+2B+DjjIP SseGHLFT4zHzaJPVZBUY5i5D2D7LrO16bIeYEbkO9QY0D2mQMvFWcGxJw8JNyt8A B5J9CVCVXqc/M2nzyv68VRC/whTrdp31WVpxiEEE4chjkfU2dXOfuaRCF6kjQcep bauDEfvzVClvhMxzLLtZAr+ljQclJBlwHDfzgTBb+2mTGgD1O2JiXHE/W9/Ncz/x rkVlqXOT/1OS5i/MA5pkfHgaWJ0X0VZg0TNzz4/0PMSKAMjLgrA=
    =P+Ts
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)