NullPointerException happens on XNIO ByteBufferSlicePool.clean() for non-direct buffers during the shutdown since EAP 7.2.4

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.2.4 or later

Issue

When direct-buffers="false" is specified to <buffer-pool> in the io subsystem, the following NullPointerException happens during the shutdown since EAP 7.2.4.

10:02:08,180 WARN  [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000004: Failure during stop of service org.wildfly.io.buffer-pool.default: java.lang.NullPointerException
	at java.util.concurrent.ConcurrentLinkedQueue.addAll(ConcurrentLinkedQueue.java:530)
	at org.xnio.ByteBufferSlicePool.clean(ByteBufferSlicePool.java:214)
	at org.wildfly.extension.io.BufferPoolService.stop(BufferPoolService.java:62)
	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1795)
	at org.jboss.msc.service.ServiceControllerImpl$StopTask.execute(ServiceControllerImpl.java:1764)
	at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
	at java.lang.Thread.run(Thread.java:748)

Resolution

  • This NPE itself is harmless, so this can be ignored.
  • If you would like to avoid this, enable direct buffers (= remove direct-buffers="false" or set direct-buffers="true" explicitly) on your <buffer-pool> configuration in the io subsystem at this moment. (direct-buffers is true by default.)
  • This content is not included.JBEAP-19049 has been raised for this issue and will be fixed in future releases (tentatively EAP 7.2.9 onwards, or EAP 7.3.2 onwards)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.