On 26 Apr 2022, at 17:08, Qian Cai wrote: > On Tue, Apr 26, 2022 at 04:26:08PM -0400, Zi Yan wrote: >> Thanks for reporting the issue. Do you have a reproducer I can use to debug the code? > > Nothing fancy. It just try to remove and add back each memory section. > > #!/usr/bin/env python3 > # SPDX-License-Identifier: GPL-2.0 > > import os > import re > import subprocess > > > def mem_iter(): > base_dir = '/sys/devices/system/memory/' > for curr_dir in os.listdir(base_dir): > if re.match(r'memory\d+', curr_dir): > yield base_dir + curr_dir > > > if __name__ == '__main__': > print('- Try to remove each memory section and then add it back.') > for mem_dir in mem_iter(): > status = f'{mem_dir}/online' > if open(status).read().rstrip() == '1': > # This could expectedly fail due to many reasons. > section = os.path.basename(mem_dir) > print(f'- Try to remove {section}.') > proc = subprocess.run([f'echo 0 | sudo tee {status}'], shell=True) > if proc.returncode == 0: > print(f'- Try to add {section}.') > subprocess.check_call([f'echo 1 | sudo tee {status}'], shell=True) Thanks. Do you mind attaching your config file? I cannot reproduce the deadlock locally using my own config. I also see kmemleak_scan in the dumped stack, so it must be something else in addition to memory online/offline causing the issue. -- Best Regards, Yan, Zi