Update of z-push-common hanging



  • I start the update from the repositories and all works fine until i reach the z-push-common package. This part now hangs since more than 1 hour with:

    Validating and fixing states (this can take some time):
    Checking username casings: Processed: 141 - Converted: 0 - Removed: 0
    Checking available devicedata & user linking: Processed: 141 - Fixed: 0
    Checking for unreferenced (obsolete) state files:

    “can take some time” means how many hours? because since i start the update no clients can connect and syncronise their accounts.

    regards
    juergen


  • Kopano

    Which version are you updating from?
    Have you run “z-push-admin -a fixstates” before? How big is your z-push states directory?

    This usually runs a few seconds at most. It should not take long for 141 devices, but it could be that you have a lot of obsolete old state files lying around…

    It should be fine to stop the execution of this script.

    We have tickets in 2.3.6 to disable the automatic checking on upgrade.

    Cheers,
    Sebastian


  • Kopano

    Hello @Juergen ,

    I have moved your post into a new thread, since it was not related to the 8.2.1 release.

    The “can take some time” usually really means a few seconds and a minute or two on large system (which is not really the case for 141 devices). I suggest you terminate the “z-push-admin -a fixstate” process. You should probably be able to find the reason for the hangup in the z-push logs.


  • Translator

    it is happening to me today. Upgrading to the latest version just released.

    Debian 8. Not that many users at all.

    PHP shows 100% CPU utilization, and the z-push upgrade is still running with the message “Checking for unreferenced (obsolete) state files:” displayed


  • Translator

    it completed now. it took about 20 minutes.


  • Kopano

    Wow, that’s a lot of time for about 140 devices. I would expect that to finish in a few seconds at most.

    As I said in the other thread, could you do a du -sh on your state directory?
    Did you do other z-push updates in the meantime? Did it take that long as well?

    Could you execute z-push-admin -a fixstates? It should take the same amount of time.


  • Translator

    no no… it isn’t 140 states, it’s a lot less.

    anyway du -sh shows 14M

    I have ran now:

    z-push-admin -a fixstates

    ran now and it took zero seconds…

    Output is:

    Checking flags of shared folders: Devices: 73 - Devices with additional folders: 0 - Fixed 0


  • Kopano

    This is then even weirder, because dpkg runs the same command in postinst. It’s exactly the same thing.

    Were there messages that stuff was fixed or (obsolete) states deleted? This would be the only explanation, that there was so much stuff to fix so it took longer. The second time everything is OK and it’s fast as expected.
    But even in this scenario, I can’t imagine what the script would be doing for 20 minutes…