<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>16047</bug_id>
          
          <creation_ts>2025-10-30 00:21:46 +0000</creation_ts>
          <short_desc>segment fault when readline 8.3 and connmanctl</short_desc>
          <delta_ts>2026-04-15 20:14:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>connectivity</component>
          <version>5.99</version>
          <rep_platform>ARM</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>5.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="João Henrique">joaohf</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>paul</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>tim.orling</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103143</commentid>
    <comment_count>0</comment_count>
    <who name="João Henrique">joaohf</who>
    <bug_when>2025-10-30 00:21:46 +0000</bug_when>
    <thetext>Hi,

With latest openembedded-core (2c134301b55892ecf3c0ae9fa4912bc827579ece) and meta-openembedded (7e9941ab0f69576542cbfeb6576750c878bdd6ca)
I&apos;m facing an issue related to readline 8.3.

My test machine is raspberrypi0-wifi and I also have reproduced the same issue using qemuarm64 machine.

I know that iwctl is not part of openembedded-core. However connmanctl is and according to below traces looks like the issue affects both programs.

```
root@raspberrypi0-wifi:~# iwctl 
Waiting for IWD to start...Segmentation fault         (core dumped) iwctl
root@raspberrypi0-wifi:~# connmanctl 
connmanctl&gt; Segmentation fault         (core dumped) connmanctl
```

Traces with gdb:

```
root@raspberrypi0-wifi:~# gdb /usr/bin/iwctl 
GNU gdb (GDB) 16.3
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type &quot;show copying&quot; and &quot;show warranty&quot; for details.
This GDB was configured as &quot;arm-poky-linux-gnueabi&quot;.
Type &quot;show configuration&quot; for configuration details.
For bug reporting instructions, please see:
&lt;https://www.gnu.org/software/gdb/bugs/&gt;.
Find the GDB manual and other documentation resources online at:
    &lt;http://www.gnu.org/software/gdb/documentation/&gt;.

For help, type &quot;help&quot;.
Type &quot;apropos word&quot; to search for commands related to &quot;word&quot;...
Reading symbols from /usr/bin/iwctl...
Reading symbols from /usr/bin/.debug/iwctl...
(gdb) run
Starting program: /usr/bin/iwctl 
[Thread debugging using libthread_db enabled]
Using host libthread_db library &quot;/usr/lib/libthread_db.so.1&quot;.
Waiting for IWD to start...
Program received signal SIGSEGV, Segmentation fault.
0xb6faed24 in update_line (old=0x440c28 &quot;Waiting for IWD to start...&quot;, old_face=0x72 &lt;error: Cannot access memory at address 0x72&gt;, new=0x8f &lt;error: Cannot access memory at address 0x8f&gt;, new_face=0x44f838 &quot;&quot;, 
    current_line=current_line@entry=0, omax=27, nmax=0, inv_botlin=inv_botlin@entry=0) at ../../sources/readline-8.3/display.c:1794
warning: 1794   ../../sources/readline-8.3/display.c: No such file or directory
(gdb) bt
#0  0xb6faed24 in update_line (old=0x440c28 &quot;Waiting for IWD to start...&quot;, old_face=0x72 &lt;error: Cannot access memory at address 0x72&gt;, new=0x8f &lt;error: Cannot access memory at address 0x8f&gt;, new_face=0x44f838 &quot;&quot;, 
    current_line=current_line@entry=0, omax=27, nmax=0, inv_botlin=inv_botlin@entry=0) at ../../sources/readline-8.3/display.c:1794
#1  0xb6fb23fc in rl_redisplay () at ../../sources/readline-8.3/display.c:1368
#2  0x0040b224 in display_enable_cmd_prompt () at ../sources/iwd-3.10/client/display.c:802
#3  0x00408ab4 in get_managed_objects_callback (message=warning: could not convert &apos;l_dbus_message&apos; from the host encoding (ANSI_X3.4-1968) to UTF-32.
This normally should not happen, please file a bug report.
0x455a30, user_data=&lt;optimized out&gt;) at ../sources/iwd-3.10/client/dbus-proxy.c:777
#4  0x0041affc in handle_method_return (dbus=dbus@entry=0x441030, message=message@entry=0x455a30) at ../sources/iwd-3.10/ell/dbus.c:204
#5  0x0041b5e8 in message_read_handler (io=&lt;optimized out&gt;, user_data=0x441030) at ../sources/iwd-3.10/ell/dbus.c:264
#6  0x00418394 in io_callback (fd=&lt;optimized out&gt;, events=1, user_data=0x440760) at ../sources/iwd-3.10/ell/io.c:105
#7  0x0041746c in l_main_iterate (timeout=&lt;optimized out&gt;) at ../sources/iwd-3.10/ell/main.c:461
#8  0x00417570 in l_main_run () at ../sources/iwd-3.10/ell/main.c:508
#9  l_main_run () at ../sources/iwd-3.10/ell/main.c:490
#10 0x004177f8 in l_main_run_with_signal (callback=0x403750 &lt;signal_handler&gt;, user_data=user_data@entry=0x0) at ../sources/iwd-3.10/ell/main.c:630
#11 0x00403540 in main (argc=1, argv=0xbefffde4) at ../sources/iwd-3.10/client/main.c:70
```

```
root@raspberrypi0-wifi:~# gdb /usr/bin/connmanctl 
GNU gdb (GDB) 16.3
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type &quot;show copying&quot; and &quot;show warranty&quot; for details.
This GDB was configured as &quot;arm-poky-linux-gnueabi&quot;.
Type &quot;show configuration&quot; for configuration details.
For bug reporting instructions, please see:
&lt;https://www.gnu.org/software/gdb/bugs/&gt;.
Find the GDB manual and other documentation resources online at:
    &lt;http://www.gnu.org/software/gdb/documentation/&gt;.

For help, type &quot;help&quot;.
Type &quot;apropos word&quot; to search for commands related to &quot;word&quot;...
Reading symbols from /usr/bin/connmanctl...
Reading symbols from /usr/bin/.debug/connmanctl...
(gdb) run
Starting program: /usr/bin/connmanctl 
[Thread debugging using libthread_db enabled]
Using host libthread_db library &quot;/usr/lib/libthread_db.so.1&quot;.
connmanctl&gt; 
Program received signal SIGSEGV, Segmentation fault.
0xb6e30d24 in update_line (old=0x43a2a0 &quot;connmanctl&gt; &quot;, old_face=0x41d78c &quot;\b\340A&quot;, new=0xb6fd0670 &lt;array_types_only_reader_class&gt; &quot;\320\251\374\266\a&quot;, new_face=0x42b690 &quot;&quot;, current_line=current_line@entry=0, omax=12, 
    nmax=0, inv_botlin=inv_botlin@entry=0) at ../../sources/readline-8.3/display.c:1794
warning: 1794   ../../sources/readline-8.3/display.c: No such file or directory
(gdb) bt
#0  0xb6e30d24 in update_line (old=0x43a2a0 &quot;connmanctl&gt; &quot;, old_face=0x41d78c &quot;\b\340A&quot;, new=0xb6fd0670 &lt;array_types_only_reader_class&gt; &quot;\320\251\374\266\a&quot;, new_face=0x42b690 &quot;&quot;, current_line=current_line@entry=0, 
    omax=12, nmax=0, inv_botlin=inv_botlin@entry=0) at ../../sources/readline-8.3/display.c:1794
#1  0xb6e343fc in rl_redisplay () at ../../sources/readline-8.3/display.c:1368
#2  0x0040baa0 in __connmanctl_save_rl () at ../sources/connman-1.45/client/input.c:66
#3  0x00403678 in dbus_method_reply (call=warning: could not convert &apos;DBusPendingCall&apos; from the host encoding (ANSI_X3.4-1968) to UTF-32.
This normally should not happen, please file a bug report.
0x41b0c8, user_data=0x41c6e8) at ../sources/connman-1.45/client/dbus_helpers.c:180
#4  0xb6fa02a4 in complete_pending_call_and_unlock (connection=0x41acc8, pending=0x41b0c8, message=&lt;optimized out&gt;) at ../sources/dbus-1.16.2/dbus/dbus-connection.c:2346
#5  dbus_connection_dispatch (connection=0x41acc8) at ../sources/dbus-1.16.2/dbus/dbus-connection.c:4668
#6  dbus_connection_dispatch (connection=connection@entry=0x41acc8) at ../sources/dbus-1.16.2/dbus/dbus-connection.c:4591
#7  0x0040e754 in message_dispatch (data=0x41acc8) at ../sources/connman-1.45/gdbus/mainloop.c:72
#8  0xb6eabf6c in g_main_dispatch (context=context@entry=0x41c7e0) at ../sources/glib-2.86.0/glib/gmain.c:3565
#9  0xb6eb06a4 in g_main_context_dispatch_unlocked (context=0x41c7e0) at ../sources/glib-2.86.0/glib/gmain.c:4425
#10 g_main_context_iterate_unlocked (context=0x41c7e0, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at ../sources/glib-2.86.0/glib/gmain.c:4490
#11 0xb6eb1234 in g_main_loop_run (loop=0x420d90) at ../sources/glib-2.86.0/glib/gmain.c:4695
#12 0x0040be4c in __connmanctl_input_init (argc=1, argv=0xbefffdd4) at ../sources/connman-1.45/client/input.c:266
#13 0xb6cba730 in __libc_start_call_main (main=0xb6cba730 &lt;__libc_start_call_main+104&gt;, main@entry=0x403408 &lt;main&gt;, argc=-1226842552, argc@entry=1, argv=0x403408 &lt;main&gt;, argv@entry=0xbefffdd4)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#14 0xb6cba810 in __libc_start_main_impl (main=&lt;optimized out&gt;, argc=1, argv=0xbefffdd4, init=&lt;optimized out&gt;, fini=0x0, rtld_fini=0xb6fdbad4 &lt;_dl_fini&gt;, stack_end=0xbefffdd4) at libc-start.c:360
#15 0x00403444 in _start () at ../sysdeps/arm/start.S:105
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
```

connmanctl and iwctl uses readline, so I suspect that readline 8.3 is not ok.


When reverting the following commits:

Revert &quot;readline: backport a patch to fix issue that readline can&apos;t work with samba&quot;
    
    This reverts commit e2478467b45ed2a80c32a7ee0a673555a3c98bf5.

Revert &quot;readline: 8.2.13 -&gt; 8.3&quot;
    
    This reverts commit 3e76f0f19c763ccf265ba9a5efe16fa9095ec76b.

I don&apos;t see the issue anymore.


It has to be related to readline lib but I could not identify what is.

Any thoughts ?

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103152</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2025-10-30 14:56:08 +0000</bug_when>
    <thetext>Reverting readline may swap one set of problems for another set of problems. It was upgraded to 8.3 in July, so it has been in testing for quite a while.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103153</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Barker">paul</who>
    <bug_when>2025-10-30 14:59:22 +0000</bug_when>
    <thetext>Looks like https://gitlab.archlinux.org/archlinux/packaging/packages/readline/-/issues/1. The solution may be applying https://lore.kernel.org/connman/20251018212411.181909-1-jsbronder@cold-front.org/ to connman.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103157</commentid>
    <comment_count>3</comment_count>
    <who name="João Henrique">joaohf</who>
    <bug_when>2025-10-30 15:37:57 +0000</bug_when>
    <thetext>Sure, reverting is not an option.

Maybe applying this patch https://cgit.git.savannah.gnu.org/cgit/readline.git/commit/display.c?h=devel&amp;id=488d7edc22894d30b6de7f2d4190bf7403f63ffd to readline. I&apos;ll give a try.


Looks almost this one: https://lists.gnu.org/archive/html/bug-readline/2025-07/txtmA7rksnmmi.txt from https://lists.gnu.org/archive/html/bug-readline/2025-07/msg00007.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103158</commentid>
    <comment_count>4</comment_count>
    <who name="João Henrique">joaohf</who>
    <bug_when>2025-10-30 20:04:51 +0000</bug_when>
    <thetext>Hi,

A feasible and working fix is here: https://patchwork.yoctoproject.org/project/oe-core/patch/20251030193525.866305-1-joaohf@gmail.com/

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105093</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-04-15 20:14:27 +0000</bug_when>
    <thetext>Fixed by: 
   https://git.openembedded.org/openembedded-core/commit/?id=8ce0359c4eade11b445bc227c42f7f1212a2d9c3

Thanks João !</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>