[Solved] Fatal GC [Allocation Failure] on Madsonic 5&6

Mission accomplished!
eerieone
Posts: 3
Joined: 20 Aug 2015, 22:20
Has thanked: 0
Been thanked: 1 time

[Solved] Fatal GC [Allocation Failure] on Madsonic 5&6

Unread post by eerieone »

Hello,

I´m fairly new to the forums, and here to bug you with a problem of mine.

I have a fairly huge collection ( 3.5TB ) of music/movie/series/audiobooks/podcasts and had it running on a Raspberry_Pi_1_B+ with Subsonic 5.0.
Very recently i switched to the RPi_2 and decided to move my library to Madsonic as well, which feels like the more thought-through Service.

After successfully installing the early MadSonic 6 and setting it up, i successfully scanned my giant library.
Upon reboot Madsonic refuses to start.

Checking the madsonic_sh.log i see this:

Code: Select all

...
Sep 06, 2015 2:31:59 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@7be20b: d$
[Full GC 63564K->9796K(507008K), 0.3548250 secs]
Sep 06, 2015 2:32:01 PM org.springframework.jdbc.datasource.DriverManagerDataSource setDriverClassName
INFO: Loaded JDBC driver: org.hsqldb.jdbcDriver
[Full GC 61601K->18192K(507008K), 0.4867060 secs]
[GC 158224K->21004K(507008K), 0.0559560 secs]
[GC 161036K->19446K(507008K), 0.0336010 secs]
[GC 159478K->19446K(507008K), 0.0309010 secs]
[GC 159478K->19446K(507008K), 0.0310240 secs]
[GC 159478K->19446K(507008K), 0.0329500 secs]
[GC 159478K->19446K(507008K), 0.0399330 secs]
...
i already edited /usr/bin/madsonic & /etc/default/madsonic to use more memory, but to no avail.
This fatal error is reproducible on Madsonic 5&6.

I´ll be running tests with the current Subsonic, but I´d hate to return to SubS if the problem persists.
Now after seeing Madsonic with it´s rich features and slick feel it is hard to turn back.
Hopeing there´s a solution up on of your sleeves :)

Cheers, eerieone

Code: Select all

 =========================================================================================
 VERSION:      MADSONIC 5.1.5260 / MADSONIC 6.0.7140  
 SERVLET:      JETTY
 SERVER:       CPU: ICORE7 | ARCH: X64 | MEMORY: 4GB | HDD: 12TB
 OS:           Raspbian Wheezy
 SYSTEM:       RASPBERRY PI 2
 INSTALLER:    DEB
 JAVA:         ORACLE JDK 1.8u60 | ORACLE JRE 1.7 | OPEN JDK 1.7
 BROWSER:      CHROME | FIREFOX 
 CLIENT:       
 DESCRIPTION:  Fatal GC [Allocation Failure] on Madsonic 5&6
 REPRODUCIBLE: YES
=========================================================================================
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: Fatal GC [Allocation Failure] on Madsonic 5&6

Unread post by Madsonic »

Hi there,

it's not as bad as it sounds ;)
Alexey Ragozin wrote: "Allocation Failure" is a cause of GC cycle to kick.

"Allocation Failure" means what no more space left in Eden to allocate object. So, it is normal cause of young GC.
Older JVM were not printing GC cause for minor GC cycles.

"Allocation Failure" is almost only possible cause for minor GC. Another reason for minor GC to kick could be CMS remark phase
(if +XX:+ScavengeBeforeRemark is enabled).

knowledge base

http://stackoverflow.com/questions/2834 ... on-failure

https://docs.oracle.com/javase/7/docs/w ... leaks.html

https://docs.oracle.com/javase/8/docs/t ... ks002.html

in your chase stop the server, edit your configuration and restart service

/etc/default/madsonic

for your configuration i recommend you to try:

Code: Select all

MADSONIC_ARGS="--init-memory=1500 --max-memory=2500"

Code: Select all

#
# This is the configuration file for the Madsonic service
# (/etc/init.d/madsonic)
#
# To change the startup parameters of Madsonic, modify
# the MADSONIC_ARGS variable below.
#
# Type "/usr/share/madsonic/madsonic.sh --help" on the command line to read an
# explanation of the different options.
#
# For example, to specify that Madsonic should use port 80 (for http)
# and 443 (for https), and use a Java memory heap size of 350 MB, use
# the following:
#
# MADSONIC_ARGS="--port=80 --https-port=443 --max-memory=350"

MADSONIC_ARGS="--init-memory=256 --max-memory=512"

# The user which should run the Madsonic process. Default "root".
# Note that non-root users are by default not allowed to use ports
# below 1024. Also make sure to grant the user write permissions in
# the music directories, otherwise changing album art and tags will fail.

MADSONIC_USER=root
eerieone
Posts: 3
Joined: 20 Aug 2015, 22:20
Has thanked: 0
Been thanked: 1 time

Re: Fatal GC [Allocation Failure] on Madsonic 5&6

Unread post by eerieone »

Unfortunately that pushes the limit of the RPi2´s 1GB Memory too far. :(
I´ll run a test tomorrow with Subsonic to check if it´s even a Madsonic error or a problem on the RPi´s end.

madsonic_sh.log after the suggested edits:
java 1.7

Code: Select all

Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
java 1.8

Code: Select all

Error occurred during initialization of VM
Could not reserve enough space for 2560000KB object heap
eerieone
Posts: 3
Joined: 20 Aug 2015, 22:20
Has thanked: 0
Been thanked: 1 time

Re: Fatal GC [Allocation Failure] on Madsonic 5&6

Unread post by eerieone »

So i did a parallel install of the latest Subsonic and Madsonic, the result is one i anticipated.
Subsonic runs all fine and dandy with my collection, Madsonic spits out the same GC Allocation Failure over and over again without ever starting up.
Weird thing is that after scanning my whole library in Madsonic, it runs all smooth and fine until i restart the RPi.

The madsonic_sh.log http://pastebin.com/jjQVWj2b for y´all.

I´m retreating back to Subsonic for now and hope that the issue can be resolved soon. I dig Madsonic and would love to jump aboard.
I´ll keep a watchful eye on this thread and on new releases.
These users thanked the author eerieone for the post:
Madsonic
Rating: 7.69%
Post Reply