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

ER_OUT_OF_SORTMEMORY #407

Closed
2 of 4 tasks
NRENJeff opened this issue Aug 18, 2021 · 1 comment · Fixed by #411 or #419
Closed
2 of 4 tasks

ER_OUT_OF_SORTMEMORY #407

NRENJeff opened this issue Aug 18, 2021 · 1 comment · Fixed by #411 or #419
Labels
bug Something isn't working DB User Story

Comments

@NRENJeff
Copy link

NRENJeff commented Aug 18, 2021

Bug Location

I found a bug in the:

  • API
  • UI
  • Elsewhere (Please specify)

Bug Description:
When uploading a CKL with a large comment if you view the asset/STIG that comment is in you get an out of sort memory error.

  • I have checked to see if there is already an existing issue that describes this bug.

To Reproduce
Steps to reproduce the behavior:

  1. Enter a massive amount of text into a comment (see picture below) (The specific RULEID is SV-224993r569186_rule)
  2. Click onto another RULEID. Click back on the original RULEID
  3. The RULEID is loaded, but an error pops up from the browser

Expected behavior
No error.

Actual behavior
GET api/collections/3/reviews/77/SV-224993r569186_rule {"message":"Out of sort memory, consider increasing server sort buffer size","code":"ER_OUT_OF_SORTMEMORY","errno":1038,"sqlState":"HY001","sqlMessage":"Out of sort memory, consider increasing server sort buffer size"}

Screenshots
ER_OUT_OF_SORTMEMORY

Environment or Configuration:

  • STIG Manager 1.0.0-beta.37
  • mysql Ver 8.0.23
  • Chrome and Edge

Additional context

select @@global.sort_buffer_size;
262144 

select * from performance_schema.variables_info where variable_source!='COMPILED';

+----------------------+-----------------+------------------------------+-----------+----------------------+----------------------------+----------+-----------+
| VARIABLE_NAME        | VARIABLE_SOURCE | VARIABLE_PATH                | MIN_VALUE | MAX_VALUE            | SET_TIME                   | SET_USER | SET_HOST  |
+----------------------+-----------------+------------------------------+-----------+----------------------+----------------------------+----------+-----------+
| datadir              | GLOBAL          | /etc/mysql/my.cnf            | 0         | 0                    | NULL                       | NULL     | NULL      |
| foreign_key_checks   | DYNAMIC         |                              | 0         | 0                    | 2021-08-17 19:22:27.804084 | NULL     | NULL      |
| group_concat_max_len | DYNAMIC         |                              | 4         | 18446744073709551615 | 2021-08-18 12:00:32.341080 | stigman  | NULL      |
| pid_file             | GLOBAL          | /etc/mysql/my.cnf            | 0         | 0                    | NULL                       | NULL     | NULL      |
| secure_file_priv     | GLOBAL          | /etc/mysql/my.cnf            | 0         | 0                    | NULL                       | NULL     | NULL      |
| skip_name_resolve    | GLOBAL          | /etc/mysql/conf.d/docker.cnf | 0         | 0                    | NULL                       | NULL     | NULL      |
| socket               | GLOBAL          | /etc/mysql/my.cnf            | 0         | 0                    | NULL                       | NULL     | NULL      |
| sort_buffer_size     | DYNAMIC         |                              | 32768     | 18446744073709551615 | 2021-08-18 15:12:43.852580 | root     | localhost |
+----------------------+-----------------+------------------------------+-----------+----------------------+----------------------------+----------+-----------+
8 rows in set (0.02 sec)

select char_length(resultComment) as resultCommentChar, length(resultComment) as resultCommentByte, char_length(actionComment) as actionCommentChar, length(actionComment) as actionCommentByte, char_length(metadata) as metadataChar, length(metadata) as metadataByte from stigman.review where char_length(resultComment) > 5000000 or char_length(actionComment) > 5000000 or char_length(metadata) > 5000000 order by resultCommentChar desc;

+-------------------+-------------------+-------------------+-------------------+--------------+--------------+
| resultCommentChar | resultCommentByte | actionCommentChar | actionCommentByte | metadataChar | metadataByte |
+-------------------+-------------------+-------------------+-------------------+--------------+--------------+
|           6242820 |           6242820 |              NULL |              NULL |            2 |            2 |
|           6242820 |           6242820 |              NULL |              NULL |            2 |            2 |
|           6242820 |           6242820 |              NULL |              NULL |            2 |            2 |
|           6242820 |           6242820 |              NULL |              NULL |            2 |            2 |
|           6242820 |           6242820 |              NULL |              NULL |            2 |            2 |
|           6242820 |           6242820 |              NULL |              NULL |            2 |            2 |
|           6242820 |           6242820 |              NULL |              NULL |            2 |            2 |
|           6242820 |           6242820 |              NULL |              NULL |            2 |            2 |
|           6242820 |           6242820 |              NULL |              NULL |            2 |            2 |
|           6242820 |           6242820 |              NULL |              NULL |            2 |            2 |
|           6242820 |           6242820 |              NULL |              NULL |            2 |            2 |
|           6242820 |           6242820 |              NULL |              NULL |            2 |            2 |
|           6239483 |           6239483 |              NULL |              NULL |            2 |            2 |
|           6239483 |           6239483 |              NULL |              NULL |            2 |            2 |
|           6239483 |           6239483 |              NULL |              NULL |            2 |            2 |
|           6182495 |           6182495 |              NULL |              NULL |            2 |            2 |
|           6182495 |           6182495 |               189 |               189 |            2 |            2 |
|           6182495 |           6182495 |              NULL |              NULL |            2 |            2 |
|           6182495 |           6182495 |              NULL |              NULL |            2 |            2 |
|           6182495 |           6182495 |              NULL |              NULL |            2 |            2 |
|           5859582 |           5859582 |               189 |               189 |            2 |            2 |
|           5859582 |           5859582 |               189 |               189 |            2 |            2 |
|           5859582 |           5859582 |               189 |               189 |            2 |            2 |
|           5859582 |           5859582 |               189 |               189 |            2 |            2 |
|           5859582 |           5859582 |               189 |               189 |            2 |            2 |
|           5859582 |           5859582 |               189 |               189 |            2 |            2 |
|           5859582 |           5859582 |               189 |               189 |            2 |            2 |
|           5859582 |           5859582 |               189 |               189 |            2 |            2 |
|           5859582 |           5859582 |               189 |               189 |            2 |            2 |
|           5859582 |           5859582 |               189 |               189 |            2 |            2 |
|           5859582 |           5859582 |               189 |               189 |            2 |            2 |
|           5859582 |           5859582 |               189 |               189 |            2 |            2 |
|           5859582 |           5859582 |               189 |               189 |            2 |            2 |
|           5859453 |           5859453 |               189 |               189 |            2 |            2 |
|           5859453 |           5859453 |               189 |               189 |            2 |            2 |
|           5859407 |           5859407 |               107 |               107 |            2 |            2 |
|           5859407 |           5859407 |               107 |               107 |            2 |            2 |
|           5859407 |           5859407 |               107 |               107 |            2 |            2 |
|           5859407 |           5859407 |               107 |               107 |            2 |            2 |
|           5859407 |           5859407 |               107 |               107 |            2 |            2 |
+-------------------+-------------------+-------------------+-------------------+--------------+--------------+
40 rows in set (4.78 sec)
@NRENJeff NRENJeff added the bug Something isn't working label Aug 18, 2021
@NRENJeff
Copy link
Author

I have the command to make the sortbuffer larger, I have not had a change to restart the container to verify enlarging the buffer will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DB User Story
Projects
None yet
2 participants