https://bugs.kde.org/show_bug.cgi?id=385055

            Bug ID: 385055
           Summary: PPC VEX temporary storage exhausted
           Product: valgrind
           Version: 3.14 SVN
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: vex
          Assignee: jsew...@acm.org
          Reporter: c...@us.ibm.com
  Target Milestone: ---

Power 9 application is receiving the error

Pool = TEMP,  start 0x5861af28 curr 0x58adfa48 end 0x58adfa67 (size
5000000)
 vex: the `impossible' happened:
 VEX temporary storage exhausted.
 Increase N_{TEMPORARY,PERMANENT}_BYTES and recompile.

I increased the N_TEMPORARY_BYTES and N_PERMANENT_BYTES #defines as
given below.

--- a/VEX/priv/main_util.c
+++ b/VEX/priv/main_util.c
@@ -55,10 +55,10 @@
 #if defined(ENABLE_INNER)
 /* 5 times more memory to be on the safe side:  consider each
allocation is
    8 bytes, and we need 16 bytes redzone before and after. */
-#define N_TEMPORARY_BYTES (5*5000000)
+#define N_TEMPORARY_BYTES (5*2000000000)
 static Bool mempools_created = False;
 #else
-#define N_TEMPORARY_BYTES 5000000
+#define N_TEMPORARY_BYTES 2000000000
 #endif

 static HChar  temporary[N_TEMPORARY_BYTES]
__attribute__((aligned(REQ_ALIGN)));
@@ -70,9 +70,9 @@ static ULong  temporary_bytes_allocd_TOT = 0;

 #if defined(ENABLE_INNER)
 /* See N_TEMPORARY_BYTES */
-#define N_PERMANENT_BYTES (5*10000)
+#define N_PERMANENT_BYTES (5*100000)
 #else
-#define N_PERMANENT_BYTES 10000
+#define N_PERMANENT_BYTES 100000


Once these were increased both workloads then hit the error:

x264 [info]: profile High, level 3.1

vex: priv/host_generic_reg_alloc3.c:470 (doRegisterAllocation_v3):
Assertion `instrs_in->arr_used <= 15000' failed.
vex storage: T total 373013384 bytes allocated
vex storage: P total 192 bytes allocated

The issue appears to be the same issue seen on arm64 in bugzilla

https://bugs.kde.org/show_bug.cgi?id=375839

Per this bugzill, it was found that using the command line option
--vex-guest-max-insns=2 allowed the application to run but does appear to run
with a significant performance hit.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to