Created attachment 60366 [details] shows the 'ps -ax | grep kdevelop' output Version: 4.2.1 (using KDE 4.6.3) OS: Linux I'm working with Makefile-based projects, and everytime I build a project a lot of kdevelop <defuct> processed apperar on the 'ps ax' output. This problem became critical when I started using -j3 as make argument (or setting the number of concurrent task on the project properties) When using kdevelop for a while the maximum number of user processes is exeeded and hsit happens :-P. If you need more info dont hesitate to contact me Reproducible: Always Steps to Reproduce: Open or import a custom make project Compile Compile again Run ps -ax | grep kdevelop Actual Results: There are a lot of kdevelop 'defunct' processes Expected Results: There should be only one kdevelop process running. I'm using Fedora 15 x64. I've also tested it on Kubuntu 10.10 and 11.04
Could you attach a simple hello-world like project that I can import and use to reproduce this bug?
Created attachment 60392 [details] Hello World simple project This project has 4 source files so it has sense to use the -j3 option.
Created attachment 60393 [details] Hello World simple project (corrected)
Created attachment 60398 [details] Sample project again It seems that there is a problem with the bug tracking system and the file-format auto-detection because the files that I've uploaded became corrupted. I'm uploading this file as a binary (application/octet-stream)
hI cannot reproduce this on my machine... I imported the project as custom make file project, then build it. I see that make -j3 ... is run but ps aux | grep kdevelop shows no defunct kdevelop processes! so - am I missing something? what platform are you using? can someone else reproduce?
(In reply to comment #5) I am working on a fresh install of fedora 15 x64. But now I cannot reproduce the problem! Since I did a system update yesterday, I started checking the yum database... I checked all yum packages and found a couple of inconsistencies, first, some packages had the suffix "rc1" (the kernel was one of them) and others where installed twice (different versions of libgcc, gcc and libstdc++). So I can only attribute this problem to my distro, or some particular package that were updated yesterday. Doing a google search I've found a post at fedoraforum.rg that descrives the same problem (good for me 'cause I'm not dreaming...): http://www.fedoraforum.org/forum/showthread.php?t=260033 Anyway, I cannot attribute this problem to kdevelop anymore, you are free to mark this bug as invalid if you think it's right. Best regards, and thanks for your time Juan
I also have the problem that KDevelop 4.2.60 creates lots of defunct processes (ps shows several thousand at the moment). I think the number increases when moving the mouse over C++ code, which opens doc tooltips etc. From strace output it seems that a thread is created, it does some work, writes a result over pipe to main process, closes the pipe, then the main process calls waitpid() with WNOHANG, then the thread exits. That would indicate that there is a race: kdevelop calls waitpid() too early (4.5 msec before the thread calls exit_group). Attached is strace output and console output. The thread I looked at has PID 23856, the main process has PID 15355. This happens on RHEL5; so maybe there is indeed something different on RedHat and Fedora that causes this problem.
Created attachment 71495 [details] strace output
Created attachment 71496 [details] kdevelop console output (fragment)
I still see this bug in Ubuntu 12.04 with kdevelop 4.3.1 (dev 4.8.3).
*** Bug 309833 has been marked as a duplicate of this bug. ***
I'd welcome if someone who can actually reproduce this spents some time on investigating the cause and submitting a patch. I can't help you here without seeing the issue in the first place...
reopening
A gdb catch fork shows that the problem is at projectmanagers/cmake/parser/cmakeparserutils.cpp::129: 129: p.start(); 130: 131: if(!p.waitForFinished()) 132: { 133: kDebug() << "failed to execute:" << execName; 134: } Enabling kdebugdialog I see kdevelop(2009)/kdevelop (cmake support debug) CMakeParserUtils::executeProcess: failed to execute: "" kdevelop(2009)/kdevelop (cmake support debug) CMakeParserUtils::executeProcess: executed "" < "" kdevelop(2009)/kdevelop (cmake support debug) CMakeParserUtils::executeProcess: Executing: "" :: ("--help-variable-list") kdevelop(2009)/kdecore (kdelibs) KTempDir::create: KTempDir: Temporary directory created : "/tmp/kde-sandro/kdevcmakemanagerz47iqy/" kdevelop(2009)/kdevelop (cmake support debug) CMakeParserUtils::executeProcess: failed to execute: "" kdevelop(2009)/kdevelop (cmake support debug) CMakeParserUtils::executeProcess: executed "" < "" kdevelop(2009)/kdevelop (cmake support debug) CMakeParserUtils::executeProcess: Executing: "" :: ("--help-module-list") kdevelop(2009)/kdecore (kdelibs) KTempDir::create: KTempDir: Temporary directory created : "/tmp/kde-sandro/kdevcmakemanageraBv2ON/" kdevelop(2009)/kdevelop (cmake support debug) CMakeParserUtils::executeProcess: failed to execute: "" kdevelop(2009)/kdevelop (cmake support debug) CMakeParserUtils::executeProcess: executed "" < "" kdevelop(2009)/kdevelop (cmake support debug) CMakeParserUtils::executeProcess: Executing: "" :: ("--help-property-list") kdevelop(2009)/kdecore (kdelibs) KTempDir::create: KTempDir: Temporary directory created : "/tmp/kde-sandro/kdevcmakemanagerb2yKf3/" kdevelop(2009)/kdevelop (cmake support debug) CMakeParserUtils::executeProcess: failed to execute: "" kdevelop(2009)/kdevelop (cmake support debug) CMakeParserUtils::executeProcess: executed "" < "" Those four executeProcess are the four zombies that get created every time I hover over a symbol. I guess one needs to ensure that the KProcess is terminated properly (though apparently it is already terminated when waitForFinished fails?
Aha! The problem is that I don't have cmake installed! Packaging bug? Though probably this should also be fixed at code level, i.e. detect a missing cmake?
Git commit 6987de41c2832de1fd42a1da17fef0b4c3f0bed5 by Milian Wolff. Committed on 11/11/2012 at 18:30. Pushed by mwolff into branch 'master'. The CMake plugins have a runtime dependency on CMake, catch that properly. M +14 -0 projectmanagers/cmake/cmakedocumentation.cpp M +4 -0 projectmanagers/cmake/cmakedocumentation.h M +14 -0 projectmanagers/cmake/cmakemanager.cpp M +4 -0 projectmanagers/cmake/cmakemanager.h M +1 -0 projectmanagers/cmake/parser/cmakeparserutils.cpp http://commits.kde.org/kdevelop/6987de41c2832de1fd42a1da17fef0b4c3f0bed5
Tested -> works. Thanks!
Hi guys! Despite this bug is marked as fixed, I experience lots of kdevelop zombie processes just by running kdevelop instance with all plugins disabled. Project doesn't use CMake. There is just web-application on Lua + custom makefile. When I start kdevelop, there is already one zombie process. After some time (about 5-10 minutes) there is second one appears. hat so, after the night with open KDevelop I've tons zombie forks. And after a week or even month — I start to experience problems with starting new processes :-/ Can I provide some more usefull info to fix that entirely?
Yes, if you can reproduce this issue, please try the following: gdb kdevelop ... (gdb) break fork (gdb) command 1 > bt > cont > end (gdb) set pagination off (gdb) run -s name-of-your-session ... This will output backtraces whenever a process is forked of using QProcess. This should not happen often, and you should be able to track the output and tell us where it tries to run applicatoins from. This is already useful information, and maybe you can figure out where the zombie comes from.
Created attachment 93846 [details] gdb output log with 2 zombies at the very start of gdb Thanks a lot! I've attached entire gdb log with commands you've suggested. It is already 2 zombie-threads, while I do not touch it yet (I mean, I just opened kdevelop and don't write a single line of code, but there is 2 zombies already). Debugging continues...
Created attachment 93929 [details] one more gdb log, after few nights of uptime; 8 zombies; Hi! there is one more log, after few days of kdevelop uptime; There is 8 zombies already. And, it seems, zombies appears only when I do coding (using autocomplete, and so on). So, I'd think it is somehow related to code autocompletion (either popup or code scanning). I'd also suggest some git calls on file saving, but it isn't reproduce by random save operations and, moreover, zombies appears even if I disable all modules, including git.
Created attachment 93930 [details] +1 more zombie I also opened KDevelop settings dialog while writing previous comment and noticed one more zombie and some log addition. Although, there is some localized messages (I forgot to run that instance of KDevelop with LC_ALL=en_US.UTF-8, sorry), so, if you interested in content of one of such line - I'd translate it for you.
Comment on attachment 93929 [details] one more gdb log, after few nights of uptime; 8 zombies; You seem to have the lumen plugin enabled - do you have dcd-client and dcd-server in your $PATH?
(In reply to Milian Wolff from comment #23) > Comment on attachment 93929 [details] > one more gdb log, after few nights of uptime; 8 zombies; > > You seem to have the lumen plugin enabled - do you have dcd-client and > dcd-server in your $PATH? 1) I can't find such plugin in KDevelop plugins list :( 2) no, I have no such binaries (and, moreover, searching for such binaries over distro's packages database gives me no result).
It's a Kate plugin, try to disable it from the editor settings. Does this fix your issue? If so, we know what to fix.
Yeah, it seems, it fixed issue. Thanks a lot! // At least, KDevelop started without 2 initial zombies ;) P.S. I'll comment here if they'll appear during workflow.
So, it still no zombies appeared. I seems, you were right about D-lang completion katepart plugin. Thanks a lot ;)
Assuming this fixed in Qt 5.5.0 (by https://bugreports.qt.io/browse/QTBUG-5990)
I am seeing this happening with 4.7.1 on OpenSUSE 13.2 with a large project I am working on. One thing to note is that I have well over 100 files, .c, .h and .dts (device tree) files open in my project.