cf login failures for IDP accounts that are assigned Space Developer role on a large number of spaces (~30 or more spaces).cf login command with the impacted user when targeting an ORG and SPACE in the login command.[FAILED] API endpoint: https://<CF_API_FQDN> | | | Authenticating... | OK | | API endpoint: https://<CF_API_FQDN> | API version: 3.217.0 | user: <USER_ACCOUNT> | No org or space targeted, use 'cf8 target -o ORG -s SPACE' | FAILEDcf login attempts targeting ORG And SPACE will appear like:
./cf8 login -a https://<CF_API_FQDN> -u <USER_ACCOUNT> -p $password -o <ORG_NAME> -s <SPACE_NAME>API endpoint: https://<CF_API_FQDN>Authenticating...OK
API endpoint: https://<CF_API_FQDN>API version: 3.217.0user: <USER_ACCOUNT>No org or space targeted, use 'cf8.exe target -o ORG -s SPACE'Organization '<ORG_NAME>' not found.FAILED
This defect was traced to MySQL bug #116741.
The problem is caused when a query uses in-memory temporary tables and those tables are converted to on-disk temporary tables due to memory pressure. For certain query patterns, this leads the MySQL executor to skip evaluation of a materialized subquery - in this case, effectively looking like organization role membership is empty.
MySQL components are fixed in version 8.4.11. The below workaround is present in the 10.4.4 patch release of EAR and should resolve login failures. A fix containing the new MySQL 8.4.11 will be provided in a future release of the EAR/TAS tile. 10.2.x line of EAR uses MySQL v8.0, which defaults to using the "temptable_use_mmap = on" option and is therefore unaffected by this issue.
There are two workaround options: Ephemeral, and Persistent. Both workarounds involve increasing the memory and temporary disk limits for temptables in the database configuration.
Ephemeral Workaround This setting takes effect immediately but reverts after a MySQL restart. Perform this on the primary node:
mysql --defaults-file=/var/vcap/jobs/pxc-mysql/config/mylogin.cnfuse ccdb;
SET GLOBAL temptable_use_mmap = ON, temptable_max_mmap = 1024*1024*1024 /*1GiB*/;
Persistent Workaround To persist this configuration across MySQL restarts, patch the tile metadata from Opsman VM:
METADATA_FILE=$(sudo find /var/tempest/workspaces/default/metadata -name "*.yml" -exec grep -l "^name: cf" {} \; | grep -v product)sudo cp -a $METADATA_FILE $METADATA_FILE.origsudo sed -i -E 's/^([[:space:]])engine_config:[[:space:]]$/&\n\1 additional_raw_entries: { mysqld: { temptable_use_mmap: "ON", temptable_max_mmap: "1G" } }/' $METADATA_FILE
NOTE FOR PERSISTENT WORKAROUND FAILURES: The persistent workaround may fail on Step 3 (METADATA_FILE backup step) with errors like:
cp: target '/var/tempest/workspaces/default/metadata/product-template20260630-1952-8s9nsn.yml.orig' is not a directory
This failure occurs because there are multiple deployment manifests for this tile in the /var/tempest/workspaces/default/metadata folder and the command expects a single file to be returned for the METADATA_FILE environment variable used in Step 2. Correct this with the following steps:
sudo find /var/tempest/workspaces/default/metadata -name "*.yml" -exec grep -l "^name: cf" {} \; | grep -v productproduct_version line, which should show the older version and the newer version. Select the newer version file (for example 10.4.2) by using the following command in Step 2 of the persistent workaround, then proceed with steps 3-5:sudo find /var/tempest/workspaces/default/metadata -name "*.yml" -exec grep -l "^name: cf" {} \;| grep -v product |sudo xargs grep -l "product_version: 10.4.2"METADATA_FILE=$(sudo find /var/tempest/workspaces/default/metadata -name "*.yml" -exec grep -l "^name: cf" {} \;| grep -v product |sudo xargs grep -l "product_version: 10.4.2")
It is possible the 1GiB limit applied in the Workaround options may require a larger size. This isn't a per-query allowance, but a shared pool that every connection to the database draws from at the same time.
As more users hit the system at once, or as the data itself grows, that shared pool gets used up faster, so the same 1GB (now 2GB) padding doesn't go as far.
The current allocations can be checked via a database query under MySQL v8.4 to determine if this limit requires further increase:
mysql> SELECTEVENT_NAME,CURRENT_NUMBER_OF_BYTES_USED / 1024 / 1024 AS current_mb,HIGH_NUMBER_OF_BYTES_USED / 1024 / 1024 AS peak_mbFROM performance_schema.memory_summary_global_by_event_nameWHERE EVENT_NAME LIKE 'memory/temptable/%';
+--------------------------------+-------------+-------------+| EVENT_NAME | current_mb | peak_mb |+--------------------------------+-------------+-------------+| memory/temptable/physical_disk | 0.00000000 | 0.00000000 || memory/temptable/physical_ram | 18.00054932 | 27.00082397 |+--------------------------------+-------------+-------------+2 rows in set (0.14 sec)