All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Bug 15456] New: No more login on Raspberry Pi 3 since 2023.02
@ 2023-03-19  9:28 bugzilla
  2023-03-19 11:22 ` [Buildroot] [Bug 15456] " bugzilla
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: bugzilla @ 2023-03-19  9:28 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=15456

            Bug ID: 15456
           Summary: No more login on Raspberry Pi 3 since 2023.02
           Product: buildroot
           Version: 2023.02
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: unassigned@buildroot.uclibc.org
          Reporter: freemp@freenet.de
                CC: buildroot@uclibc.org
  Target Milestone: ---

Created attachment 9541
  --> https://bugs.busybox.net/attachment.cgi?id=9541&action=edit
Console output

I was building raspberrypi4_defconfig with systemd as init system and bash as
shell. Here's the config diff:

$ git diff
diff --git a/configs/raspberrypi3_defconfig b/configs/raspberrypi3_defconfig
index 0a59ab42a9..2940ee52fb 100644
--- a/configs/raspberrypi3_defconfig
+++ b/configs/raspberrypi3_defconfig
@@ -1,39 +1,31 @@
 BR2_arm=y
 BR2_cortex_a53=y
 BR2_ARM_FPU_NEON_VFPV4=y
-
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
 BR2_TOOLCHAIN_BUILDROOT_CXX=y
-
+BR2_DL_DIR="$(TOPDIR)/../buildroot_dl"
+BR2_CCACHE=y
+BR2_INIT_SYSTEMD=y
+BR2_SYSTEM_BIN_SH_BASH=y
 BR2_SYSTEM_DHCP="eth0"
-
-# Linux headers same as kernel, a 5.10 series
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
-
+BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
 BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call
github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
 BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
-
-# Build the DTB from the kernel sources
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b bcm2710-rpi-3-b-plus
bcm2710-rpi-cm3"
-
 BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
-
 BR2_PACKAGE_RPI_FIRMWARE=y
 BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN=y
 BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI=y
 BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE="board/raspberrypi3/config_3.txt"
-
-# Required tools to create the SD image
-BR2_PACKAGE_HOST_DOSFSTOOLS=y
-BR2_PACKAGE_HOST_GENIMAGE=y
-BR2_PACKAGE_HOST_MTOOLS=y
-
-# Filesystem / image
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
 # BR2_TARGET_ROOTFS_TAR is not set
-BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y


The resulting system image does not allow to login (entire console log
attached):

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.92-v7 (*******)
(arm-buildroot-linux-gnueabihf-gcc.br_real (Buildroot 2023.02) 11.3.0, GNU ld
(GNU Binutils) 2.38) #1 SMP Sun Mar 19 09:32:14 CET 2023
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Rev 1.2
[    0.000000] random: fast init done
[    0.000000] Memory policy: Data cache writealloc
...
[  OK  ] Started D-Bus System Message Bus.
[   11.490042] random: dbus-daemon: uninitialized urandom read (12 bytes read)
[  OK  ] Started Serial Getty on ttyAMA0.
[  OK  ] Reached target Login Prompts.
[   11.591252] random: dbus-daemon: uninitialized urandom read (12 bytes read)
[  OK  ] Started Network Configuration.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Network.
[   12.040785] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl
0x50

Welcome to Buildroot
buildroot login: root
[   16.761152] random: crng init done
[   16.826639] audit: type=1701 audit(1671560156.029:7): auid=4294967295 uid=0
gid=0 ses=4294967295 pid=189 comm="bash" exe="/usr/bin/bash" sig=11 res=1

Welcome to Buildroot
buildroot login:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [Bug 15456] No more login on Raspberry Pi 3 since 2023.02
  2023-03-19  9:28 [Buildroot] [Bug 15456] New: No more login on Raspberry Pi 3 since 2023.02 bugzilla
@ 2023-03-19 11:22 ` bugzilla
  2023-03-19 13:50 ` bugzilla
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla @ 2023-03-19 11:22 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=15456

--- Comment #1 from Peter Seiderer <ps.report@gmx.net> ---
> [   16.826639] audit: type=1701 audit(1671560156.029:7): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=189 comm="bash" exe="/usr/bin/bash" sig=11 res=1

Disable 'BR2_SYSTEM_BIN_SH_BASH=y' in your configuration (make menuconfig and
change 'System configuration' --> '/bin/sh' from 'bash' back to 'busybox
default shell') and try to debug/fix the bash 'Segmentation fault' error
separately...

Your mention 'raspberrypi4_defconfig' but the diff is from
'raspberrypi3_defconfig'..., did you test both?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [Bug 15456] No more login on Raspberry Pi 3 since 2023.02
  2023-03-19  9:28 [Buildroot] [Bug 15456] New: No more login on Raspberry Pi 3 since 2023.02 bugzilla
  2023-03-19 11:22 ` [Buildroot] [Bug 15456] " bugzilla
@ 2023-03-19 13:50 ` bugzilla
  2023-03-19 20:36 ` bugzilla
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla @ 2023-03-19 13:50 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=15456

--- Comment #2 from freemp@freenet.de ---
(In reply to Peter Seiderer from comment #1)
> Your mention 'raspberrypi4_defconfig' but the diff is from 'raspberrypi3_defconfig'..., did you test both?

No, this is just a typo. I was building for Raspi 3 only.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [Bug 15456] No more login on Raspberry Pi 3 since 2023.02
  2023-03-19  9:28 [Buildroot] [Bug 15456] New: No more login on Raspberry Pi 3 since 2023.02 bugzilla
  2023-03-19 11:22 ` [Buildroot] [Bug 15456] " bugzilla
  2023-03-19 13:50 ` bugzilla
@ 2023-03-19 20:36 ` bugzilla
  2023-03-21 19:25 ` bugzilla
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla @ 2023-03-19 20:36 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=15456

--- Comment #3 from Peter Seiderer <ps.report@gmx.net> ---
Tested on raspberrypi_4, bash crashes with:

    $ ./host/bin/arm-buildroot-linux-gnueabihf-gdb build/bash-5.2.15/bash
core.199
    Core was generated by `bash'.
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0  0xb6d74b5c in ?? ()
    (gdb) set sysroot ./staging
    Reading symbols from ./staging/lib/libreadline.so.8...
    Reading symbols from ./staging/lib/libhistory.so.8...
    Reading symbols from ./staging/lib/libncurses.so.6...
    Reading symbols from ./staging/lib/libc.so.6...
    Reading symbols from ./staging/lib/ld-linux-armhf.so.3...
    (gdb) where
    #0  0xb6d74b5c in kill () at ../sysdeps/unix/syscall-template.S:120
    #1  0x004d4f0c in kill_shell (sig=sig@entry=11) at sig.c:643
    #2  0x004d5110 in termsig_handler (sig=11) at sig.c:624
    #3  termsig_handler (sig=11) at sig.c:575
    #4  0x004d5248 in termsig_sighandler (sig=<optimized out>) at sig.c:558
    #5  <signal handler called>
    #6  strlen () at ../sysdeps/arm/strlen.S:32
    #7  0xb6f2fb20 in _rl_init_locale () at ../nls.c:150
    #8  0xb6f2fba0 in _rl_init_eightbit () at ../nls.c:227
    #9  0xb6f10f54 in readline_initialize_everything () at ../readline.c:1292
    #10 rl_initialize () at ../readline.c:1183
    #11 0x004e439c in initialize_readline () at bashline.c:522
    #12 0x0048e63c in yy_readline_get ()
        at /usr/local/src/chet/src/bash/src/parse.y:1514
    #13 0x00491190 in shell_getc (
        remove_quoted_newline=remove_quoted_newline@entry=1)
        at /usr/local/src/chet/src/bash/src/parse.y:2393
    #14 0x00493410 in read_token (command=0)
        at /usr/local/src/chet/src/bash/src/parse.y:3404
    #15 read_token (command=0) at /usr/local/src/chet/src/bash/src/parse.y:3355
    #16 0x00496a64 in yylex () at /usr/local/src/chet/src/bash/src/parse.y:2892
    #17 yyparse () at y.tab.c:1854
    #18 0x0048da38 in parse_command () at eval.c:348
    #19 0x0048db88 in read_command () at eval.c:392
    #20 0x0048dd10 in reader_loop () at eval.c:139
    #21 0x0048c7e8 in main (argc=5489868, argv=0x0, env=<optimized out>)
        at shell.c:833

But e.g. 'LANG=C bash' runs fine...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [Bug 15456] No more login on Raspberry Pi 3 since 2023.02
  2023-03-19  9:28 [Buildroot] [Bug 15456] New: No more login on Raspberry Pi 3 since 2023.02 bugzilla
                   ` (2 preceding siblings ...)
  2023-03-19 20:36 ` bugzilla
@ 2023-03-21 19:25 ` bugzilla
  2023-03-22 15:44 ` bugzilla
  2023-03-24 16:32 ` bugzilla
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla @ 2023-03-21 19:25 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=15456

--- Comment #4 from Peter Seiderer <ps.report@gmx.net> ---
The systemd default locale is 'C.UTF-8' (since 252, see [1] and
/etc/locale.conf  on the board):

    $ echo $LANG
    C.UTF-8

From build/readline-8.2/nls.c:

    126 char *
    127 _rl_init_locale (void)
    128 {
    129   char *ret, *lspec;
    130
    131   /* Set the LC_CTYPE locale category from environment variables. */
    132   lspec = _rl_get_locale_var ("LC_CTYPE");
    133   /* Since _rl_get_locale_var queries the right environment variables,
    134      we query the current locale settings with setlocale(), and, if
    135      that doesn't return anything, we set lspec to the empty string to
    136      force the subsequent call to setlocale() to define the `native'
    137      environment. */
    138 #if defined (HAVE_SETLOCALE)
    139   if (lspec == 0 || *lspec == 0)
    140     lspec = setlocale (LC_CTYPE, (char *)NULL);
    141   if (lspec == 0)
    142     lspec = "";
    143   ret = setlocale (LC_CTYPE, lspec);    /* ok, since it does not change
locale */
    144 #else
    145   ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
    146 #endif
    147
    148   _rl_utf8locale = (ret && *ret) ? utf8locale (ret) : 0;
    149
    150   _rl_current_locale = savestring (ret);
    151   return ret;
    152 }

The call to '_rl_get_locale_var()' returns 'C.UTF-8' (line 132) but the
call to 'setlocale(LC_CTYPE, 'C.UTF-8')' returns 0 (line 143) which
leads to the segmentation fault in the call to 'savestring(0)' (line 150).

Setting the following in the buildroot config file fixes the problem for me:

    BR2_ENABLE_LOCALE_WHITELIST="C"
    BR2_GENERATE_LOCALE="C"

[1] https://github.com/systemd/systemd/blob/main/NEWS

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [Bug 15456] No more login on Raspberry Pi 3 since 2023.02
  2023-03-19  9:28 [Buildroot] [Bug 15456] New: No more login on Raspberry Pi 3 since 2023.02 bugzilla
                   ` (3 preceding siblings ...)
  2023-03-21 19:25 ` bugzilla
@ 2023-03-22 15:44 ` bugzilla
  2023-03-24 16:32 ` bugzilla
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla @ 2023-03-22 15:44 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=15456

--- Comment #5 from Peter Seiderer <ps.report@gmx.net> ---
Upstream bug/patch at [1].

[1] https://lists.gnu.org/archive/html/bug-readline/2022-10/msg00002.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [Bug 15456] No more login on Raspberry Pi 3 since 2023.02
  2023-03-19  9:28 [Buildroot] [Bug 15456] New: No more login on Raspberry Pi 3 since 2023.02 bugzilla
                   ` (4 preceding siblings ...)
  2023-03-22 15:44 ` bugzilla
@ 2023-03-24 16:32 ` bugzilla
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla @ 2023-03-24 16:32 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=15456

--- Comment #6 from freemp@freenet.de ---
Works for me too.

So, BR2_GENERATE_LOCALE="C" should be set in case BR2_PACKAGE_BASH is selected.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-24 16:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-19  9:28 [Buildroot] [Bug 15456] New: No more login on Raspberry Pi 3 since 2023.02 bugzilla
2023-03-19 11:22 ` [Buildroot] [Bug 15456] " bugzilla
2023-03-19 13:50 ` bugzilla
2023-03-19 20:36 ` bugzilla
2023-03-21 19:25 ` bugzilla
2023-03-22 15:44 ` bugzilla
2023-03-24 16:32 ` bugzilla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.