ATRA: SM50 displays semaphore 51, many trace files
[displays] [java semaphore] [trace] [video trace]
- ldap_rfc patch level is not output in traceSymptom The current patch level is not apparent in the trace of ldap_rfc. In addition, the trace of ldap_rfc specifies an incorrect release in Releases 701, 711, and 720. Other terms LDAP...
Symptom
At least one of the following problems occurred:
1. Transaction SM50 repeatedly displays semaphore 51 as a reason for waiting for processes. In the directory DIR_DATA, there are approximately 10,000 files that have the prefix AT.2. The system repeatedly starts new ABAP runtime measurements, even if no measurements are scheduled and the profile parameter rstr/accept_remote_trace has value 0 or FALSE.
Reason and Prerequisites
1. During the ABAP runtime measurement, the kernel writes the performance data into a file in the directory DIR_DATA. Depending on the platform, the name of such a file is structured as follows:
Windows AT
Other platforms AT
In this case,
A total of 10,000 performance data files can be created as a result.
Each work process stores the number n of the last file that it created. If a new measurement process is to be started in a work process, the system checks whether such a file already exists starting with number n+1.
If 10,000 files already exist, the system checks all 10,000 files until it determines that all the file names have been used up. This process takes a long time.
Note the following additional problem: This action is performed under semaphore protection; in other words, if an additional process tries to start a measurement, it must wait until the first process has finished checking all 10,000 files and it then repeats the same process.
Therefore, the performance of the application server may be poor.2. ABAP runtime measurements can be started either within an application server or externally. If they are started externally, the trace requirement is inherited using the HTTP/RFC interface. To prevent traces from being written, the target server can then set the dynamic profile parameter rstr/accept_remote_trace to value 0.
If you use a stateful application, the context is retained. Since up to now, the parameter is checked only once (when a new context is created), the system may repeatedly start runtime measurements, even if the parameter rstr/accept_remote_trace is set to value 0.
Solution
These problems have been corrected with a kernel patch:
1. The check for available file names has been optimized so that performance problems no longer occur.2. When an ABAP runtime measurement is started, the system always takes the current value of the profile parameter rstr/accept_remote_trace into account.
See the “SP Patch Level” section for information about the patch level that is valid for your release.
In 7.0, patch level 212 still contains an error, which can be corrected by applying patch level 213. As a result of this error, the number of available trace files may fall below 10,000 if you had already created 10,000 files and then deleted them.