OpenCue
OpenCue copied to clipboard
smallint out of range error for exit codes on windows
I am getting the following error on windows:
Exception in thread Thread-120:
Traceback (most recent call last):
File "[...]\deploy\py37\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "[...]\deploy\py37\lib\site-packages\rqd-unknown-py3.7.egg\rqd\rqcore.py", line 540, in run
self.__sendFrameCompleteReport()
File "[...]\deploy\py37\lib\site-packages\rqd-unknown-py3.7.egg\rqd\rqcore.py", line 219, in __sendFrameCompleteReport
self.rqCore.network.reportRunningFrameCompletion(report)
File "[...]\deploy\py37\lib\site-packages\rqd-unknown-py3.7.egg\rqd\rqnetwork.py", line 240, in reportRunningFrameCompletion
stub.ReportRunningFrameCompletion(request, timeout=rqd.rqconstants.RQD_TIMEOUT)
File "[...]\deploy\py37\lib\site-packages\grpc\_channel.py", line 533, in __call__
return _end_unary_response_blocking(state, call, False, None)
File "[...]\deploy\py37\lib\site-packages\grpc\_channel.py", line 467, in _end_unary_response_blocking
raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.INTERNAL
details = "com.imageworks.spcue.dispatcher.RqdRetryReportException: error processing the frame complete report, sending retry message to RQD org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [UPDATE frame SET str_state=?, int_exit_status = ?, ts_stopped = current_timestamp + interval '1' second, ts_updated = current_timestamp, int_mem_max_used = ?, int_version = int_version + 1, int_total_past_core_time = int_total_past_core_time + round(INTERVAL_TO_SECONDS(current_timestamp + interval '1' second - ts_started) * int_cores / 100) WHERE frame.pk_frame = ? AND frame.str_state = ? AND frame.int_version = ? ]; ERROR: smallint out of range
Where: SQL statement "UPDATE
frame_history
SET
int_mem_max_used=$1,
int_ts_stopped=$2,
int_exit_status=$3,
int_checkpoint_count=$4
WHERE
int_ts_stopped = 0 AND pk_frame=$5"
PL/pgSQL function trigger__frame_history_open() line 19 at EXECUTE; nested exception is org.postgresql.util.PSQLException: ERROR: smallint out of range
Where: SQL statement "UPDATE
frame_history
SET
int_mem_max_used=$1,
int_ts_stopped=$2,
int_exit_status=$3,
int_checkpoint_count=$4
WHERE
int_ts_stopped = 0 AND pk_frame=$5"
PL/pgSQL function trigger__frame_history_open() line 19 at EXECUTE
error processing the frame complete report, sending retry message to RQD org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [UPDATE frame SET str_state=?, int_exit_status = ?, ts_stopped = current_timestamp + interval '1' second, ts_updated = current_timestamp, int_mem_max_used = ?, int_version = int_version + 1, int_total_past_core_time = int_total_past_core_time + round(INTERVAL_TO_SECONDS(current_timestamp + interval '1' second - ts_started) * int_cores / 100) WHERE frame.pk_frame = ? AND frame.str_state = ? AND frame.int_version = ? ]; ERROR: smallint out of range
Where: SQL statement "UPDATE
frame_history
SET
int_mem_max_used=$1,
int_ts_stopped=$2,
int_exit_status=$3,
int_checkpoint_count=$4
WHERE
int_ts_stopped = 0 AND pk_frame=$5"
PL/pgSQL function trigger__frame_history_open() line 19 at EXECUTE; nested exception is org.postgresql.util.PSQLException: ERROR: smallint out of range
Where: SQL statement "UPDATE
frame_history
SET
int_mem_max_used=$1,
int_ts_stopped=$2,
int_exit_status=$3,
int_checkpoint_count=$4
WHERE
int_ts_stopped = 0 AND pk_frame=$5"
PL/pgSQL function trigger__frame_history_open() line 19 at EXECUTE"
debug_error_string = "{"created":"@1584117532.535000000","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1017,"grpc_message":"com.imageworks.spcue.dispatcher.RqdRetryReportException: error processing the frame complete report, sending retry message to RQD org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [UPDATE frame SET str_state=?, int_exit_status = ?, ts_stopped = current_timestamp + interval '1' second, ts_updated = current_timestamp, int_mem_max_used = ?, int_version = int_version + 1, int_total_past_core_time = int_total_past_core_time + round(INTERVAL_TO_SECONDS(current_timestamp + interval '1' second - ts_started) * int_cores / 100) WHERE frame.pk_frame = ? AND frame.str_state = ? AND frame.int_version = ? ]; ERROR: smallint out of range\n Where: SQL statement "UPDATE\n frame_history\n
SET\n int_mem_max_used=$1,\n int_ts_stopped=$2,\n int_exit_status=$3,\n int_checkpoint_count=$4\n WHERE\n int_ts_stopped = 0 AND pk_frame=$5"\nPL/pgSQL function trigger__frame_history_open() line 19 at EXECUTE; nested exception is org.postgresql.util.PSQLException: ERROR: smallint out of range\n Where: SQL statement "UPDATE\n frame_history\n SET\n
int_mem_max_used=$1,\n int_ts_stopped=$2,\n int_exit_status=$3,\n
int_checkpoint_count=$4\n WHERE\n int_ts_stopped = 0 AND pk_frame=$5"\nPL/pgSQL function trigger__frame_history_open() line 19 at EXECUTE\nerror processing the frame complete report, sending retry message to RQD org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [UPDATE frame SET str_state=?, int_exit_status = ?, ts_stopped = current_timestamp + interval '1' second, ts_updated = current_timestamp, int_mem_max_used = ?, int_version = int_version + 1, int_total_past_core_time = int_total_past_core_time + round(INTERVAL_TO_SECONDS(current_timestamp + interval '1' second - ts_started) * int_cores / 100) WHERE frame.pk_frame = ? AND frame.str_state = ? AND frame.int_version = ? ]; ERROR: smallint out of range\n Where: SQL statement "UPDATE\n frame_history\n SET\n int_mem_max_used=$1,\n int_ts_stopped=$2,\n int_exit_status=$3,\n int_checkpoint_count=$4\n WHERE\n
int_ts_stopped = 0 AND pk_frame=$5"\nPL/pgSQL function trigger__frame_history_open() line 19 at EXECUTE; nested exception is org.postgresql.util.PSQLException: ERROR: smallint out of range\n Where: SQL statement "UPDATE\n
frame_history\n SET\n int_mem_max_used=$1,\n int_ts_stopped=$2,\n
int_exit_status=$3,\n int_checkpoint_count=$4\n WHERE\n int_ts_stopped = 0 AND pk_frame=$5"\nPL/pgSQL function trigger__frame_history_open() line 19 at EXECUTE","grpc_status":13}"
>
Windows allows unsigned 32Bit exit codes which are larger than the smallint type of int_exit_status.
We could change the type of int_exit_status to INTEGER but since postgres only has signed integers this would mean that we could still only represent half of the exit codes.
The other option would be BIGINT but thats 8bytes which would be a lot of storage.
https://docs.microsoft.com/en-gb/windows/win32/api/processthreadsapi/nf-processthreadsapi-exitprocess?redirectedfrom=MSDN
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/52ddd4c3-55b9-4e03-8287-5392aac0627f
@bcipriano I would like to take this issue up.
Sounds good, I've assigned it to you!
OpenCue uses database migrations to manage its database schema; Flyway has a good doc explaining this: https://flywaydb.org/getstarted/why
Basically you will want to create a new migration file which makes the schema change. PR #618 is a good example to work from.
Setting Up the Database | Apply Migrations from Source shows how this works in practice; once you have a migration, run flyway to apply it and test it.
There may be Cuebot changes needed to support the new datatype; again #618 is a good example of the Cuebot changes that were needed in that particular instance.
Can I work on this issue
I am interested to work on this.
I am still on it Thanks
On Thu, Nov 25, 2021, 9:31 AM PrabhuRajVansh @.***> wrote:
I am interested to work on this.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/AcademySoftwareFoundation/OpenCue/issues/657#issuecomment-978807148, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ6VVHZHV7K7G2RZTREENWDUNWYILANCNFSM4LHGUKTA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.