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

DMT: seg fault when user exits application during 'step 1/3 Connecting to the migration cluster...' [CLC-442] #434

Closed
sumnerib opened this issue Nov 14, 2023 · 1 comment · Fixed by #436
Labels
bug Something isn't working source:internal to-jira Open a tracking issue on Jira

Comments

@sumnerib
Copy link

If the user presses 'Ctrl+c' while the front-end is trying to connect to the migration cluster ([1/3] Connecting to the migration cluster), the application will panic and print a stacktrace:

λ isaac-thinkpad hazelcast-enterprise-5.3.5-DM-SNAPSHOT-slim → ./bin/dmt --config migration.yaml start migration_config --yes

Hazelcast Data Migration Tool v5.3.0
(c) 2023 Hazelcast, Inc.

Selected data structures in the source cluster will be migrated to the target cluster.

Exiting the application does not affect the migration progress.
In order to cancel the migration, use the 'cancel' command.


panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb4daa1]

goroutine 1 [running]:
github.com/hazelcast/hazelcast-go-client.(*ClientInternal).Client(...)
        github.com/hazelcast/[email protected]/client_internals.go:107
github.com/hazelcast/hazelcast-commandline-client/base/commands/migration.querySingleRow({0xe37ab0?, 0x146f460?}, 0xc00041f748?, {0xc0000523f0?, 0x2?})
        github.com/hazelcast/hazelcast-commandline-client/base/commands/migration/migration_stages.go:354 +0x21
github.com/hazelcast/hazelcast-commandline-client/base/commands/migration.maybePrintWarnings({0xe37ab0, 0x146f460}, {0xe3f1a0, 0xc0000da240}, 0x23?, {0xc000042630?, 0x22?})
        github.com/hazelcast/hazelcast-commandline-client/base/commands/migration/migration_stages.go:375 +0xce
github.com/hazelcast/hazelcast-commandline-client/base/commands/migration.StartCmd.Exec.func1()
        github.com/hazelcast/hazelcast-commandline-client/base/commands/migration/migration_start.go:68 +0x6e
github.com/hazelcast/hazelcast-commandline-client/base/commands/migration.StartCmd.Exec({}, {0xe37ab0, 0x146f460}, {0xe3f1a0, 0xc0000da240})
        github.com/hazelcast/hazelcast-commandline-client/base/commands/migration/migration_start.go:76 +0x7c6
github.com/hazelcast/hazelcast-commandline-client/clc/cmd.(*Main).createCommands.func1(0xc000005b00, {0xc000362880, 0x1, 0x4})
        github.com/hazelcast/hazelcast-commandline-client/clc/cmd/clc.go:348 +0x53f
github.com/spf13/cobra.(*Command).execute(0xc000005b00, {0xc000362840, 0x4, 0x4})
        github.com/spf13/[email protected]/command.go:940 +0x87c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000004300)
        github.com/spf13/[email protected]/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/[email protected]/command.go:992
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        github.com/spf13/[email protected]/command.go:985
github.com/hazelcast/hazelcast-commandline-client/clc/cmd.(*Main).Execute(0xc0000da0c0, {0xe37ab0?, 0x146f460}, {0xc0000341f0, 0x5, 0x5})
        github.com/hazelcast/hazelcast-commandline-client/clc/cmd/clc.go:180 +0x234
main.main()
        github.com/hazelcast/hazelcast-commandline-client/cmd/clc/main.go:55 +0x3d0

To reproduce, run ./bin/dmt --config migration.yaml start migration_config --yes w/o any migration cluster running (so it won't connect) and then Ctrl+c the command.

Env:

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
kernel release: 6.2.0-36-generic
@sumnerib sumnerib added bug Something isn't working to-jira Open a tracking issue on Jira source:internal labels Nov 14, 2023
@github-actions github-actions bot changed the title DMT: seg fault when user exits application during 'step 1/3 Connecting to the migration cluster...' DMT: seg fault when user exits application during 'step 1/3 Connecting to the migration cluster...' [CLC-442] Nov 14, 2023
Copy link

Internal Jira issue: CLC-442

@sumnerib sumnerib linked a pull request Nov 15, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working source:internal to-jira Open a tracking issue on Jira
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant