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

"Waiting on threads to park on joinable thread list timed out" with Drone.io CI #98

Open
Weasy666 opened this issue Mar 24, 2021 · 3 comments
Labels
bug in unity This is a bug in unity itself (out of scope) bug Something isn't working

Comments

@Weasy666
Copy link

Weasy666 commented Mar 24, 2021

Bug description
I created a Drone.io pipeline with your images. I took inspiration from the gitlab and Travis examples. Here is the .drone.yml:

.drone.yml
globals:
  - &unity3d-base
    volumes:
    - name: unity3d-cache
      path: /drone/src/Library


kind: pipeline
type: docker
name: 🔨 build & 🔍 test

environment:
  BUILD_NAME: ${DRONE_REPO_NAME}

platform:
  arch: amd64

steps:
# Build Android package with IL2CPP backend
- name: 🔨 build | 🤖 android
  image: unityci/editor:2020.2.0f1-android-0.11
  <<: *unity3d-base
  environment:
    BUILD_TARGET: Android
    BUILD_APP_BUNDLE: 'false'
    SCRIPTING_BACKEND: IL2CPP
    UNITY_LICENSE:
      from_secret: UNITY_LICENSE
  commands:
    - chmod +x ./ci/before_script.sh && ./ci/before_script.sh
    - chmod +x ./ci/build.sh && ./ci/build.sh
  when:
    ref:
      include:
        - refs/heads/*
      exclude:
        - refs/heads/master
        - refs/pull/*/head

# Build iOS package
- name: 🔨 build | 🍏 iOS
  image: unityci/editor:2020.2.0f1-ios-0.11
  <<: *unity3d-base
  environment:
    BUILD_TARGET: iOS
    UNITY_LICENSE:
      from_secret: UNITY_LICENSE
  commands:
    - chmod +x ./ci/build.sh && ./ci/build.sh
  when:
    ref:
      include:
        - refs/heads/*
      exclude:
        - refs/heads/master
        - refs/pull/*/head

- name: 🔍 tests
  image: unityci/editor:2020.2.0f1-windows-mono-0.11
  <<: *unity3d-base
  environment:
    UNITY_LICENSE:
      from_secret: UNITY_LICENSE
  commands:
    - chmod +x ./ci/test.sh && ./ci/test.sh

volumes:
- name: unity3d-cache
  temp: {}

Im not really sure if this qualifies as a bug, because i am trying to run the images with a Drone.io CI and you don't officially support that, but...it kind of is a mono bug. At least that was what i found when searching for Waiting on threads to park on joinable thread list timed out., so i hope you can help me out here. And when all goes well, i would like to add the Drone config/instructions to your documentation.

How to reproduce
Setup Drone.io with docker and run the above pipeline config with a Unity project.

Expected behavior
Pipeline finishes or at least does not hang with

Waiting on threads to park on joinable thread list timed out.
debugger-agent: Unable to listen on 27

Additional details
The last part of the pipeline logs

Logfile
...
:: Done with build
Timeout after 300 seconds while waiting async operations to finish. executeMethod 'BuildCommand.PerformBuild'


Aborting batchmode due to failure:
Timeout after 300 seconds while waiting async operations to finish. executeMethod 'BuildCommand.PerformBuild'

[Performance] Application.InitializeProject                                           :        1 samples, Peak.   228 s (1.0x), Avg.   228 s, Total. 227.6 s (11.3%)
[Performance] Application.PackageManager.StartServer                                  :        1 samples, Peak.  2.95 ms (1.0x), Avg.  2.95 ms, Total. 2.953 ms (0.0%)
[Performance] Application.AcquireProjectLock                                          :        1 samples, Peak.  1.82 ms (1.0x), Avg.  1.82 ms, Total. 1.824 ms (0.0%)
[Performance] Application.InitializeEngineNoGraphics                                  :        1 samples, Peak.   275 ms (1.0x), Avg.   275 ms, Total. 275.0 ms (0.0%)
[Performance] Application.PackageManager.Initialize                                   :        1 samples, Peak.  2.58 s (1.0x), Avg.  2.58 s, Total. 2.579 s (0.1%)
[Performance] CurlRequestCheck                                                        :       48 samples, Peak.  99.4 us (3.2x), Avg.  31.4 us, Total. 1.506 ms (0.0%)
[Performance] PackageManager::RunRequestSynchronously                                 :     1227 samples, Peak.  1.14 ms (80.9x), Avg.  14.1 us, Total. 17.26 ms (0.0%)
[Performance] Application.EngineGraphics.Initialize                                   :        1 samples, Peak.   124 ms (1.0x), Avg.   124 ms, Total. 124.4 ms (0.0%)
[Performance] Application.GI.Initialize                                               :        1 samples, Peak.  4.86 ms (1.0x), Avg.  4.86 ms, Total. 4.858 ms (0.0%)
[Performance] Application.LoadAllDefaultResourcesFromEditor                           :        1 samples, Peak.  4.40 ms (1.0x), Avg.  4.40 ms, Total. 4.404 ms (0.0%)
[Performance] Application.LoadMonoAssemblies                                          :        1 samples, Peak.  9.17 s (1.0x), Avg.  9.17 s, Total. 9.170 s (0.5%)
[Performance] RestoreManagedReferences                                                :        2 samples, Peak.   203 ms (2.0x), Avg.   101 ms, Total. 202.6 ms (0.0%)
[Performance] ProcessService.EditorAfterLoadAllAssemblies                             :        2 samples, Peak.   147 ms (1.2x), Avg.   119 ms, Total. 238.4 ms (0.0%)
[Performance] Application.ReadLicenseInfo                                             :        1 samples, Peak.  40.4 ms (1.0x), Avg.  40.4 ms, Total. 40.36 ms (0.0%)
[Performance] Application.InitialScriptRefresh                                        :        1 samples, Peak.  87.7 s (1.0x), Avg.  87.7 s, Total. 87.66 s (4.3%)
[Performance] PresetManagerPostProcessor.OnPreprocessAsset                            :     4511 samples, Peak.  5.47 ms (152.3x), Avg.  35.9 us, Total. 162.1 ms (0.0%)
[Performance] CancelSplashScreenOnAssetChange.OnPreprocessAsset                       :     4511 samples, Peak.  2.96 ms (328.6x), Avg.  8.99 us, Total. 40.56 ms (0.0%)
[Performance] Compiling Scripts                                                       :        1 samples, Peak.  64.8 s (1.0x), Avg.  64.8 s, Total. 64.82 s (3.2%)
[Performance] Package.AsyncRequest                                                    :        2 samples, Peak.  22.9 us (1.2x), Avg.  19.2 us, Total. 38.37 us (0.0%)
[Performance] AssetDatabase.ImportAssets                                              :        8 samples, Peak.   334 ms (8.0x), Avg.  41.7 ms, Total. 333.6 ms (0.0%)
[Performance] AssetCallbacks.OnPostprocessAllAssets                                   :        4 samples, Peak.   117 ms (4.0x), Avg.  29.2 ms, Total. 116.8 ms (0.0%)
[Performance] TMPro_TexturePostProcessor.OnPostprocessAllAssets                       :        4 samples, Peak.  47.6 ms (2.6x), Avg.  18.4 ms, Total. 73.43 ms (0.0%)
[Performance] SimulatedAREnvironmentImport.OnPostprocessAllAssets                     :        4 samples, Peak.   136 ms (3.0x), Avg.  46.1 ms, Total. 184.5 ms (0.0%)
[Performance] RetainedMode.OnPostprocessAllAssets                                     :        4 samples, Peak.  92.5 ms (3.4x), Avg.  27.6 ms, Total. 110.2 ms (0.0%)
[Performance] EditorAtlasMonitorInjector.OnPostprocessAllAssets                       :        4 samples, Peak.  2.21 ms (2.6x), Avg.   848 us, Total. 3.392 ms (0.0%)
[Performance] AudioMixerPostprocessor.OnPostprocessAllAssets                          :        4 samples, Peak.   977 us (3.8x), Avg.   255 us, Total. 1.021 ms (0.0%)
[Performance] AssetEvents.OnPostprocessAllAssets                                      :        8 samples, Peak.   621 us (6.0x), Avg.   103 us, Total. 824.7 us (0.0%)
[Performance] ModelImporterPostProcessor.OnPostprocessAllAssets                       :        4 samples, Peak.   609 ms (2.0x), Avg.   300 ms, Total. 1.200 s (0.1%)
[Performance] StyleCatalogPostProcessor.OnPostprocessAllAssets                        :        4 samples, Peak.   408 ms (2.6x), Avg.   159 ms, Total. 636.1 ms (0.0%)
[Performance] BuildCatalog                                                            :        2 samples, Peak.   405 ms (1.3x), Avg.   315 ms, Total. 630.3 ms (0.0%)
[Performance] Application.AssetDatabase.Refresh                                       :        1 samples, Peak.  60.7 s (1.0x), Avg.  60.7 s, Total. 60.67 s (3.0%)
[Performance] AssetDatabase.Refresh                                                   :        1 samples, Peak.  60.7 s (1.0x), Avg.  60.7 s, Total. 60.67 s (3.0%)
[Performance] TextureImporter.Import                                                  :      469 samples, Peak.  2.14 s (21.9x), Avg.  97.9 ms, Total. 45.90 s (2.3%)
[Performance] EditorAtlasMonitorInjector.OnPostprocessTexture                         :      467 samples, Peak.   560 us (29.6x), Avg.  18.9 us, Total. 8.843 ms (0.0%)
[Performance] ShaderImporter.Import                                                   :       26 samples, Peak.  2.69 s (14.7x), Avg.   182 ms, Total. 4.739 s (0.2%)
[Performance] ModelImporter.Import                                                    :        2 samples, Peak.   353 ms (1.4x), Avg.   254 ms, Total. 507.6 ms (0.0%)
[Performance] FBXMaterialDescriptionPreprocessor.OnPreprocessMaterialDescription      :        1 samples, Peak.  10.9 ms (1.0x), Avg.  10.9 ms, Total. 10.92 ms (0.0%)
[Performance] SketchupMaterialDescriptionPreprocessor.OnPreprocessMaterialDescription :        1 samples, Peak.   307 us (1.0x), Avg.   307 us, Total. 306.9 us (0.0%)
[Performance] ThreeDSMaterialDescriptionPreprocessor.OnPreprocessMaterialDescription  :        1 samples, Peak.   219 us (1.0x), Avg.   219 us, Total. 219.1 us (0.0%)
[Performance] TreeAOImporter.OnPostprocessModel                                       :        2 samples, Peak.  2.99 ms (2.0x), Avg.  1.52 ms, Total. 3.033 ms (0.0%)
[Performance] SceneDataContainer.TransformHierarchyChangedSetParentCallback           :        3 samples, Peak.  93.2 us (2.5x), Avg.  36.6 us, Total. 109.8 us (0.0%)
[Performance] SceneVisibilityState.IsFlagSetInParents                                 :        3 samples, Peak.  25.3 us (1.9x), Avg.  13.4 us, Total. 40.23 us (0.0%)
[Performance] Application.ImportAssetsWithMismatchingAssetImporterVersion             :        1 samples, Peak.   529 ms (1.0x), Avg.   529 ms, Total. 528.7 ms (0.0%)
[Performance] Application.SyncCurrentColorSpace                                       :        1 samples, Peak.  24.9 ms (1.0x), Avg.  24.9 ms, Total. 24.92 ms (0.0%)
[Performance] Application.OnUsbDevicesChanged                                         :        1 samples, Peak.  35.5 us (1.0x), Avg.  35.5 us, Total. 35.48 us (0.0%)
[Performance] Application.AssetDatabase.SaveAssets                                    :        1 samples, Peak.  10.7 ms (1.0x), Avg.  10.7 ms, Total. 10.68 ms (0.0%)
[Performance] Application.AssetInstanceCacheUpdate                                    :        1 samples, Peak.   914 ns (1.0x), Avg.   914 ns, Total. 914.0 ns (0.0%)
[Performance] Application.UnityExtensions.Initialize                                  :        1 samples, Peak.  4.37 ms (1.0x), Avg.  4.37 ms, Total. 4.369 ms (0.0%)
[Performance] Application.InitializeManagedCompilationPipeline                        :        1 samples, Peak.   209 ms (1.0x), Avg.   209 ms, Total. 209.1 ms (0.0%)
[Performance] Application.ExecuteStartups                                             :        1 samples, Peak.   503 ms (1.0x), Avg.   503 ms, Total. 503.4 ms (0.0%)
[Performance] Application.InitializeMenu                                              :        1 samples, Peak.   143 ms (1.0x), Avg.   143 ms, Total. 142.5 ms (0.0%)
[Performance] UpdateAllMenus                                                          :        1 samples, Peak.   143 ms (1.0x), Avg.   143 ms, Total. 142.5 ms (0.0%)
[Performance] Application.editorInitializingProject                                   :        1 samples, Peak.   167 us (1.0x), Avg.   167 us, Total. 167.4 us (0.0%)
[Performance] GUIView.RepaintAll.PlayerLoopController                                 :        4 samples, Peak.  14.2 us (1.9x), Avg.  7.37 us, Total. 29.48 us (0.0%)
[Performance] Application.InvokeFinishedLoadingProject                                :        1 samples, Peak.   102 ms (1.0x), Avg.   102 ms, Total. 101.7 ms (0.0%)
[Performance] ProcessService.OnProjectLoaded                                          :        1 samples, Peak.  84.6 ms (1.0x), Avg.  84.6 ms, Total. 84.64 ms (0.0%)
[Performance] GenerateAssemblyTypeInfos                                               :        2 samples, Peak.  2.72 s (1.0x), Avg.  2.61 s, Total. 5.225 s (0.3%)
[Performance] Inspector.InitOrRebuild                                                 :        2 samples, Peak.  4.36 ms (1.4x), Avg.  3.08 ms, Total. 6.156 ms (0.0%)
Start importing ProjectSettings/ProjectSettings.asset using Guid(00000000000000004000000000000000) Importer(-1,00000000000000000000000000000000)  -> (artifact id: '9ef8fd4c7a59f7cf43aa1496d08415bc') in 0.019765 seconds
Refreshing native plugins compatible for Editor in 4.70 ms, found 28 plugins.
Preloading 0 native plugins for Editor in 0.00 ms.
RefreshInfo: StopAssetImportingV2(NoUpdateAssetOptions) scanfilter: 
RefreshProfiler: Total: 998.206ms
	InvokeBeforeRefreshCallbacks: 0.004ms
	ApplyChangesToAssetFolders: 0.383ms
	Scan: 41.565ms
	OnSourceAssetsModified: 0.726ms
	InitializeImportedAssetsSnapshot: 102.928ms
	GetAllGuidsForCategorization: 1.235ms
	CategorizeAssets: 41.797ms
	ImportAndPostprocessOutOfDateAssets: 757.511ms (6.092ms without children)
		ImportManagerImport: 26.141ms (3.029ms without children)
			ImportInProcess: 22.774ms
			UpdateCategorizedAssets: 0.337ms
		PostProcessAllAssets: 686.529ms
		ReloadImportedAssets: 0.003ms
		EnsureUptoDateAssetsAreRegisteredWithGuidPM: 1.073ms
		InitializingProgressBar: 0.014ms
		PostProcessAllAssetNotificationsAddChangedAssets: 0.755ms
		OnDemandSchedulerStart: 17.900ms
		RestoreLoadedAssetsState: 3.414ms
	UpdateImportedAssetsSnapshot: 15.590ms
	ReloadSourceAssets: 3.223ms
	UnloadImportedAssets: 0.431ms
	Hotreload: 6.381ms
	FixTempGuids: 0.020ms
	GatherAllCurrentPrimaryArtifactRevisions: 1.553ms
	UnloadStreamsBegin: 0.613ms
	LoadedImportedAssetsSnapshotReleaseGCHandles: 2.042ms
	GetLoadedSourceAssetsSnapshot: 9.024ms
	PersistCurrentRevisions: 0.521ms
	UnloadStreamsEnd: 2.377ms
	Untracked: 25.872ms
AcceleratorClientConnectionCallback - disconnected - :0
Cleanup mono
latform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
./Editor/Platform/Linux/UsbDevices.cpp:UsbDevicesQuery
Waiting on threads to park on joinable thread list timed out.
debugger-agent: Unable to listen on 27
@Weasy666 Weasy666 added the bug Something isn't working label Mar 24, 2021
@webbertakken
Copy link
Member

Could you verify whether this problem occurs while running out of disk space?

If you're not sure, you could use atop which I have included in the images.

@Weasy666
Copy link
Author

Weasy666 commented Mar 25, 2021

We have at least 94GB free on the server on which Drone is running, so i don't think that we are running out of disk space, but i will test it.
Edit: Tested it, disk space is no problem. And memory on host and in docker container is also no problem. On host there is at least 4GB free and in container 300MB. But...on one of a few runs, i got a new error message, directly after the location where the others end.

...
./Editor/Platform/Linux/UsbDevices.cpp:UsbDevicesQuery
Waiting on threads to park on joinable thread list timed out.
debugger-agent: Unable to listen on 27
/opt/unity/Editor/Data/Resources/PackageManager/Server/node_modules/winston/lib/winston/logger.js:307
      throw ex;
      ^

Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
    at doWrite (_stream_writable.js:413:19)
    at writeOrBuffer (_stream_writable.js:401:5)
    at Socket.Writable.write (_stream_writable.js:301:11)
    at Console.log (/opt/unity/Editor/Data/Resources/PackageManager/Server/node_modules/winston/lib/winston/transports/console.js:79:23)
    at Console._write (/opt/unity/Editor/Data/Resources/PackageManager/Server/node_modules/winston-transport/index.js:82:19)
    at doWrite (/opt/unity/Editor/Data/Resources/PackageManager/Server/node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js:428:64)
    at writeOrBuffer (/opt/unity/Editor/Data/Resources/PackageManager/Server/node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js:417:5)
    at Console.Writable.write (/opt/unity/Editor/Data/Resources/PackageManager/Server/node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js:334:11)
    at DerivedLogger.ondata (/opt/unity/Editor/Data/Resources/PackageManager/Server/node_modules/winston/node_modules/readable-stream/lib/_stream_readable.js:681:20)
    at DerivedLogger.emit (events.js:201:15)

@shopsoft-srl
Copy link

shopsoft-srl commented Apr 16, 2021

I have the same issue on azure devops running a unity-ios build

./Editor/Platform/Linux/UsbDevices.cpp:UsbDevicesQuery
Waiting on threads to park on joinable thread list timed out.
debugger-agent: Unable to listen on 33
##[error]Bash exited with code '1'.

@davidmfinol davidmfinol added bug in unity This is a bug in unity itself (out of scope) labels Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug in unity This is a bug in unity itself (out of scope) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants