Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Application crashes when loading plugin as child process #8786

Closed
Tracked by #7226
sameersubudhi opened this issue Jul 31, 2023 · 1 comment
Closed
Tracked by #7226

Application crashes when loading plugin as child process #8786

sameersubudhi opened this issue Jul 31, 2023 · 1 comment
Assignees
Milestone

Comments

@sameersubudhi
Copy link

Expected behavior

When loading the plugins in the child process, the application should start normally.

Actual behavior

When loading the plugins in the child process, the application crashes with the plugin loading timout error:

2023-07-31T12:45:44.680Z DEBUG Sameers-MBP.koepi126 engine 33619 [id=39995227f21b7623943fbfe984621d48f36465ef843e3ab88f9289f4ad9770fa height=1] Starting to process block
2023-07-31T12:45:44.681Z DEBUG Sameers-MBP.koepi126 engine 33619 [id=39995227f21b7623943fbfe984621d48f36465ef843e3ab88f9289f4ad9770fa height=1] Processing valid block
2023-07-31T12:45:44.685Z DEBUG Sameers-MBP.koepi126 application 33619 [moduleName=random] Executing verifyAssets
2023-07-31T12:45:44.685Z DEBUG Sameers-MBP.koepi126 application 33619 [moduleName=random] Executed verifyAssets
2023-07-31T12:45:44.686Z DEBUG Sameers-MBP.koepi126 engine 33619 [id=39995227f21b7623943fbfe984621d48f36465ef843e3ab88f9289f4ad9770fa height=1 generator=lskdx32a42ffarc35c7vrq4k7xtng5x8f3vjruaej numberOfTransactions=0 numberOfAssets=1] Block broadcasted
2023-07-31T12:45:44.689Z DEBUG Sameers-MBP.koepi126 application 33619 [moduleName=dynamicReward] Executing beforeTransactionsExecute
2023-07-31T12:45:44.691Z DEBUG Sameers-MBP.koepi126 application 33619 [moduleName=dynamicReward] Executed beforeTransactionsExecute
2023-07-31T12:45:44.691Z DEBUG Sameers-MBP.koepi126 application 33619 [moduleName=pos] Executing afterTransactionsExecute
2023-07-31T12:45:44.692Z DEBUG Sameers-MBP.koepi126 application 33619 [round=1] Updating validators productivity for round
2023-07-31T12:45:44.698Z DEBUG Sameers-MBP.koepi126 application 33619 [moduleName=pos] Executed afterTransactionsExecute
2023-07-31T12:45:44.698Z DEBUG Sameers-MBP.koepi126 application 33619 [moduleName=random] Executing afterTransactionsExecute
2023-07-31T12:45:44.698Z DEBUG Sameers-MBP.koepi126 application 33619 [moduleName=random] Executed afterTransactionsExecute
2023-07-31T12:45:44.698Z DEBUG Sameers-MBP.koepi126 application 33619 [moduleName=dynamicReward] Executing afterTransactionsExecute
2023-07-31T12:45:44.698Z DEBUG Sameers-MBP.koepi126 application 33619 [moduleName=dynamicReward] Executed afterTransactionsExecute
2023-07-31T12:45:44.702Z INFO Sameers-MBP.koepi126 engine 33619 [id=39995227f21b7623943fbfe984621d48f36465ef843e3ab88f9289f4ad9770fa height=1 generator=lskdx32a42ffarc35c7vrq4k7xtng5x8f3vjruaej numberOfTransactions=0 numberOfAssets=1 numberOfEvents=1] Block executed
2023-07-31T12:45:44.702Z INFO Sameers-MBP.koepi126 engine 33619 [status=success event=chain_newBlock] IPCServer published event
2023-07-31T12:45:44.702Z INFO Sameers-MBP.koepi126 engine 33619 [status=success event=network_newBlock] IPCServer published event
2023-07-31T12:45:44.702Z INFO Sameers-MBP.koepi126 engine 33619 [status=success event=chain_newBlock] WSServer published event
2023-07-31T12:45:44.702Z INFO Sameers-MBP.koepi126 engine 33619 [status=success event=network_newBlock] WSServer published event
    Error: Child process plugin loading timeout
2023-07-31T12:45:45.673Z INFO Sameers-MBP.koepi126 application 33619 [errorCode=2 message=process.exit] Application shutdown started
sameer@Sameers-MBP enevti-core % 2023-07-31T12:45:45.956Z DEBUG Sameers-MBP.koepi126 plugin_chainConnector 33632 [plugin=chainConnector] Unloading plugin
2023-07-31T12:45:45.957Z DEBUG Sameers-MBP.koepi126 plugin_chainConnector 33632 [plugin=chainConnector err=Cannot read properties of undefined (reading 'close')] Fail to unload plugin


sameer@Sameers-MBP enevti-core % 

Steps to reproduce

  • Bootstrap an application with lisk-commander
  • Ensure the dependencies in pacakage.json correspond to Lisk SDK v6.0.0-beta.5
  • Ensure all the plugins in src/commands/start.ts are registered with { loadAsChildProcess: true } option
  • Install dependencies and build the application
  • Ensure to update the node config with the necessary plugin config you intend to enable
	"plugins": {
		"chainConnector": {
			"receivingChainID": "04000000",
			"receivingChainIPCPath": "~/.lisk/lisk-core",
			"ccuFee": "150000000",
			"encryptedPrivateKey": "kdf=argon2id&cipher=aes-256-gcm&version=1&ciphertext=f0115a579546494ffcb5015f9913498f155af0ae3af5429fb9f51aa340389a1e8951f63e7cfdb8dc7962c59c0677ea42ea2b279294bfb622a671e4636d0109f8772fcdd488461454b042a37e641885e7271ed6f2f44ee078732d1ef264d0e1457cc684a3363131a78284bea565b93b60cf14a6c29b3ce4535daf1e8e1e9860e1&mac=66afeb905e7a062fc120ecfbf14c80837bf37bed9af3e8efea40f506f644f755&salt=b7d17ee62cbe59c0b71dce8a42a93cbb&iv=a26b4bb94815c15ea15473d1&tag=04101ba7f8b69f064ba7d837ca855128&iterations=1&parallelism=4&memorySize=2097023",
			"password": "lisk",
			"registrationHeight": 10
		}
	}
  • Start the node with the plugin enabled (./bin/run start -n devnet --enable-chain-connector-plugin)

Which version(s) does this affect? (Environment, OS, etc...)

v6.0.0-beta.5

@Madhulearn Madhulearn added this to the Sprint 101 milestone Aug 1, 2023
@shuse2 shuse2 self-assigned this Aug 3, 2023
@shuse2
Copy link
Collaborator

shuse2 commented Aug 4, 2023

This is failing specific to chain-connector plugin because when decrypting the private key on init it will stop the initialization too long that it will timeout to create the child process.

Removing the password and below issue will resolve the problem
#8484

@shuse2 shuse2 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2023
@shuse2 shuse2 modified the milestone: Sprint 101 Aug 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants