OutOfMemory Error
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
OutOfMemory Error
@mik_s
I am running UMS on a Linux server.
With UMS V14.12.0 and V14.12.1, I am getting this error in my logs:
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached.
Using previous versions this error does not happen.
The error happens immediately upon starting UMS, but only happens if one of my LG TV's is turned on.
If none of my LG TV's are on, the error does not happen but happens as soon as I turn on one of the TV's.
For now I have reverted back to UMS V14.11.0 and there is no error.
The error is definitely due to some change in V14.12.0 and not due to any configuration problem.
Attached is the log file (In TRACE mode) for V14.12.1.
Thanks
I am running UMS on a Linux server.
With UMS V14.12.0 and V14.12.1, I am getting this error in my logs:
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached.
Using previous versions this error does not happen.
The error happens immediately upon starting UMS, but only happens if one of my LG TV's is turned on.
If none of my LG TV's are on, the error does not happen but happens as soon as I turn on one of the TV's.
For now I have reverted back to UMS V14.11.0 and there is no error.
The error is definitely due to some change in V14.12.0 and not due to any configuration problem.
Attached is the log file (In TRACE mode) for V14.12.1.
Thanks
- Attachments
-
- debug.log (14.12.1).zip
- (38.46 KiB) Downloaded 19 times
Re: OutOfMemory Error
I had a quick look but not sure of the cause.
There was mention of libraries not able to load related to MediaInfo so that might be related, I had seen the same thing from another user on Linux but I don't know if Mediainfo is installed as part of UMS or needs to be done separately on Linux. It appears the library is missing.
Could you do logs with V14.11.0 so I can compare?
There was mention of libraries not able to load related to MediaInfo so that might be related, I had seen the same thing from another user on Linux but I don't know if Mediainfo is installed as part of UMS or needs to be done separately on Linux. It appears the library is missing.
Code: Select all
WARN 2025-06-22 11:33:09.668 [jupnp-sync-protocol 584-1] Error loading libzen: Unable to load library 'zen':
libstdc++.so.6: failed to map segment from shared object
libstdc++.so.6: failed to map segment from shared object
libstdc++.so.6: failed to map segment from shared object
Native library (linux-x86/libzen.so) not found in resource path (update.jar:ums.jar)
ERROR 2025-06-22 11:33:09.671 [jupnp-sync-protocol 584-1] Error loading MediaInfo library: Unable to load library 'mediainfo':
libmediainfo.so: failed to map segment from shared object
/usr/lib/libmediainfo.so: failed to map segment from shared object
/usr/lib/libmediainfo.so.0.0.0: failed to map segment from shared object
Native library (linux-x86/libmediainfo.so) not found in resource path (update.jar:ums.jar)
...
...
TRACE 2025-06-22 11:33:09.668 [jupnp-sync-protocol 584-1]
java.lang.UnsatisfiedLinkError: Unable to load library 'zen':
libstdc++.so.6: failed to map segment from shared object
libstdc++.so.6: failed to map segment from shared object
libstdc++.so.6: failed to map segment from shared object
Native library (linux-x86/libzen.so) not found in resource path (update.jar:ums.jar)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:325)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:481)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:423)
at net.pms.parsers.mediainfo.MediaInfoLibrary.createInstance(MediaInfoLibrary.java:78)
at net.pms.parsers.mediainfo.MediaInfoLibrary.<clinit>(MediaInfoLibrary.java:39)
at net.pms.parsers.mediainfo.MediaInfoHelper.<init>(MediaInfoHelper.java:42)
at net.pms.parsers.MediaInfoParser.getMediaInfoHelper(MediaInfoParser.java:130)
at net.pms.parsers.MediaInfoParser.<clinit>(MediaInfoParser.java:80)
at net.pms.configuration.RendererConfiguration.isUseMediaInfo(RendererConfiguration.java:990)
at net.pms.store.container.RealFolder.isValid(RealFolder.java:53)
at net.pms.store.StoreContainer.addChildContainer(StoreContainer.java:304)
at net.pms.store.StoreContainer.addChild(StoreContainer.java:125)
at net.pms.store.MediaStore.setFolderContent(MediaStore.java:300)
at net.pms.store.MediaStore.setSharedContents(MediaStore.java:272)
at net.pms.store.MediaStore.discoverChildren(MediaStore.java:220)
at net.pms.renderers.Renderer.getMediaStore(Renderer.java:257)
at net.pms.network.mediaserver.jupnp.support.contentdirectory.UmsContentDirectoryService.browse(UmsContentDirectoryService.java:760)
at net.pms.network.mediaserver.jupnp.support.contentdirectory.UmsContentDirectoryService.browse(UmsContentDirectoryService.java:292)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at org.jupnp.util.Reflections.invoke(Reflections.java:42)
at org.jupnp.model.action.MethodActionExecutor.execute(MethodActionExecutor.java:94)
at org.jupnp.model.action.AbstractActionExecutor$1.execute(AbstractActionExecutor.java:74)
at org.jupnp.model.DefaultServiceManager.execute(DefaultServiceManager.java:130)
at org.jupnp.model.action.AbstractActionExecutor.execute(AbstractActionExecutor.java:71)
at org.jupnp.protocol.sync.ReceivingAction.executeSync(ReceivingAction.java:104)
at org.jupnp.protocol.ReceivingSync.execute(ReceivingSync.java:65)
at org.jupnp.protocol.ReceivingAsync.run(ReceivingAsync.java:71)
at org.jupnp.transport.spi.UpnpStream.process(UpnpStream.java:83)
at net.pms.network.mediaserver.jupnp.transport.impl.JakartaServletUpnpStream.run(JakartaServletUpnpStream.java:70)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Suppressed: java.lang.UnsatisfiedLinkError: libstdc++.so.6: failed to map segment from shared object
at com.sun.jna.Native.open(Native Method)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:213)
... 34 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: libstdc++.so.6: failed to map segment from shared object
at com.sun.jna.Native.open(Native Method)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:226)
... 34 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: libstdc++.so.6: failed to map segment from shared object
at com.sun.jna.Native.open(Native Method)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:257)
... 34 common frames omitted
Suppressed: java.io.IOException: Native library (linux-x86/libzen.so) not found in resource path (update.jar:ums.jar)
at com.sun.jna.Native.extractFromResourcePath(Native.java:1141)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:297)
... 34 common frames omitted
TRACE 2025-06-22 11:33:09.671 [jupnp-sync-protocol 584-1]
java.lang.UnsatisfiedLinkError: Unable to load library 'mediainfo':
libmediainfo.so: failed to map segment from shared object
/usr/lib/libmediainfo.so: failed to map segment from shared object
/usr/lib/libmediainfo.so.0.0.0: failed to map segment from shared object
Native library (linux-x86/libmediainfo.so) not found in resource path (update.jar:ums.jar)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:325)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:481)
at com.sun.jna.Library$Handler.<init>(Library.java:197)
at com.sun.jna.Native.load(Native.java:618)
at net.pms.parsers.mediainfo.MediaInfoLibrary.createInstance(MediaInfoLibrary.java:90)
at net.pms.parsers.mediainfo.MediaInfoLibrary.<clinit>(MediaInfoLibrary.java:39)
at net.pms.parsers.mediainfo.MediaInfoHelper.<init>(MediaInfoHelper.java:42)
at net.pms.parsers.MediaInfoParser.getMediaInfoHelper(MediaInfoParser.java:130)
at net.pms.parsers.MediaInfoParser.<clinit>(MediaInfoParser.java:80)
at net.pms.configuration.RendererConfiguration.isUseMediaInfo(RendererConfiguration.java:990)
at net.pms.store.container.RealFolder.isValid(RealFolder.java:53)
at net.pms.store.StoreContainer.addChildContainer(StoreContainer.java:304)
at net.pms.store.StoreContainer.addChild(StoreContainer.java:125)
at net.pms.store.MediaStore.setFolderContent(MediaStore.java:300)
at net.pms.store.MediaStore.setSharedContents(MediaStore.java:272)
at net.pms.store.MediaStore.discoverChildren(MediaStore.java:220)
at net.pms.renderers.Renderer.getMediaStore(Renderer.java:257)
at net.pms.network.mediaserver.jupnp.support.contentdirectory.UmsContentDirectoryService.browse(UmsContentDirectoryService.java:760)
at net.pms.network.mediaserver.jupnp.support.contentdirectory.UmsContentDirectoryService.browse(UmsContentDirectoryService.java:292)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at org.jupnp.util.Reflections.invoke(Reflections.java:42)
at org.jupnp.model.action.MethodActionExecutor.execute(MethodActionExecutor.java:94)
at org.jupnp.model.action.AbstractActionExecutor$1.execute(AbstractActionExecutor.java:74)
at org.jupnp.model.DefaultServiceManager.execute(DefaultServiceManager.java:130)
at org.jupnp.model.action.AbstractActionExecutor.execute(AbstractActionExecutor.java:71)
at org.jupnp.protocol.sync.ReceivingAction.executeSync(ReceivingAction.java:104)
at org.jupnp.protocol.ReceivingSync.execute(ReceivingSync.java:65)
at org.jupnp.protocol.ReceivingAsync.run(ReceivingAsync.java:71)
at org.jupnp.transport.spi.UpnpStream.process(UpnpStream.java:83)
at net.pms.network.mediaserver.jupnp.transport.impl.JakartaServletUpnpStream.run(JakartaServletUpnpStream.java:70)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Suppressed: java.lang.UnsatisfiedLinkError: libmediainfo.so: failed to map segment from shared object
at com.sun.jna.Native.open(Native Method)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:213)
... 35 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: /usr/lib/libmediainfo.so: failed to map segment from shared object
at com.sun.jna.Native.open(Native Method)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:226)
... 35 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: /usr/lib/libmediainfo.so.0.0.0: failed to map segment from shared object
at com.sun.jna.Native.open(Native Method)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:257)
... 35 common frames omitted
Suppressed: java.io.IOException: Native library (linux-x86/libmediainfo.so) not found in resource path (update.jar:ums.jar)
at com.sun.jna.Native.extractFromResourcePath(Native.java:1141)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:297)
... 35 common frames omitted
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Re: OutOfMemory Error
Please find attached the log of V14.11.0.
UMS is using my own mediainfo installation on my server. The version is 24.11 which is up to date .
In the V14.11.0 log, this appears which would indicate it is using my servers mediainfo.
DEBUG 2025-06-23 13:00:23.685 [jupnp-sync-protocol 248-1] Discovering the root folder for LG-WebOSTV-2
DEBUG 2025-06-23 13:00:23.685 [jupnp-sync-protocol 248-1] Reading show_media_library_folder: false (default: true)
INFO 2025-06-23 13:00:23.713 [jupnp-sync-protocol 248-1] Loading MediaInfo library
INFO 2025-06-23 13:00:23.830 [jupnp-sync-protocol 248-1] Loaded MediaInfoLib - v24.11
DEBUG 2025-06-23 13:00:23.830 [jupnp-sync-protocol 248-1] Setting MediaInfo library characterset to UTF-8
Perhaps this could be the issue. From the V14.12 logs:
Native library (linux-x86/libzen.so) not found in resource path (update.jar:ums.jar)
The library (libzen.so) is located at /usr/lib/libzen.so
and
Native library (linux-x86/libmediainfo.so) not found in resource path (update.jar:ums.jar)
The library (libmediainfo.so) is located at /usr/lib/libmediainfo.so.
PS: Nothing to do with the java version as I use my servers java which was the same for V14.11 and V14.12.
And... I did also test V14.12 using the UMS version of java and the problem still existed.
Cheers
UMS is using my own mediainfo installation on my server. The version is 24.11 which is up to date .
In the V14.11.0 log, this appears which would indicate it is using my servers mediainfo.
DEBUG 2025-06-23 13:00:23.685 [jupnp-sync-protocol 248-1] Discovering the root folder for LG-WebOSTV-2
DEBUG 2025-06-23 13:00:23.685 [jupnp-sync-protocol 248-1] Reading show_media_library_folder: false (default: true)
INFO 2025-06-23 13:00:23.713 [jupnp-sync-protocol 248-1] Loading MediaInfo library
INFO 2025-06-23 13:00:23.830 [jupnp-sync-protocol 248-1] Loaded MediaInfoLib - v24.11
DEBUG 2025-06-23 13:00:23.830 [jupnp-sync-protocol 248-1] Setting MediaInfo library characterset to UTF-8
Perhaps this could be the issue. From the V14.12 logs:
Native library (linux-x86/libzen.so) not found in resource path (update.jar:ums.jar)
The library (libzen.so) is located at /usr/lib/libzen.so
and
Native library (linux-x86/libmediainfo.so) not found in resource path (update.jar:ums.jar)
The library (libmediainfo.so) is located at /usr/lib/libmediainfo.so.
PS: Nothing to do with the java version as I use my servers java which was the same for V14.11 and V14.12.
And... I did also test V14.12 using the UMS version of java and the problem still existed.
Cheers
- Attachments
-
- debug.log (V14.11.0).zip
- (101.2 KiB) Downloaded 19 times
Re: OutOfMemory Error
The issue seems to be rectified now.
Today, there were a few upgrades available for Gentoo Linux.
They were new upgrades as they were not available yesterday.
After installing the upgrades, I am no longer getting the OutOfMemory error.
I will see how it goes over the next few days and report back.
Thanks
Today, there were a few upgrades available for Gentoo Linux.
They were new upgrades as they were not available yesterday.
After installing the upgrades, I am no longer getting the OutOfMemory error.
I will see how it goes over the next few days and report back.
Thanks
Re: OutOfMemory Error
@mik_s
I spoke too soon.
The OutOfMemory error (V14.12.0 & V14.12.1) is still happening.
Cheers
I spoke too soon.
The OutOfMemory error (V14.12.0 & V14.12.1) is still happening.
Cheers
Re: OutOfMemory Error
I think this is one for @Subjunk as I can't see anything obvious.
It does confirm the libzen problem does not exist in 14.11.0 so I am suspecting that, and this error appears just before the out of memory error, but don't know how it could be causing the memory error when your TV is turned on.
does /usr/lib/libzen.so and /usr/lib/libmediainfo.so exist on your computer? or are there is another location?
I tried looking though the source files for these but could not find them.
These recent versions do filter out a lot of the logspam about how UMS is communicating with a device but maybe this has the information needed that points to the problem.
Try changing the Media server log level to Full and see it that reveals anything in 14.12
It does confirm the libzen problem does not exist in 14.11.0 so I am suspecting that, and this error appears just before the out of memory error, but don't know how it could be causing the memory error when your TV is turned on.
does /usr/lib/libzen.so and /usr/lib/libmediainfo.so exist on your computer? or are there is another location?
I tried looking though the source files for these but could not find them.
These recent versions do filter out a lot of the logspam about how UMS is communicating with a device but maybe this has the information needed that points to the problem.
Try changing the Media server log level to Full and see it that reveals anything in 14.12
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Re: OutOfMemory Error
libzen.so and libmediainfo.so are both located on my server.
The path for both is: /usr/lib/ I will try 14.12.1 again with the log level set to FULL - Did you mean FULL or ALL?
This is from UMS.conf and there is no mention of a FULL option.
# Log Level
# ---------------------
# The root logging level, a root filter applied to all logging, which can be:
# ALL, TRACE, DEBUG, INFO, WARN, ERROR or OFF
# This property can also be set from the 'Logs' tab in the gui.
# Default: "DEBUG"
log_level = FULL
Changing that in the GUI (like your example) does not make any change to the UMS.conf file even though a message says that the changes were saved.
The GUI has always been a bit hit and miss for me on Linux.
I usually modify UMS.conf by directly editing the file anyway so no problem.
In UMS.conf there is information: "This property can also be set from the 'Logs' tab in the gui."
But..... there is no "Logs" tab in the GUI.
Thanks
The path for both is: /usr/lib/ I will try 14.12.1 again with the log level set to FULL - Did you mean FULL or ALL?
This is from UMS.conf and there is no mention of a FULL option.
# Log Level
# ---------------------
# The root logging level, a root filter applied to all logging, which can be:
# ALL, TRACE, DEBUG, INFO, WARN, ERROR or OFF
# This property can also be set from the 'Logs' tab in the gui.
# Default: "DEBUG"
log_level = FULL
Changing that in the GUI (like your example) does not make any change to the UMS.conf file even though a message says that the changes were saved.
The GUI has always been a bit hit and miss for me on Linux.
I usually modify UMS.conf by directly editing the file anyway so no problem.
In UMS.conf there is information: "This property can also be set from the 'Logs' tab in the gui."
But..... there is no "Logs" tab in the GUI.
Thanks
Re: OutOfMemory Error
I tested full but this is different from the normal log_level.
I don't know what setting it changes in UMS.conf, I'm not sure it is even in here and may be some log configuration file.
This is the first time I tried it but it did show more in the logs.
I think the path to those libraries may be messed up in 14.12 if they do exist but cannot be found.
Maybe the wrong version for your CPU or OS architecture was added to that Linux build.
You could try and back them up from 14.11 then restore them after installing 14.12 to see if it makes a difference.
I don't know what setting it changes in UMS.conf, I'm not sure it is even in here and may be some log configuration file.
This is the first time I tried it but it did show more in the logs.
This is probably still referring to the old Java GUI, I don't think there is a way to set this in the web UI except to put into trace mode for making logs.# This property can also be set from the 'Logs' tab in the gui.
I think the path to those libraries may be messed up in 14.12 if they do exist but cannot be found.
Maybe the wrong version for your CPU or OS architecture was added to that Linux build.
You could try and back them up from 14.11 then restore them after installing 14.12 to see if it makes a difference.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Re: OutOfMemory Error
"I think the path to those libraries may be messed up in 14.12 if they do exist but cannot be found. "
My feeling is that this could be the issue.
This line from the logs (V14.12.1):
Suppressed: java.io.IOException: Native library (linux-x86/libzen.so) not found in resource path (update.jar:ums.jar)
Indicates that UMS is looking for "libzen.so" in some folder named "linux-x86" but there is no "linux-x86" folder.
The path for libzen.so is "/usr/lib/libzen.so".
"Maybe the wrong version for your CPU or OS architecture was added to that Linux build.
You could try and back them up from 14.11 then restore them after installing 14.12 to see if it makes a difference."
I'm not sure what you are suggesting that I back up.
Can you give me more information?
Thanks
My feeling is that this could be the issue.
This line from the logs (V14.12.1):
Suppressed: java.io.IOException: Native library (linux-x86/libzen.so) not found in resource path (update.jar:ums.jar)
Indicates that UMS is looking for "libzen.so" in some folder named "linux-x86" but there is no "linux-x86" folder.
The path for libzen.so is "/usr/lib/libzen.so".
"Maybe the wrong version for your CPU or OS architecture was added to that Linux build.
You could try and back them up from 14.11 then restore them after installing 14.12 to see if it makes a difference."
I'm not sure what you are suggesting that I back up.
Can you give me more information?
Thanks
Re: OutOfMemory Error
Just throwing out Ideas as I don't know how media info is installed on Linux.
I thought if UMS was installing it then overwriting these in 14.12 with those from 14.11 would prove this is a problem with the version it is installing.
Since it mentioned UMS.jar I remembered that this is basically a zip file so I downloaded UMS-Linux-14.11.0-arm64.tgz, extracted it and renamed UMS.jar to UMS.zip so I can browse it.
I did not see a folder called "linux-x86" but did see similar folders for
I wonder if you opened UMS.jar for 14.12, made that folder and copied those 2 library files from your mediainfo install if this will fix it.
If it does then it proves some mis-configuration of the Linux build.
I thought if UMS was installing it then overwriting these in 14.12 with those from 14.11 would prove this is a problem with the version it is installing.
Since it mentioned UMS.jar I remembered that this is basically a zip file so I downloaded UMS-Linux-14.11.0-arm64.tgz, extracted it and renamed UMS.jar to UMS.zip so I can browse it.
I did not see a folder called "linux-x86" but did see similar folders for
- Linux-amd64
- Linux-i386
- Mac-x86_64
- Windows-amd64
- Windows-x86
I wonder if you opened UMS.jar for 14.12, made that folder and copied those 2 library files from your mediainfo install if this will fix it.
If it does then it proves some mis-configuration of the Linux build.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.