linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
To: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	rjw@rjwysocki.net
Cc: regressions@lists.linux.dev, regressions@leemhuis.info,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	Robert Moore <robert.moore@intel.com>,
	devel@acpica.org
Subject: Re: BUG: bisected: thermald regression (MEMLEAK) in commit c7ff29763989bd09c433f73fae3c1e1c15d9cda4
Date: Wed, 26 Oct 2022 19:52:03 +0200	[thread overview]
Message-ID: <6c2f47c8-d6b5-074a-4c8f-e9cd04f62ef4@alu.unizg.hr> (raw)
In-Reply-To: <d034dbbc-613c-1a5e-df64-d0251453c8eb@alu.unizg.hr>

[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]

Dear all,

On 24. 10. 2022. 20:56, Mirsad Goran Todorovac wrote:
> On 24. 10. 2022. 20:39, srinivas pandruvada wrote:
>
>>> Thank you for the patch. Unfortunately, when applied to v6.0.3 it
>>> didn't
>>> fix the issue.
>> Thanks for the test. I copied to acpi and acpica mailing list. Someone
>> can tell us what is this call doing wrong here. 

I have worse news: after every

# systemctl stop thermald
# systemctl start thermald

the number of leaks increases by one allocated block (apparently 80 
bytes). The effect appears to be
cummulative.

Please find the results of the MEMLEAK scan in the attachment.

In theory, motivated adversary could theoretically exhaust  i.e. 8 GiB 
in a loop of 10 million thermald stops/starts,
on my laptop and 2 sec for stop+start, it would be approx. 230 days.

Hope this helps.

Mirsad

-- 

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

[-- Attachment #2: memleak-cummulative.txt --]
[-- Type: text/plain, Size: 8584 bytes --]

unreferenced object 0xffff95e686df7c80 (size 80):
  comm "thermald", pid 853, jiffies 4294894308 (age 1327.784s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 0d 01 2d 00 00 00 00 00  ..........-.....
    af 07 01 40 fe a2 ff ff 00 00 00 00 00 00 00 00  ...@............
  backtrace:
    [<00000000da3c667c>] slab_post_alloc_hook+0x80/0x2e0
    [<000000007820f763>] kmem_cache_alloc+0x171/0x300
    [<00000000c8d00bcc>] acpi_os_acquire_object+0x2c/0x32
    [<000000003aec451a>] acpi_ps_alloc_op+0x4a/0x99
    [<000000008a7f6c81>] acpi_ps_get_next_arg+0x611/0x761
    [<00000000f7fcc03d>] acpi_ps_parse_loop+0x494/0x8d7
    [<0000000078ba6397>] acpi_ps_parse_aml+0x1bb/0x561
    [<00000000e189ac30>] acpi_ps_execute_method+0x20f/0x2d5
    [<0000000078532bb9>] acpi_ns_evaluate+0x34d/0x4f3
    [<0000000071538943>] acpi_evaluate_object+0x180/0x3ae
    [<00000000fdcec938>] acpi_run_osc+0x128/0x250
    [<00000000e0544e57>] int3400_thermal_run_osc+0x6f/0xc0 [int3400_thermal]
    [<000000007a443462>] current_uuid_store+0xe3/0x120 [int3400_thermal]
    [<000000005063ae55>] dev_attr_store+0x14/0x30
    [<000000001ccc0b04>] sysfs_kf_write+0x38/0x50
    [<00000000f24dcffc>] kernfs_fop_write_iter+0x146/0x1d0
unreferenced object 0xffff95e683768820 (size 80):
  comm "thermald", pid 853, jiffies 4294950021 (age 1105.064s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 0d 01 2d 00 00 00 00 00  ..........-.....
    3a 08 01 40 fe a2 ff ff 00 00 00 00 00 00 00 00  :..@............
  backtrace:
    [<00000000da3c667c>] slab_post_alloc_hook+0x80/0x2e0
    [<000000007820f763>] kmem_cache_alloc+0x171/0x300
    [<00000000c8d00bcc>] acpi_os_acquire_object+0x2c/0x32
    [<000000003aec451a>] acpi_ps_alloc_op+0x4a/0x99
    [<000000008a7f6c81>] acpi_ps_get_next_arg+0x611/0x761
    [<00000000f7fcc03d>] acpi_ps_parse_loop+0x494/0x8d7
    [<0000000078ba6397>] acpi_ps_parse_aml+0x1bb/0x561
    [<00000000e189ac30>] acpi_ps_execute_method+0x20f/0x2d5
    [<0000000078532bb9>] acpi_ns_evaluate+0x34d/0x4f3
    [<0000000071538943>] acpi_evaluate_object+0x180/0x3ae
    [<00000000fdcec938>] acpi_run_osc+0x128/0x250
    [<00000000e0544e57>] int3400_thermal_run_osc+0x6f/0xc0 [int3400_thermal]
    [<0000000014b96f7d>] int3400_thermal_change_mode+0xd3/0x110 [int3400_thermal]
    [<000000006ffc8826>] thermal_zone_device_set_mode+0x46/0xc0
    [<0000000036a1f221>] thermal_zone_device_disable+0x10/0x20
    [<00000000502e4e74>] mode_store+0x5c/0x80
unreferenced object 0xffff95e68a6181e0 (size 80):
  comm "thermald", pid 5206, jiffies 4294951963 (age 1097.300s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 0d 01 2d 00 00 00 00 00  ..........-.....
    af 07 01 40 fe a2 ff ff 00 00 00 00 00 00 00 00  ...@............
  backtrace:
    [<00000000da3c667c>] slab_post_alloc_hook+0x80/0x2e0
    [<000000007820f763>] kmem_cache_alloc+0x171/0x300
    [<00000000c8d00bcc>] acpi_os_acquire_object+0x2c/0x32
    [<000000003aec451a>] acpi_ps_alloc_op+0x4a/0x99
    [<000000008a7f6c81>] acpi_ps_get_next_arg+0x611/0x761
    [<00000000f7fcc03d>] acpi_ps_parse_loop+0x494/0x8d7
    [<0000000078ba6397>] acpi_ps_parse_aml+0x1bb/0x561
    [<00000000e189ac30>] acpi_ps_execute_method+0x20f/0x2d5
    [<0000000078532bb9>] acpi_ns_evaluate+0x34d/0x4f3
    [<0000000071538943>] acpi_evaluate_object+0x180/0x3ae
    [<00000000fdcec938>] acpi_run_osc+0x128/0x250
    [<00000000e0544e57>] int3400_thermal_run_osc+0x6f/0xc0 [int3400_thermal]
    [<000000007a443462>] current_uuid_store+0xe3/0x120 [int3400_thermal]
    [<000000005063ae55>] dev_attr_store+0x14/0x30
    [<000000001ccc0b04>] sysfs_kf_write+0x38/0x50
    [<00000000f24dcffc>] kernfs_fop_write_iter+0x146/0x1d0
unreferenced object 0xffff95e687dbe500 (size 80):
  comm "thermald", pid 5206, jiffies 4294952889 (age 1093.724s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 0d 01 2d 00 00 00 00 00  ..........-.....
    3a 08 01 40 fe a2 ff ff 00 00 00 00 00 00 00 00  :..@............
  backtrace:
    [<00000000da3c667c>] slab_post_alloc_hook+0x80/0x2e0
    [<000000007820f763>] kmem_cache_alloc+0x171/0x300
    [<00000000c8d00bcc>] acpi_os_acquire_object+0x2c/0x32
    [<000000003aec451a>] acpi_ps_alloc_op+0x4a/0x99
    [<000000008a7f6c81>] acpi_ps_get_next_arg+0x611/0x761
    [<00000000f7fcc03d>] acpi_ps_parse_loop+0x494/0x8d7
    [<0000000078ba6397>] acpi_ps_parse_aml+0x1bb/0x561
    [<00000000e189ac30>] acpi_ps_execute_method+0x20f/0x2d5
    [<0000000078532bb9>] acpi_ns_evaluate+0x34d/0x4f3
    [<0000000071538943>] acpi_evaluate_object+0x180/0x3ae
    [<00000000fdcec938>] acpi_run_osc+0x128/0x250
    [<00000000e0544e57>] int3400_thermal_run_osc+0x6f/0xc0 [int3400_thermal]
    [<0000000014b96f7d>] int3400_thermal_change_mode+0xd3/0x110 [int3400_thermal]
    [<000000006ffc8826>] thermal_zone_device_set_mode+0x46/0xc0
    [<0000000036a1f221>] thermal_zone_device_disable+0x10/0x20
    [<00000000502e4e74>] mode_store+0x5c/0x80
unreferenced object 0xffff95e687a34cd0 (size 80):
  comm "thermald", pid 5214, jiffies 4294953628 (age 1090.768s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 0d 01 2d 00 00 00 00 00  ..........-.....
    af 07 01 40 fe a2 ff ff 00 00 00 00 00 00 00 00  ...@............
  backtrace:
    [<00000000da3c667c>] slab_post_alloc_hook+0x80/0x2e0
    [<000000007820f763>] kmem_cache_alloc+0x171/0x300
    [<00000000c8d00bcc>] acpi_os_acquire_object+0x2c/0x32
    [<000000003aec451a>] acpi_ps_alloc_op+0x4a/0x99
    [<000000008a7f6c81>] acpi_ps_get_next_arg+0x611/0x761
    [<00000000f7fcc03d>] acpi_ps_parse_loop+0x494/0x8d7
    [<0000000078ba6397>] acpi_ps_parse_aml+0x1bb/0x561
    [<00000000e189ac30>] acpi_ps_execute_method+0x20f/0x2d5
    [<0000000078532bb9>] acpi_ns_evaluate+0x34d/0x4f3
    [<0000000071538943>] acpi_evaluate_object+0x180/0x3ae
    [<00000000fdcec938>] acpi_run_osc+0x128/0x250
    [<00000000e0544e57>] int3400_thermal_run_osc+0x6f/0xc0 [int3400_thermal]
    [<000000007a443462>] current_uuid_store+0xe3/0x120 [int3400_thermal]
    [<000000005063ae55>] dev_attr_store+0x14/0x30
    [<000000001ccc0b04>] sysfs_kf_write+0x38/0x50
    [<00000000f24dcffc>] kernfs_fop_write_iter+0x146/0x1d0
unreferenced object 0xffff95e687a34820 (size 80):
  comm "thermald", pid 5214, jiffies 4295194182 (age 128.568s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 0d 01 2d 00 00 00 00 00  ..........-.....
    3a 08 01 40 fe a2 ff ff 00 00 00 00 00 00 00 00  :..@............
  backtrace:
    [<00000000da3c667c>] slab_post_alloc_hook+0x80/0x2e0
    [<000000007820f763>] kmem_cache_alloc+0x171/0x300
    [<00000000c8d00bcc>] acpi_os_acquire_object+0x2c/0x32
    [<000000003aec451a>] acpi_ps_alloc_op+0x4a/0x99
    [<000000008a7f6c81>] acpi_ps_get_next_arg+0x611/0x761
    [<00000000f7fcc03d>] acpi_ps_parse_loop+0x494/0x8d7
    [<0000000078ba6397>] acpi_ps_parse_aml+0x1bb/0x561
    [<00000000e189ac30>] acpi_ps_execute_method+0x20f/0x2d5
    [<0000000078532bb9>] acpi_ns_evaluate+0x34d/0x4f3
    [<0000000071538943>] acpi_evaluate_object+0x180/0x3ae
    [<00000000fdcec938>] acpi_run_osc+0x128/0x250
    [<00000000e0544e57>] int3400_thermal_run_osc+0x6f/0xc0 [int3400_thermal]
    [<0000000014b96f7d>] int3400_thermal_change_mode+0xd3/0x110 [int3400_thermal]
    [<000000006ffc8826>] thermal_zone_device_set_mode+0x46/0xc0
    [<0000000036a1f221>] thermal_zone_device_disable+0x10/0x20
    [<00000000502e4e74>] mode_store+0x5c/0x80
unreferenced object 0xffff95e687dbe4b0 (size 80):
  comm "thermald", pid 5763, jiffies 4295197814 (age 114.188s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 0d 01 2d 00 00 00 00 00  ..........-.....
    af 07 01 40 fe a2 ff ff 00 00 00 00 00 00 00 00  ...@............
  backtrace:
    [<00000000da3c667c>] slab_post_alloc_hook+0x80/0x2e0
    [<000000007820f763>] kmem_cache_alloc+0x171/0x300
    [<00000000c8d00bcc>] acpi_os_acquire_object+0x2c/0x32
    [<000000003aec451a>] acpi_ps_alloc_op+0x4a/0x99
    [<000000008a7f6c81>] acpi_ps_get_next_arg+0x611/0x761
    [<00000000f7fcc03d>] acpi_ps_parse_loop+0x494/0x8d7
    [<0000000078ba6397>] acpi_ps_parse_aml+0x1bb/0x561
    [<00000000e189ac30>] acpi_ps_execute_method+0x20f/0x2d5
    [<0000000078532bb9>] acpi_ns_evaluate+0x34d/0x4f3
    [<0000000071538943>] acpi_evaluate_object+0x180/0x3ae
    [<00000000fdcec938>] acpi_run_osc+0x128/0x250
    [<00000000e0544e57>] int3400_thermal_run_osc+0x6f/0xc0 [int3400_thermal]
    [<000000007a443462>] current_uuid_store+0xe3/0x120 [int3400_thermal]
    [<000000005063ae55>] dev_attr_store+0x14/0x30
    [<000000001ccc0b04>] sysfs_kf_write+0x38/0x50
    [<00000000f24dcffc>] kernfs_fop_write_iter+0x146/0x1d0

  reply	other threads:[~2022-10-26 17:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <e0f06714-5a49-a4e6-24e6-c4103c820819@alu.unizg.hr>
2022-10-24 15:51 ` BUG: bisected: thermald regression (MEMLEAK) in commit c7ff29763989bd09c433f73fae3c1e1c15d9cda4 srinivas pandruvada
2022-10-24 18:34   ` Mirsad Goran Todorovac
2022-10-24 18:39     ` srinivas pandruvada
2022-10-24 18:56       ` Mirsad Goran Todorovac
2022-10-26 17:52         ` Mirsad Goran Todorovac [this message]
2022-10-26 22:48           ` srinivas pandruvada
     [not found]             ` <78e347e9-c8b1-f228-ca32-0ad6186a6285@alu.unizg.hr>
2022-10-27 18:20               ` Mirsad Goran Todorovac
2022-10-28 18:25                 ` Rafael J. Wysocki
2022-11-15 10:36                   ` Thorsten Leemhuis
2022-11-15 11:17                     ` Mirsad Goran Todorovac
2022-11-15 14:40                   ` Mirsad Goran Todorovac
2022-11-15 14:49                     ` Rafael J. Wysocki
2022-11-15 18:57                       ` Mirsad Goran Todorovac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c2f47c8-d6b5-074a-4c8f-e9cd04f62ef4@alu.unizg.hr \
    --to=mirsad.todorovac@alu.unizg.hr \
    --cc=devel@acpica.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=regressions@leemhuis.info \
    --cc=regressions@lists.linux.dev \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).