miniDLNA memory leak and not scanning any media

Installation, suggestions and any issues you may have with any of the plugins for OMV.

miniDLNA memory leak and not scanning any media

Postby macnb » Fri 1. Mar 2013, 00:41

I upgraded OMV from 0.3 to 0.4...all went fine.
Problem is after installing the latest plugin for miniDLNA, the server no longer serves any of my media.
All my media were available to the TV, XBMC, media centre, etc but not any more.
In the logs, there was an inotify error but I fixed that by increasing max_user_whatever.
The log now shows:
Code: Select all
[2013/02/28 22:39:31] minidlna.c:884: warn: Starting MiniDLNA version 1.0.25 [SQLite 3.7.3].
[2013/02/28 22:39:31] minidlna.c:907: warn: Creating new database...
[2013/02/28 22:39:31] scanner.c:731: warn: Scanning /media/a12d6ea5-174d-4943-afb2-a54b2c15f0de/drive0
[2013/02/28 22:39:31] minidlna.c:990: warn: HTTP listening on port 8200

My media drive contains .MKV and .TS files

When I run

dmesg | grep mini, I see:

Code: Select all
[  778.855398] Out of memory: kill process 1932 (minidlna) score 1395918 or a child
[  778.912714] Killed process 1932 (minidlna)
[ 1978.525059] Out of memory: kill process 3703 (minidlna) score 1396872 or a child
[ 1978.584678] Killed process 3703 (minidlna)
[26300.272044] Out of memory: kill process 1608 (minidlna) score 1394358 or a child
[26300.333067] Killed process 1608 (minidlna)
[31618.143793] Out of memory: kill process 14994 (minidlna) score 1392954 or a child
[31618.206159] Killed process 14994 (minidlna)

minidlna version is 1.0.25-2+0~1357321103.14~1.gbpdcecf1
minidlna plugin version is 0.4+0~1355675183.5~1.gbpa4376d

I have the following plugins installed:
Code: Select all
root@OMV:/var/cache/apt/archives# dpkg -l | grep openmediavault
ii  openmediavault                      0.4.24                               Open network attached storage solution
ii  openmediavault-ajaxplorer           0.1                                  OpenMediaVault Ajaxplorer (Web file browser) plugin
ii  openmediavault-keyring              0.2                                  GnuPG archive keys of the OpenMediaVault archive
ii  openmediavault-minidlna             0.4+0~1355675183.5~1.gbpa4376d       OpenMediaVault miniDLNA (DLNA server) plugin
ii  openmediavault-netatalk             0.4.5                                OpenMediaVault netatalk (AppleTalk Protocol Suite) plugin
ii  openmediavault-omvpluginsorg        0.4.1+0~1355675019.3~1.gbpe45741     OMV-Plugins.org Package Repositories for OpenMediaVault
root@OMV:/var/cache/apt/archives#

I have tried deleting /tmp/minidlna/files.db, but as soon as I start the minidlna service, that file is created (always the same size 73728 bytes) but no media

What's going wrong ?
macnb
 
Posts: 41
Joined: Wed 19. Sep 2012, 14:16

Re: miniDLNA memory leak and not scanning any media

Postby tekkbebe » Fri 1. Mar 2013, 00:56

apt-get remove openmediavault-minidlna
apt-get remove minidlna
apt-get clean
apt-get update
apt-get upgrade
apt-get -f install

Then go to plugins and install minidlna package. Then install openmediavault-minidlna plugin.
Guides/Tutorials: http://forums.openmediavault.org/viewtopic.php?f=13&t=1289
Manage firewall with webmin: http://forums.openmediavault.org/viewtopic.php?f=3&t=1072
How to install OMV Extras in OMV .5(Sardaukar): http://omv-extras.org/simple/index.php?id=how-to-install-omv-extras-plugin
User avatar
tekkbebe
 
Posts: 5485
Joined: Fri 6. Jul 2012, 23:11
Location: Michigan, USA

Re: miniDLNA memory leak and not scanning any media

Postby macnb » Fri 1. Mar 2013, 02:27

Thx for the suggestions.
But before I try that, you said "Then go to plugins and install minidlna package. Then install openmediavault-minidlna plugin" BUT currently in my web-gui Plugin list, I do not see "minidlna package"...only openmediavault-minidlna 0.4.....

In fact I have never seen TWO minidlna's ever listed in plugin list web-gui.

I thought that the openmediavault-minidlna plugin actually installed the minidlna package.
Seems strange that a user has to install two related packages separately and not as one homogeneous plugin ?
macnb
 
Posts: 41
Joined: Wed 19. Sep 2012, 14:16

Re: miniDLNA memory leak and not scanning any media

Postby tekkbebe » Fri 1. Mar 2013, 02:33

ther other package is causing a conflict.. after apt-get clean you should be able to see it .if not go to point where to install minidlna and report back and i give a wget line for it then you can install the plugin. the minidlna package was not put in the plugin. we testing various version til we found one that worked really well. that is why it's like this.
Guides/Tutorials: http://forums.openmediavault.org/viewtopic.php?f=13&t=1289
Manage firewall with webmin: http://forums.openmediavault.org/viewtopic.php?f=3&t=1072
How to install OMV Extras in OMV .5(Sardaukar): http://omv-extras.org/simple/index.php?id=how-to-install-omv-extras-plugin
User avatar
tekkbebe
 
Posts: 5485
Joined: Fri 6. Jul 2012, 23:11
Location: Michigan, USA

Re: miniDLNA memory leak and not scanning any media

Postby macnb » Fri 1. Mar 2013, 03:01

I just went through those steps:

Code: Select all
root@OMV:~# apt-get remove openmediavault-minidlna
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  openmediavault-minidlna
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 201 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 25982 files and directories currently installed.)
Removing openmediavault-minidlna ...
Processing triggers for openmediavault ...
Updating locale files ...
root@OMV:~# apt-get remove minidlna
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  minidlna
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 401 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 25968 files and directories currently installed.)
Removing minidlna ...
root@OMV:~# apt-get clean
root@OMV:~# apt-get update
Ign file:  Release.gpg
Ign file:/var/cache/openmediavault/archives/  Translation-en
Ign file:/var/cache/openmediavault/archives/  Translation-en_GB
Ign file:  Release
Hit http://ftp.uk.debian.org squeeze Release.gpg
Ign http://ftp.uk.debian.org/debian/ squeeze/main Translation-en
Ign http://ftp.uk.debian.org/debian/ squeeze/main Translation-en_GB
Hit http://ftp.uk.debian.org squeeze-updates Release.gpg
Ign http://ftp.uk.debian.org/debian/ squeeze-updates/main Translation-en
Ign http://ftp.uk.debian.org/debian/ squeeze-updates/main Translation-en_GB
Ign http://ftp.uk.debian.org/debian/ squeeze-updates/non-free Translation-en
Ign http://ftp.uk.debian.org/debian/ squeeze-updates/non-free Translation-en_GB
Hit http://ftp.uk.debian.org squeeze Release
Hit http://ftp.uk.debian.org squeeze-updates Release
Hit http://dl.ajaxplorer.info squeeze Release.gpg
Ign http://dl.ajaxplorer.info/repos/apt/ squeeze/main Translation-en
Ign http://dl.ajaxplorer.info/repos/apt/ squeeze/main Translation-en_GB
Hit http://packages.openmediavault.org fedaykin Release.gpg
Ign http://packages.openmediavault.org/public/ fedaykin/main Translation-en
Ign http://packages.openmediavault.org/public/ fedaykin/main Translation-en_GB
Hit http://packages.openmediavault.org fedaykin Release
Hit http://dl.ajaxplorer.info squeeze Release
Hit http://ftp.uk.debian.org squeeze/main Sources
Hit http://ftp.uk.debian.org squeeze/main amd64 Packages
Hit http://ftp.uk.debian.org squeeze-updates/main Sources/DiffIndex
Hit http://ftp.uk.debian.org squeeze-updates/non-free Sources
Hit http://ftp.uk.debian.org squeeze-updates/main amd64 Packages/DiffIndex
Hit http://ftp.uk.debian.org squeeze-updates/non-free amd64 Packages
Hit http://packages.openmediavault.org fedaykin/main amd64 Packages
Hit http://ftp.uk.debian.org squeeze-updates/main amd64 Packages
Hit http://dl.ajaxplorer.info squeeze/main Sources
Hit http://dl.ajaxplorer.info squeeze/main amd64 Packages
Hit http://packages.omv-plugins.org fedaykin Release.gpg
Ign http://packages.omv-plugins.org/ fedaykin/main Translation-en
Ign http://packages.omv-plugins.org/ fedaykin/main Translation-en_GB
Hit http://security.debian.org squeeze/updates Release.gpg
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Ign http://security.debian.org/ squeeze/updates/main Translation-en_GB
Hit http://packages.omv-plugins.org fedaykin Release
Ign http://security.debian.org/ squeeze/updates/non-free Translation-en
Ign http://security.debian.org/ squeeze/updates/non-free Translation-en_GB
Hit http://security.debian.org squeeze/updates Release
Hit http://packages.omv-plugins.org fedaykin/main amd64 Packages
Hit http://security.debian.org squeeze/updates/main Sources
Hit http://security.debian.org squeeze/updates/non-free Sources
Hit http://security.debian.org squeeze/updates/main amd64 Packages
Hit http://security.debian.org squeeze/updates/non-free amd64 Packages
Reading package lists... Done
root@OMV:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@OMV:~# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@OMV:~#


I then refreshed teh web-gui page.
In the plugin section, I still only see openmediavault-minidlna... so I installed it. I noticed the output to the screen mentioned that it fetched the minidlna package 1.0.25-2 and the plugin installed it...as I expected it should.
But the server still does not detect the media files.
And the memory usage shot up...using up all of the 8GB until I stopped the minidlna service.
macnb
 
Posts: 41
Joined: Wed 19. Sep 2012, 14:16

Re: miniDLNA memory leak and not scanning any media

Postby tekkbebe » Fri 1. Mar 2013, 03:11

when you reinstall the minidlna it blanks your config so you need to set it up again. does not take long.


i think he went to high on the inotify.. i'm looking..


lower the value to 64000
Guides/Tutorials: http://forums.openmediavault.org/viewtopic.php?f=13&t=1289
Manage firewall with webmin: http://forums.openmediavault.org/viewtopic.php?f=3&t=1072
How to install OMV Extras in OMV .5(Sardaukar): http://omv-extras.org/simple/index.php?id=how-to-install-omv-extras-plugin
User avatar
tekkbebe
 
Posts: 5485
Joined: Fri 6. Jul 2012, 23:11
Location: Michigan, USA

Re: miniDLNA memory leak and not scanning any media

Postby macnb » Fri 1. Mar 2013, 13:52

Appreciate your help tekkbebe.
I set the inotify value to 64000 (using sysctl fs.inotify.max_user_watches=64000.
Stopped the minidlna service, rm'ed the files.db, restarted the minidlna service.

No joy.

There were no inotify warnings but again the memory usage shotup and the load was so high for around 4 minutes that I could not type anything on the terminal window. dmesg reports that minidlna process was killed due to out of memory:

Code: Select all
[44374.808706] Out of memory: kill process 14493 (minidlna) score 1394982 or a child
[44374.871934] Killed process 14493 (minidlna)

See the memory usage chart:
Image

As the minidlna service is being killed off, I guess that's the reason no media files are being served.
All used to work before the upgrade.
Something is clearly broken.

What else (apart from re-install of OMV) can we try ?
macnb
 
Posts: 41
Joined: Wed 19. Sep 2012, 14:16

Re: miniDLNA memory leak and not scanning any media

Postby tekkbebe » Fri 1. Mar 2013, 14:17

Do this first: service minidlna stop

did you redo your /etc/minidlna.conf file???? show your minidlna.conf.

agree with ryeco and that is why i want to see your config file. i don't think he has files properly configured to scan..
Guides/Tutorials: http://forums.openmediavault.org/viewtopic.php?f=13&t=1289
Manage firewall with webmin: http://forums.openmediavault.org/viewtopic.php?f=3&t=1072
How to install OMV Extras in OMV .5(Sardaukar): http://omv-extras.org/simple/index.php?id=how-to-install-omv-extras-plugin
User avatar
tekkbebe
 
Posts: 5485
Joined: Fri 6. Jul 2012, 23:11
Location: Michigan, USA

Re: miniDLNA memory leak and not scanning any media

Postby ryecoaaron » Fri 1. Mar 2013, 14:59

When minidlna is scanning for files, it uses all available memory. When it is done scanning, it releases it. I don't think this is a memory leak. Maybe not efficient.

If you some very large files that minidlna doesn't like (bluray rips come to mind), it will get "stuck" and not serve files (if it hits a large incompatible file first) or release this memory.

I also have never changed my max_user_watches and never had a problem other than the error message.
omv 1.0.9 kralizec | 64 bit | 3.14 backport kernel | omvextrasorg 1.0.2
omv-extras.org plugins source code and issue tracker - https://github.com/OpenMediaVault-Plugin-Developers
User avatar
ryecoaaron
 
Posts: 6423
Joined: Mon 20. Aug 2012, 16:03
Location: Wisconsin, USA

Re: miniDLNA memory leak and not scanning any media

Postby macnb » Fri 1. Mar 2013, 15:21

tekkbebe wrote:Do this first: service minidlna stop

did you redo your /etc/minidlna.conf file???? show your minidlna.conf.

agree with ryeco and that is why i want to see your config file. i don't think he has files properly configured to scan..

No I did not redo the /etc/minidlna.conf as it looked fine.
Here it is:
Code: Select all
root@OMV:~# more /etc/minidlna.conf
# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200

# network interfaces to serve, comma delimited
#network_interface=eth0

# set this if you want to customize the name that shows up on your clients
friendly_name=MiniDLNA

# set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
#db_dir=/var/cache/minidlna

# set this if you would like to specify the directory where you want MiniDLNA to store its log file
#log_dir=/var/log

# this should be a list of file names to check for when searching for album art
# note: names should be delimited with a forward slash ("/")
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Fol
der.jpg/folder.jpg/Thumb.jpg/thumb.jpg

# set this to no to disable inotify monitoring to automatically discover new files
# note: the default is yes
inotify=yes

# set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
enable_tivo=no

# set this to strictly adhere to DLNA standards.
# * This will allow server-side downscaling of very large JPEG images,
#   which may hurt JPEG serving performance on (at least) Sony DLNA products.
strict_dlna=no

# default presentation url is http address on port 80
#presentation_url=http://www.mylan/index.php

# notify interval in seconds. default is 895 seconds.
notify_interval=60

# serial and model number the daemon will report to clients
# in its XML description
serial=31446133
model_number=1

# use different container as root of the tree
# possible values:
#   + "." - use standard container (this is the default)
#   + "B" - "Browse Directory"
#   + "M" - "Music"
#   + "V" - "Video"
#   + "P" - "Pictures"
# if you specify "B" and client device is audio-only then "Music/Folders" will be used as root
#root_container=.

# set this to the directory you want scanned.
# * if have multiple directories, you can have multiple media_dir= lines
# * if you want to restrict a media_dir to a specific content type, you
#   can prepend the type, followed by a comma, to the directory:
#   + "A" for audio  (eg. media_dir=A,/home/jmaggard/Music)
#   + "V" for video  (eg. media_dir=V,/home/jmaggard/Videos)
#   + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)
media_dir=/media/a12d6ea5-174d-4943-afb2-a54b2c15f0de/drive0/


It is as configured by the plugin.

@ryeco,
Yes that media drive does have full bluray .MKV's and some .TS files (one folder per movie).
I never had an issue regarding inotify before the upgrade to 0.4.
The same drive never had any issues with minidlna before I upgraded to 0.4
macnb
 
Posts: 41
Joined: Wed 19. Sep 2012, 14:16

Next

Return to Plugins

Who is online

Users browsing this forum: Bing [Bot] and 7 guests