View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014015 | CMake | CMake | public | 2013-03-15 07:23 | 2013-03-16 04:05 | ||||
Reporter | Sylwester Arabas | ||||||||
Assigned To | Eric NOULARD | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | won't fix | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0014015: execute_process() causing CMake to abort suddenly | ||||||||
Description | Hello, here's an example causing CMake to abort suddenly without printing any useful information. HTH, Sylwester | ||||||||
Steps To Reproduce | $ cat CMakeLists.txt execute_process(COMMAND perf stat -oo /dev/null w) message("HERE") $ cmake . -- The C compiler identification is GNU 4.7.2 -- The CXX compiler identification is GNU 4.7.2 -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done /dev/null: Permission denied Terminated | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | test_execute_process_abort.cmake [^] (216 bytes) 2013-03-15 07:52 | ||||||||
Relationships | |
Relationships |
Notes | |
(0032636) Eric NOULARD (developer) 2013-03-15 08:08 |
I guess the culprit is not cmake but the perf command itself. Try the following command line: $ perf stat -oo /dev/null and see what happen you'll see that perf is terminating abruptely. If you $ strace -f perf stat -oo /dev/null w at the end you'll see: [pid xxxx] kill(0, SIGTERM <unfinished ...> which basically sends SIFTERM to **all** processes of the process group, thus killing CMake itself. I think there is nothing CMake can do about it however the trouble comes from the typo: perf stat -oo /dev/null w which means from the 'perf' command point of view that you are trying to collect stats for the command "/dev/null" (and put stats inside 'o' file) if you try: perf stat -o /dev/null w you'll see that it works as expected. I put the bug in feedback status but I guess it should go to won't fix. |
(0032637) Eric NOULARD (developer) 2013-03-15 08:08 |
Waiting for feedback before switching and closing. |
(0032643) Sylwester Arabas (reporter) 2013-03-15 13:33 |
The typo was intentional - it triggers this behaviour. Do you consider it worth reporting to perf maintainers? Killing the parent process seems quite surprising to me. Thanks, Sylwester |
(0032644) Eric NOULARD (developer) 2013-03-15 17:21 |
I think it's worth asking, at least, because killing the process group looks like overkill. |
(0032645) Sylwester Arabas (reporter) 2013-03-15 18:52 |
I've just asked if this behaviour is intentional on the linux-perf-users mailing list. I guess the issue is closed as it has nothing to do with CMake - sorry. Thanks for checking it. Sylwester |
(0032646) Eric NOULARD (developer) 2013-03-16 04:05 |
This is not a CMake issue. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-03-15 07:23 | Sylwester Arabas | New Issue | |
2013-03-15 07:51 | Eric NOULARD | Assigned To | => Eric NOULARD |
2013-03-15 07:51 | Eric NOULARD | Status | new => assigned |
2013-03-15 07:52 | Eric NOULARD | File Added: test_execute_process_abort.cmake | |
2013-03-15 08:08 | Eric NOULARD | Note Added: 0032636 | |
2013-03-15 08:08 | Eric NOULARD | Note Added: 0032637 | |
2013-03-15 08:08 | Eric NOULARD | Status | assigned => feedback |
2013-03-15 13:33 | Sylwester Arabas | Note Added: 0032643 | |
2013-03-15 13:33 | Sylwester Arabas | Status | feedback => assigned |
2013-03-15 17:21 | Eric NOULARD | Note Added: 0032644 | |
2013-03-15 18:52 | Sylwester Arabas | Note Added: 0032645 | |
2013-03-16 04:05 | Eric NOULARD | Note Added: 0032646 | |
2013-03-16 04:05 | Eric NOULARD | Status | assigned => closed |
2013-03-16 04:05 | Eric NOULARD | Resolution | open => won't fix |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |