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


#1

Hi,
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:
Bildschirmfoto%20von%202019-01-07%2017-29-42

htop:

ss output:

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

CLOSE-WAIT

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.

greets


#2

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


#3

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


#4

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.


#5

Strit,
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 !


#6

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


#7

I think at this state of the investigation it is not clear what causes the behavior.
But if you check out https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.halu101/constatus.htm 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.


#8

Sounds about right.

@guinux any ideas?