openhab-core: OH 4.3.0/4.3.1 is never getting past startlevel 30 for some users

Expected Behavior

When OH starts the rule engine starts and begins executing rules.

Current Behavior

It’s been reported at least three times now on the forum:

The first link has the most thorough investigation. I’m not positive that it’s the same root problem for all three as they differ in details.

In all three cases the problem appeared when upgrading to 4.3.1, but backporting to 4.3.0 does not fix the problem. So it might be a regression from before 4.3.0 release.

File based Rules DSL rules seem to be involved in all three cases.

Possible Solution

Steps to Reproduce (for Bugs)

This is trickly because clearly it’s not happening for everyone.

Context

Users who face this have no rules running.

Mitigation is to go back to 4.2.

Your Environment

  • Version used: (e.g., openHAB and add-on versions)
  • Environment name and version (e.g. Chrome 111, Java 17, Node.js 18.15, …):
  • Operating System and version (desktop or mobile, Windows 11, Raspbian Bullseye, …):

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

I’m not sure that there isn’t two if not three different issues going on here.

One issue has been identified and I think it’s been fixed already. Giving Quartz a bogus cron expression leads to an infinite loop.

However, others are being stuck at start level 30 and now you are reporting getting past that, and no cron expressions are involved.

The only real commonality I can see is everyone with the problem is using file based Rules DSL and a lot of RAM (though is it an unusual amount of RAM? 🤷

I don’t know if it still makes sense to have these all combined in one issue, or if it makes sense to split them up as they might not be related problems after all.

I was able to reproduce the invalid cron expression issue by adding this rule in a file:

rule "Test"
when
    Time cron "0 0  5 31 2 ? ?"
    //         s m hh DD MM WW YYYY
then
    // Nothing
end

The rule will stay in state INITIALIZING and it’s impossible to shut down openHAB. When already having this rule while starting openHAB, no rules will be processed after trying to load this rule and the system is stuck at run level 20.