Alexpux / MSYS2-pacman

MSYS2 port of Arch Linux packman package manager.
GNU General Public License v2.0
164 stars 34 forks source link

pacman hangs on upgrading or reinstalling some packages #28

Closed Maximus5 closed 8 years ago

Maximus5 commented 8 years ago

Have started pacman -S base-devel, after some printouts packman hangs - it utilizes 100% of one CPU and do not print anything more. What can I check or fix?

Maximus5 commented 8 years ago

Contents of pacman.log does not contain anything interesting

[2016-03-18 11:41] [PACMAN] Running 'pacman -Sy --force -v gettext'      
[2016-03-18 11:41] [PACMAN] synchronizing package lists                  
[2016-03-18 11:41] [ALPM] transaction started                            
[2016-03-18 11:42] [ALPM] reinstalled gettext (0.19.7-3)                 
Alexpux commented 8 years ago

Did you run first update-core?

Maximus5 commented 8 years ago
$ update-core
:: Synchronizing package databases...         
 git-for-windows is up to date                
 mingw32 is up to date                        
 mingw64 is up to date                        
 msys is up to date                           
:: Starting core system upgrade...            
 there is nothing to do                       

Also, I tried to update pacman itself

$ pacman -Sy -v pacman
...
Packages (1) pacman-5.0.1.6391.cdeb8ff-1
...
(1/1) reinstalling pacman

Completed successfully, but pacman -V still shows version v4.2.1-504?

$ pacman -V                                                               

 .--.                  Pacman v4.2.1-504-gcdeb-dirty - libalpm v10.0.1    
/ _.-' .-.  .-.  .-.   Copyright (C) 2006-2016 Pacman Development Team    
\  '-. '-'  '-'  '-'   Copyright (C) 2002-2006 Judd Vinet                 
 '--'                                                                     
                       This program may be freely redistributed under     
                       the terms of the GNU General Public License.       
Alexpux commented 8 years ago

Version mismatch is upstream issue

Maximus5 commented 8 years ago

No ideas?

Well, is there simple way to determine the list of installed packages, to reinstall them from scratch?

mingwandroid commented 8 years ago

On Sun, 3 Apr 2016 20:27 Maximus5, notifications@github.com wrote:

No ideas?

Well, is there simple way to determine the list of installed packages, to reinstall them from scratch?

Please see this link:

https://sourceforge.net/p/msys2/wiki/MSYS2%20re-installation/

You are receiving this because you are subscribed to this thread.

Reply to this email directly or view it on GitHub https://github.com/Alexpux/MSYS2-pacman/issues/28#issuecomment-205039834

Maximus5 commented 8 years ago

Thanks

ghost commented 8 years ago

I am having the same issue in pacman on Win 8.1 x64 when instaling, updating, re-installing or uninstalling random packages. On average the issue appears when installing a package at about 20% probability. The issue appears in the later stages of the install/update/reisntall/uninstall process, so the package (on which pacman hangs) seems to be in a more or less consistent state as a result.

One thread in pacman.exe seems to be in a kind of race condition with another one from accessing a pipe with a name like "\Device\NamedPipe\msys-XXXXXXXXXXXXXXXX-YYYY-pipe-0xZZ" (one of the two pipes that are open by pacman.exe, the other pipe is named "\Device\NamedPipe\msys-XXXXXXXXXXXXXXXX-YYYY-sigwait"). The attempts to read from the pipe fail (lots of errors from many win32api calls , thousands per second):

ReadFile() = Error code 997 = Overlapped I/O operation is in progress.
Stack from that call:
#   Module  Address Offset  Location
1   msys-2.0.dll    0x000000018007c172  0x3c172 _feinitialise + 0x5bc2
2   msys-2.0.dll    0x0000000180078f22  0x38f22 _feinitialise + 0x2972
3   msys-2.0.dll    0x0000000180144c82  0x104c82    getppid + 0x402
4   msys-2.0.dll    0x000000018012f19b  0xef19b acl_get_perm + 0x94cb
------------------------------------------------------
GetOverlappedResult() = Error code 109 = The pipe has been ended.
Stack from that call:
#   Module  Address Offset  Location
1   msys-2.0.dll    0x000000018007bd3d  0x3bd3d _feinitialise + 0x578d
2   msys-2.0.dll    0x000000018007c1b2  0x3c1b2 _feinitialise + 0x5c02
3   msys-2.0.dll    0x0000000180078f22  0x38f22 _feinitialise + 0x2972
4   msys-2.0.dll    0x0000000180144c82  0x104c82    getppid + 0x402
5   msys-2.0.dll    0x000000018012f19b  0xef19b acl_get_perm + 0x94cb

Reinstallation does not help. Pacman seems to hang randomly.

javierholguera commented 7 years ago

I'm having the same problem in Windows 8.1 x64 as well. Is there any solution for this?

humodz commented 7 years ago

Same issue, Windows 10 Home x64. The first time I call pacman -Syuu, upgrading pacman to 5.0.1-2-x86-64, works properly, but after I reopen the terminal and call pacman -Syuu again, it always hangs at (2/50) gcc-libs.

https://sourceforge.net/p/msys2/wiki/MSYS2%20re-installation/ 403 Create access required

perdigao1 commented 6 years ago

Hi, I am haing the same issue as humodz, and cannot install any packages on Msys2 on a windows7 64bit machine. It hangs when checking for package integrity. Task manager shows one pacman process consuming 25% CPU (quad core machine), until I do Ctrl+C. It brings back the command line, but that does not kill the pacman process in the task manager, which is still consuming 25% CPU. Any help would be appreciated, ultimately I am trying to compile a big fortran program for windows.

$ pacman -Syuu
:: Synchronizing package databases...
 mingw32 is up to date
 mingw64 is up to date
 msys is up to date
:: Starting core system upgrade...
 there is nothing to do
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (40) bash-completion-2.8-2  brotli-1.0.5-2  bsdcpio-3.3.2-2
              bsdtar-3.3.2-2  curl-7.60.0-3  dash-0.5.10.2-1  gawk-4.2.1-1
              gcc-libs-7.3.0-2  glib2-2.54.3-1  gnupg-2.2.9-1  grep-3.1-1
              heimdal-libs-7.5.0-2  icu-62.1-1  libarchive-3.3.2-2
              libassuan-2.5.1-1  libcurl-7.60.0-3  libgcrypt-1.8.3-2
              libgnutls-3.6.1-1  libgpg-error-1.32-1  libgpgme-1.11.1-1
              libhogweed-3.4-1  libidn2-2.0.5-1  libksba-1.3.5-1
              liblzma-5.2.4-1  libnettle-3.4-1  libnpth-1.5-1  libpcre-8.42-1
              libpcre16-8.42-1  libpcre32-8.42-1  libpcrecpp-8.42-1
              libpcreposix-8.42-1  libreadline-7.0.005-1  libsqlite-3.21.0-4
              libunistring-0.9.10-1  libxml2-2.9.8-1  m4-1.4.18-2  nettle-3.4-1
              pcre-8.42-1  pinentry-1.1.0-2  xz-5.2.4-1

Total Download Size:   23.90 MiB
Total Installed Size:  88.98 MiB
Net Upgrade Size:       9.26 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 bash-completion-2.8...   196.5 KiB   192M/s 00:00 [#####################] 100%
 gcc-libs-7.3.0-2-x86_64  977.0 KiB   477M/s 00:00 [#####################] 100%
 liblzma-5.2.4-1-x86_64    83.1 KiB  81.2M/s 00:00 [#####################] 100%
 libhogweed-3.4-1-x86_64  143.0 KiB   140M/s 00:00 [#####################] 100%
 libnettle-3.4-1-x86_64   105.5 KiB  0.00B/s 00:00 [#####################] 100%
 icu-62.1-1-x86_64          7.5 MiB  2.23M/s 00:03 [#####################] 100%
 libreadline-7.0.005...   271.3 KiB   265M/s 00:00 [#####################] 100%
 libxml2-2.9.8-1-x86_64   505.3 KiB   493M/s 00:00 [#####################] 100%
 bsdcpio-3.3.2-2-x86_64   822.3 KiB   402M/s 00:00 [#####################] 100%
 bsdtar-3.3.2-2-x86_64    865.8 KiB   423M/s 00:00 [#####################] 100%
 brotli-1.0.5-2-x86_64    287.5 KiB   281M/s 00:00 [#####################] 100%
 libsqlite-3.21.0-4-...   569.7 KiB   556M/s 00:00 [#####################] 100%
 heimdal-libs-7.5.0-...   736.6 KiB   360M/s 00:00 [#####################] 100%
 libunistring-0.9.10...   516.9 KiB   505M/s 00:00 [#####################] 100%
 libpcre-8.42-1-x86_64     99.8 KiB  97.5M/s 00:00 [#####################] 100%
 libidn2-2.0.5-1-x86_64    93.6 KiB  0.00B/s 00:00 [#####################] 100%
 libgpg-error-1.32-1...   153.3 KiB   150M/s 00:00 [#####################] 100%
 libgcrypt-1.8.3-2-x...   470.6 KiB   460M/s 00:00 [#####################] 100%
 glib2-2.54.3-1-x86_64   1861.0 KiB  2.30M/s 00:01 [#####################] 100%
 libcurl-7.60.0-3-x86_64  228.5 KiB   223M/s 00:00 [#####################] 100%
 curl-7.60.0-3-x86_64     751.0 KiB   733M/s 00:00 [#####################] 100%
 grep-3.1-1-x86_64        229.3 KiB   224M/s 00:00 [#####################] 100%
 dash-0.5.10.2-1-x86_64    86.4 KiB  0.00B/s 00:00 [#####################] 100%
 gawk-4.2.1-1-x86_64     1040.9 KiB  2.93M/s 00:00 [#####################] 100%
 libassuan-2.5.1-1-x...   100.1 KiB  0.00B/s 00:00 [#####################] 100%
 libgnutls-3.6.1-1-x...   994.9 KiB   486M/s 00:00 [#####################] 100%
 libksba-1.3.5-1-x86_64   117.0 KiB  0.00B/s 00:00 [#####################] 100%
 libnpth-1.5-1-x86_64      19.4 KiB  0.00B/s 00:00 [#####################] 100%
 nettle-3.4-1-x86_64       96.5 KiB  0.00B/s 00:00 [#####################] 100%
 pinentry-1.1.0-2-x86_64   58.8 KiB  0.00B/s 00:00 [#####################] 100%
 gnupg-2.2.9-1-x86_64    1926.2 KiB  2.38M/s 00:01 [#####################] 100%
 libarchive-3.3.2-2-...   820.1 KiB   400M/s 00:00 [#####################] 100%
 libgpgme-1.11.1-1-x...   319.1 KiB   312M/s 00:00 [#####################] 100%
 libpcre16-8.42-1-x86_64   96.5 KiB  94.2M/s 00:00 [#####################] 100%
 libpcre32-8.42-1-x86_64   90.9 KiB  88.8M/s 00:00 [#####################] 100%
 libpcrecpp-8.42-1-x...    26.8 KiB  0.00B/s 00:00 [#####################] 100%
 libpcreposix-8.42-1...    20.3 KiB  0.00B/s 00:00 [#####################] 100%
 m4-1.4.18-2-x86_64       218.4 KiB   213M/s 00:00 [#####################] 100%
 pcre-8.42-1-x86_64       594.5 KiB   581M/s 00:00 [#####################] 100%
 xz-5.2.4-1-x86_64        150.3 KiB   147M/s 00:00 [#####################] 100%
(40/40) checking keys in keyring                   [#####################] 100%
( 0/40) checking package integrity                 [---------------------]   0%
perdigao1 commented 6 years ago

I tried to reinstall msys (msys2-x86_64-20180531.exe) and, while displaying details, I noticed one error that could explain the problem


==> Appending keys from msys2.gpg...

==> Locally signing trusted keys in keyring...

  -> Locally signing key D55E7A6D7CE9BA1587C0ACACF40D263ECA25678A...

  -> Locally signing key 123D4D51A1793859C2BE916BBBE514E53E0D0813...

  -> Locally signing key B91BCF3303284BF90CC043CA9F418C233E652008...

  -> Locally signing key 9DD0D4217D75A33B896159E6DA7EF2ABAEEA755C...

==> Importing owner trust values...

==> Updating trust database...

gpgkeys: key C88B25443F0F088F68D38AF860B85C27C329AF96 not found on keyserver

Could this missing key be causing the failure to update/install packages in msys ?

valeriuo commented 5 years ago

@perdigao1 did you fix the issue? I am seeing the same behaviour with the 2018 release on a Win10 machine. Whatever package I try to install after the initial pacman -Syuu, it hangs at checking package integrity. I am also getting the missing key error.

valeriuo commented 5 years ago

The pacman subprocess that does the integrity checking busy waits on something, taking a whole core (25%). I ran it with --debug and --verbose and it didn't spit any errors. If you kill it by hand, the main process goes to checking the next package, by spawning a new subprocess that will hang as well. Do this for 40 times (kill it) and you'll get to the end of a successful installation.

perdigao1 commented 5 years ago

Hi, I have not managed to resolve this issue on the machine I wanted to install msys2. This machine is Windows 7, with active directory services. I was running with elevated rights but apparently there were still some issues. I managed to install on a surface 3 laptop (without Active Directory) with Windows 10 64bit. Perhaps there is an issue with msys2 that requires more than necessary admin rights. Am I correct saying that pacman runs (or requires to be run) as a service? I hope this is useful.

daddydrac commented 3 years ago

While its hung up, type in the capital Y and hit enter into the cmd line. That worked for me.