Re: BUG: bisected: thermald regression (MEMLEAK) in commit c7ff29763989bd09c433f73fae3c1e1c15d9cda4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15.11.2022. 15:49, Rafael J. Wysocki wrote:
On Tue, Nov 15, 2022 at 3:40 PM Mirsad Goran Todorovac
<mirsad.todorovac@xxxxxxxxxxxx> wrote:

On 28.10.2022. 20:25, Rafael J. Wysocki wrote:
On Thu, Oct 27, 2022 at 8:20 PM Mirsad Goran Todorovac
<mirsad.todorovac@xxxxxxxxxxxx> wrote:

Re-sending compressed attachments to fit into the size limit.

On 27. 10. 2022. 20:03, Mirsad Goran Todorovac wrote:
P.S.

Forgot another useful thing you've mentioned: please find attached the
dmesg output.

Good luck!

I'm wondering if the problem is reproducible with this patch applied:

https://patchwork.kernel.org/project/linux-acpi/patch/20221019073443.248215-1-chenzhongjin@xxxxxxxxxx/

Dear Rafael,

Thousand apologies. Your email was still bold in my Thunderbird, which
means that I failed to notice it and open it.

The patch applied successfully to commit c7ff29763989 and it is
currently building and still has to undergo torture tests.

Actually, that fix was problematic too.

I would recommend testing with this one applied instead:

https://patchwork.kernel.org/project/linux-acpi/patch/2669303.mvXUDI8C0e@kreacher/

Hi Rafael,

I have applied this patch, as it is evident from the git diff command:

mtodorov@domac:~/linux/kernel/linux_stable_build$ git diff c7ff29763989bd09c433f73fae3c1e1c15d9cda4
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c
index 8e011e59b9b4..ee1832ba39a2 100644
--- a/drivers/acpi/acpica/dsmethod.c
+++ b/drivers/acpi/acpica/dsmethod.c
@@ -517,7 +517,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
        info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
        if (!info) {
                status = AE_NO_MEMORY;
-               goto cleanup;
+               goto pop_walk_state;
        }

        info->parameters = &this_walk_state->operands[0];
@@ -529,7 +529,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,

        ACPI_FREE(info);
        if (ACPI_FAILURE(status)) {
-               goto cleanup;
+               goto pop_walk_state;
        }

        next_walk_state->method_nesting_depth =
@@ -575,6 +575,12 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,

        return_ACPI_STATUS(status);

+pop_walk_state:
+
+       /* On error, pop the walk state to be deleted from thread */
+
+       acpi_ds_pop_walk_state(thread);
+
 cleanup:

        /* On error, we must terminate the method properly */

However, after a couple of hundred executions of:

  for a in {0..2000}; do
	echo $a
	systemctl stop thermald
	sleep 1
	systemctl start thermald
	sleep 1
  done

it first starts with a single leak, until the number of restarts is
greater than 500. Currently the number of unreferenced objects is 93.

Please find the log and config attached.

The script that reproduced the bug was also run simultaneously:

for a in {0..2000}; do echo -n $a': '; \
	grep thermald /sys/kernel/debug/kmemleak | wc -l; \
	cat /sys/kernel/debug/kmemleak > /dev/null; \
	tail -40 /sys/kernel/debug/kmemleak > /dev/null; \
done


--
Mirsad Todorovac
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb
Republic of Croatia, the European Union
--
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu

Attachment: thermald-kmemleak-20221115.log.gz
Description: application/gzip

Attachment: thermald-leak-fix-wysocki.config.gz
Description: application/gzip


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux