Why Are Logs Printed Without Enabling the Log Printing?

Symptom

Log printing (set by running the export ASCEND_SLOG_PRINT_TO_STDOUT=1 command) is not enabled, but logs are still printed to the screen.

Possible Cause

After receiving log messages, the log module determines whether to print them to the screen based on the environment variable setting. If log printing is not enabled, a socket is created and connected to the slogd process. Behind the scene, the log messages are transferred to the slogd process and then flushed by the process. If the socket fails to be created, the logs are printed on the screen.

Solution

The possible cause is that the number of opened files exceeds the maximum number of files allowed by the system when you are attempting to run test cases. You can run the ulimit -a command to query the default maximum number (value of the open files field) of files that can be opened at a time, and then run the lsof | wc -l command to view the number of files that have been opened. Check whether the allowed upper limit has been reached. If yes, run the ulimit -n <num> command to change the maximum value as required.