Bug 1945413

Summary: systemd-resolved malloc(): unaligned fastbin chunk detected
Product: [Fedora] Fedora Reporter: Jack <xxjack12xx>
Component: systemdAssignee: systemd-maint
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 33CC: fedoraproject, filbranden, flepied, kasong, lnykryn, msekleta, rhbugs, ssahani, s, systemd-maint, xxjack12xx, yuwatana, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-30 18:43:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jack 2021-03-31 20:13:37 UTC
After upgrading to systemd-libs-246.13-1.fc33.x86_64 to fix https://bugzilla.redhat.com/show_bug.cgi?id=1930415 , I'm now getting the following:

systemd-resolved[655]: malloc_consolidate(): unaligned fastbin chunk detected

and

Mar 30 14:32:51 systemd-resolved[207182]: malloc(): unaligned fastbin chunk detected 3
Mar 30 14:32:51 systemd[1]: systemd-resolved.service: Main process exited, code=killed, status=6/ABRT
Mar 30 14:32:51 systemd[1]: systemd-resolved.service: Failed with result 'signal'.
Mar 30 14:32:51 systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 2.
Mar 30 14:32:51 systemd[1]: Stopped Network Name Resolution.
Mar 30 14:32:51 systemd[1]: Starting Network Name Resolution...
Mar 30 14:32:51 systemd-resolved[207227]: Positive Trust Anchors:
Mar 30 14:32:51 systemd-resolved[207227]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
Mar 30 14:32:51 systemd-resolved[207227]: Negative trust anchors: 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr.arpa 22.172.in-addr.arpa 23.172.in-addr.arpa 24.172.in-addr.arpa 25.172.in-addr.arpa 26.172.in-addr.arpa 27.172.in-addr.arpa 28.172.in-addr.arpa 29.172.in-addr.arpa 30.172.in-addr.arpa 31.172.in-addr.arpa 168.192.in-addr.arpa d.f.ip6.arpa corp home internal intranet lan local private test
Mar 30 14:32:51 systemd-resolved[207227]: Using system hostname 'redacted'.
Mar 30 14:32:51 systemd[1]: Started Network Name Resolution.
Mar 30 14:32:53 kernel: traps: systemd-resolve[207227] general protection fault ip:7f1c974f82d7 sp:7ffc0947b9a0 error:0 in libsystemd-shared-246.so[7f1c97424000+1a8000]
Mar 30 14:32:53 systemd[1]: systemd-resolved.service: Main process exited, code=killed, status=11/SEGV
Mar 30 14:32:53 systemd[1]: systemd-resolved.service: Failed with result 'signal'.
Mar 30 14:32:53 systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 3.
Mar 30 14:32:53 systemd[1]: Stopped Network Name Resolution.
Mar 30 14:32:53 systemd[1]: Starting Network Name Resolution...

systemd-resolved infinitely crashes on start and I'm unable to get a coredump.

If I set Cache=no in /etc/systemd/resolved.conf, systemd-resolved does not crash.

Comment 1 Jack 2021-04-06 18:28:30 UTC
 coredumpctl info
           PID: 845063 (systemd-resolve)
           UID: 193 (systemd-resolve)
           GID: 193 (systemd-resolve)
        Signal: 6 (ABRT)
     Timestamp: Tue 2021-04-06 10:29:07 EDT (3h 58min ago)
  Command Line: /usr/lib/systemd/systemd-resolved
    Executable: /usr/lib/systemd/systemd-resolved
 Control Group: /system.slice/systemd-resolved.service
          Unit: systemd-resolved.service
         Slice: system.slice
       Boot ID: 3fd60428ee014da1b849b0e3da45399b
    Machine ID: 6b8b8ddf689c480784028977a3089b47
      Hostname: dev-jlow1.internetbrands.com
       Storage: /var/lib/systemd/coredump/core.systemd-resolve.193.3fd60428ee014da1b849b0e3da45399b.845063.1617719347000000.zst
       Message: Process 845063 (systemd-resolve) of user 193 dumped core.

                Stack trace of thread 845063:
                #0  0x00007fc3bc4739d5 __GI_raise (libc.so.6 + 0x3d9d5)
                #1  0x00007fc3bc45c8a4 __GI_abort (libc.so.6 + 0x268a4)
                #2  0x00007fc3bc4b6177 __libc_message (libc.so.6 + 0x80177)
                #3  0x00007fc3bc4bde6c malloc_printerr (libc.so.6 + 0x87e6c)
                #4  0x00007fc3bc4bef14 malloc_consolidate (libc.so.6 + 0x88f14)
                #5  0x00007fc3bc4c0dc3 _int_malloc (libc.so.6 + 0x8adc3)
                #6  0x00007fc3bc4c36c5 __libc_calloc (libc.so.6 + 0x8d6c5)
                #7  0x0000562ca022b6a6 dns_packet_new (systemd-resolved + 0x3f6a6)
                #8  0x0000562ca0235af9 manager_recv.constprop.0 (systemd-resolved + 0x49af9)
                #9  0x0000562ca022d777 on_dns_stub_packet (systemd-resolved + 0x41777)
                #10 0x00007fc3bcc767b7 source_dispatch (libsystemd-shared-246.so + 0x1d27b7)
                #11 0x00007fc3bcc76a9d sd_event_dispatch (libsystemd-shared-246.so + 0x1d2a9d)
                #12 0x00007fc3bcc77d68 sd_event_run (libsystemd-shared-246.so + 0x1d3d68)
                #13 0x00007fc3bcc77f8f sd_event_loop (libsystemd-shared-246.so + 0x1d3f8f)
                #14 0x0000562ca0205c44 run (systemd-resolved + 0x19c44)
                #15 0x0000562ca01fa63a main (systemd-resolved + 0xe63a)
                #16 0x00007fc3bc45e1e2 __libc_start_main (libc.so.6 + 0x281e2)
                #17 0x0000562ca01fa6de _start (systemd-resolved + 0xe6de)

Comment 2 Jack 2021-04-08 08:19:06 UTC
Is the info above sufficient? The only way to get around the crash is to Cache=no in /etc/systemd/resolved.conf which is suboptimal.

Comment 3 Phil O 2021-05-04 00:23:49 UTC
Upstream bug: https://github.com/systemd/systemd/issues/19376

The patch shown in comment 9 fixes the issue for me (with some offsets in systemd v246).

Comment 4 Ben Cotton 2021-11-04 14:04:38 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2021-11-04 14:33:39 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Ben Cotton 2021-11-04 15:31:28 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Ben Cotton 2021-11-30 18:43:50 UTC
Fedora 33 changed to end-of-life (EOL) status on 2021-11-30. Fedora 33 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.