| Summary: | Dolphin Crash After Changing Directory | ||
|---|---|---|---|
| Product: | [Applications] dolphin | Reporter: | Keren Sky <keren_sky> |
| Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
| Status: | RESOLVED UPSTREAM | ||
| Severity: | crash | CC: | henry.hu.sh, mail |
| Priority: | NOR | Keywords: | drkonqi |
| Version First Reported In: | 16.12.2 | ||
| Target Milestone: | --- | ||
| Platform: | FreeBSD Ports | ||
| OS: | FreeBSD | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Keren Sky
2016-03-28 17:19:21 UTC
This also happens for me, with Qt 5.5.1, dolphin 16.04.1, kde frameworks 5.22.0. I've investigated the bug a little. The direct cause of the crash is calling FD_SET with a large fd (>FD_SETSIZE, which defaults to 1024). This causes an out-of-bound access and modifies data on the stack, which leads to the crash. According to the man page, this behavior is undefined. There are 2 places. First in QProcess (qprocess_unix.cpp, QProcessPrivate::waitForFinished). Another in QNativeSocketEngine (qnativesocketengine_unix.cpp, QNativeSocketEngine::nativeSelect). Both places can have out-of-bound access. The real reason is that dolphin is using large number of file descriptors. I tried to increase FD_SETSIZE to 4096, but after some extensive usage of dolphin, the file descriptor count still grows past it. In Qt 5.7 the select is replaced with poll, which should fix this problem. But the real problem is still there, dolphin should not open large number of files at the same time. @Henry: Great detective work! As Qt 5.7 has indeed been released since your comment, this should no longer happen (it did not for me). The problem that Dolphin uses a lot of file descriptors is obviously not fixed, but I don't think that we should track this here but rather open a new bug or create a task over at Phabricator. Therefore, I am going to close this bug as RESOLVED UPSTREAM. If you still experience such a crash even with Qt 5.7+, please reopen this report. Thanks again for the report & your investigations! |