corretto/corretto-8

Problem with servlet application running on batch service. (org.springframework.batch.core)

Argenis-Neoris opened this issue · 2 comments

Hi,
We have a batch application using the org.springframework.batch.core, this job have many steps, two of the steps are optional (using org.springframework.batch.core.job.flow.JobExecutionDecider), we use Elastic Beanstalk for the deploy, and it's deployed in 4 threads (same app in each thread),
We found a bug after the migration from JDK 8 to Corretto 8 in Elastic Beanstalk, we are experiencing an unexpected behavior. In some threads the process got stuck and there is no exception or error throwed telling us that there is a new error, the thread(s) simply stops logging and does not report success or fail when stops.

Is important to note that the app should end with a message even is there is any kind of exception. We noted that this only happens when at least one of the optional steps is skipped, if every step is executed, everything works as expected.

Expected behavior

Jobs must report when the task is completed, it can be success or failed (this is what we expect with any exception)

Platform information

Tomcat 8.5 with Corretto 8 running on 64bit Amazon Linux 2/4.3.6
2.6.4-RC-495-build-30

I attached a log file with the messages when a run starts and ends. I also tagged (manually) in which part start and end each run. In this log you can see there is a thread that never reports when the process is completed.
log_extracted_runs.txt

case id in aws: 12599200791

Hi, more information is needed to investigate how the process got stuck. Could you try jstack to detect any deadlock and get the stack dump?

Note that there are significant underlying differences between Elastic Beanstalk's old JDK 8 platforms (2.x) and their new Corretto 8 ones (3.x) -- https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platform-history-javase.html.