Framework 16.0.50: YUM lock messages parsed as RPM package names (Exit Code 2)

Additional finding: Exit code 2 caused by YUM lock messages being parsed as package names

During further investigation on our production FreePBX 16 system, we identified a second issue in Framework 16.0.50.

This issue is independent of the German GUI locale problem described in my original report.

Environment:

  • FreePBX 16, Framework 16.0.50

  • Sangoma Linux 7

  • PHP 7.4.33

  • System update transaction completed successfully

Problem:

After installing the available system updates, the System Updates page failed with:

RPM command errored, Delete /dev/shm/yumwrapper/* and try again.
Exit code 2 - see FreePBX log for more info.

The FreePBX log showed the following RPM command:

/usr/bin/rpm -q --queryformat "%{NAME}.%{ARCH} %{VERSION}.%{RELEASE}\n" Existing Another

We traced the package names Existing and Another back to the contents of /dev/shm/yumwrapper/yum-check-updates-current.log:

Existing lock /var/run/yum.pid: another copy is running as pid 8360.
Another app is currently holding the yum lock; waiting for it to exit...

FreePBX apparently parsed the first words of these YUM diagnostic messages as package names.

Running the RPM command manually confirmed:

package Existing is not installed
package Another is not installed
Exit-Code: 2

The system update itself had completed successfully:

Transaction ID : 45
Return-Code    : Success
Command Line   : -y update

No YUM or RPM processes were running afterward, and /var/run/yum.pid no longer existed.

Confirmed workaround:

We backed up and removed the four temporary log files in /dev/shm/yumwrapper/.

After clearing these files, the FreePBX System Updates page worked again without modifying any Framework files.

Related reports:

A similar Exit Code 2 problem and the same cache-clearing workaround were reported in the FreePBX Community forum:

A related error message was also reported in the FreePBX Framework GitHub repository:

These reports do not necessarily establish the same underlying cause, but they suggest that this error condition has occurred on other systems.

Suggested improvement:

The System Updates parser should distinguish valid package update entries from YUM informational messages, warnings, and lock-related diagnostics.

Messages such as Existing lock or Another app is currently holding the yum lock should never be interpreted as RPM package names.

This appears to be a separate parsing issue from the locale-dependent handling of missing RPM packages described in my original report.