You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Bryan Dixon <br...@bldixon.net> on 2018/06/29 12:01:07 UTC

Qpid JMS 0.33.0 OutOfMemoryError

We have a Java Spring app that was using Qpid JMS 0.31.0 without any issues. 
I upgraded it to use Qpid JMS 0.33.0 and the app would occasionally receive
an OutOfMemoryError.  The stacktrace is:

2018-06-28 05:13:05.434 -- WARN -- [AmqpProvider
:(26492):[amqp://spgmqtest1:5692]] io.netty.channel.AbstractChannel:
Force-closing a channel whose registration task was not accepted by an event
loop: [id: 0x4ecf4236]
java.lang.OutOfMemoryError: Failed to create a thread: retVal -1073741830,
errno 22
	at java.lang.Thread.startImpl(Native Method) ~[?:1.8.0-internal]
	at java.lang.Thread.start(Thread.java:948) ~[?:1.8.0-internal]
	at
io.netty.util.concurrent.ThreadPerTaskExecutor.execute(ThreadPerTaskExecutor.java:33)
~[netty-common-4.1.25.Final.jar:4.1.25.Final]
	at
io.netty.util.concurrent.SingleThreadEventExecutor.doStartThread(SingleThreadEventExecutor.java:873)
~[netty-common-4.1.25.Final.jar:4.1.25.Final]
	at
io.netty.util.concurrent.SingleThreadEventExecutor.startThread(SingleThreadEventExecutor.java:862)
~[netty-common-4.1.25.Final.jar:4.1.25.Final]
	at
io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:767)
~[netty-common-4.1.25.Final.jar:4.1.25.Final]
	at
io.netty.channel.AbstractChannel$AbstractUnsafe.register(AbstractChannel.java:479)
[netty-transport-4.1.25.Final.jar:4.1.25.Final]
	at
io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:80)
[netty-transport-4.1.25.Final.jar:4.1.25.Final]
	at
io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:74)
[netty-transport-4.1.25.Final.jar:4.1.25.Final]
	at
io.netty.channel.MultithreadEventLoopGroup.register(MultithreadEventLoopGroup.java:86)
[netty-transport-4.1.25.Final.jar:4.1.25.Final]
	at
io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:333)
[netty-transport-4.1.25.Final.jar:4.1.25.Final]
	at io.netty.bootstrap.Bootstrap.doResolveAndConnect(Bootstrap.java:163)
[netty-transport-4.1.25.Final.jar:4.1.25.Final]
	at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:145)
[netty-transport-4.1.25.Final.jar:4.1.25.Final]
	at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:126)
[netty-transport-4.1.25.Final.jar:4.1.25.Final]
	at
org.apache.qpid.jms.transports.netty.NettyTcpTransport.connect(NettyTcpTransport.java:181)
[qpid-jms-client-0.33.0.jar:?]
	at
org.apache.qpid.jms.provider.amqp.AmqpProvider$1.run(AmqpProvider.java:223)
[qpid-jms-client-0.33.0.jar:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:522)
[?:1.8.0-internal]
	at java.util.concurrent.FutureTask.run(FutureTask.java:277)
[?:1.8.0-internal]
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:191)
[?:1.8.0-internal]
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
[?:1.8.0-internal]
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
[?:1.8.0-internal]
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[?:1.8.0-internal]
	at java.lang.Thread.run(Thread.java:785) [?:1.8.0-internal]
2018-06-28 05:13:05.496 -- WARN -- [nioEventLoopGroup-26493-2]
io.netty.channel.AbstractChannel: Failed to mark a promise as failure
because it's done already: DefaultChannelPromise@dfcd5fdd(failure:
java.lang.OutOfMemoryError: Failed to create a thread: retVal -1073741830,
errno 22)
java.nio.channels.ClosedChannelException: null
	at io.netty.channel.AbstractChannel$AbstractUnsafe.ensureOpen(...)(Unknown
Source) ~[netty-transport-4.1.25.Final.jar:4.1.25.Final]


The spring jms config is:
	<bean id="qpidConnectionFactory"
class="org.apache.qpid.jms.JmsConnectionFactory"  
	 		 p:remoteURI="${message.broker.url}"
    		 p:username="${message.broker.username}" 
    		 p:password="${message.broker.password}"/>
			 
	<jms:listener-container connection-factory="qpidConnectionFactory"
concurrency="1" message-converter="workdayEventMessageConverter"
							prefetch="1" transaction-manager="transactionManager"
acknowledge="transacted">
	    <jms:listener id="wdeventQueueListener"
destination="app_events_workday_employees_simon411" 
	    			  selector="simon_msg_version=1" ref="workdayEventService"
method="processWorkdayEvent"/>
	</jms:listener-container>	

Our broker URL is:
message.broker.url=failover:(amqp://spgmqtest1:5692,amqp://spgmqtest2:5692,amqp://spgmqtest3:5672)?failover.nested.amqp.vhost=testbroker&jms.prefetchPolicy.all=0&jms.clientIDPrefix=simon411-&jms.connectionIDPrefix=simon411-




--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Qpid JMS 0.33.0 OutOfMemoryError

Posted by Robbie Gemmell <ro...@gmail.com>.
The below indicates that creating a new connection failed, due to
Netty being unable to start the thread use to process the TCP
connection. There isnt really enough detail here to allow saying say
much more than that. If you have an app showing issues, I'd suggest
investigating the state of it more closely when it occurs to see if
there is any hint whats going on.

On 29 June 2018 at 13:01, Bryan Dixon <br...@bldixon.net> wrote:
> We have a Java Spring app that was using Qpid JMS 0.31.0 without any issues.
> I upgraded it to use Qpid JMS 0.33.0 and the app would occasionally receive
> an OutOfMemoryError.  The stacktrace is:
>
> 2018-06-28 05:13:05.434 -- WARN -- [AmqpProvider
> :(26492):[amqp://spgmqtest1:5692]] io.netty.channel.AbstractChannel:
> Force-closing a channel whose registration task was not accepted by an event
> loop: [id: 0x4ecf4236]
> java.lang.OutOfMemoryError: Failed to create a thread: retVal -1073741830,
> errno 22
>         at java.lang.Thread.startImpl(Native Method) ~[?:1.8.0-internal]
>         at java.lang.Thread.start(Thread.java:948) ~[?:1.8.0-internal]
>         at
> io.netty.util.concurrent.ThreadPerTaskExecutor.execute(ThreadPerTaskExecutor.java:33)
> ~[netty-common-4.1.25.Final.jar:4.1.25.Final]
>         at
> io.netty.util.concurrent.SingleThreadEventExecutor.doStartThread(SingleThreadEventExecutor.java:873)
> ~[netty-common-4.1.25.Final.jar:4.1.25.Final]
>         at
> io.netty.util.concurrent.SingleThreadEventExecutor.startThread(SingleThreadEventExecutor.java:862)
> ~[netty-common-4.1.25.Final.jar:4.1.25.Final]
>         at
> io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:767)
> ~[netty-common-4.1.25.Final.jar:4.1.25.Final]
>         at
> io.netty.channel.AbstractChannel$AbstractUnsafe.register(AbstractChannel.java:479)
> [netty-transport-4.1.25.Final.jar:4.1.25.Final]
>         at
> io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:80)
> [netty-transport-4.1.25.Final.jar:4.1.25.Final]
>         at
> io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:74)
> [netty-transport-4.1.25.Final.jar:4.1.25.Final]
>         at
> io.netty.channel.MultithreadEventLoopGroup.register(MultithreadEventLoopGroup.java:86)
> [netty-transport-4.1.25.Final.jar:4.1.25.Final]
>         at
> io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:333)
> [netty-transport-4.1.25.Final.jar:4.1.25.Final]
>         at io.netty.bootstrap.Bootstrap.doResolveAndConnect(Bootstrap.java:163)
> [netty-transport-4.1.25.Final.jar:4.1.25.Final]
>         at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:145)
> [netty-transport-4.1.25.Final.jar:4.1.25.Final]
>         at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:126)
> [netty-transport-4.1.25.Final.jar:4.1.25.Final]
>         at
> org.apache.qpid.jms.transports.netty.NettyTcpTransport.connect(NettyTcpTransport.java:181)
> [qpid-jms-client-0.33.0.jar:?]
>         at
> org.apache.qpid.jms.provider.amqp.AmqpProvider$1.run(AmqpProvider.java:223)
> [qpid-jms-client-0.33.0.jar:?]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:522)
> [?:1.8.0-internal]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:277)
> [?:1.8.0-internal]
>         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:191)
> [?:1.8.0-internal]
>         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
> [?:1.8.0-internal]
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
> [?:1.8.0-internal]
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> [?:1.8.0-internal]
>         at java.lang.Thread.run(Thread.java:785) [?:1.8.0-internal]
> 2018-06-28 05:13:05.496 -- WARN -- [nioEventLoopGroup-26493-2]
> io.netty.channel.AbstractChannel: Failed to mark a promise as failure
> because it's done already: DefaultChannelPromise@dfcd5fdd(failure:
> java.lang.OutOfMemoryError: Failed to create a thread: retVal -1073741830,
> errno 22)
> java.nio.channels.ClosedChannelException: null
>         at io.netty.channel.AbstractChannel$AbstractUnsafe.ensureOpen(...)(Unknown
> Source) ~[netty-transport-4.1.25.Final.jar:4.1.25.Final]
>
>
> The spring jms config is:
>         <bean id="qpidConnectionFactory"
> class="org.apache.qpid.jms.JmsConnectionFactory"
>                          p:remoteURI="${message.broker.url}"
>                  p:username="${message.broker.username}"
>                  p:password="${message.broker.password}"/>
>
>         <jms:listener-container connection-factory="qpidConnectionFactory"
> concurrency="1" message-converter="workdayEventMessageConverter"
>                                                         prefetch="1" transaction-manager="transactionManager"
> acknowledge="transacted">
>             <jms:listener id="wdeventQueueListener"
> destination="app_events_workday_employees_simon411"
>                                   selector="simon_msg_version=1" ref="workdayEventService"
> method="processWorkdayEvent"/>
>         </jms:listener-container>
>
> Our broker URL is:
> message.broker.url=failover:(amqp://spgmqtest1:5692,amqp://spgmqtest2:5692,amqp://spgmqtest3:5672)?failover.nested.amqp.vhost=testbroker&jms.prefetchPolicy.all=0&jms.clientIDPrefix=simon411-&jms.connectionIDPrefix=simon411-
>
>
>
>
> --
> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org