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

Issue: Loading ActionEvaluators crashing Headless. #2674

Open
1 task
FioX0 opened this issue Jan 6, 2025 · 1 comment
Open
1 task

Issue: Loading ActionEvaluators crashing Headless. #2674

FioX0 opened this issue Jan 6, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@FioX0
Copy link

FioX0 commented Jan 6, 2025

Description

Unable to load ActionEvaluator Plugins after getting a fresh environment setup.
Once the code attempts to Load the Assembly of the DLL it returns "SystemNotSupported".
This occurs both when executing Headdless through VisualStudioCode and Visual Studio 2022 Debugger, and running it in production through docker on ubuntu system.

Reproduction

-git clone repo into a fresh environment.
-move to v200260 branch.
-run dotnet line mentioned below.
-loading ActionEvaluator fails.
-headless crashes.

Executed environment

  • Through dotnet run (commit: ...(e.g. )):
    Using planetarium's V200260 branch.
    dotnet run --app-protocol-version=200260/C6553c8e634bEE685F264F4C5720d65919dc9c9c/MEUCIQD8rqZ2truv391FEZrcFncy5dtDDayl3QZtCY0slRSSiwIgNsYv6HLKpZHddkJt0RlQVJMqLM6N+i0XtSxBiHtvUA0=/ZHU5OnRpbWVzdGFtcHUxMDoyMDI0LTEyLTE5ZQ== --trusted-app-protocol-version-signer=028857c146f57d7a24409d9b5da178c62e7becd756259b5ea32e7b5a0dd30545fd --genesis-block-path=https://planets.nine-chronicles.com/planets/0x000000000003/genesis --port=31234 --no-miner --store-type=rocksdb --store-path=G:\9c\snapshot --host=XXX.XXX.XXX --peer=03bfc4221069d995b55df46cfa651c1fce3ac9ec7def7415faba40cd5e019ea5af,thor-seed-1.nine-chronicles.com,31234 --graphql-server --graphql-host=0.0.0.0 --graphql-port=80 --rpc-server --rpc-remote-server --rpc-listen-host=0.0.0.0 --rpc-listen-port=31238 --no-cors --chain-tip-stale-behavior-type=reboot --tx-life-time=10 --planet=Thor --config=https://9c-cluster-config.s3.us-east-2.amazonaws.com/9c-main/thor/appsettings.json --tx-quota-per-signer=1

Expected behavior

Successfully loading ActionEvaluator.

Actual behavior

Assembly of ActionEvaluator fails due to "OSSystemNotSupport" causing Load.Plugin() to crash.
image

Additional context

StackTrace

[13:03:18 INF] The workstation garbage collector is running.
[13:03:18 DBG] Secp256K1CryptoBackend initialized.
[13:03:19 DBG] Migrating RocksDB.
[13:03:20 DBG] RocksDB is initialized.
[13:03:20 DBG] Number of chain ids: 1
[13:03:20 DBG] Canonical chain id: ff2aa120-8178-4e34-b5c3-b2fd06388c1e
[13:03:20 DBG] Download Path: G:\9c\nodeFork\NineChronicles.Headless\NineChronicles.Headless.Executable\plugins\f6e2e778f106a3ada250177d39579e2a11dc1f57642e5e6469425c171a987f93.zip
[13:03:20 DBG] Extract Path: G:\9c\nodeFork\NineChronicles.Headless\NineChronicles.Headless.Executable\plugins\f6e2e778f106a3ada250177d39579e2a11dc1f57642e5e6469425c171a987f93
[13:03:20 DBG] Downloading...
[13:03:22 DBG] Finished downloading.
[13:03:22 DBG] Extracting...
[13:03:22 DBG] Finished extracting.
[13:03:22 ERR] Unexpected exception occurred during Run. System.IO.FileLoadException: Could not load file or assembly 'Lib9c.Plugin, Culture=neutral, PublicKeyToken=null'. Could not find or load a specific file. (0x80131621)
File name: 'Lib9c.Plugin, Culture=neutral, PublicKeyToken=null'
---> System.IO.FileLoadException: Could not load file or assembly 'Lib9c.Plugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at Libplanet.Extensions.PluggedActionEvaluator.PluginLoadContext.Load(AssemblyName assemblyName) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Extensions.PluggedActionEvaluator\PluginLoadContext.cs:line 19
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext, RuntimeAssembly requestingAssembly, Boolean throwOnFileNotFound)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
at Libplanet.Extensions.PluggedActionEvaluator.PluggedActionEvaluator.LoadPlugin(String absolutePath) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Extensions.PluggedActionEvaluator\PluggedActionEvaluator.cs:line 31
at Libplanet.Extensions.PluggedActionEvaluator.PluggedActionEvaluator.CreateActionEvaluator(String pluginPath, String typeName, IKeyValueStore keyValueStore) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Extensions.PluggedActionEvaluator\PluggedActionEvaluator.cs:line 47
at Libplanet.Extensions.PluggedActionEvaluator.PluggedActionEvaluator..ctor(String pluginPath, String typeName, IKeyValueStore keyValueStore, IActionLoader actionLoader) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Extensions.PluggedActionEvaluator\PluggedActionEvaluator.cs:line 24
at Libplanet.Headless.Hosting.LibplanetNodeService.<>c__DisplayClass23_1.<.ctor>g__BuildActionEvaluator|0(IActionEvaluatorConfiguration actionEvaluatorConfiguration) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Headless\Hosting\LibplanetNodeService.cs:line 129
at Libplanet.Headless.Hosting.LibplanetNodeService.<>c__DisplayClass23_1.<.ctor>b__3(ValueTuple2 pair) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Headless\Hosting\LibplanetNodeService.cs:line 142 at System.Linq.Enumerable.SelectArrayIterator2.Fill(ReadOnlySpan1 source, Span1 destination, Func2 func) at System.Linq.Enumerable.SelectArrayIterator2.ToArray()
at System.Linq.Buffer1..ctor(IEnumerable1 source)
at System.Linq.OrderedEnumerable1.ToArray() at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable1 items) at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable1 items)
at Libplanet.Extensions.ForkableActionEvaluator.HardForkRouter..ctor(IEnumerable1 rangeAndEvaluatorPairs) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Extensions.ForkableActionEvaluator\HardForkRouter.cs:line 16 at Libplanet.Extensions.ForkableActionEvaluator.ForkableActionEvaluator..ctor(IEnumerable1 pairs, IActionLoader actionLoader) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Extensions.ForkableActionEvaluator\ForkableActionEvaluator.cs:line 15
at Libplanet.Headless.Hosting.LibplanetNodeService.<>c__DisplayClass23_1.<.ctor>g__BuildActionEvaluator|0(IActionEvaluatorConfiguration actionEvaluatorConfiguration) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Headless\Hosting\LibplanetNodeService.cs:line 140
at Libplanet.Headless.Hosting.LibplanetNodeService..ctor(LibplanetNodeServiceProperties properties, IBlockPolicy blockPolicy, IStagePolicy stagePolicy, IEnumerable1 renderers, Progress1 preloadProgress, Action2 exceptionHandlerAction, Action1 preloadStatusHandlerAction, IActionLoader actionLoader, Boolean ignoreBootstrapFailure, Boolean ignorePreloadFailure) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Headless\Hosting\LibplanetNodeService.cs:line 150
at NineChronicles.Headless.NineChroniclesNodeService..ctor(PrivateKey minerPrivateKey, LibplanetNodeServiceProperties properties, IBlockPolicy blockPolicy, Planet planet, IActionLoader actionLoader, Progress1 preloadProgress, Boolean ignoreBootstrapFailure, Boolean ignorePreloadFailure, Boolean strictRendering, TimeSpan txLifeTime, Int32 txQuotaPerSigner, AccessControlServiceOptions acsOptions) in G:\9c\nodeFork\NineChronicles.Headless\NineChronicles.Headless\NineChroniclesNodeService.cs:line 152 at NineChronicles.Headless.NineChroniclesNodeService.Create(NineChroniclesNodeServiceProperties properties, StandaloneContext context) in G:\9c\nodeFork\NineChronicles.Headless\NineChronicles.Headless\NineChroniclesNodeService.cs:line 214 at NineChronicles.Headless.Executable.Program.Run(String appProtocolVersionToken, String genesisBlockPath, String host, Nullable1 port, String swarmPrivateKeyString, Nullable1 noMiner, Nullable1 minerCount, String minerPrivateKeyString, Nullable1 minerBlockIntervalMilliseconds, String storeType, String storePath, Nullable1 noReduceStore, String[] iceServerStrings, String[] peerStrings, String[] trustedAppProtocolVersionSigners, Nullable1 rpcServer, String rpcListenHost, Nullable1 rpcListenPort, Nullable1 rpcRemoteServer, Nullable1 rpcHttpServer, Nullable1 graphQLServer, String graphQLHost, Nullable1 graphQLPort, String graphQLSecretTokenPath, Nullable1 noCors, Nullable1 confirmations, Nullable1 nonblockRenderer, Nullable1 nonblockRendererQueue, Nullable1 strictRendering, Nullable1 logActionRenders, String networkType, Nullable1 planet, Nullable1 txLifeTime, Nullable1 messageTimeout, Nullable1 tipTimeout, Nullable1 demandBuffer, String[] staticPeerStrings, Nullable1 skipPreload, Nullable1 minimumBroadcastTarget, Nullable1 bucketSize, String chainTipStaleBehaviorType, Nullable1 txQuotaPerSigner, Nullable1 maximumPollPeers, Nullable1 consensusPort, String consensusPrivateKeyString, String[] consensusSeedStrings, Nullable1 consensusTargetBlockIntervalMilliseconds, Nullable1 consensusProposeSecondBase, Nullable1 consensusEnterPreCommitDelay, Nullable1 maxTransactionPerBlock, String configPath, Nullable1 arenaParticipantsSyncInterval, Boolean arenaParticipantsSync, Boolean remoteKeyValueService, Nullable1 cancellationToken) in G:\9c\nodeFork\NineChronicles.Headless\NineChronicles.Headless.Executable\Program.cs:line 491 System.IO.FileLoadException: Could not load file or assembly 'Lib9c.Plugin, Culture=neutral, PublicKeyToken=null'. Could not find or load a specific file. (0x80131621) File name: 'Lib9c.Plugin, Culture=neutral, PublicKeyToken=null' ---> System.IO.FileLoadException: Could not load file or assembly 'Lib9c.Plugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath) at Libplanet.Extensions.PluggedActionEvaluator.PluginLoadContext.Load(AssemblyName assemblyName) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Extensions.PluggedActionEvaluator\PluginLoadContext.cs:line 19 at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName) at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext, RuntimeAssembly requestingAssembly, Boolean throwOnFileNotFound) at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) at Libplanet.Extensions.PluggedActionEvaluator.PluggedActionEvaluator.LoadPlugin(String absolutePath) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Extensions.PluggedActionEvaluator\PluggedActionEvaluator.cs:line 31 at Libplanet.Extensions.PluggedActionEvaluator.PluggedActionEvaluator.CreateActionEvaluator(String pluginPath, String typeName, IKeyValueStore keyValueStore) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Extensions.PluggedActionEvaluator\PluggedActionEvaluator.cs:line 47 at Libplanet.Extensions.PluggedActionEvaluator.PluggedActionEvaluator..ctor(String pluginPath, String typeName, IKeyValueStore keyValueStore, IActionLoader actionLoader) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Extensions.PluggedActionEvaluator\PluggedActionEvaluator.cs:line 24 at Libplanet.Headless.Hosting.LibplanetNodeService.<>c__DisplayClass23_1.<.ctor>g__BuildActionEvaluator|0(IActionEvaluatorConfiguration actionEvaluatorConfiguration) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Headless\Hosting\LibplanetNodeService.cs:line 129 at Libplanet.Headless.Hosting.LibplanetNodeService.<>c__DisplayClass23_1.<.ctor>b__3(ValueTuple2 pair) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Headless\Hosting\LibplanetNodeService.cs:line 142
at System.Linq.Enumerable.SelectArrayIterator2.Fill(ReadOnlySpan1 source, Span1 destination, Func2 func)
at System.Linq.Enumerable.SelectArrayIterator2.ToArray() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.OrderedEnumerable1.ToArray()
at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable1 items)
at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable1 items) at Libplanet.Extensions.ForkableActionEvaluator.HardForkRouter..ctor(IEnumerable1 rangeAndEvaluatorPairs) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Extensions.ForkableActionEvaluator\HardForkRouter.cs:line 16
at Libplanet.Extensions.ForkableActionEvaluator.ForkableActionEvaluator..ctor(IEnumerable1 pairs, IActionLoader actionLoader) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Extensions.ForkableActionEvaluator\ForkableActionEvaluator.cs:line 15 at Libplanet.Headless.Hosting.LibplanetNodeService.<>c__DisplayClass23_1.<.ctor>g__BuildActionEvaluator|0(IActionEvaluatorConfiguration actionEvaluatorConfiguration) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Headless\Hosting\LibplanetNodeService.cs:line 140 at Libplanet.Headless.Hosting.LibplanetNodeService..ctor(LibplanetNodeServiceProperties properties, IBlockPolicy blockPolicy, IStagePolicy stagePolicy, IEnumerable1 renderers, Progress1 preloadProgress, Action2 exceptionHandlerAction, Action1 preloadStatusHandlerAction, IActionLoader actionLoader, Boolean ignoreBootstrapFailure, Boolean ignorePreloadFailure) in G:\9c\nodeFork\NineChronicles.Headless\Libplanet.Headless\Hosting\LibplanetNodeService.cs:line 150 at NineChronicles.Headless.NineChroniclesNodeService..ctor(PrivateKey minerPrivateKey, LibplanetNodeServiceProperties properties, IBlockPolicy blockPolicy, Planet planet, IActionLoader actionLoader, Progress1 preloadProgress, Boolean ignoreBootstrapFailure, Boolean ignorePreloadFailure, Boolean strictRendering, TimeSpan txLifeTime, Int32 txQuotaPerSigner, AccessControlServiceOptions acsOptions) in G:\9c\nodeFork\NineChronicles.Headless\NineChronicles.Headless\NineChroniclesNodeService.cs:line 152
at NineChronicles.Headless.NineChroniclesNodeService.Create(NineChroniclesNodeServiceProperties properties, StandaloneContext context) in G:\9c\nodeFork\NineChronicles.Headless\NineChronicles.Headless\NineChroniclesNodeService.cs:line 214
at NineChronicles.Headless.Executable.Program.Run(String appProtocolVersionToken, String genesisBlockPath, String host, Nullable1 port, String swarmPrivateKeyString, Nullable1 noMiner, Nullable1 minerCount, String minerPrivateKeyString, Nullable1 minerBlockIntervalMilliseconds, String storeType, String storePath, Nullable1 noReduceStore, String[] iceServerStrings, String[] peerStrings, String[] trustedAppProtocolVersionSigners, Nullable1 rpcServer, String rpcListenHost, Nullable1 rpcListenPort, Nullable1 rpcRemoteServer, Nullable1 rpcHttpServer, Nullable1 graphQLServer, String graphQLHost, Nullable1 graphQLPort, String graphQLSecretTokenPath, Nullable1 noCors, Nullable1 confirmations, Nullable1 nonblockRenderer, Nullable1 nonblockRendererQueue, Nullable1 strictRendering, Nullable1 logActionRenders, String networkType, Nullable1 planet, Nullable1 txLifeTime, Nullable1 messageTimeout, Nullable1 tipTimeout, Nullable1 demandBuffer, String[] staticPeerStrings, Nullable1 skipPreload, Nullable1 minimumBroadcastTarget, Nullable1 bucketSize, String chainTipStaleBehaviorType, Nullable1 txQuotaPerSigner, Nullable1 maximumPollPeers, Nullable1 consensusPort, String consensusPrivateKeyString, String[] consensusSeedStrings, Nullable1 consensusTargetBlockIntervalMilliseconds, Nullable1 consensusProposeSecondBase, Nullable1 consensusEnterPreCommitDelay, Nullable1 maxTransactionPerBlock, String configPath, Nullable1 arenaParticipantsSyncInterval, Boolean arenaParticipantsSync, Boolean remoteKeyValueService, Nullable1 cancellationToken) in G:\9c\nodeFork\NineChronicles.Headless\NineChronicles.Headless.Executable\Program.cs:line 491`

@FioX0 FioX0 added the bug Something isn't working label Jan 6, 2025
@FioX0
Copy link
Author

FioX0 commented Jan 6, 2025

This started somewhere in the last 2 months when project files were being moved around headless and lib9c.

It was all fine until I did a clean new git clone, instead of using a legacy folder.

Example of changes:
image

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

No branches or pull requests

1 participant