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

Hyperion cores selectively during quit #668

Closed
Lord-Grey opened this issue Feb 8, 2020 · 3 comments · Fixed by #846
Closed

Hyperion cores selectively during quit #668

Lord-Grey opened this issue Feb 8, 2020 · 3 comments · Fixed by #846
Labels
Bug needs investigation Further testing is required

Comments

@Lord-Grey
Copy link
Collaborator

Hyperion.NG sometimes ends with a Segmentation fault and cores.

[hyperiond HYPERION] <INFO> Hyperion instance 'First LED Hardware instance' has been started
^C
[hyperiond MAIN] <INFO> Application closed with code 0
[hyperiond FLATBUFSERVER] <INFO> Stopped
Segmentation fault (core dumped)

The related code is during quiting the various Qt Treads.


...
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./build-x86x64/bin/hyperiond'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f53027f4e98 in QObject::thread() const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
[Current thread is 1 (Thread 0x7f52ff808800 (LWP 25146))]
(gdb) bt
#0  0x00007f53027f4e98 in QObject::thread() const () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#1  0x0000562e7e8db408 in HyperionDaemon::freeObjects() (this=0x562e7ff31100) at /home/thomas/hyperion.ng/src/hyperiond/hyperiond.cpp:166
#2  0x0000562e7e8db261 in HyperionDaemon::~HyperionDaemon() (this=0x562e7ff31100, __in_chrg=<optimised out>) at /home/thomas/hyperion.ng/src/hyperiond/hyperiond.cpp:142
#3  0x0000562e7e8db2f2 in HyperionDaemon::~HyperionDaemon() (this=0x562e7ff31100, __in_chrg=<optimised out>) at /home/thomas/hyperion.ng/src/hyperiond/hyperiond.cpp:145
#4  0x0000562e7e8ebf52 in main(int, char**) (argc=1, argv=0x7ffe00f498a8) at /home/thomas/hyperion.ng/src/hyperiond/main.cpp:379
void HyperionDaemon::freeObjects()
{
	// destroy network first as a client might want to access hyperion
	delete _jsonServer;
	_flatBufferServer->thread()->quit();
	_flatBufferServer->thread()->wait(1000);
	_protoServer->thread()->quit();
->	_protoServer->thread()->wait(1000);
	//ssdp before webserver
	_ssdp->thread()->quit();
	_ssdp->thread()->wait(1000);
	_webserver->thread()->quit();
	_webserver->thread()->wait(1000);
	_sslWebserver->thread()->quit();
	_sslWebserver->thread()->wait(1000);
@Lord-Grey
Copy link
Collaborator Author

Looking at the implementation of the different network related classes, it seems that the Qt Tread affinity is not considered properly (similar as in LedDeviceWrapper & LedDevice).
I will have a look after the PR654 has been merged with the master branch to ring-fence any updates.

@tpmodding
Copy link
Collaborator

Stand der Dinge? lassen?

@tpmodding tpmodding added the Bug label Jun 3, 2020
@Lord-Grey
Copy link
Collaborator Author

@tpmodding Issue is still open and requires further investigation.

@tpmodding tpmodding added the needs investigation Further testing is required label Jun 3, 2020
m-seker added a commit to m-seker/hyperion.ng that referenced this issue Jun 27, 2020
brindosch added a commit that referenced this issue Jun 28, 2020
* Fix #668 by fixing delete order of threads

* update changelog

Co-authored-by: Sersch <edeltraud70@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug needs investigation Further testing is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants