[systemd-devel] [PATCH 3/4] bus: driverd: don't attempt to remove from empty list

Marc-Antoine Perennou Marc-Antoine at Perennou.com
Sat Jan 4 02:56:58 PST 2014


On 28 December 2013 13:54, Marc-Antoine Perennou
<Marc-Antoine at perennou.com> wrote:
> ---
>  src/bus-driverd/bus-driverd.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/bus-driverd/bus-driverd.c b/src/bus-driverd/bus-driverd.c
> index b423420..1fdea7e 100644
> --- a/src/bus-driverd/bus-driverd.c
> +++ b/src/bus-driverd/bus-driverd.c
> @@ -90,10 +90,10 @@ static void match_free(Match *m) {
>                  Match *first;
>
>                  first = hashmap_get(m->client->matches, m->match);
> -                LIST_REMOVE(matches, first, m);
> -                if (first)
> +                if (first) {
> +                        LIST_REMOVE(matches, first, m);
>                          assert_se(hashmap_replace(m->client->matches, m->match, first) >= 0);
> -                else
> +                } else
>                          hashmap_remove(m->client->matches, m->match);
>
>                  m->client->n_matches--;
> --
> 1.8.5.2
>

Any news on this one?
Without it, every startup I get

#0  0x00007ffcebc5f339 in raise () from /usr/lib64/libc.so.6
No symbol table info available.
#1  0x00007ffcebc60738 in abort () from /usr/lib64/libc.so.6
No symbol table info available.
#2  0x000000000042e743 in log_assert_failed (text=text at entry=0x4308af
"*_head == _item", file=file at entry=0x4303c0
"/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/bus-driverd/bus-driverd.c",
line=line at entry=93, func=func at entry=0x430bf4
<__PRETTY_FUNCTION__.10834> "match_free") at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/shared/log.c:725
No locals.
#3  0x00000000004038cb in match_free (m=0x1a99ba0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/bus-driverd/bus-driverd.c:93
        _head = <synthetic pointer>
        _item = 0x1a99ba0
        first = <optimized out>
        __PRETTY_FUNCTION__ = "match_free"
#4  0x00000000004041c0 in client_free (c=0x1a54db0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/bus-driverd/bus-driverd.c:166
        m = <optimized out>
        __PRETTY_FUNCTION__ = "client_free"
#5  0x00000000004047bd in on_name_owner_changed (bus=<optimized out>,
m=<optimized out>, userdata=<optimized out>, error=<optimized out>) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/bus-driverd/bus-driverd.c:180
        c = <optimized out>
        __PRETTY_FUNCTION__ = "on_name_owner_changed"
#6  0x000000000041e328 in bus_match_run (bus=bus at entry=0x197b180,
node=0x1aa7e60, m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-match.c:292
        error_buffer = {name = 0x0, message = 0x0, _need_free = 0}
        test_str = 0x0
        test_u8 = 0 '\000'
        r = <optimized out>
        __PRETTY_FUNCTION__ = "bus_match_run"
#7  0x000000000041e2bf in bus_match_run (bus=bus at entry=0x197b180,
node=0x1aa7e10, m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-match.c:273
        test_str = 0x0
        test_u8 = 0 '\000'
        r = <optimized out>
        __PRETTY_FUNCTION__ = "bus_match_run"
#8  0x000000000041e47d in bus_match_run (bus=bus at entry=0x197b180,
node=0x197f3e0, m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-match.c:355
        found = <optimized out>
        test_str = 0x7ffcec40f000 ":1.76"
        test_u8 = 0 '\000'
        r = <optimized out>
        __PRETTY_FUNCTION__ = "bus_match_run"
#9  0x000000000041e2bf in bus_match_run (bus=bus at entry=0x197b180,
node=0x197f370, m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-match.c:273
        test_str = 0x0
        test_u8 = 0 '\000'
        r = <optimized out>
        __PRETTY_FUNCTION__ = "bus_match_run"
#10 0x000000000041e47d in bus_match_run (bus=bus at entry=0x197b180,
node=0x197f320, m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-match.c:355
        found = <optimized out>
        test_str = 0x1a58e68 "/org/freedesktop/DBus"
        test_u8 = 0 '\000'
        r = <optimized out>
        __PRETTY_FUNCTION__ = "bus_match_run"
#11 0x000000000041e2bf in bus_match_run (bus=bus at entry=0x197b180,
node=0x197f2b0, m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-match.c:273
        test_str = 0x0
        test_u8 = 0 '\000'
        r = <optimized out>
        __PRETTY_FUNCTION__ = "bus_match_run"
#12 0x000000000041e47d in bus_match_run (bus=bus at entry=0x197b180,
node=0x197f260, m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-match.c:355
        found = <optimized out>
        test_str = 0x1a58ea8 "NameOwnerChanged"
        test_u8 = 0 '\000'
        r = <optimized out>
        __PRETTY_FUNCTION__ = "bus_match_run"
#13 0x000000000041e2bf in bus_match_run (bus=bus at entry=0x197b180,
node=0x197f1f0, m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-match.c:273
        test_str = 0x0
        test_u8 = 0 '\000'
        r = <optimized out>
        __PRETTY_FUNCTION__ = "bus_match_run"
#14 0x000000000041e47d in bus_match_run (bus=bus at entry=0x197b180,
node=0x197f1a0, m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-match.c:355
        found = <optimized out>
        test_str = 0x1a58e88 "org.freedesktop.DBus"
        test_u8 = 0 '\000'
        r = <optimized out>
        __PRETTY_FUNCTION__ = "bus_match_run"
#15 0x000000000041e2bf in bus_match_run (bus=bus at entry=0x197b180,
node=0x197f150, m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-match.c:273
        test_str = 0x0
        test_u8 = 0 '\000'
        r = <optimized out>
        __PRETTY_FUNCTION__ = "bus_match_run"
#16 0x000000000041e47d in bus_match_run (bus=bus at entry=0x197b180,
node=0x197f100, m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-match.c:355
        found = <optimized out>
        test_str = 0x0
        test_u8 = 4 '\004'
        r = <optimized out>
        __PRETTY_FUNCTION__ = "bus_match_run"
#17 0x000000000041e2bf in bus_match_run (bus=bus at entry=0x197b180,
node=node at entry=0x197f090, m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-match.c:273
        test_str = 0x0
        test_u8 = 0 '\000'
        r = <optimized out>
        __PRETTY_FUNCTION__ = "bus_match_run"
#18 0x000000000041e4b7 in bus_match_run (bus=bus at entry=0x197b180,
node=0x197ee20, m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-match.c:368
        c = 0x197f090
        test_str = 0x43084a "org.freedesktop.DBus"
        test_u8 = 0 '\000'
        r = <optimized out>
        __PRETTY_FUNCTION__ = "bus_match_run"
#19 0x000000000041e286 in bus_match_run (bus=bus at entry=0x197b180,
node=node at entry=0x197b200, m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-match.c:263
        test_str = 0x0
        test_u8 = 0 '\000'
        r = <optimized out>
        __PRETTY_FUNCTION__ = "bus_match_run"
#20 0x0000000000406e7b in process_match (bus=bus at entry=0x197b180,
m=m at entry=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/sd-bus.c:2055
        r = 0
        __PRETTY_FUNCTION__ = "process_match"
#21 0x00000000004097bc in process_message (bus=bus at entry=0x197b180,
m=0x1a3a8a0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/sd-bus.c:2147
        r = <optimized out>
        __PRETTY_FUNCTION__ = "process_message"
        __func__ = "process_message"
#22 0x00000000004098aa in process_running (bus=bus at entry=0x197b180,
ret=ret at entry=0x0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/sd-bus.c:2183
        m = 0x1a3a8a0
        r = 1
        __PRETTY_FUNCTION__ = "process_running"
        __func__ = "process_running"
#23 0x0000000000408964 in sd_bus_process (bus=0x197b180,
ret=ret at entry=0x0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/sd-bus.c:2352
        _dont_destroy_bus = 0x197b180
        r = <optimized out>
        __PRETTY_FUNCTION__ = "sd_bus_process"
#24 0x0000000000408a21 in io_callback (s=<optimized out>,
fd=<optimized out>, revents=<optimized out>, userdata=<optimized out>)
at /var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/sd-bus.c:2605
        bus = <optimized out>
        r = <optimized out>
        __PRETTY_FUNCTION__ = "io_callback"
#25 0x0000000000427302 in source_dispatch (s=0x197e5b0) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/sd-event.c:1793
        r = 0
        __PRETTY_FUNCTION__ = "source_dispatch"
        __func__ = "source_dispatch"
#26 0x0000000000427b36 in sd_event_run (e=e at entry=0x197b010,
timeout=<optimized out>) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/sd-event.c:2045
        ev_queue = 0x7fffcd498420
        ev_queue_max = <optimized out>
        p = <optimized out>
        r = <optimized out>
        i = 1
        m = 1
        __PRETTY_FUNCTION__ = "sd_event_run"
#27 0x000000000042448b in bus_event_loop_with_idle (e=0x197b010,
bus=0x197b180, name=name at entry=0x43084a "org.freedesktop.DBus",
timeout=timeout at entry=30000000, check_idle=check_idle at entry=0x40322d
<check_idle>, userdata=userdata at entry=0x7fffcd498540) at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/libsystemd-bus/bus-util.c:118
        idle = <optimized out>
        exiting = false
        r = <optimized out>
        code = 0
        __PRETTY_FUNCTION__ = "bus_event_loop_with_idle"
#28 0x0000000000404b67 in main (argc=<optimized out>, argv=<optimized
out>) at /var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/bus-driverd/bus-driverd.c:817
        context = {bus = 0x197b180, event = 0x197b010, clients = 0x197bf00}
        c = <optimized out>
        r = 0
        __func__ = "main"


More information about the systemd-devel mailing list