You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I said, I am not sure to fully understand, but it looks like it is due to the weakref. When we are in __deleteTQIfEmpty, it's like the streams have already been cleaned up, and the logger, even if it's still alive, cannot emit the messages anymore.
Quick and easy but a bit ugly fixes would consist in:
removing the log statements from __deleteTQIfEmpty, not a good idea
wrap the log statements in try/except blocks
Should we take the time to investigate the issue? I am not so sure as it doesn't seem to happen in production (probably just in the tests).
---Loggingerror---Traceback (mostrecentcalllast):
File"/home/dirac/ServerInstallDIR/diracos/lib/python3.11/logging/__init__.py", line1113, inemitstream.write(msg+self.terminator)
ValueError: I/Ooperationonclosedfile.
Callstack:
File"/home/dirac/ServerInstallDIR/diracos/lib/python3.11/weakref.py", line666, in_exitfuncf()
File"/home/dirac/ServerInstallDIR/diracos/lib/python3.11/weakref.py", line590, in__call__returninfo.func(*info.args, **(info.kwargsor {}))
File"/home/dirac/ServerInstallDIR/diracos/lib/python3.11/site-packages/DIRAC/Core/Utilities/DictCache.py", line246, in_purgeAlldeleteFunction(cache[cKey]["value"])
File"/home/dirac/ServerInstallDIR/diracos/lib/python3.11/site-packages/DIRAC/WorkloadManagementSystem/DB/TaskQueueDB.py", line950, in__deleteTQIfEmptyresult=self.deleteTaskQueueIfEmpty(tqId, tqOwner, tqOwnerGroup)
File"/home/dirac/ServerInstallDIR/diracos/lib/python3.11/site-packages/DIRAC/WorkloadManagementSystem/DB/TaskQueueDB.py", line976, indeleteTaskQueueIfEmptyretVal=self._query(sqlCmd, conn=connObj)
File"/home/dirac/ServerInstallDIR/diracos/lib/python3.11/site-packages/DIRAC/Core/Utilities/MySQL.py", line718, in_queryself.log.debug(f"_query: {self._safeCmd(cmd)}")
File"/home/dirac/ServerInstallDIR/diracos/lib/python3.11/site-packages/DIRAC/FrameworkSystem/private/standardLogging/Logging.py", line [340](https://github.com/DIRACGrid/DIRAC/actions/runs/11820090778/job/32931577624#step:12:341), in debugreturnself._createLogRecord(LogLevels.DEBUG, sMsg, sVarMsg)
File"/home/dirac/ServerInstallDIR/diracos/lib/python3.11/site-packages/DIRAC/FrameworkSystem/private/standardLogging/Logging.py", line407, in_createLogRecordself._logger.log(level, "%s", sMsg, exc_info=exc_info, extra=extra)
Message: '%s'Arguments: ('_query: SELECT TQId FROM `tq_TaskQueues` WHERE Enabled >= 1 AND `tq_TaskQueues`.TQId = 2 AND `tq_TaskQueues`.TQId not in ( SELECT DISTINCT TQId from `tq_Jobs` )',)
The text was updated successfully, but these errors were encountered:
Reported in #7924
As I said, I am not sure to fully understand, but it looks like it is due to the
weakref
. When we are in__deleteTQIfEmpty
, it's like the streams have already been cleaned up, and the logger, even if it's still alive, cannot emit the messages anymore.Quick and easy but a bit ugly fixes would consist in:
__deleteTQIfEmpty
, not a good ideatry/except
blocksShould we take the time to investigate the issue? I am not so sure as it doesn't seem to happen in production (probably just in the tests).
The text was updated successfully, but these errors were encountered: