-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
4.0.6
-
MOODLE_400_STABLE
Assignment submission files may not be in moodledata/filedir.
Submitting the same file in which the problem occurred does not reproduce it.
This issue occurs with a frequency of approximately between 1% and 0.01% regardless of file type.
It occurs more frequently than the problem (MDL-73015) previously reported in Moodle 3.9.3.
・Version used in the environment where the problem occurred
Moodle: 4.0.6
MariaDB: 10.4.8
PHP: 8.0.28
OS: Red Hat Enterprise Linux release 8.1
Web Server: Apache 2.4.37
・Records in the mdl_files table
In this example, only "3. row (xxxx_day14.png)" has a problem and there is no file on the server
In order to protect information, the DB name filename, author value and moodledata directory name are changed from the one that actually caused the problem.
MariaDB [moodle]> SELECT * FROM mdl_files WHERE filename LIKE "%xxxx_day14%" ORDER BY ID LIMIT 3\G
|
*************************** 1. row ***************************
|
id: 20611759
|
contenthash: da31a8f78d3cef1a27b3ba013e04e1c648dd58c4
|
pathnamehash: 5dadb7f05da344df63052f7d9100b34e015ff47c
|
contextid: 1039979
|
component: user
|
filearea: draft
|
itemid: 293377041
|
filepath: /
|
filename: xxxx_day14.txt
|
userid: 55282
|
filesize: 1459
|
mimetype: text/plain
|
status: 0
|
source: O:8:"stdClass":1:{s:6:"source";s:18:"xxxx_day14.txt";}
|
author: author
|
license: allrightsreserved
|
timecreated: 1690004075
|
timemodified: 1690004075
|
sortorder: 0
|
referencefileid: NULL
|
*************************** 2. row ***************************
|
id: 20611762
|
contenthash: c91ffaee201f5006ef46adae9df5cd352a055108
|
pathnamehash: bcae85eeb77adacabf1e8b5229c5cdde590cba43
|
contextid: 1039979
|
component: user
|
filearea: draft
|
itemid: 293377041
|
filepath: /
|
filename: xxxx_day14.py
|
userid: 55282
|
filesize: 1441
|
mimetype: text/plain
|
status: 0
|
source: O:8:"stdClass":1:{s:6:"source";s:17:"xxxx_day14.py";}
|
author: author
|
license: allrightsreserved
|
timecreated: 1690004075
|
timemodified: 1690004075
|
sortorder: 0
|
referencefileid: NULL
|
*************************** 3. row ***************************
|
id: 20611768
|
contenthash: e87ea99aa74a1e1ad7328438e7eca8265007b7b7
|
pathnamehash: b3acdde40052e6411fda4cf41157938e8a2da4af
|
contextid: 1039979
|
component: user
|
filearea: draft
|
itemid: 293377041
|
filepath: /
|
filename: xxxx_day14.png
|
userid: 55282
|
filesize: 217705
|
mimetype: image/png
|
status: 0
|
source: O:8:"stdClass":1:{s:6:"source";s:18:"xxxx_day14.png";}
|
author: author
|
license: allrightsreserved
|
timecreated: 1690004098
|
timemodified: 1690004098
|
sortorder: 0
|
referencefileid: NULL
|
Modified date and time of files and directories
[root@ap01 31]# ls -l --full-time /mnt/nfs/var/www/moodledata/filedir/da/31/da31a8f78d3cef1a27b3ba013e04e1c648dd58c4
rw-rw-rw 1 apache apache 1459 2023-07-22 14:34:35.505918165 +0900 /mnt/nfs/var/www/moodledata23/filedir/da/31/da31a8f78d3cef1a27b3ba013e04e1c648dd58c4
[root@ap01 31]# ls -l --full-time /mnt/nfs/var/www/moodledata/filedir/c9/1f/c91ffaee201f5006ef46adae9df5cd352a055108
rw-rw-rw 1 apache apache 1441 2023-07-22 14:34:35.873916473 +0900 /mnt/nfs/var/www/moodledata23/filedir/c9/1f/c91ffaee201f5006ef46adae9df5cd352a055108
[root@ap01 ~]# ls -l --full-time /mnt/nfs/var/www/moodledata/filedir/e8/7e/e87ea99aa74a1e1ad7328438e7eca8265007b7b7
ls: cannot access '/mnt/nfs/var/www/moodledata/filedir/e8/7e/e87ea99aa74a1e1ad7328438e7eca8265007b7b7': No such file or directory
[root@ap01 ~]# ls -l --full-time /mnt/nfs/var/www/moodledata/filedir/da | grep " 31"
drwxrwxrwx 2 apache apache 4096 2023-07-22 14:34:35.509918147 +0900 31
[root@ap01 ~]# ls -l --full-time /mnt/nfs/var/www/moodledata/filedir/c9 | grep " 1f"
drwxrwxrwx 2 apache apache 4096 2023-07-22 14:34:35.877916454 +0900 1f
[root@ap01 ~]# ls -l --full-time /mnt/nfs/var/www/moodledata/filedir/e8 | grep " 7e"
drwxrwxrwx 2 apache apache 4096 2023-07-22 14:34:45.838870645 +0900 7e
Strangely, the modified time of the missing file directory is not timecreated at 14:34:58, but 14:34:45, 13 seconds earlier.
/var/log/messages, no php-fpm, Apache and MariaDB error logs at the time of the problem
To check if this is a Moodle bug,
Please let me know if there is a Moodle that has a similar problem