Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-5023

Intermittent NPE when removing data sources

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 10.0.0.Alpha6
    • JCA
    • None
    • Hide

      It is easy to reproduce it if you create and delete many data sources at once.
      Attaching two CLI scripts, one for adding 300 datasources, one for removing all of them.
      Run bin/jboss-cli.sh -c --file=many-datasources.cli and then bin/jboss-cli.sh -c --file=remove-datasources.cli and watch the server log.

      For 300 data sources, I get about 4 to 6 NPEs.

      Show
      It is easy to reproduce it if you create and delete many data sources at once. Attaching two CLI scripts, one for adding 300 datasources, one for removing all of them. Run bin/jboss-cli.sh -c --file=many-datasources.cli and then bin/jboss-cli.sh -c --file=remove-datasources.cli and watch the server log. For 300 data sources, I get about 4 to 6 NPEs.

      When removing a datasource, sporadically this exception appears in the log:

      12:49:58,224 WARN  [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000004: Failure during stop of service org.wildfly.data-source.ds51: java.lang.NullPointerException
      	at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.stop(AbstractDataSourceService.java:161)
      	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:2056)
      	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:2017)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      This doesn't seem to happen on WildFly 9.x, only on recent master.
      I suspect that this could lead to some resource leaks, but didn't study it further.

      From git history, it looks like this might be caused by the fix for https://issues.jboss.org/browse/WFLY-4429

        1. many-datasources.cli
          32 kB
          Jan Martiska
        2. remove-datasources.cli
          10 kB
          Jan Martiska

              smaestri@redhat.com Stefano Maestri
              jmartisk@redhat.com Jan Martiska
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: