Java exception when adding folders with "Never" as interval

Post your Server Bug Report
User avatar
Tak-MK
Posts: 30
Joined: 14 Sep 2017, 17:34
Has thanked: 7 times
Been thanked: 15 times

Java exception when adding folders with "Never" as interval

Unread post by Tak-MK »

First of all:

Code: Select all

=========================================================================================
 VERSION:      Madsonic 6.3.9560.3e2ad42.20170712.0529
 SERVLET:      Integrated with madsonic, I suppose it's Jetty.
 SERVER:       CPU: i5-3470T | ARCH: X64 | MEMORY: 2GB | HDD: 6TB
 OS:           Debian 9
 SYSTEM:       Server
 INSTALLER:    Deb
 JAVA:         OpenJDK 8
 BROWSER:      Any
 CLIENT:       Madsonic 6.3
 DESCRIPTION:  Java exception when adding folders with "Never" as interval.
 REPRODUCIBLE: Yup
=========================================================================================
Hi!
As the title says, when you add a media folder and set "Never" as interval, it adds well, but appears an exception. This will not be an issue except from the fact that if you reboot madsonic with a media folder with that "Never", it'll consume 100% of the CPU and never will start. :(

Code: Select all

Java Exception:
 	java.lang.IllegalArgumentException: Non-positive period.
	at java.util.Timer.schedule(Timer.java:286)
	at org.madsonic.service.MediaScannerService.schedule(MediaScannerService.java:109)
	at org.madsonic.controller.MusicFolderSettingsController.onSubmit(MusicFolderSettingsController.java:128)
	at org.springframework.web.servlet.mvc.SimpleFormController.onSubmit(SimpleFormController.java:415)
	at org.springframework.web.servlet.mvc.SimpleFormController.onSubmit(SimpleFormController.java:387)
	at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:272)
	at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:268)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:933)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:951)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:853)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:827)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1507)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1495)
	at org.madsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:44)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1495)
	at org.madsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:63)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1495)
	at org.madsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:60)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1487)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:427)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
	at org.eclipse.jetty.server.Server.handle(Server.java:370)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:984)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1045)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:236)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
	at java.lang.Thread.run(Thread.java:748)
Thanks a lot!
Last edited by Tak-MK on 15 Oct 2017, 19:17, edited 1 time in total.
These users thanked the author Tak-MK for the post (total 2):
Madsonicsparc
Rating: 15.38%
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: Java exception when adding folders with "Never" as inter

Unread post by Madsonic »

confirmed, will be fixed with next release. :thumbsup:
These users thanked the author Madsonic for the post (total 2):
Tak-MKsparc
Rating: 15.38%
User avatar
Tak-MK
Posts: 30
Joined: 14 Sep 2017, 17:34
Has thanked: 7 times
Been thanked: 15 times

Re: Java exception when adding folders with "Never" as inter

Unread post by Tak-MK »

Madevil wrote:confirmed, will be fixed with next release. :thumbsup:
Perfect, thanks! :D
sparc
Posts: 14
Joined: 25 Oct 2017, 02:39
Has thanked: 7 times
Been thanked: 4 times

Re: Java exception when adding folders with "Never" as inter

Unread post by sparc »

This showed up for me in Windows Server 2012 R2 in the form of a hung service at ~50% CPU when the service was started using a domain user account (admin, I have music stored on NAS & full r/w privileges to it). When I would start the service with the LOCAL SYSTEM account, it starts just fine...but I can't access the music folders.. which is probably why it is able to start.

Coincidentally, I did have all my media folders set to Never as the interval. So, I started it using the LOCAL SYSTEM account. Changed all of them to 6 months, saved. Stopped Madsonic, Started Madsonic using the domain user account & voila. It is fixed.

Definitely some kind of an issue with Never as the interval. The madsonic logs in Windows were not very helpful. The last item as it hung at 50% CPU was Initializing Spring root WebApplicationContext.

Thanks OP.
These users thanked the author sparc for the post:
Tak-MK
Rating: 7.69%
User avatar
Tak-MK
Posts: 30
Joined: 14 Sep 2017, 17:34
Has thanked: 7 times
Been thanked: 15 times

Re: Java exception when adding folders with "Never" as inter

Unread post by Tak-MK »

sparc wrote:This showed up for me in Windows Server 2012 R2 in the form of a hung service at ~50% CPU when the service was started using a domain user account (admin, I have music stored on NAS & full r/w privileges to it). When I would start the service with the LOCAL SYSTEM account, it starts just fine...but I can't access the music folders.. which is probably why it is able to start.

Coincidentally, I did have all my media folders set to Never as the interval. So, I started it using the LOCAL SYSTEM account. Changed all of them to 6 months, saved. Stopped Madsonic, Started Madsonic using the domain user account & voila. It is fixed.

Definitely some kind of an issue with Never as the interval. The madsonic logs in Windows were not very helpful. The last item as it hung at 50% CPU was Initializing Spring root WebApplicationContext.

Thanks OP.
Exactly. That's what I had to do to raise up properly the madsonic daemon. Glad my post helped other to bypass the bug! :D
Post Reply