-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing the kernel after container has been reset throws exception #294
Comments
Wouldn't using subscribed services solve the issue though? https://github.com/webmozarts/console-parallelization?tab=readme-ov-file#subscribed-services |
I don't know. In my personal case, I am not using the |
Do you have a reproducer? This sounds a bit weird, we do use this package extensively and did not have that issue so far ever since we used subscribed services. So having a clear way to check what is going on would be very helpful |
Seems like a weird local issue in my project. Tried to reproduce it in a freshly set up project, works as expected. Sorry for any inconvenience! |
Hi. I could reproduce the issue now with a fresh Symfony project. Steps to reproduce:
Example:
When the command runs and the exception is thrown you can notice this error on the CLI:
After removing So it has something to do with the stopwatch component and the web-profiler-bundle. |
Hi,
when one of the items is throwing an error, the standard error handler kicks in and is resetting the container in the child process.
This leads to the kernel not being available in the container any more. As the kernel is a synthetic service and initialises itself during
boot()
, it's not available any more after a container reset in the error handler.Any subsequent access to the
kernel
service throws the following exception:Options to reproduce:
console.terminate
and thus throws the exception.kernel
directly, for example directly after the container has been reset inResetServiceErrorHandler
:Output:
"The "kernel" service is synthetic, it needs to be set at boot time before it can be used."
Best regards!
Tim
The text was updated successfully, but these errors were encountered: