Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There are memory leaks in dbus-broker-launcher #289

Closed
evverx opened this issue May 11, 2022 · 2 comments
Closed

There are memory leaks in dbus-broker-launcher #289

evverx opened this issue May 11, 2022 · 2 comments

Comments

@evverx
Copy link
Contributor

evverx commented May 11, 2022

It was found accidentally when systemd was tested with dfuzzer

detected memory leaks
Direct leak of 5738 byte(s) in 190 object(s) allocated from:
    #0 0x7f6c85dac8f7 in strdup (/usr/lib64/libasan.so.6.0.0+0x598f7)
    #1 0x4113dc in service_update ../src/launch/service.c:128
    #2 0x40a28f in launcher_load_service_file ../src/launch/launcher.c:717
    #3 0x40ac18 in launcher_load_service_dir ../src/launch/launcher.c:786
    #4 0x40b6f4 in launcher_load_standard_session_services ../src/launch/launcher.c:913
    #5 0x40bbf1 in launcher_load_services ../src/launch/launcher.c:969
    #6 0x40dc11 in launcher_reload_config ../src/launch/launcher.c:1190
    #7 0x40e43c in bus_method_reload_config ../src/launch/launcher.c:1295
    #8 0x7f6c8524627a in method_callbacks_run ../src/libsystemd/sd-bus/bus-objects.c:406
    #9 0x7f6c8524fa7a in object_find_and_run ../src/libsystemd/sd-bus/bus-objects.c:1310
    #10 0x7f6c8525113c in bus_process_object ../src/libsystemd/sd-bus/bus-objects.c:1430
    #11 0x7f6c852b0563 in process_message ../src/libsystemd/sd-bus/sd-bus.c:2962
    #12 0x7f6c852b0a7a in process_running ../src/libsystemd/sd-bus/sd-bus.c:3004
    #13 0x7f6c852b38db in bus_process_internal ../src/libsystemd/sd-bus/sd-bus.c:3224
    #14 0x7f6c852b3a75 in sd_bus_process ../src/libsystemd/sd-bus/sd-bus.c:3251
    #15 0x7f6c852b7176 in io_callback ../src/libsystemd/sd-bus/sd-bus.c:3602
    #16 0x7f6c8546f1ec in source_dispatch ../src/libsystemd/sd-event/sd-event.c:3591
    #17 0x7f6c85477a03 in sd_event_dispatch ../src/libsystemd/sd-event/sd-event.c:4175
    #18 0x7f6c85478b67 in sd_event_run ../src/libsystemd/sd-event/sd-event.c:4236
    #19 0x7f6c85478ee8 in sd_event_loop ../src/libsystemd/sd-event/sd-event.c:4257
    #20 0x40fdbb in launcher_run ../src/launch/launcher.c:1441
    #21 0x404297 in run ../src/launch/main.c:151
    #22 0x404475 in main ../src/launch/main.c:174
    #23 0x7f6c84ae4f1f in __libc_start_call_main (/lib64/libc.so.6+0x40f1f)
Direct leak of 302 byte(s) in 10 object(s) allocated from:
    #0 0x7f6c85dac8f7 in strdup (/usr/lib64/libasan.so.6.0.0+0x598f7)
    #1 0x4113dc in service_update ../src/launch/service.c:128
    #2 0x411972 in service_new ../src/launch/service.c:171
    #3 0x40a068 in launcher_load_service_file ../src/launch/launcher.c:707
    #4 0x40ac18 in launcher_load_service_dir ../src/launch/launcher.c:786
    #5 0x40b6f4 in launcher_load_standard_session_services ../src/launch/launcher.c:913
    #6 0x40bbf1 in launcher_load_services ../src/launch/launcher.c:969
    #7 0x40ef78 in launcher_run ../src/launch/launcher.c:1338
    #8 0x404297 in run ../src/launch/main.c:151
    #9 0x404475 in main ../src/launch/main.c:174
    #10 0x7f6c84ae4f1f in __libc_start_call_main (/lib64/libc.so.6+0x40f1f)
6040 byte(s) leaked in 200 allocation(s).

cc @mrc0mmand

evverx added a commit to evverx/systemd that referenced this issue May 11, 2022
There are memory leaks there bus1/dbus-broker#289
and it crashes from time to time
https://github.com/matusmarhefka/dfuzzer/issues/20#issuecomment-1114097840
so let's just skip it by analogy with dbus-daemon to avoid
reports that have nothing to do with systemd itself.

It's kind of a part of systemd#22547
yuwata pushed a commit to systemd/systemd that referenced this issue May 12, 2022
There are memory leaks there bus1/dbus-broker#289
and it crashes from time to time
https://github.com/matusmarhefka/dfuzzer/issues/20#issuecomment-1114097840
so let's just skip it by analogy with dbus-daemon to avoid
reports that have nothing to do with systemd itself.

It's kind of a part of #22547
@dvdhrm
Copy link
Member

dvdhrm commented May 12, 2022

Indeed. I pushed a fix for a leak I identified: 6d9b817

Thanks a lot!

@evverx
Copy link
Contributor Author

evverx commented May 12, 2022

With that commit included I can't seem to trigger the issue any more. I think it can be closed. Thanks!

@evverx evverx closed this as completed May 12, 2022
keszybz pushed a commit to systemd/systemd-stable that referenced this issue May 25, 2022
There are memory leaks there bus1/dbus-broker#289
and it crashes from time to time
https://github.com/matusmarhefka/dfuzzer/issues/20#issuecomment-1114097840
so let's just skip it by analogy with dbus-daemon to avoid
reports that have nothing to do with systemd itself.

It's kind of a part of systemd/systemd#22547

(cherry picked from commit d0880fa)
mrc0mmand pushed a commit to mrc0mmand/rhel-9 that referenced this issue Jun 13, 2022
There are memory leaks there bus1/dbus-broker#289
and it crashes from time to time
https://github.com/matusmarhefka/dfuzzer/issues/20#issuecomment-1114097840
so let's just skip it by analogy with dbus-daemon to avoid
reports that have nothing to do with systemd itself.

It's kind of a part of systemd/systemd#22547

(cherry picked from commit d0880fa)
Related: #2087652
mrc0mmand pushed a commit to mrc0mmand/rhel-9 that referenced this issue Jun 14, 2022
There are memory leaks there bus1/dbus-broker#289
and it crashes from time to time
https://github.com/matusmarhefka/dfuzzer/issues/20#issuecomment-1114097840
so let's just skip it by analogy with dbus-daemon to avoid
reports that have nothing to do with systemd itself.

It's kind of a part of systemd/systemd#22547

(cherry picked from commit d0880fa)
Related: #2087652
systemd-rhel-bot pushed a commit to redhat-plumbers/systemd-rhel9 that referenced this issue Jun 14, 2022
There are memory leaks there bus1/dbus-broker#289
and it crashes from time to time
https://github.com/matusmarhefka/dfuzzer/issues/20#issuecomment-1114097840
so let's just skip it by analogy with dbus-daemon to avoid
reports that have nothing to do with systemd itself.

It's kind of a part of systemd/systemd#22547

(cherry picked from commit d0880fa)
Related: #2087652
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants