• Pamac db lock issues...


    Yeah I’ve got no idea on this one. The pacman db.lck file appears to be not removed after a reboot now (which I’m assuming is created during a session startup.) Issue:

    $ sudo pacman -Syu
    :: Synchronizing package databases...
    error: failed to update antergos (unable to lock database)
    error: failed to update core (unable to lock database)
    error: failed to update extra (unable to lock database)
    error: failed to update community (unable to lock database)
    error: failed to update multilib (unable to lock database)
    error: failed to synchronize any databases
    error: failed to init transaction (unable to lock database)
    error: could not lock database: File exists
    if you're sure a package manager is not already
    running, you can remove /var/lib/pacman/db.lck
    

    In order to update I have to do:
    sudo rm /var/lib/pacman/db.lck
    …pamac does some stuff in the background, I wait a minute for network activity to calm down, and then do another manual terminal pacman update – which then works.

    This all happened after the new pamac update a couple days ago. They changed some code in how the db.lck file gets removed that may/may not be related to my issue.

    Not sure what to do now. I can live without pamac if it’s ultimately causing the issue but I’d like to get to the bottom of this.

  • dangit bobby…

    kernel: pamac-updater[x]: segfault at 0 ip [x] sp [x] error 4 in libgio-2.0.so.0.5200.1[x+x]
    
  • @d_K Hi i experienced this problem using a VM once, didn’t dig deep enough to help you with that.

    I noticed though that when i get the errors using pacman under terminal the problem was gone after opening pamac. To me seemed that i tried to use terminal right after login, while pamac was loading system tray and etc, so i guessed there was some conflict with both using pacman at same time.

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • I saw one other report in irc about pamac failing to open in KDE, although that guy didn’t come back to say if it was successful after a reboot. Pamac failing to open would be consistent with a hanging daemon (speculation) and a subsequent lock file never closing. The option to only show the icon when updates are available seems to be broken for me as checking that box multiple times doesn’t remove the pamac icon in my xfce panel.

    That segfault I posted resulted in right-clicking the icon and selecting “update manager.” Selecting “package manager” said pamac was already open, lol. Although now it’s working again.

  • @d_K said in Pamac db lock issues...:

    I saw one other report in irc about pamac failing to open in KDE

    i experienced under MATE DE…

    The option to only show the icon when updates are available seems to be broken for me

    I never tested that option, i just ignore the update pop up, and update the system once a week, ignoring the updates warning and the “red colored” pamac system tray.

    That segfault I posted…

    I don’t remember having that error, just your first one using pacman -Syu…

    Although now it’s working again.

    At least a happy endind. Hopping some day we’ll know exactly why that happen sometimes…

    Cheers!

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @fernandomaroto said in Pamac db lock issues...:

    At least a happy endind.

    Until the next boot perhaps?

  • unable to lock database

    since years and years it is allways the same question… ;)

    if you’re sure a package manager is not already
    running, you can remove /var/lib/pacman/db.lck

    There is no BUG it is caus of a reason…

    “If you are getting leftover db.lck files on a regular basis something is very wrong. pacman should only be leaving a db.lck file behind if it is being killed in a way that prevents it from cleaning up. In that case, your db may be in an inconsistent state and just blindly deleting the file is the wrong thing to do. pamac appears to use libalpm, if it is leaving behind lock files, that is its problem.”

    database is locked for security reason, because if another update is running at the same time it will be a killer for package management.

    May it was pamac try to get updates while you are rebooting or poweroff or loosing Internet connection or you just try to install a AUR PKGBUILD package with yaourt? and before exit the terminal without ending the installation inside?..may you have another extention that checks for updates? like showup thouse with conky e.t.c. pamac-tray pamac-service pacaur gnome-software-center ??

    So the most secure way of handling this is to lock the db and force the user to check if there was some other process using pacman.

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    http://kamprad.net/howto-installing-antergos/
    https://forum.antergos.com/topic/1883/how-to-include-system-logs-when-asking-for-help

  • @joekamprad
    Just to add a last information with my experience some time ago:

    I had a fresh installed system in VM, after i saw the error i rebooted, and enter in command line with Ctrl+Alt+F2 (didn’t make a X login).

    Even so sudo pacman -Syu got that errors. I even opened a post at that time, but since it was a VM i just moved forward.

    So it wasn’t something i installed or messed with the system, that just happened after a fresh installed Antergos.

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • Rebooted this morning and this time it worked without manual intervention. No idea what changed since then – we did get a few updates yesterday. Still experiencing weird issues though:

    1. the checkbox to hide the pamac tray icon still doesn’t do anything.
    2. pamac-updater randomly hangs without a gui. Might be related to issue #1. It prevents pamac itself from opening (lol.) To solve it, open the updater again, see the same segfault, and then open it again – which then works fine.

    I’ll see you again on next boot.

  • @d_K said in Pamac db lock issues...:

    the checkbox to hide the pamac tray icon still doesn’t do anything.

    Ok I take that back, this is working after the first segfault and while in pamac-updater, not pamac-manager.

    edit: I believe I know when pamac-updater decides when to hang. While in the app, authenticate to change settings, exit, the gui closes but pamac-updater hangs (versus not authenticating and exiting normally.)

    Lots-o-quirks.

  • Hello,
    I was browsing on the net rn because I have the same problem here, I could provide logs if asked idk, also pacman works back after i delete /var/lib/pacman/db.lck but after a reboot the problem persist.
    I wonder if deleting some .conf file would help IF there is a .conf file to delete i this case

  • Yeah I can’t be bothered with this broken package any longer.

    sudo pacman -R pamac
    

    Rest in pepperoni’s. I’m marking this thread as ‘solved’:slight_smile:

  • @d_K the thing is that it might not be pamac, iirc the other day there’s been a pacman update

  • @NicoNex said in Pamac db lock issues...:

    @d_K the thing is that it might not be pamac, iirc the other day there’s been a pacman update

    Nope, no more problems with hanging lock files after a reboot.:slight_smile:

  • @d_K I’m not sure, but maybe if add some delay to pamac could solve the problem, i guess it’s possible that pamac is waiting for something to be loaded and get stuck at boot…
    Who knows, i’m too lazy to test it. :p

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • I was using pamac, pacman itself and yaourt, regulary… i do not have a locked db since last 6 month… ;)

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    http://kamprad.net/howto-installing-antergos/
    https://forum.antergos.com/topic/1883/how-to-include-system-logs-when-asking-for-help

  • im suffering with this too, a locked pamac in every reboot.

    Antergos Gnome - Lenovo G4070
    Antergos XFCE (Ex-Mate) - Dell D630
    Antergos Cinnamon - Asus E-11
    Puppy Linux Precise 5.7.1 - Asus 701 EEEpc
    Puppy Linux Lxpuptahr USB live - All machines

  • @Caiosama205 said in Pamac db lock issues...:

    im suffering with this too, a locked pamac in every reboot.

    This thread is solved. If you’re having issues with pamac, I suggest putting in a bug report. Or, uninstall pamac:slight_smile:

  • i am facing the same pamac problem with latest pamac update. i dont know whether its due to pamac or pamac tray indicator.

    after pc boot i waited patiently for half an hour to see if any update will come but it didnt come in system tray.
    then i try to update manually by clicking on pamac tray but it says " waiting for another package manager to quit. "
    if i reboot my pc then no problem then system update appears.

    this issue happens on every alternate reboot.

    guys pls fix this.

  • I find this:

    cat /etc/NetworkManager/dispatcher.d/99_update_pamac_tray
    #!/bin/sh
    
    INTERFACE=$1 # The interface which is brought up or down
    STATUS=$2 # The new state of the interface
    
    case "$STATUS" in
        'up') # $INTERFACE is up
          [[ -e /usr/bin/mhwd-live ]] && sleep 30
          /usr/bin/pamac-refresh
        ;;
    esac
    
    

    But this /usr/bin/mhwd-live is not aviable here because it is a manjaro skript …
    It starts /usr/bin/pamac-refresh if network is changing status to “up” pamac is doing also automaticly a refresh every 6 hours… if this two come together db will be locked…

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    http://kamprad.net/howto-installing-antergos/
    https://forum.antergos.com/topic/1883/how-to-include-system-logs-when-asking-for-help

pamac37 lock17 issues40 Posts 24Views 1924
Log in to reply