Roon 2.71 runs out of file descriptors (Win 10) and stops working (ref#LRUHQ4)

Hi! What’s not quite right with Roon?

· None of the above quite fits

None of the above quite fits

· None of these quite match

Tell us what's going on

· Roon 2.7.1 runs out of file descriptors and stops working

Tell us about your home network

· Gigabit ethernet wired

Can I downgrade to 2.70?

After 2.71 “upgrade” everything works fine for a few minutes or hours then stops playing from library or streaming radio. It says to check my internet connection. I think the real problem is it’s running out of file descriptors because they’re being allocated but not freed/garbage collected.

At 2.71 startup this message repeats many times per second continuously:

08/05 14:37:43 Critical: scx: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'LevelDb'.
   at Roon.Analytics.EventManager.SetLocalState(String name, PropertyValue value)
   at Roon.Broker.Transport.AnalyticsHelper.SetLastState(IAudioDevice device, String state)
   at Roon.Broker.Transport.AnalyticsHelper.NotifyDiscovered(IAudioDevice device)
   at Roon.Broker.Transport.AirPlay.<>c__DisplayClass22_0.<ev_device_seen>b__0()
   at Sooloos.SynchronizationContextThread._Dispatch(SendOrPostWrapper& ret)
08/05 14:37:43 Critical: scx: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'LevelDb'.
   at Roon.Analytics.EventManager.SetLocalState(String name, PropertyValue value)
   at Roon.Broker.Transport.AnalyticsHelper.SetLastState(IAudioDevice device, String state)
   at Roon.Broker.Transport.AnalyticsHelper.NotifyDiscovered(IAudioDevice device)
   at Roon.Broker.Transport.AirPlay.<>c__DisplayClass22_0.<ev_device_seen>b__0()
   at Sooloos.SynchronizationContextThread._Dispatch(SendOrPostWrapper& ret)

Nevertheless Roon works fine, then after some time it no longer plays music. The log shows this message repeating continuously:

08/06 06:12:14 Critical: scx: System.Net.Sockets.SocketException (10055): An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, Boolean disconnectOnFailure, String callerName)
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at Roon.Http.HttpServer._Start()
   at Roon.Audio.AirPlay.DACPServer.Start()
   at Roon.Broker.Transport.AirPlayDevice..ctor(AirPlay airplay, MdnsDiscovery discovery, DACPManager dacp_manager, AirPlayDeviceData data)
   at Roon.Broker.Transport.AirPlay.<>c__DisplayClass22_0.<ev_device_seen>b__0()
   at Sooloos.SynchronizationContextThread._Dispatch(SendOrPostWrapper& ret)
08/06 06:12:15 Critical: scx: System.Net.Sockets.SocketException (10055): An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, Boolean disconnectOnFailure, String callerName)
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at Roon.Http.HttpServer._Start()
   at Roon.Audio.AirPlay.DACPServer.Start()
   at Roon.Broker.Transport.AirPlayDevice..ctor(AirPlay airplay, MdnsDiscovery discovery, DACPManager dacp_manager, AirPlayDeviceData data)
   at Roon.Broker.Transport.AirPlay.<>c__DisplayClass22_0.<ev_device_seen>b__0()
   at Sooloos.SynchronizationContextThread._Dispatch(SendOrPostWrapper& ret)

Rebooting the Windows 10 box makes it start working again for a short time.

Static code analysis in your QA process should have caught this. Allocating but not freeing resources similar to a memory leak is a pretty basic but in software dev, are you doing static analysis of the code? Maybe your tool missed this.

Please fix asap or let me roll back to 2.70. The 2.70 version worked fine for weeks at a time without anything needing to be restarted.

FWIW: Things are fine on my Windows 11 server machine. Windows 10 is end of life, so specific testing on it won’t necessarily happen.

I don’t think this is a Windows 10 issue because Roon 2.70 worked fine for weeks at a time with no reboots.

Roon does not provide the option to downgrade is not due to potential database issues. I just posted this in another thread..

Hi @James_Ockers,

Thanks for the details. Since Roon 2.7.0 was stable for you for weeks at a time, this does not look like a Windows 10 issue. The next step we would like you to try is the latest Roon release, the hotfix, and then let us know whether you see the same behavior there.

Please report back once you have tested it. If the issue is still present on the latest hotfix, we can take it from there.

Hi @noris ,

Thanks for that. I installed 2.71 build 1683

08/06 19:35:11 Debug: [appupdater] Update installed: 2.71 (build 1683) production

and I bet it’s not better, I still see this repeating in the RoonServer_log.txt logfile:

08/06 19:39:12 Critical: scx: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'LevelDb'.
   at LevelDb.Database.CheckDisposedClosed()
   at LevelDb.Database.Put(Byte[] key, ByteBuffer val)
   at LevelDb.Database.Put(Byte[] key, Byte[] val)
   at Roon.Analytics.EventManager.SetLocalState(String name, PropertyValue value)
   at Roon.Broker.Transport.AnalyticsHelper.SetLastState(IAudioDevice device, String state)
   at Roon.Broker.Transport.AnalyticsHelper.NotifyDiscovered(IAudioDevice device)
   at Roon.Broker.Transport.AirPlay.<>c__DisplayClass22_0.<ev_device_seen>b__0()
   at Sooloos.CallingThread.<>c__DisplayClass12_0.<Post>b__1(Object <p0>)
   at Sooloos.SynchronizationContextThread._Dispatch(SendOrPostWrapper& ret)
08/06 19:39:13 Debug: [music/storage] queueing 2 mods for 9969f8d7-2dfc-462a-a6b2-217725b94e30 (\)
08/06 19:39:13 Trace: [devicedb] [autodetect] No Match for DeviceAutodetectData[Type=AirPlay Model=ShairportSync DescriptiveName=office shairplay]
08/06 19:39:13 Critical: scx: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'LevelDb'.
   at LevelDb.Database.CheckDisposedClosed()
   at LevelDb.Database.Put(Byte[] key, ByteBuffer val)
   at LevelDb.Database.Put(Byte[] key, Byte[] val)
   at Roon.Analytics.EventManager.SetLocalState(String name, PropertyValue value)
   at Roon.Broker.Transport.AnalyticsHelper.SetLastState(IAudioDevice device, String state)
   at Roon.Broker.Transport.AnalyticsHelper.NotifyDiscovered(IAudioDevice device)
   at Roon.Broker.Transport.AirPlay.<>c__DisplayClass22_0.<ev_device_seen>b__0()
   at Sooloos.CallingThread.<>c__DisplayClass12_0.<Post>b__1(Object <p0>)
   at Sooloos.SynchronizationContextThread._Dispatch(SendOrPostWrapper& ret)

This is the problematic message that I speculate leads to the exhaustion of file descriptors as I explained in my initial trouble report.

But I will let you know if it is stable now.

Thanks,
James

Hi @noris

I didn’t reboot Windows after the hotfix was installed so as expected it quit working a few hours later, with the “Critical: scx: System.Net.Sockets.SocketException (10055)” error repeated continuously in the logfile.

My usual workaround for these 2.71 “Critical: scx:” issues is to restart Windows (reboot the MediaPC) which restarts RoonServer and everything else. I did that this morning:

08/07 09:32:09 Info: Starting RoonServer v2.71 (build 1683) production on windows

I’m pleased to report I don’t see any further logfile lines containing the string “scx” after the restart.

I will let this topic auto-close if I don’t see any further file descriptor exhaustion related issues.

Thanks!
James