On (01/12/15 14:02), Lukas Slebodnik wrote:
On (24/11/15 13:23), Pavel Březina wrote:
>Hi,
>I'm sending some sudo provider patches. I wanted to fix/improve things in the
>ldap sudo provider prior my work on ipa provider so I get familiar with it
>again and avoid making the same mistakes.
>
>It fixes tevent style, shuffles the code around a little bit, convert
>periodic task to use be_ptask module, renew hostinfo when needed, fix
>sdap_id_op logic, recude code duplication, remove dead code, simplify error
>handling, etc.
>
>Ticket fixed:
>https://fedorahosted.org/sssd/ticket/1943
>https://fedorahosted.org/sssd/ticket/2672
>
>I let Dan run downstream tests on those patches. We had to fix one test that
>was prone to a race condition which my patches revealed, but everything is
>green now.
>
I got following valgrind errors with patches
==17279== 1 errors in context 3 of 7:
==17279== Conditional jump or move depends on uninitialised value(s)
==17279== at 0x8BC76FE: _talloc_steal_loc (talloc.c:1162)
==17279== by 0x13DA3775: sdap_sudo_set_usn (sdap_async_sudo.c:318)
==17279== by 0x13DA3775: sdap_sudo_refresh_done (sdap_async_sudo.c:750)
==17279== by 0x89B4201: _tevent_req_error (tevent_req.c:167)
==17279== by 0x13DA3321: sdap_sudo_load_sudoers_done (sdap_async_sudo.c:170)
==17279== by 0x89B4201: _tevent_req_error (tevent_req.c:167)
==17279== by 0x89B4201: _tevent_req_error (tevent_req.c:167)
==17279== by 0x13D71ADB: generic_ext_search_handler.isra.3 (sdap_async.c:1651)
==17279== by 0x89B3923: tevent_common_loop_immediate (tevent_immediate.c:135)
==17279== by 0x89B822D: epoll_event_loop_once (tevent_epoll.c:907)
==17279== by 0x89B6936: std_event_loop_once (tevent_standard.c:114)
==17279== by 0x89B30FC: _tevent_loop_once (tevent.c:533)
==17279== by 0x89B329A: tevent_common_loop_wait (tevent.c:637)
==17279==
==17279==
==17279== 1 errors in context 4 of 7:
==17279== Conditional jump or move depends on uninitialised value(s)
==17279== at 0x13DA3738: sdap_sudo_set_usn (sdap_async_sudo.c:307)
==17279== by 0x13DA3738: sdap_sudo_refresh_done (sdap_async_sudo.c:750)
==17279== by 0x89B4201: _tevent_req_error (tevent_req.c:167)
==17279== by 0x13DA3321: sdap_sudo_load_sudoers_done (sdap_async_sudo.c:170)
==17279== by 0x89B4201: _tevent_req_error (tevent_req.c:167)
==17279== by 0x89B4201: _tevent_req_error (tevent_req.c:167)
==17279== by 0x13D71ADB: generic_ext_search_handler.isra.3 (sdap_async.c:1651)
==17279== by 0x89B3923: tevent_common_loop_immediate (tevent_immediate.c:135)
==17279== by 0x89B822D: epoll_event_loop_once (tevent_epoll.c:907)
==17279== by 0x89B6936: std_event_loop_once (tevent_standard.c:114)
==17279== by 0x89B30FC: _tevent_loop_once (tevent.c:533)
==17279== by 0x89B329A: tevent_common_loop_wait (tevent.c:637)
==17279== by 0x89B68D6: std_event_loop_wait (tevent_standard.c:140)
I can see error in sssd_sudo as well
but it should not be caused by your patches.
==21931== Invalid read of size 8
==21931== at 0x114F24: sss_dp_callback_destructor (responder_dp.c:60)
==21931== by 0x87A65C8: _talloc_free_internal (talloc.c:993)
==21931== by 0x87A0642: _talloc_free_children_internal (talloc.c:1472)
==21931== by 0x87A0642: _talloc_free_internal (talloc.c:1019)
==21931== by 0x87A0642: _talloc_free (talloc.c:1594)
==21931== by 0x859436F: tevent_req_received (tevent_req.c:247)
==21931== by 0x85943A8: tevent_req_destructor (tevent_req.c:99)
==21931== by 0x87A65C8: _talloc_free_internal (talloc.c:993)
==21931== by 0x87A61E2: _talloc_free_children_internal (talloc.c:1472)
==21931== by 0x87A61E2: _talloc_free_internal (talloc.c:1019)
==21931== by 0x87A61E2: _talloc_free_children_internal (talloc.c:1472)
==21931== by 0x87A61E2: _talloc_free_internal (talloc.c:1019)
==21931== by 0x87A61E2: _talloc_free_children_internal (talloc.c:1472)
==21931== by 0x87A61E2: _talloc_free_internal (talloc.c:1019)
==21931== by 0x87A61E2: _talloc_free_children_internal (talloc.c:1472)
==21931== by 0x87A61E2: _talloc_free_internal (talloc.c:1019)
==21931== by 0x87A61E2: _talloc_free_children_internal (talloc.c:1472)
==21931== by 0x87A61E2: _talloc_free_internal (talloc.c:1019)
==21931== by 0x87A0642: _talloc_free_children_internal (talloc.c:1472)
==21931== by 0x87A0642: _talloc_free_internal (talloc.c:1019)
==21931== by 0x87A0642: _talloc_free (talloc.c:1594)
==21931== Address 0xb906e70 is 688 bytes inside a block of size 797 free'd
==21931== at 0x4C28D17: free (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==21931== by 0x87A6283: _talloc_free_internal (talloc.c:1063)
==21931== by 0x87A61E2: _talloc_free_children_internal (talloc.c:1472)
==21931== by 0x87A61E2: _talloc_free_internal (talloc.c:1019)
==21931== by 0x87A61E2: _talloc_free_children_internal (talloc.c:1472)
==21931== by 0x87A61E2: _talloc_free_internal (talloc.c:1019)
==21931== by 0x87A61E2: _talloc_free_children_internal (talloc.c:1472)
==21931== by 0x87A61E2: _talloc_free_internal (talloc.c:1019)
==21931== by 0x87A0642: _talloc_free_children_internal (talloc.c:1472)
==21931== by 0x87A0642: _talloc_free_internal (talloc.c:1019)
==21931== by 0x87A0642: _talloc_free (talloc.c:1594)
==21931== by 0x8DED028: __run_exit_handlers (exit.c:82)
==21931== by 0x8DED074: exit (exit.c:104)
==21931== by 0x4E74A1C: orderly_shutdown (server.c:257)
==21931== by 0x8596716: tevent_common_check_signal (tevent_signal.c:450)
==21931== by 0x85983EB: epoll_event_loop (tevent_epoll.c:647)
==21931== by 0x85983EB: epoll_event_loop_once (tevent_epoll.c:926)
==21931== by 0x8596936: std_event_loop_once (tevent_standard.c:114)
LS