Skip to content
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

[🐛 BUG]: Reload plugin hangs when trying to reload invalid PHPland code #1003

Closed
1 task done
benalf opened this issue Feb 10, 2022 · 1 comment · Fixed by roadrunner-server/sdk#7
Closed
1 task done
Assignees
Labels
B-bug Bug: bug, exception F-need-verification
Milestone

Comments

@benalf
Copy link
Sponsor

benalf commented Feb 10, 2022

No duplicates 🥲.

  • I have searched for a similar issue in our bug tracker and didn't find any solutions.

What happened?

Reload plugin in 2.7.6 hangs when trying to reload invalid PHPland code (like syntax errors) until hits an endure timeout.
2.6.6 used to die immediately.

Attached both 2.6 and 2.7 log outputs for exactly the same reload scenario.

Version

2.7.6

Relevant log output

2022-02-10T14:33:55.057Z	DEBUG	rpc         	plugin was started	{"address": "tcp://127.0.0.1:6001", "list of the plugins with RPC methods:": ["informer", "resetter"]}
[INFO] RoadRunner server started; version: 2.7.6, buildtime: 2022-02-06T10:22:44+0000
2022-02-10T14:33:56.532Z	DEBUG	server      	worker is allocated	{"pid": 15, "internal_event_name": "EventWorkerConstruct"}
2022-02-10T14:33:56.532Z	DEBUG	http        	http server was started	{"address": "0.0.0.0:8008"}
2022-02-10T14:34:06.062Z	DEBUG	reload      	file was updated	{"path": "/code/app/src/Controller/IndexController.php", "name": "IndexController.php", "size": 1443}
2022-02-10T14:34:07.063Z	INFO	http        	reset signal was received
2022-02-10T14:34:07.077Z	DEBUG	server      	worker destroyed	{"pid": 15, "internal_event_name": "EventWorkerDestruct"}
2022-02-10T14:34:07.631Z	INFO	server      	 [ParseError]
 syntax error, unexpected token ")", expecting variable 
in /code/app/src/Controller/IndexController.php:41
2022-02-10T14:34:07.645Z	ERROR	container/poller.go:16	vertex got an error	{"id": "reload.Plugin", "error": "reload_plugin_serve: WorkerAllocate:\n\thttp_plugin_reset:\n\tstatic_pool_allocate_workers: EOF"}
github.com/roadrunner-server/endure/pkg/container.(*Endure).poll.func1
	github.com/roadrunner-server/endure@v1.2.1/pkg/container/poller.go:16
2022-02-10T14:34:37.647Z	ERROR	container/stop.go:147	vertices which are not stopped	{"id": ["config.Plugin", "logger.Plugin", "server.Plugin", "gzip.Plugin", "prometheus.Plugin", "memory.Plugin", "boltdb.Plugin", "redis.Plugin"]}
github.com/roadrunner-server/endure/pkg/container.(*Endure).shutdown
	github.com/roadrunner-server/endure@v1.2.1/pkg/container/stop.go:147
github.com/roadrunner-server/endure/pkg/container.(*Endure).Shutdown
	github.com/roadrunner-server/endure@v1.2.1/pkg/container/endure.go:459
reflect.Value.call
	reflect/value.go:556
reflect.Value.Call
	reflect/value.go:339
github.com/roadrunner-server/endure/pkg/fsm.(*FSMImpl).Transition
	github.com/roadrunner-server/endure@v1.2.1/pkg/fsm/fsm.go:216
github.com/roadrunner-server/endure/pkg/container.(*Endure).Stop
	github.com/roadrunner-server/endure@v1.2.1/pkg/container/endure.go:328
github.com/roadrunner-server/endure/pkg/container.(*Endure).startMainThread.func1
	github.com/roadrunner-server/endure@v1.2.1/pkg/container/poller.go:56
2022-02-10T14:34:37.647Z	ERROR	container/poller.go:58	error during stopping vertex	{"id": "reload.Plugin", "error": "endure_shutdown: Timeout: timeout exceed, some vertices may not be stopped and can cause memory leak"}
github.com/roadrunner-server/endure/pkg/container.(*Endure).startMainThread.func1
	github.com/roadrunner-server/endure@v1.2.1/pkg/container/poller.go:58
error occurred: reload_plugin_serve: WorkerAllocate:
	http_plugin_reset:
	static_pool_allocate_workers: EOF, plugin: reload.Plugin
handle_serve_command: WorkerAllocate:
	reload_plugin_serve:
	http_plugin_reset:
	static_pool_allocate_workers: EOF





2022-02-10T14:39:59.552Z	DEBUG	rpc         	RPC plugin started	{"address": "tcp://127.0.0.1:6001", "plugins": ["informer", "resetter"]}
[INFO] RoadRunner server started; version: 2.6.6, buildtime: 2021-12-15T10:32:57+0000
2022-02-10T14:40:00.977Z	DEBUG	http        	http server is running	{"address": "0.0.0.0:8008"}
2022-02-10T14:40:00.977Z	INFO	server      	worker allocated, pid: 18
2022-02-10T14:40:07.556Z	DEBUG	reload      	file was updated	{"path": "/code/app/src/Controller/IndexController.php", "name": "IndexController.php", "size": 1441}
2022-02-10T14:40:08.556Z	INFO	http        	HTTP plugin got restart request. Restarting...
2022-02-10T14:40:08.659Z	INFO	server      	worker destroyed, pid: 18
2022-02-10T14:40:09.215Z	INFO	server      	 [ParseError]
 syntax error, unexpected token ")", expecting variable 
in /code/app/src/Controller/IndexController.php:41
2022-02-10T14:40:09.220Z	ERROR	container/poller.go:16	vertex got an error	{"id": "reload.Plugin", "error": "reload_plugin_serve: WorkerAllocate:\n\thttp_plugin_reset:\n\tgoridge_frame_receive: EOF"}
github.com/spiral/endure/pkg/container.(*Endure).poll.func1
	github.com/spiral/endure@v1.1.0/pkg/container/poller.go:16
error occurred: reload_plugin_serve: WorkerAllocate:
	http_plugin_reset:
	goridge_frame_receive: EOF, plugin: reload.Plugin
handle_serve_command: WorkerAllocate:
	reload_plugin_serve:
	http_plugin_reset:
	goridge_frame_receive: EOF
@benalf benalf added B-bug Bug: bug, exception F-need-verification labels Feb 10, 2022
@rustatian rustatian added this to the v2.7.7 milestone Feb 10, 2022
@rustatian
Copy link
Member

Thanks @benalf , the fix will be in a moment ⚡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: bug, exception F-need-verification
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants