actions / runner

The Runner for GitHub Actions :rocket:
https://github.com/features/actions
MIT License
4.82k stars 947 forks source link

v2.316.1 can't start on the image generated from the main branch of runner-images repo #3274

Closed enescakir closed 4 months ago

enescakir commented 5 months ago

v2.316.1 can't start on the image generated from the main branch of runner-images repo. The Newtonsoft.Json library throws different exceptions.

Runner Version and Platform

2.316.1 Linux

Job Log Output

/actions-runner/run.sh --jitconfig throws this exception. The type initializer for 'Newtonsoft.Json.Utilities.ConvertUtils' threw an exception

./config.sh --url throws this exception. The type initializer for 'Newtonsoft.Json.JsonWriter' threw an exception

Runner and Worker's Diagnostic Logs

[2024-05-04 07:12:16Z INFO HostContext] Well known directory 'Root': '/home/runner/actions-runner'
[2024-05-04 07:12:16Z INFO HostContext] Well known config file 'Service': '/home/runner/actions-runner/.service'
[2024-05-04 07:12:16Z INFO ConfigurationStore] ServiceConfigFilePath: /home/runner/actions-runner/.service
[2024-05-04 07:12:16Z INFO CommandSettings] Flag 'help': 'False'
[2024-05-04 07:12:16Z INFO CommandSettings] Flag 'version': 'False'
[2024-05-04 07:12:16Z INFO CommandSettings] Flag 'commit': 'False'
[2024-05-04 07:12:16Z INFO CommandSettings] Flag 'check': 'False'
[2024-05-04 07:12:16Z INFO CommandSettings] Command 'configure': 'False'
[2024-05-04 07:12:16Z INFO CommandSettings] Command 'remove': 'False'
[2024-05-04 07:12:16Z INFO CommandSettings] Command 'warmup': 'False'
[2024-05-04 07:12:16Z ERR  Runner] System.TypeInitializationException: The type initializer for 'Newtonsoft.Json.Utilities.ConvertUtils' threw an exception.
 ---> System.BadImageFormatException: Could not load file or assembly 'System.Runtime.Numerics, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The module was expected to contain an assembly manifest.
File name: 'System.Runtime.Numerics, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   --- End of inner exception stack trace ---
   at Newtonsoft.Json.Utilities.ConvertUtils.GetTypeCode(Type t, Boolean& isEnum)
   at Newtonsoft.Json.Utilities.ConvertUtils.GetTypeCode(Type t)
   at Newtonsoft.Json.Serialization.DefaultContractResolver.IsJsonPrimitiveType(Type t)
   at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType)
   at Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver.ResolveContract(Type type)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.GetContract(Type type)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.GetContractSafe(Type type)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at GitHub.Runner.Listener.Runner.ExecuteCommand(CommandSettings command)
[2024-05-04 07:12:16Z ERR  Runner] #####################################################
[2024-05-04 07:12:16Z ERR  Runner] System.BadImageFormatException: Could not load file or assembly 'System.Runtime.Numerics, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The module was expected to contain an assembly manifest.
File name: 'System.Runtime.Numerics, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
[2024-05-04 07:12:16Z ERR  Terminal] WRITE ERROR: The type initializer for 'Newtonsoft.Json.Utilities.ConvertUtils' threw an exception.
[2024-05-04 07:12:16Z INFO Listener] Runner execution has finished with return code 1
enescakir commented 4 months ago

Interesting. After downloading the runner script several times, it worked.