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

Polkitd: The utils_spawn_data_free reap timeout subprocess did not work resulting in a large number of zombie processes #12

Open
polkit-github-migration-bot opened this issue Apr 13, 2018 · 14 comments

Comments

@polkit-github-migration-bot
Copy link
Collaborator

In gitlab.freedesktop.org by bugzilla-migration on Apr 13, 2018, 07:22

Link to the original issue: https://gitlab.freedesktop.org/polkit/polkit/-/issues/11

Submitted by lin..@..ud.com

Assigned to David Zeuthen @david

Link to original bug (#106021)

Description

Hi,

We found a prolem of polkitd.

When run subprocess timeout in rules ,the utils_spawn_data_free reap timeout subprocess did not work , and it result in a large number of zombie processes

It can be reproduced in fedora27. And the upstream has not fix it.

How to reproduce:

  1. Add a debug rule , this rule waill run spawn process over 10s and result in a timeout
    [root@localhost ~]# cat /etc/polkit-1/rules.d/01-test.rules
    polkit.addRule(function(action, subject) {
    polkit.log("debug start")
    try {
    polkit.spawn(["/usr/bin/sleep", "15"]);
    } catch (error) {
    // polkit.log(error)
    }
    });

  2. have a look at the prcess of polkitd,
    [root@localhost ~]# ps -ef |grep polkit |grep -v polkit
    polkitd 1501 1 0 Mar31 ? 00:02:51 /usr/lib/polkit-1/polkitd --no-debug
    polkitd 5060 1501 0 12:37 ? 00:00:00 [sleep] <defunct>
    polkitd 5367 1501 0 12:38 ? 00:00:00 [sleep] <defunct>
    polkitd 5631 1501 0 12:38 ? 00:00:00 [sleep] <defunct>
    polkitd 5915 1501 0 12:38 ? 00:00:00 [sleep] <defunct>
    polkitd 14052 1501 0 12:42 ? 00:00:00 sleep 20

[root@localhost ~]# journalctl -fu polkit
-- Logs begin at Sat 2018-03-31 14:36:03 CST. --
Apr 03 12:39:11 2-3 polkitd[1501]: /etc/polkit-1/rules.d/01-test.rules:5: Error: Error spawning helper: Timed out after 10 seconds (g-io-error-quark, 24)
Apr 03 12:39:21 2-3 polkitd[1501]: /etc/polkit-1/rules.d/01-test.rules:5: Error: Error spawning helper: Timed out after 10 seconds (g-io-error-quark, 24)
Apr 03 12:40:11 2-3 polkitd[1501]: /etc/polkit-1/rules.d/01-test.rules:5: Error: Error spawning helper: Timed out after 10 seconds (g-io-error-quark, 24)
Apr 03 12:40:21 2-3 polkitd[1501]: /etc/polkit-1/rules.d/01-test.rules:5: Error: Error spawning helper: Timed out after 10 seconds (g-io-error-quark, 24)

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org by bugzilla-migration on Apr 13, 2018, 10:28

🛠️ lin..@..ud.com submitted a patch:

Patch 138819, "0001-add-child-reaper-thread-to-fix-zombies":
file_106021.txt

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org by bugzilla-migration on Apr 13, 2018, 10:34

💬 lin..@..ud.com said:

I made a patch to fix this issue.

The root cause is :

static void
utils_spawn_data_free (UtilsSpawnData *data)
{

if (data->child_pid != 0)
{
GSource source;
kill (data->child_pid, SIGTERM);
/
OK, we need to reap for the child ourselves - we don't want
* to use waitpid() because that might block the calling
* thread (the child might handle SIGTERM and use several
* seconds for cleanup/rollback).
*
* So we use GChildWatch instead.
*
* Avoid taking a references to ourselves. but note that we need
* to pass the GSource so we can nuke it once handled.
*/
source = g_child_watch_source_new (data->child_pid);
g_source_set_callback (source,
(GSourceFunc) utils_child_watch_from_release_cb,
source,
(GDestroyNotify) g_source_destroy);
g_source_attach (source, data->main_context);
g_source_unref (source);
data->child_pid = 0;
}

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org by bugzilla-migration on Apr 13, 2018, 10:38

💬 lin..@..ud.com said:

The GChildWatch in utils_spawn_data_free didn't work due to the release of main_loop and main context outside.

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org by bugzilla-migration on May 3, 2018, 18:42

💬 David Herrmann @dvdhrm said:

Why not simply turn SIGTERM into SIGKILL and use waitid(2)? I mean, we are dealing with a timeout here, no reason to try to be graceful.

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org by bugzilla-migration on May 5, 2018, 14:10

💬 lin..@..ud.com said:

(In reply to David Herrmann from comment 4)

Why not simply turn SIGTERM into SIGKILL and use waitid(2)? I mean, we are
dealing with a timeout here, no reason to try to be graceful.

Hi,I made a better patch to fix this. I will send out next Monday. :)

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org by bugzilla-migration on May 8, 2018, 04:14

📎 lin..@..ud.com uploaded an attachment:

Attachment 139417, "0001-polkitd-make-sure-child-process-exits-will-be-proces.patch":
file_106021.txt

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org by bugzilla-migration on May 8, 2018, 04:28

💬 lin..@..ud.com said:

Hi,I made a better patch to make sure child process exits will be processed.
This patch seems to be simpler.

I made 3 timeout source.
The 1st one will send SIGTERM at 10s,
2nd one will send SIGKILL at 15s,
last one quit the main loop.
Once child process exit and child watch source was processed , the main loop quit. Otherwise we quit main loop at 20s.

Timer1: 10s send SIGTERM.
Timer2: 15s send SIGKILL
Timer3: 20s exit the mainloop

0 ~ 10s: child exit normally
10 ~ 15s: child exit by SIGTERM
15 ~ 20s: child exit by SIGKILL
20s ~ : child seems to be abnormal. we quit main loop.

Please give me some comments or suggestions on fixing the issue. : )

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org by bugzilla-migration on May 9, 2018, 12:35

💬 David Herrmann @dvdhrm said:

I would prefer to send SIGKILL straight away and use waitid(2) to guarantee it is collected.

Anyway, your patch looks fine. Lets see whether a polkit maintainer can apply it.

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org by bugzilla-migration on May 10, 2018, 11:14

🛠️ lin..@..ud.com submitted a patch:

This patch seems to be much simpler and better.

Patch 139459, "polkitd-fix-zombie-not-reaped-when-js-spawned-proces.patch":
file_106021.txt

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org by bugzilla-migration on May 14, 2018, 10:01

💬 lin..@..ud.com said:

(In reply to David Herrmann from comment 8)

I would prefer to send SIGKILL straight away and use waitid(2) to guarantee
it is collected.

Anyway, your patch looks fine. Lets see whether a polkit maintainer can
apply it.

Hi,I post a new patch, this one seems mucher simpler. This patch attaches source to global default main context and can work.

Change:

  •  g_source_attach (source, data->main_context);
    
  •  /* attach source to the global default main context */
    
  •  g_source_attach (source, NULL)
    

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org by bugzilla-migration on Aug 15, 2018, 13:02

💬 David Herrmann @dvdhrm said:

(In reply to lining916740672 from comment 10)

  •  g_source_attach (source, data->main_context);
    
  •  /* attach source to the global default main context */
    
  •  g_source_attach (source, NULL)
    

According to glib docs g_source_attach() is safe to attach to other threads. The callback we use is localized to the source itself, so I see no harm in doing that. Furthermore, no threading should be involved here, since the js-authority is executed inline, but I am not entirely sure it is invoked in the main-thread.

Regardless: I think this is safe.

I still believe sending SIGKILL is the right thing to do. But I also think this patch is also the right thing to do to reap children correctly.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>

Not sure who to ping to pick this up and merge upstream, though.

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org by jcpunk on Dec 1, 2020, 20:54

Any chance to get this revived and finished?

mrc0mmand added a commit to mrc0mmand/polkit that referenced this issue Jun 10, 2024
duk_error() never returns, so the error string gets leaked every time an error
is thrown. Let's avoid this by creating the error object first without throwing
it, freeing the original error string (we don't need it anymore since it gets
sprintf-ed into the error object), and then throwing the error object from top
of the current context stack.

 =================================================================
==1270==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 231 byte(s) in 2 object(s) allocated from:
    #0 0x7f3a489258b7 in malloc (/lib64/libasan.so.8+0xf68b7) (BuildId: 388cbb99455c2e2eaec79bd8db6d9a78eb39f80d)
    #1 0x7f3a47b27487 in __vasprintf_internal (/lib64/libc.so.6+0x8a487) (BuildId: 4a92fcedbba6d6d2629ce066a2970017faa9995e)
    #2 0x7f3a484b06a2 in g_vasprintf (/lib64/libglib-2.0.so.0+0xb16a2) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    #3 0x7f3a48480a92 in g_strdup_vprintf (/lib64/libglib-2.0.so.0+0x81a92) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    polkit-org#4 0x7f3a48480b50 in g_strdup_printf (/lib64/libglib-2.0.so.0+0x81b50) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    polkit-org#5 0x41fcec in js_polkit_spawn ../src/polkitbackend/polkitbackendduktapeauthority.c:1090
    polkit-org#6 0x7f3a483b31b8 in duk__handle_call_raw.lto_priv.0 (/lib64/libduktape.so.207+0x2a1b8) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#7 0x7f3a483962e1 in duk__js_execute_bytecode_inner.lto_priv.0 (/lib64/libduktape.so.207+0xd2e1) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#8 0x7f3a483b33eb in duk_js_execute_bytecode (/lib64/libduktape.so.207+0x2a3eb) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#9 0x7f3a483b319d in duk__handle_call_raw.lto_priv.0 (/lib64/libduktape.so.207+0x2a19d) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#10 0x7f3a48399ab0 in duk__pcall_prop_raw (/lib64/libduktape.so.207+0x10ab0) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#11 0x7f3a483b23cc in duk_handle_safe_call.lto_priv.0 (/lib64/libduktape.so.207+0x293cc) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#12 0x7f3a483972e8 in duk_pcall_prop (/lib64/libduktape.so.207+0xe2e8) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#13 0x41d048 in runaway_killer_thread_call_js ../src/polkitbackend/polkitbackendduktapeauthority.c:682
    polkit-org#14 0x7f3a4888cb45 in asan_thread_start(void*) (/lib64/libasan.so.8+0x5db45) (BuildId: 388cbb99455c2e2eaec79bd8db6d9a78eb39f80d)

Direct leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7f3a489247b8 in realloc.part.0 (/lib64/libasan.so.8+0xf57b8) (BuildId: 388cbb99455c2e2eaec79bd8db6d9a78eb39f80d)
    #1 0x7f3a4846304a in g_realloc (/lib64/libglib-2.0.so.0+0x6404a) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    #2 0x7f3a48481b19 in g_string_expand (/lib64/libglib-2.0.so.0+0x82b19) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    #3 0x7f3a48481b90 in g_string_sized_new (/lib64/libglib-2.0.so.0+0x82b90) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    polkit-org#4 0x41fb0f in js_polkit_spawn ../src/polkitbackend/polkitbackendduktapeauthority.c:1099
    polkit-org#5 0x7f3a483b31b8 in duk__handle_call_raw.lto_priv.0 (/lib64/libduktape.so.207+0x2a1b8) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#6 0x7f3a483962e1 in duk__js_execute_bytecode_inner.lto_priv.0 (/lib64/libduktape.so.207+0xd2e1) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#7 0x7f3a483b33eb in duk_js_execute_bytecode (/lib64/libduktape.so.207+0x2a3eb) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#8 0x7f3a483b319d in duk__handle_call_raw.lto_priv.0 (/lib64/libduktape.so.207+0x2a19d) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#9 0x7f3a48399ab0 in duk__pcall_prop_raw (/lib64/libduktape.so.207+0x10ab0) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#10 0x7f3a483b23cc in duk_handle_safe_call.lto_priv.0 (/lib64/libduktape.so.207+0x293cc) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#11 0x7f3a483972e8 in duk_pcall_prop (/lib64/libduktape.so.207+0xe2e8) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#12 0x41d048 in runaway_killer_thread_call_js ../src/polkitbackend/polkitbackendduktapeauthority.c:682
    polkit-org#13 0x7f3a4888cb45 in asan_thread_start(void*) (/lib64/libasan.so.8+0x5db45) (BuildId: 388cbb99455c2e2eaec79bd8db6d9a78eb39f80d)

SUMMARY: AddressSanitizer: 359 byte(s) leaked in 3 allocation(s).
@qsW-git
Copy link

qsW-git commented Jun 26, 2024

Will this patch be accepted by the upstream community?

mrc0mmand added a commit to mrc0mmand/polkit that referenced this issue Jun 26, 2024
duk_error() never returns, so the error string gets leaked every time an error
is thrown. Let's avoid this by creating the error object first without throwing
it, freeing the original error string (we don't need it anymore since it gets
sprintf-ed into the error object), and then throwing the error object from top
of the current context stack.

 =================================================================
==1270==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 231 byte(s) in 2 object(s) allocated from:
    #0 0x7f3a489258b7 in malloc (/lib64/libasan.so.8+0xf68b7) (BuildId: 388cbb99455c2e2eaec79bd8db6d9a78eb39f80d)
    #1 0x7f3a47b27487 in __vasprintf_internal (/lib64/libc.so.6+0x8a487) (BuildId: 4a92fcedbba6d6d2629ce066a2970017faa9995e)
    #2 0x7f3a484b06a2 in g_vasprintf (/lib64/libglib-2.0.so.0+0xb16a2) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    #3 0x7f3a48480a92 in g_strdup_vprintf (/lib64/libglib-2.0.so.0+0x81a92) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    polkit-org#4 0x7f3a48480b50 in g_strdup_printf (/lib64/libglib-2.0.so.0+0x81b50) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    polkit-org#5 0x41fcec in js_polkit_spawn ../src/polkitbackend/polkitbackendduktapeauthority.c:1090
    polkit-org#6 0x7f3a483b31b8 in duk__handle_call_raw.lto_priv.0 (/lib64/libduktape.so.207+0x2a1b8) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#7 0x7f3a483962e1 in duk__js_execute_bytecode_inner.lto_priv.0 (/lib64/libduktape.so.207+0xd2e1) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#8 0x7f3a483b33eb in duk_js_execute_bytecode (/lib64/libduktape.so.207+0x2a3eb) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#9 0x7f3a483b319d in duk__handle_call_raw.lto_priv.0 (/lib64/libduktape.so.207+0x2a19d) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#10 0x7f3a48399ab0 in duk__pcall_prop_raw (/lib64/libduktape.so.207+0x10ab0) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#11 0x7f3a483b23cc in duk_handle_safe_call.lto_priv.0 (/lib64/libduktape.so.207+0x293cc) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#12 0x7f3a483972e8 in duk_pcall_prop (/lib64/libduktape.so.207+0xe2e8) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#13 0x41d048 in runaway_killer_thread_call_js ../src/polkitbackend/polkitbackendduktapeauthority.c:682
    polkit-org#14 0x7f3a4888cb45 in asan_thread_start(void*) (/lib64/libasan.so.8+0x5db45) (BuildId: 388cbb99455c2e2eaec79bd8db6d9a78eb39f80d)

Direct leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7f3a489247b8 in realloc.part.0 (/lib64/libasan.so.8+0xf57b8) (BuildId: 388cbb99455c2e2eaec79bd8db6d9a78eb39f80d)
    #1 0x7f3a4846304a in g_realloc (/lib64/libglib-2.0.so.0+0x6404a) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    #2 0x7f3a48481b19 in g_string_expand (/lib64/libglib-2.0.so.0+0x82b19) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    #3 0x7f3a48481b90 in g_string_sized_new (/lib64/libglib-2.0.so.0+0x82b90) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    polkit-org#4 0x41fb0f in js_polkit_spawn ../src/polkitbackend/polkitbackendduktapeauthority.c:1099
    polkit-org#5 0x7f3a483b31b8 in duk__handle_call_raw.lto_priv.0 (/lib64/libduktape.so.207+0x2a1b8) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#6 0x7f3a483962e1 in duk__js_execute_bytecode_inner.lto_priv.0 (/lib64/libduktape.so.207+0xd2e1) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#7 0x7f3a483b33eb in duk_js_execute_bytecode (/lib64/libduktape.so.207+0x2a3eb) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#8 0x7f3a483b319d in duk__handle_call_raw.lto_priv.0 (/lib64/libduktape.so.207+0x2a19d) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#9 0x7f3a48399ab0 in duk__pcall_prop_raw (/lib64/libduktape.so.207+0x10ab0) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#10 0x7f3a483b23cc in duk_handle_safe_call.lto_priv.0 (/lib64/libduktape.so.207+0x293cc) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#11 0x7f3a483972e8 in duk_pcall_prop (/lib64/libduktape.so.207+0xe2e8) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    polkit-org#12 0x41d048 in runaway_killer_thread_call_js ../src/polkitbackend/polkitbackendduktapeauthority.c:682
    polkit-org#13 0x7f3a4888cb45 in asan_thread_start(void*) (/lib64/libasan.so.8+0x5db45) (BuildId: 388cbb99455c2e2eaec79bd8db6d9a78eb39f80d)

SUMMARY: AddressSanitizer: 359 byte(s) leaked in 3 allocation(s).
jrybar-rh pushed a commit that referenced this issue Jun 26, 2024
* test: drop mocklibc

Let's get rid of mocklibc and replace it with a simple combination of
mount & user namespaces + bind mount to replace the host's /etc with our
own version.

This means we don't $LD_PRELOAD the mocklibc DSO, but instead run each
unit test through a very simple python wrapper that sets up a temporary
user & mount namespace through the unshare() syscall,  gains "fake" root
using uid_map and gid_map, overmounts /etc in this new namespace (with
our own custom test files), and then executes the test binary itself.
Check user_namespaces(7) for more information about the namespace
shenanigans.

* Replace duk_error() with duk_push_error_object() + duk_throw()

duk_error() never returns, so the error string gets leaked every time an error
is thrown. Let's avoid this by creating the error object first without throwing
it, freeing the original error string (we don't need it anymore since it gets
sprintf-ed into the error object), and then throwing the error object from top
of the current context stack.

 =================================================================
==1270==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 231 byte(s) in 2 object(s) allocated from:
    #0 0x7f3a489258b7 in malloc (/lib64/libasan.so.8+0xf68b7) (BuildId: 388cbb99455c2e2eaec79bd8db6d9a78eb39f80d)
    #1 0x7f3a47b27487 in __vasprintf_internal (/lib64/libc.so.6+0x8a487) (BuildId: 4a92fcedbba6d6d2629ce066a2970017faa9995e)
    #2 0x7f3a484b06a2 in g_vasprintf (/lib64/libglib-2.0.so.0+0xb16a2) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    #3 0x7f3a48480a92 in g_strdup_vprintf (/lib64/libglib-2.0.so.0+0x81a92) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    #4 0x7f3a48480b50 in g_strdup_printf (/lib64/libglib-2.0.so.0+0x81b50) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    #5 0x41fcec in js_polkit_spawn ../src/polkitbackend/polkitbackendduktapeauthority.c:1090
    #6 0x7f3a483b31b8 in duk__handle_call_raw.lto_priv.0 (/lib64/libduktape.so.207+0x2a1b8) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    #7 0x7f3a483962e1 in duk__js_execute_bytecode_inner.lto_priv.0 (/lib64/libduktape.so.207+0xd2e1) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    #8 0x7f3a483b33eb in duk_js_execute_bytecode (/lib64/libduktape.so.207+0x2a3eb) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    #9 0x7f3a483b319d in duk__handle_call_raw.lto_priv.0 (/lib64/libduktape.so.207+0x2a19d) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    #10 0x7f3a48399ab0 in duk__pcall_prop_raw (/lib64/libduktape.so.207+0x10ab0) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    #11 0x7f3a483b23cc in duk_handle_safe_call.lto_priv.0 (/lib64/libduktape.so.207+0x293cc) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    #12 0x7f3a483972e8 in duk_pcall_prop (/lib64/libduktape.so.207+0xe2e8) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    #13 0x41d048 in runaway_killer_thread_call_js ../src/polkitbackend/polkitbackendduktapeauthority.c:682
    #14 0x7f3a4888cb45 in asan_thread_start(void*) (/lib64/libasan.so.8+0x5db45) (BuildId: 388cbb99455c2e2eaec79bd8db6d9a78eb39f80d)

Direct leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7f3a489247b8 in realloc.part.0 (/lib64/libasan.so.8+0xf57b8) (BuildId: 388cbb99455c2e2eaec79bd8db6d9a78eb39f80d)
    #1 0x7f3a4846304a in g_realloc (/lib64/libglib-2.0.so.0+0x6404a) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    #2 0x7f3a48481b19 in g_string_expand (/lib64/libglib-2.0.so.0+0x82b19) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    #3 0x7f3a48481b90 in g_string_sized_new (/lib64/libglib-2.0.so.0+0x82b90) (BuildId: 795136df3faa85587229ddc59d709f81d6f697df)
    #4 0x41fb0f in js_polkit_spawn ../src/polkitbackend/polkitbackendduktapeauthority.c:1099
    #5 0x7f3a483b31b8 in duk__handle_call_raw.lto_priv.0 (/lib64/libduktape.so.207+0x2a1b8) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    #6 0x7f3a483962e1 in duk__js_execute_bytecode_inner.lto_priv.0 (/lib64/libduktape.so.207+0xd2e1) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    #7 0x7f3a483b33eb in duk_js_execute_bytecode (/lib64/libduktape.so.207+0x2a3eb) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    #8 0x7f3a483b319d in duk__handle_call_raw.lto_priv.0 (/lib64/libduktape.so.207+0x2a19d) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    #9 0x7f3a48399ab0 in duk__pcall_prop_raw (/lib64/libduktape.so.207+0x10ab0) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    #10 0x7f3a483b23cc in duk_handle_safe_call.lto_priv.0 (/lib64/libduktape.so.207+0x293cc) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    #11 0x7f3a483972e8 in duk_pcall_prop (/lib64/libduktape.so.207+0xe2e8) (BuildId: a9f661ee1766489794e9ece7cfd0d6a7fb420ccb)
    #12 0x41d048 in runaway_killer_thread_call_js ../src/polkitbackend/polkitbackendduktapeauthority.c:682
    #13 0x7f3a4888cb45 in asan_thread_start(void*) (/lib64/libasan.so.8+0x5db45) (BuildId: 388cbb99455c2e2eaec79bd8db6d9a78eb39f80d)

SUMMARY: AddressSanitizer: 359 byte(s) leaked in 3 allocation(s).

* packit: run unit tests during package build
@qsW-git
Copy link

qsW-git commented Jun 27, 2024

Will this patch be accepted by the upstream community?@jrybar-rh @mrc0mmand @Peelz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants