Hi Esa,
Did you verify the ulimit value of "-d" and "-m" in both Power8 and Power9.
I see same behaviour in P8 & P9 if ulimit value is not set to unlimited.
This is on my P8 system
# 7z a -p ../demo.7z *bytes
7-Zip 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US,Utf16=on,HugeFiles=on,64 bits,1 CPU BE)
Scanning the drive:
7 files, 21338044 bytes (21 MiB)
Creating archive: ../demo.7z
Items to compress: 7
Enter password (will not be echoed):
Verify password (will not be echoed) :
ERROR: Can't allocate required memory!
# ulimit -d unlimited
# ulimit -m unlimited
# 7z a -p ../demo.7z *bytes
7-Zip 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US,Utf16=on,HugeFiles=on,64 bits,1 CPU BE)
Scanning the drive:
7 files, 21338044 bytes (21 MiB)
Creating archive: ../demo.7z
Items to compress: 7
Enter password (will not be echoed):
Verify password (will not be echoed) :
Files read from disk: 7
Archive size: 21339495 bytes (21 MiB)
Everything is Ok
#
This is on my P9 system.
# 7z a -p ../demo.7z *bytes
7-Zip 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,1 CPU BE)
Scanning the drive:
7 files, 21338044 bytes (21 MiB)
Creating archive: ../demo.7z
Items to compress: 7
Enter password (will not be echoed):
Verify password (will not be echoed) :
ERROR: Can't allocate required memory!
# ulimit -d unlimited
# ulimit -m unlimited
# 7z a -p ../demo.7z *bytes
7-Zip 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,1 CPU BE)
Scanning the drive:
7 files, 21338044 bytes (21 MiB)
Creating archive: ../demo.7z
Items to compress: 7
Enter password (will not be echoed):
Verify password (will not be echoed) :
Files read from disk: 7
Archive size: 21339486 bytes (21 MiB)
Everything is Ok
------------------------------
SANGAMESH
------------------------------
Original Message:
Sent: Tue March 26, 2024 11:00 AM
From: Esa Kärkkäinen
Subject: 7z "ERROR: Can't allocate required memory!" on POWER9
Hello,
TL:DR running "7z a -p ../demo.7z *bytes" on POWER9 fails, but same command works on POWER8, same AIX version on p8 and p9, same p7zip package installed on p8 and p9.
Yes, there is a workaround for p9.
The file sizes are somewhat random as is the file content.
FIle content does not matter, because the compressed files have been created on several AIX instances.
Nor does the password used matter, it can be secure, long and generated or literally "password", command without "-mx=" will fail on p9.
I didn't try other "-mx" values on p9.
Environment setup
% mkdir 7zdemo
% cd 7zdemo
% for i in 210147 47538 5773714 3408712 4816578 1839375 5241980
do
dd if=/dev/random of=$i.bytes bs=$i count=1
done
% ls -l
total 41704
-rw-r--r-- 1 username group 1839375 Mar 26 16:07 1839375.bytes
-rw-r--r-- 1 username group 210147 Mar 26 16:07 210147.bytes
-rw-r--r-- 1 username group 3408712 Mar 26 16:07 3408712.bytes
-rw-r--r-- 1 username group 47538 Mar 26 16:07 47538.bytes
-rw-r--r-- 1 username group 4816578 Mar 26 16:07 4816578.bytes
-rw-r--r-- 1 username group 5241980 Mar 26 16:07 5241980.bytes
-rw-r--r-- 1 username group 5773714 Mar 26 16:07 5773714.bytes
On POWER9:
% oslevel -s
7200-05-07-2346
% 7z a -p ../demo.7z *bytes
7-Zip 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,64 bits,1 CPU BE)
Scanning the drive:
7 files, 21338044 bytes (21 MiB)
Creating archive: ../demo.7z
Items to compress: 7
Enter password (will not be echoed):
Verify password (will not be echoed) :
ERROR: Can't allocate required memory!
% 7z a -mx=1 -p ../demo.7z *bytes
7-Zip 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,64 bits,1 CPU BE)
Scanning the drive:
7 files, 21338044 bytes (21 MiB)
Creating archive: ../demo.7z
Items to compress: 7
Enter password (will not be echoed):
Verify password (will not be echoed) :
Files read from disk: 7
Archive size: 21339524 bytes (21 MiB)
Everything is Ok
%
On POWER8:
% oslevel -s
7200-05-07-2346
% 7z a -p ../demo.7z *bytes
7-Zip 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US,Utf16=on,HugeFiles=on,64 bits,1 CPU BE)
Scanning the drive:
7 files, 21338044 bytes (21 MiB)
Creating archive: ../demo.7z
Items to compress: 7
Enter password (will not be echoed):
Verify password (will not be echoed) :
Files read from disk: 7
Archive size: 21339494 bytes (21 MiB)
Everything is Ok
------------------------------
Esa Kärkkäinen
------------------------------