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

[CBRD-24630] The stop command of cubrid hb (applylogdb/repl) does not work correctly when the build is generated in the QA environment, release mode and devtoolset-9 (#4092) #4101

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

hornetmj
Copy link
Contributor

… work correctly when the build is generated in the QA environment, release mode and devtoolset-9 (CUBRID#4092)

http://jira.cubrid.org/browse/CBRD-24630

Purpose

when the build is created in the QA env, release mode and devtoolset-9, the stop command of cubrid hb (applylogdb or replication) doesn't work correctly
the reason is not clear. But the problem is related to the strcmp function. The following code block is in the process_is_registered_proc(). And the if condition checks the response from cub_master in order to check the copylogdb or applylogdb is alive
if (size > 0 && strcmp (reply_buffer, HA_REQUEST_SUCCESS) == 0)
the problem is that the strcmp() returns a positive value even if values of arguments are equal
when I try to dump values of arguments as hexa, they have same values with null termination
when I try to compare them using memcmp(), strcmp()(again), they return 0
when I try to check the length of them using strlen(), they return 1 (it means values are terminated with null)
now, I don't have any options to handle this problem. But when I change the strcmp() to strncmp(), the problem is disapeared. So I apply this fix for the regression test temparaly(or permenantly if there are no solution)
Implementation

strcmp() -> strncmp()
Remarks

the problem is occurred after changing devtoolset-8 to devtoolset-9
@hornetmj hornetmj requested a review from joohok February 10, 2023 06:02
@hornetmj hornetmj merged commit 0601631 into CUBRID:release/10.2 Feb 13, 2023
@hornetmj hornetmj deleted the 10.2 branch February 13, 2023 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants