Pamac high cpu usage (100%) on four cores during update


this is happening the seccond time when i use the cli pamac.
The first time i just killed pamac and restarted it again, i think this will help also this time, but i want to investigate the problem:

pamac call:


ss output:

As you can see the State of the socket that opened an connection to the repository stays in the state:


This state stays forever (or at least 1hour since i started the update) and no new sockets are opened.
I think there could be the following problems:

  • pamac opens an connection, then during downloading it looses the connection and never reconnects correctly
  • libalpm connects, looses connection and never reconnects correctly
  • server side implementation (could be but that is simple http/ftp protokoll, but i did not checked wich server side backend (http server, ftp server …) is running there.

I did not checked the sourcec of pamac, libalp or pacman but because i never had this issue with pacman, i realy think this is related to pamac.



And you are certain it does not build/update anything from the AUR?


absolutely, i have no AUR packages insatalled.
it happerns suring the download as you can see in the first picture.


But you said it is present at least an hour. That download should not take that long.

If it does you are on an unstable mirror.
Run sudo pacman-mirrors -f5 && sudo pacman -Syy && pamac update
and see if that fixes it.


it will not finish the download until i kill pamac, delete the lockfile and restart it.

If it is an unstable mirror, it is not a solution to use a different mirror. That would be, maybe, ,just a workaround but the bug still exists !


But the bug is not with manjaro or pamac then. it’s with the mirror you use.


I think at this state of the investigation it is not clear what causes the behavior.
But if you check out you can see all the states during a tcp connection.

The above dokumentation says:

CLOSE_WAIT: This endpoint has received a close request from the remote endpoint and this TCP is now waiting for a connection termination request from the local application.

If i understand that correct pamac/libalpm does not closes the socket since it is in CLOSE_WAIT state.


Sounds about right.

@guinux any ideas?