Skip to content
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

Test crashes: Data too long for column 'results' #616

Closed
matsduf opened this issue May 15, 2020 · 3 comments · Fixed by #617
Closed

Test crashes: Data too long for column 'results' #616

matsduf opened this issue May 15, 2020 · 3 comments · Fixed by #617
Assignees
Labels
T-Bug Type: Bug in software or error in test case description
Milestone

Comments

@matsduf
Copy link
Contributor

matsduf commented May 15, 2020

Tests results in error message "DBD::mysql::db do failed: Data too long for column 'results' at row 1 at /usr/local/share/perl/5.26.1/Zonemaster/Backend/DB/MySQL.pm line 208."

Field "results" is of data type BLOB, if I get it right, is limited to 64 kB data.

I tested .com and .arpa through RPC-API, but the tests do not complete. Testing with CLI is no problem. When I test the following command

zonemaster-cli --show_module --json com --level INFO > test_com.json

the resulting file test_com.json is 76 kB.

$ curl -sH "Content-Type: application/json" -d '{"jsonrpc": "2.0","id": 6,"method": "get_test_results","params": {"id": "fcb73b0a8f5b056a","language": "en"} }' http://127.0.0.1:5000/ | jq .
{
  "result": {
    "creation_time": "2020-05-15 20:51:24",
    "hash_id": "fcb73b0a8f5b056a",
    "id": 52,
    "results": [
      {
        "level": "CRITICAL",
        "message": "\n",
        "module": "BACKEND_TEST_AGENT"
      }
    ],
    "params": {
      "domain": "com",
      "priority": 10,
      "ipv6": true,
      "queue": 0
    }
  },
  "jsonrpc": "2.0",
  "id": 6
}

Found in /var/log/zonemaster/zm-testagent.log

2020-05-15T20:51:25Z [27027] INFO - Test found: fcb73b0a8f5b056a
2020-05-15T20:51:25Z [5510] INFO - Test starting: fcb73b0a8f5b056a
2020-05-15T20:52:28Z [5510] ERROR - Test died: fcb73b0a8f5b056a: DBD::mysql::db do failed: Data too long for column 'results' at row 1 at /usr/local/share/perl/5.26.1/Zonemaster/Backend/DB/MySQL.pm line 208.
2020-05-15T20:52:28Z [27027] NOTICE - Worker process (pid 5510, testid fcb73b0a8f5b056a): Terminated with exit code 0
@matsduf matsduf added T-Bug Type: Bug in software or error in test case description A-Databases labels May 15, 2020
@matsduf matsduf added this to the v2019.2.2 milestone May 15, 2020
@matsduf
Copy link
Contributor Author

matsduf commented May 16, 2020

For Postgres databases we do not seem to have any size limit problem. The field is of type JSON in the Postgres database, and the size limit of such is around 256 MB as far as I could read. Testing .com on installation with Postgres does not seem to be a problem. This issue is therefore limited to Mysql/Mariadb databases.

@matsduf
Copy link
Contributor Author

matsduf commented May 18, 2020

Tests have shown that increasing the column from BLOB to MEDIUMBLOB will resolve the issue. See PR #617.

@matsduf matsduf linked a pull request May 18, 2020 that will close this issue
matsduf added a commit that referenced this issue May 19, 2020
…e-v2019.2.2

Fix issue #616 and prepare for release v2019.2.2:
* Update MySQL/MariaDB create script to increase the size to fit larger results.
* Rename current scripts to patch (upgrade) the zonemaster database to get a better 
  naming structure.
* Add patch script README.
* Add new patch script for MySQL/MariaDB to upgrade "result" column to MEDIUMBLOB.
* Rename the document files for the current scripts.
* Update the current documents to point at the renamed scripts.
* Add document for the new patch script.
* Updated MANIFEST with new and change file names.
* Updated section on zonemaster database upgrade in the Zonemaster-Backend main
   README with
   * Updated links to new document file names.
   * Added link to new document.
   * Clarified instructions.
* Bumped version of Zonemaster::Backend to v5.0.2.
* Updated Changes file as preparation for the release.
@matsduf
Copy link
Contributor Author

matsduf commented May 19, 2020

Resolved by #617.

@matsduf matsduf closed this as completed May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Bug Type: Bug in software or error in test case description
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants