On 2018-11-19 14:36:24 +0100, Vincent Lefevre wrote:
> I've also noticed that the failure of system/library calls is not
> checked (see my comments in the upstream bug). In case there's a
> failure due to some race condition, this could explain the issue.
> But it may also be due to something else.

After testing and debugging, I've eventually found the issue.
Actually, in addition to the type mismatch (my patches have been
applied upstream), there were two other issues, which made the
debugging even more confusing:

1. The malloc did not fail because of a huge number of processes
(this huge number only appeared in the error message, which was
wrong, see (2)), but because of some large, but reasonable number
of processes. The reason of the failure is that atop locks all
the memory, and the default hard limit of locked memory is very
small: 16 MB!

For testing only, if I increase this limit to 64 MB, the failure
disappears.

2. About the wrong number in the error message, this was due to
incorrect usage of va_list. I wrote a patch and did a pull request:

  https://github.com/Atoptool/atop/pull/43

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to