Bug 376432 - kdevelop is calling utimes() on a C/C++ file
Summary: kdevelop is calling utimes() on a C/C++ file
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: Custom Makefiles (show other bugs)
Version: 5.0.80
Platform: Other Linux
: NOR critical
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-13 07:24 UTC by Jan Ziak (http://atom-symbol.net)
Modified: 2017-02-20 21:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.1.0


Attachments
gdb backtrace (3.45 KB, text/plain)
2017-02-13 07:31 UTC, Jan Ziak (http://atom-symbol.net)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Ziak (http://atom-symbol.net) 2017-02-13 07:24:39 UTC
Steps to reproduce the issue:

0. Start kdevelop
1. Create or open a kdevelop C/C++ project
2. Open a C/C++ file in the editor
3. Close kdevelop
4. Run "strace -f -o kdevelop.strace kdevelop", open the project if required
5. Close kdevelop
6. Run "grep utimes kdevelop.strace"

$ grep utimes kdevelop.strace
21302 utimes("file.cc", [{tv_sec=1486969933, tv_usec=0}, {tv_sec=1486969933, tv_usec=0}] <unfinished ...>
21302 <... utimes resumed> )            = 0

See also: man utimes, man strace

Related bugs: #226117
Comment 1 Jan Ziak (http://atom-symbol.net) 2017-02-13 07:30:23 UTC
$ gdb kdevelop
(gdb) break utimes
(gdb) run
(gdb) bt
#0  __utimes (file=0x7fffb4004068 "file.cc", tvp=0x7fffc5ffa3c0) at ../sysdeps/unix/sysv/linux/utimes.c:31
#1  0x00007fffcc1af4e1 in Helper::changeAccessAndModificationTime(QString const&, QDateTime const&, QDateTime const&) () from /usr/lib64/qt5/plugins/kdevplatform/27/kdevcustommakemanager.so
#2  0x00007fffcc1aef02 in FileModificationTimeWrapper::FileModificationTimeWrapper(QStringList const&, QString const&) () from /usr/lib64/qt5/plugins/kdevplatform/27/kdevcustommakemanager.so
#3  0x00007fffcc1a9c7a in MakeFileResolver::resolveIncludePathInternal(QString const&, QString const&, QString const&, SourcePathInformation const&, int) () from /usr/lib64/qt5/plugins/kdevplatform/27/kdevcustommakemanager.so
#4  0x00007fffcc1ab88d in MakeFileResolver::resolveIncludePath(QString const&, QString const&, int) () from /usr/lib64/qt5/plugins/kdevplatform/27/kdevcustommakemanager.so
#5  0x00007fffcc1ac835 in MakeFileResolver::resolveIncludePath(QString const&) () from /usr/lib64/qt5/plugins/kdevplatform/27/kdevcustommakemanager.so
#6  0x00007fffcc1a0dcc in CustomMakeProvider::includesInBackground(QString const&) const () from /usr/lib64/qt5/plugins/kdevplatform/27/kdevcustommakemanager.so
#7  0x00007fffcc7f4d4a in DefinesAndIncludesManager::includesInBackground(QString const&) const () from /usr/lib64/qt5/plugins/kdevplatform/27/kdevdefinesandincludesmanager.so
#8  0x00007fffd78c02d0 in ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) () from /usr/lib64/qt5/plugins/kdevplatform/27/kdevclangsupport.so
#9  0x000000326e0175a4 in ThreadWeaver::IdDecorator::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) () from /usr/lib64/libKF5ThreadWeaver.so.5
#10 0x000000326e017b4a in ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () from /usr/lib64/libKF5ThreadWeaver.so.5
#11 0x000000326e016fc9 in ThreadWeaver::Private::DefaultExecutor::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () from /usr/lib64/libKF5ThreadWeaver.so.5
#12 0x000000326e017c7a in ThreadWeaver::ExecuteWrapper::executeWrapped(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () from /usr/lib64/libKF5ThreadWeaver.so.5
#13 0x000000326e017c70 in ThreadWeaver::ExecuteWrapper::executeWrapped(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () from /usr/lib64/libKF5ThreadWeaver.so.5
#14 0x000000326e017c89 in ThreadWeaver::ExecuteWrapper::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () from /usr/lib64/libKF5ThreadWeaver.so.5
#15 0x000000326e016781 in ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () from /usr/lib64/libKF5ThreadWeaver.so.5
#16 0x000000326e019304 in ThreadWeaver::Collection::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () from /usr/lib64/libKF5ThreadWeaver.so.5
#17 0x000000326e017539 in ThreadWeaver::IdDecorator::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () from /usr/lib64/libKF5ThreadWeaver.so.5
#18 0x000000326e016296 in ThreadWeaver::Thread::run() () from /usr/lib64/libKF5ThreadWeaver.so.5
#19 0x00000032594a57c3 in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#20 0x0000003904607310 in start_thread (arg=0x7fffc5ffb700) at pthread_create.c:334
#21 0x00000039042e6f8d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Comment 2 Jan Ziak (http://atom-symbol.net) 2017-02-13 07:31:46 UTC
Created attachment 104012 [details]
gdb backtrace
Comment 3 Jan Ziak (http://atom-symbol.net) 2017-02-13 07:38:05 UTC
I suggest to completely delete class FileModificationTimeWrapper.
Comment 4 Kevin Funk 2017-02-13 07:41:42 UTC
Thanks for the report, but I think bug 226117 contains all necessary information already. Thanks for the strace & gdb output.

Marking as duplicate.

*** This bug has been marked as a duplicate of bug 226117 ***
Comment 5 Jan Ziak (http://atom-symbol.net) 2017-02-13 07:56:12 UTC
(In reply to Kevin Funk from comment #4)
> Thanks for the report, but I think bug 226117 contains all necessary
> information already. Thanks for the strace & gdb output.
> 
> Marking as duplicate.
> 
> *** This bug has been marked as a duplicate of bug 226117 ***

The header of bug 226117 has different importance than this bug. Please raise the importance of bug 226117 in its header to increase the probability of getting it fixed for kdevelop 5.1.0. Thanks.
Comment 6 Kevin Funk 2017-02-14 08:51:03 UTC
Done. Unfortunately that won't really affect the probability this is getting fixed.

Stepping up & contributing a patch would increase probability a lot more ;)

See: https://www.kdevelop.org/contribute-kdevelop
Comment 7 Jan Ziak (http://atom-symbol.net) 2017-02-14 13:51:08 UTC
(In reply to Kevin Funk from comment #6)
> Done. Unfortunately that won't really affect the probability this is getting
> fixed.
> 
> Stepping up & contributing a patch would increase probability a lot more ;)
> 
> See: https://www.kdevelop.org/contribute-kdevelop

I took a look at https://phabricator.kde.org. It seems to be a much better tool than previous KDE developer workflow management tools.
Comment 8 Jan Ziak (http://atom-symbol.net) 2017-02-14 17:53:58 UTC
(In reply to Kevin Funk from comment #6)
> Done. Unfortunately that won't really affect the probability this is getting
> fixed.
> 
> Stepping up & contributing a patch would increase probability a lot more ;)
> 
> See: https://www.kdevelop.org/contribute-kdevelop

The patch: https://phabricator.kde.org/D4612

Also: I have never heard of the "unsermake" alternative to make/gmake until I examined kdevelop custommake source code. From internet search, it seems to be an abandoned thing from year 2003. It may be beneficial to completely remove unsermake support from kdevelop.
Comment 9 Sven Brauch 2017-02-14 20:46:30 UTC
KDevelop still references unsermake? Patches removing that are very welcome.
Comment 10 Milian Wolff 2017-02-20 20:53:46 UTC
Git commit a05e48ebbfa33f28ddd332bd6bd23dafcb1b2c0f by Milian Wolff, on behalf of Jan Ziak.
Committed on 20/02/2017 at 20:52.
Pushed by mwolff into branch 'master'.

Avoid utimes() in custommake projects, remove unsermake support

Reviewed By: mwolff
Differential Revision: https://phabricator.kde.org/D4612

M  +6    -143  projectmanagers/custommake/makefileresolver/makefileresolver.cpp

https://commits.kde.org/kdevelop/a05e48ebbfa33f28ddd332bd6bd23dafcb1b2c0f
Comment 11 Kevin Funk 2017-02-20 21:06:13 UTC
Git commit 4f3813672089258a2044cbeb901c9432dc8d9a03 by Kevin Funk, on behalf of Jan Ziak.
Committed on 20/02/2017 at 21:06.
Pushed by kfunk into branch '5.1'.

Avoid utimes() in custommake projects, remove unsermake support

Reviewed By: mwolff
Differential Revision: https://phabricator.kde.org/D4612

M  +6    -143  projectmanagers/custommake/makefileresolver/makefileresolver.cpp

https://commits.kde.org/kdevelop/4f3813672089258a2044cbeb901c9432dc8d9a03