Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1544498 > unrolled thread
| Started by | Martin Steigerwald <martin.steigerwald@teamix.de> |
|---|---|
| First post | 2016-12-19 13:20 +0100 |
| Last post | 2016-12-19 18:30 +0100 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
[REGRESSION] Two issues that prevent process accounting (taskstats) from working correctly Martin Steigerwald <martin.steigerwald@teamix.de> - 2016-12-19 13:20 +0100
Re: [REGRESSION] Two issues that prevent process accounting (taskstats) from working correctly Peter Zijlstra <peterz@infradead.org> - 2016-12-19 14:20 +0100
Re: [REGRESSION] Two issues that prevent process accounting (taskstats) from working correctly Martin Steigerwald <martin@lichtvoll.de> - 2016-12-19 15:00 +0100
Re: [REGRESSION] Two issues that prevent process accounting (taskstats) from working correctly Peter Zijlstra <peterz@infradead.org> - 2016-12-19 15:10 +0100
Re: [REGRESSION] Two issues that prevent process accounting (taskstats) from working correctly Peter Zijlstra <peterz@infradead.org> - 2016-12-19 18:30 +0100
| From | Martin Steigerwald <martin.steigerwald@teamix.de> |
|---|---|
| Date | 2016-12-19 13:20 +0100 |
| Subject | [REGRESSION] Two issues that prevent process accounting (taskstats) from working correctly |
| Message-ID | <sQ558-7DY-25@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Hello Ingo, Peter, Nicolas, Andrew, Balbir, Shailabh, Jay, Gerlof and Marc, starting from a Debian bug report of mine, Gerlof Langeveld, developer of system and process monitor atop¹, found two issues with process accounting. [1] http://atoptool.nl/ I did some guess work on who might be the maintainer for this, but please feel free to add further Cc´s as you see fit. Or ask for removal for Cc if you are not working on this anymore. Gerlof found two issues which I also reported to the kernel bug tracker. I copy and paste the summaries that Gerlof prepared: 1) Sometimes process accounting does not work at all. The acct() system call (to activate process accounting) return value 0, which means that process accounting is activated successfully. However, no process accounting records are written whatsoever. This situation can be reproduced with the program 'acctdemo.c' that you can find as attachment. When this program gives the message "found a process accounting record!", the situation is okay and process accounting works fine to the file '/tmp/mypacct'. When the message 'No process accounting record yet....' is repeatedly given, process accounting does not work and will not work at all. It might be that you have to start this program several times before you get this situation (preferably start/finish lots of processes in the mean time). This problem is probably caused by a new mechanism introduced in the kernel code (..../linux/kernel/acct.c) that is called 'slow accounting' and has to be solved in the kernel code. I experience this problem on Debian8 with a 4.8 kernel and on CentOS7 with a 4.8 kernel. I reported this as: Bug 190271 - process accounting sometimes does not work https://bugzilla.kernel.org/show_bug.cgi?id=190271 2) When using the NETLINK inface, the command TASKSTATS_CMD_GET consequently returns -EINVAL. The code that is used by the atopacctd daemon is based on the demo code 'getdelays.c' that can be found in the kernel source code tree (..../linux/Documentation/accounting/getdelays.c). Also this 'getdelays' program does not work any more (also -EINVAL on the same call) with the newer kernels. I really spent a lot of time on this issue to get the code running (there are many places in the kernel code where -EINVAL for this call can be given), but I did not succeed. It is really an incompatibility introduced by the kernel code. It would be nice if the kernel maintainers provide a working version of the getdelays program in the kernel source tree. I only experience this problem on Debian8 with a 4.8 kernel (virtual machine with 4 cores). On CentOS7 with a 4.8 kernel it works fine (physical machine with 4 cores). I will anyhow adapt atopacctd for this issue that it detects and logs the -EINVAL and terminates. The current version of atopacctd keeps running which is not useful at all. I reported this as: Bug 190711 - Process accounting: Using the NETLINK inface, the command TASKSTATS_CMD_GET returns -EINVAL https://bugzilla.kernel.org/show_bug.cgi?id=190711 Marc Haber, maintainer of atop package, Gerlof Langeveld, developer of atop and I are currently discussing workarounds with atop and/or systemd service fail for the time till upstream kernels with this issues fixed are shipped by distributions. Still it would be nice to remove those work-arounds and have the kernel work correctly again at some time in the future. Thanks, -- Martin Steigerwald | Trainer teamix GmbH Südwestpark 43 90449 Nürnberg Tel.: +49 911 30999 55 | Fax: +49 911 30999 99 mail: martin.steigerwald@teamix.de | web: http://www.teamix.de | blog: http://blog.teamix.de Amtsgericht Nürnberg, HRB 18320 | Geschäftsführer: Oliver Kügow, Richard Müller teamix Support Hotline: +49 911 30999-112 *** Bitte liken Sie uns auf Facebook: facebook.com/teamix ***
[toc] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2016-12-19 14:20 +0100 |
| Subject | Re: [REGRESSION] Two issues that prevent process accounting (taskstats) from working correctly |
| Message-ID | <sQ61c-8fM-31@gated-at.bofh.it> |
| In reply to | #1544498 |
On Mon, Dec 19, 2016 at 01:06:00PM +0100, Martin Steigerwald wrote: > Hello Ingo, Peter, Nicolas, Andrew, Balbir, Shailabh, Jay, Gerlof and Marc, > > starting from a Debian bug report of mine, Gerlof Langeveld, developer of > system and process monitor atop¹, found two issues with process accounting. > While $subject says regression the rest of the email completely fails to mentions if this ever worked, and if so, against what version.
[toc] | [prev] | [next] | [standalone]
| From | Martin Steigerwald <martin@lichtvoll.de> |
|---|---|
| Date | 2016-12-19 15:00 +0100 |
| Message-ID | <sQ6DU-8us-31@gated-at.bofh.it> |
| In reply to | #1544522 |
Am Montag, 19. Dezember 2016, 14:19:11 CET schrieb Peter Zijlstra: > On Mon, Dec 19, 2016 at 01:06:00PM +0100, Martin Steigerwald wrote: > > Hello Ingo, Peter, Nicolas, Andrew, Balbir, Shailabh, Jay, Gerlof and > > Marc, > > > > starting from a Debian bug report of mine, Gerlof Langeveld, developer of > > system and process monitor atop¹, found two issues with process > > accounting. > > While $subject says regression the rest of the email completely fails to > mentions if this ever worked, and if so, against what version. Sorry for not mentioning it here. With kernel 3.16 process accounting worked nicely. We do not have any data on the exact kernel version where it started to fail. I do see these issues since quite a while, but I was never sure whether it was an issue in atop or the kernel and I do not recall on what exact combination of atop + kernel version it failed to work. As an additional notice: The mail addresses of Balbir and Shailabh which I got from source code annotations of taskstats.c and getdelays.c do not work anymore. -- Martin
[toc] | [prev] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2016-12-19 15:10 +0100 |
| Subject | Re: [REGRESSION] Two issues that prevent process accounting (taskstats) from working correctly |
| Message-ID | <sQ6NA-lK-21@gated-at.bofh.it> |
| In reply to | #1544541 |
On Mon, Dec 19, 2016 at 02:50:25PM +0100, Martin Steigerwald wrote: > Am Montag, 19. Dezember 2016, 14:19:11 CET schrieb Peter Zijlstra: > > On Mon, Dec 19, 2016 at 01:06:00PM +0100, Martin Steigerwald wrote: > > > Hello Ingo, Peter, Nicolas, Andrew, Balbir, Shailabh, Jay, Gerlof and > > > Marc, > > > > > > starting from a Debian bug report of mine, Gerlof Langeveld, developer of > > > system and process monitor atop¹, found two issues with process > > > accounting. > > > > While $subject says regression the rest of the email completely fails to > > mentions if this ever worked, and if so, against what version. > > Sorry for not mentioning it here. With kernel 3.16 process accounting worked > nicely. We do not have any data on the exact kernel version where it started > to fail. I do see these issues since quite a while, but I was never sure > whether it was an issue in atop or the kernel and I do not recall on what > exact combination of atop + kernel version it failed to work. > > As an additional notice: The mail addresses of Balbir and Shailabh which I got > from source code annotations of taskstats.c and getdelays.c do not work > anymore. Right, Balbir is back with IBM and working on Linux again, but under a different email address (and on a different continent). I've amended his address and bounced him the initial email.
[toc] | [prev] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2016-12-19 18:30 +0100 |
| Subject | Re: [REGRESSION] Two issues that prevent process accounting (taskstats) from working correctly |
| Message-ID | <sQ9V7-2r7-9@gated-at.bofh.it> |
| In reply to | #1544498 |
On Mon, Dec 19, 2016 at 01:06:00PM +0100, Martin Steigerwald wrote: > > 2) When using the NETLINK inface, the command TASKSTATS_CMD_GET > consequently returns -EINVAL. > > The code that is used by the atopacctd daemon is based on the demo code > 'getdelays.c' that can be found in the kernel source code tree > (..../linux/Documentation/accounting/getdelays.c). Also this 'getdelays' > program does not work any more (also -EINVAL on the same call) > with the newer kernels. I really spent a lot of time on this issue to > get the code running (there are many places in the kernel code where > -EINVAL for this call can be given), but I did not succeed. It is really > an incompatibility introduced by the kernel code. > It would be nice if the kernel maintainers provide a working version of > the getdelays program in the kernel source tree. > > I only experience this problem on Debian8 with a 4.8 kernel (virtual > machine with 4 cores). > On CentOS7 with a 4.8 kernel it works fine (physical machine with 4 cores). > > I will anyhow adapt atopacctd for this issue that it detects and logs > the -EINVAL and terminates. > The current version of atopacctd keeps running which is not useful at all. > > > I reported this as: > > Bug 190711 - Process accounting: Using the NETLINK inface, the command > TASKSTATS_CMD_GET returns -EINVAL > > https://bugzilla.kernel.org/show_bug.cgi?id=190711 Ben Hutchings reports: "It looks like the taskstats bug was introduced by 513e3d2d11c9 as that means cpumask_parse() may not initialise as many bits as cpumask_subset() compares"
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web