Skip to content

PHP 8 crash: TypeError: strtotime(): Argument #1 ($datetime) must be of type string, null given in vendor/magento/module-security/Model/AdminSessionInfo.php:136 #35837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 5 tasks
snez opened this issue Jul 28, 2022 · 7 comments
Labels
Area: Upgrades - Upgrade Compatibility Tool Component: Backup Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reported on 2.4.4 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@snez
Copy link

snez commented Jul 28, 2022

Preconditions and environment

  • Magento version 2.4.4
  • PHP 8.x

Steps to reproduce

Enabled and rolled db backup as per Devdocs
On running the command bin/magento setup:rollback [-c|--code-file=""] [-m|--media-file=""] [-d|--db-file=""], below php error is getting displayed on both the instances.

Expected result

Restore DB backup is successful.

Actual result

main.ERROR: SQLSTATE[HY000]: General error: 1100 Table 'queue_lock' was not locked with LOCK TABLES, query was: DELETE FROM `queue_lock` WHERE (created_at <= '2022-07-28 11:23:15') #0 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php(91): Magento\Framework\DB\Statement\Pdo\Mysql->tryExecute() #1 /var/www/html/mgce/magento2/vendor/magento/zendframework1/library/Zend/Db/Statement.php(313): Magento\Framework\DB\Statement\Pdo\Mysql->_execute() #2 /var/www/html/mgce/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute() #3 /var/www/html/mgce/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query() #4 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(564): Zend_Db_Adapter_Pdo_Abstract->query() #5 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(634): Magento\Framework\DB\Adapter\Pdo\Mysql->_query() #6 /var/www/html/mgce/magento2/generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php(95): Magento\Framework\DB\Adapter\Pdo\Mysql->query() #7 /var/www/html/mgce/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(664): Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->query() #8 /var/www/html/mgce/magento2/generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php(1067): Zend_Db_Adapter_Abstract->delete() #9 /var/www/html/mgce/magento2/app/code/Magento/MessageQueue/Model/ResourceModel/Lock.php(103): Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->delete() #10 /var/www/html/mgce/magento2/app/code/Magento/MessageQueue/Model/Plugin/ResourceModel/Lock.php(39): Magento\MessageQueue\Model\ResourceModel\Lock->releaseOutdatedLocks() #11 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(146): Magento\MessageQueue\Model\Plugin\ResourceModel\Lock->afterSet() #12 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Framework\App\MaintenanceMode\Interceptor->Magento\Framework\Interception\{closure}() #13 /var/www/html/mgce/magento2/generated/code/Magento/Framework/App/MaintenanceMode/Interceptor.php(32): Magento\Framework\App\MaintenanceMode\Interceptor->___callPlugins() #14 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/App/Console/MaintenanceModeEnabler.php(67): Magento\Framework\App\MaintenanceMode\Interceptor->set() #15 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/App/Console/MaintenanceModeEnabler.php(93): Magento\Framework\App\Console\MaintenanceModeEnabler->disableMaintenanceMode() #16 /var/www/html/mgce/magento2/setup/src/Magento/Setup/Console/Command/RollbackCommand.php(154): Magento\Framework\App\Console\MaintenanceModeEnabler->executeInMaintenanceMode() #17 /var/www/html/mgce/magento2/vendor/symfony/console/Command/Command.php(298): Magento\Setup\Console\Command\RollbackCommand->execute() #18 /var/www/html/mgce/magento2/vendor/symfony/console/Application.php(1024): Symfony\Component\Console\Command\Command->run() #19 /var/www/html/mgce/magento2/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand() #20 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun() #21 /var/www/html/mgce/magento2/vendor/symfony/console/Application.php(171): Magento\Framework\Console\Cli->doRun() #22 /var/www/html/mgce/magento2/bin/magento(23): Symfony\Component\Console\Application->run() #23 {main} [] []

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Jul 28, 2022

Hi @snez. Thank you for your report.
To speed up processing of this issue, make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-assistant
Copy link

m2-assistant bot commented Jul 28, 2022

Hi @engcom-November. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-November
Copy link
Contributor

engcom-November commented Jul 28, 2022

Thank you for reporting and collaboration @snez . Verified the issue on both Magento 2.4-develop branch and 2.4.4 project-community edition as well, but I'm getting different exception when trying to restore DB backup.
Steps performed:
Enabled and rolled db backup as per Devdocs
On running the command bin/magento setup:rollback [-c|--code-file="<name>"] [-m|--media-file="<name>"] [-d|--db-file="<name>"], below php error is getting displayed on both the instances.
image
Please check and confirm if you are able to restore db backup or facing same issue/error to confirm the issue with different description.. Also provide missing steps /configuration details: 3rd party extesnions / modules enabled if any if the issue is different.
Logs:
main.ERROR: SQLSTATE[HY000]: General error: 1100 Table 'queue_lock' was not locked with LOCK TABLES, query was: DELETE FROM `queue_lock` WHERE (created_at <= '2022-07-28 11:23:15') #0 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php(91): Magento\Framework\DB\Statement\Pdo\Mysql->tryExecute() #1 /var/www/html/mgce/magento2/vendor/magento/zendframework1/library/Zend/Db/Statement.php(313): Magento\Framework\DB\Statement\Pdo\Mysql->_execute() #2 /var/www/html/mgce/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute() #3 /var/www/html/mgce/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query() #4 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(564): Zend_Db_Adapter_Pdo_Abstract->query() #5 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(634): Magento\Framework\DB\Adapter\Pdo\Mysql->_query() #6 /var/www/html/mgce/magento2/generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php(95): Magento\Framework\DB\Adapter\Pdo\Mysql->query() #7 /var/www/html/mgce/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(664): Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->query() #8 /var/www/html/mgce/magento2/generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php(1067): Zend_Db_Adapter_Abstract->delete() #9 /var/www/html/mgce/magento2/app/code/Magento/MessageQueue/Model/ResourceModel/Lock.php(103): Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->delete() #10 /var/www/html/mgce/magento2/app/code/Magento/MessageQueue/Model/Plugin/ResourceModel/Lock.php(39): Magento\MessageQueue\Model\ResourceModel\Lock->releaseOutdatedLocks() #11 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(146): Magento\MessageQueue\Model\Plugin\ResourceModel\Lock->afterSet() #12 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Framework\App\MaintenanceMode\Interceptor->Magento\Framework\Interception\{closure}() #13 /var/www/html/mgce/magento2/generated/code/Magento/Framework/App/MaintenanceMode/Interceptor.php(32): Magento\Framework\App\MaintenanceMode\Interceptor->___callPlugins() #14 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/App/Console/MaintenanceModeEnabler.php(67): Magento\Framework\App\MaintenanceMode\Interceptor->set() #15 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/App/Console/MaintenanceModeEnabler.php(93): Magento\Framework\App\Console\MaintenanceModeEnabler->disableMaintenanceMode() #16 /var/www/html/mgce/magento2/setup/src/Magento/Setup/Console/Command/RollbackCommand.php(154): Magento\Framework\App\Console\MaintenanceModeEnabler->executeInMaintenanceMode() #17 /var/www/html/mgce/magento2/vendor/symfony/console/Command/Command.php(298): Magento\Setup\Console\Command\RollbackCommand->execute() #18 /var/www/html/mgce/magento2/vendor/symfony/console/Application.php(1024): Symfony\Component\Console\Command\Command->run() #19 /var/www/html/mgce/magento2/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand() #20 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun() #21 /var/www/html/mgce/magento2/vendor/symfony/console/Application.php(171): Magento\Framework\Console\Cli->doRun() #22 /var/www/html/mgce/magento2/bin/magento(23): Symfony\Component\Console\Application->run() #23 {main} [] []

@engcom-November engcom-November added the Issue: needs update Additional information is require, waiting for response label Jul 28, 2022
@ryanisn
Copy link

ryanisn commented Aug 4, 2022

Seem to be fixed in #34531
Which is surprisingly not in 2.4.4 as the PR was merged back in Feb

@engcom-November
Copy link
Contributor

As different exception/error is observed on Magento 2.4-develop branch as mentioned above here, confirming the issue by updating description with current behavior.

@engcom-November engcom-November added Component: DB Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Reported on 2.4.4 Indicates original Magento version for the Issue report. Component: Backup Area: Upgrades - Upgrade Compatibility Tool Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Component: DB labels Aug 9, 2022
@m2-community-project m2-community-project bot removed the Issue: needs update Additional information is require, waiting for response label Aug 9, 2022
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-6329 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Aug 9, 2022

✅ Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@engcom-November engcom-November added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Aug 10, 2022
@engcom-Hotel engcom-Hotel moved this to Ready for Development in High Priority Backlog Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Upgrades - Upgrade Compatibility Tool Component: Backup Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reported on 2.4.4 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
None yet
Development

No branches or pull requests

4 participants