RFR: 8313306: More sensible reservation logging [v10]

Thomas Stuefe stuefe at openjdk.org
Wed Feb 14 06:53:07 UTC 2024


On Wed, 14 Feb 2024 05:37:40 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> src/hotspot/os/aix/os_aix.cpp line 1615:
>> 
>>> 1613:                        os::strerror(ep.saved_errno()));
>>> 1614:     // I want to know if this ever happens.
>>> 1615:     assert(false, "failed to set page size for shmat");
>> 
>> All of these messages could be printed with fatal() rather than assert(false) ?  Unless it's against some AIX policy?
>
> assert will only fire on debug builds whereas fatal will fire on all builds. I assume the intent is to catch this during testing but only log in production ??

Let's use assert here. 

I think the assert vs guarantee/fatal question in these sources is a bit messy and could do with a do-over, but in a different PR and done by people that can test on AIX (neither I nor Sonia can).

Most of this code was done by me, 20 years ago. When we did the AIX port, initially things were broken left and right, and some AIX sysV APIs failed intermittently too, so I often used guarantee to make sure we noticed when this happened, even at a customer site. That said, all issues OS- and JVM-wise are long ironed out today, so assert is more appropiate.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17356#discussion_r1488979261


More information about the hotspot-runtime-dev mailing list