Hi, We are using karaf 4.4.3 with equinox 3.18.200.v20221116-1324 on Windows 10 machines and we observe sometimes a very surprising effect of the logging functionality on BundleActivator instances when restarting the karaf server after a certain form of previous shut downs.
How to reproduce: Initially we observed the issue after some VM reboots when the karaf server restarted, but found out that especially VMs with not too much memory and/or a smaller number of cores can provoke this situation in nearly 100% of all cases. We also found that the same issue can be provoked more easily (on Windows) when killing the karaf Java process in the task manager, sometimes only after the second or third attempt of such provoked crashes followed by a restart. How does it manifest: We found that under above described conditions certain bundles that have registered a BundleActivator, don't show up any more in the karaf logging. Interestingly an immediate declarative OSGi service component in the same bundle (Which from a user point of view has not much differences to a BundleActivator) did show logging, so we could exclude the hypotheses, that the bundle was not started. In fact, by triggering other observable side effects within BundleActivator#start - such as creating a special marker file - we could proof that the seemingly not executed BundleActivator#start *was* in fact executed (The marker file was created), but no logging became visible from the BundleActivator (as if logging would be disabled). We found that all of org.slf4j.Logger, java.util.logging.Logger, and org.osgi.service.log.Logger are affected by this, so we _assume_ that the actual root may be related to a somewhat broken persisted state of pax logging. But before we report that to the paxlogging project directly, we would like to ask the karaf user group for possible hints or ideas. I should point out that we investigated this situation only for our own bundles that are started rather early, but certainly after pax logging has been started (No system bundles, just normal bundles). I would appreciate any ideas or suggestions how to proceed. Thanks, - Daniel Krügler
