I was installing SharePoint prerequisites and it seemed to hang at the first step "Configuring application server role, Web Server (IIS) Role". The PrerequisiteInstaller process seems to stall there forever. Looking at the installation log at \AppData\Local\Temp\2 under my profile, I saw over 2500 instances of the message: "Request for install time of Application Server Role, Web Server (IIS) Role". In the System event log, there are thousands of events "Windows Servicing successfully set package <some-package>(<some-status>) to <some-status>(<some-status>). There are also many repeats of the same package and status (eg: update, installed, staged).
I don't really know why it took so long. However, the simple solution was to just wait it out and eventually the task succeeded. In the end, the prerequisite installation took 1h 15min.