Giter Site home page Giter Site logo

Comments (35)

aignas avatar aignas commented on May 18, 2024 1

Just wanted to add that I can see the same whilst using 6.5.5 on an updated Arch Linux. Are there any thoughts as of why is this happening?

from offlineimap.

mlen avatar mlen commented on May 18, 2024 1

You should try to set socktimeout in general section of your offlineimaprc. It sets timeout on select call, so the process will terminate when no data is recieved within the timeout. Solved the problem for me.

from offlineimap.

rcorre avatar rcorre commented on May 18, 2024 1

I use socktimeout = 10

from offlineimap.

dolohow avatar dolohow commented on May 18, 2024 1

from offlineimap.

pwnage101 avatar pwnage101 commented on May 18, 2024 1

I said earlier:

If i wait another couple of seconds after CTRL-C, the lockfiles disappear and I can re-run notmuch.

I should clarify that sometimes if i resume from suspend, offlineimap will hang forever. Of course I can kill it manually with SIGKILL or SIGQUIT.

from offlineimap.

konvpalto avatar konvpalto commented on May 18, 2024

Which version of OfflineIMAP you're using? Which OS?

from offlineimap.

quite avatar quite commented on May 18, 2024

offlineimap 6.5.4 on an updated Arch Linux, which means basically latest vanilla versions of everything

from offlineimap.

quite avatar quite commented on May 18, 2024

What typically happens after resume and upon sending offlineimap the SIGUSR2:

Terminating after this sync...
[seems to hang forever, i press ^C]
Terminating NOW (this may take a few seconds)...
[hung again....]

from offlineimap.

Gonzih avatar Gonzih commented on May 18, 2024

Same here. Offlineimap 6.5.3 on OpenSUSE. I use timeout to fix that and kill offlineimap if timeout returns non zero. Never had issues with broken repo because of that (happily).

from offlineimap.

quite avatar quite commented on May 18, 2024

How do you use timeout(1) for that? Are you running offlineimap -o (run-once mode)?

from offlineimap.

Gonzih avatar Gonzih commented on May 18, 2024

No, just calling offlineimap by cron.

On Tue, Feb 11, 2014 at 03:55:07AM -0800, Daniel wrote:

How do you use timeout(1) for that? Are you running offlineimap -o (run-once mode)?


Reply to this email directly or view it on GitHub:
#56 (comment)

Best regards,
Max

from offlineimap.

doy avatar doy commented on May 18, 2024

I'm seeing this issue too (6.5.5 on Arch Linux).

from offlineimap.

rcorre avatar rcorre commented on May 18, 2024

Same here, 6.5.5 on Arch Linux. Not using cron, just running offlineimap -o.

from offlineimap.

treese avatar treese commented on May 18, 2024

I am seeing a similar problem on a Macbook Air running Mac OS X 10.9.2 (Mavericks). No cron, just using offlineimap.

from offlineimap.

christopherraa avatar christopherraa commented on May 18, 2024

Same here. Offlineimap 6.5.4, Python: 2.7.5, Debian Wheezy (Ubuntu)

from offlineimap.

rcorre avatar rcorre commented on May 18, 2024

Thanks @mlen -- setting socktimeout in the [general] section seems to work.

from offlineimap.

doy avatar doy commented on May 18, 2024

This workaround helps, but I'm still getting occasional hangs even with the socktimeout option set.

from offlineimap.

jbmartin avatar jbmartin commented on May 18, 2024

@mlen's suggestion worked for me, thanks.

from offlineimap.

tgy avatar tgy commented on May 18, 2024

what value of socktimeout did you use?

from offlineimap.

tgy avatar tgy commented on May 18, 2024

@murphyslaw480 thanks 👍

from offlineimap.

nicolas33 avatar nicolas33 commented on May 18, 2024

Requires to be documented in known issues.

from offlineimap.

nicolas33 avatar nicolas33 commented on May 18, 2024

Done in cd962d4.

from offlineimap.

doy avatar doy commented on May 18, 2024

As I mentioned, setting socktimeout doesn't actually fix the problem - it makes it less frequent, but it still happens to me all the time even with this set. I don't think this is a sufficient fix.

from offlineimap.

nicolas33 avatar nicolas33 commented on May 18, 2024

Ok. I know current behaviour sucks. Sadly, it's hard to handle this properly so don't expect this to be fixed soon.

from offlineimap.

ezyang avatar ezyang commented on May 18, 2024

There are two things I would suggest here:

  1. If the first C-c attempts a graceful exit, the second C-c should hard exit.
  2. I'm pretty sure the remaining hanging is from the timeout not being applied to all blocking calls. This is something an audit should be able to catch.

from offlineimap.

nicolas33 avatar nicolas33 commented on May 18, 2024

Hi Edward,

  1. Yes, I've already suggested to handle the second Ctrl-c as hard exit.
  2. On resume the timeout might require to wait until the local time is adjusted. Or wait until the timeout is hit. BTW, the broken socket should be better handled.
    I'm planning a deep refactoring and such issues should be made easier to fix. You might be interested in following the coming changes.

from offlineimap.

dolohow avatar dolohow commented on May 18, 2024

Still happening on 6.6.1

from offlineimap.

nicolas33 avatar nicolas33 commented on May 18, 2024

Fix to force OfflineIMAP to stop with consecutives ctrl+c was merged some days ago. Will be in the next release (6.7.0-rc2).
AFAIK, nobody worked on proper resume at wakeup.

from offlineimap.

tgy avatar tgy commented on May 18, 2024

I'm also interested in someone fixing this. I have the same issue. 😅

(I have offlineimap running as a systemd user service under Arch Linux)

from offlineimap.

nicolas33 avatar nicolas33 commented on May 18, 2024
  • Naive but still effective approach would be to introduce print statements to find a blocker.
  • A more advanced way can be to try strace while this can be tricky to map the output to lines of code.
  • Python includes debugging tools that could be usefull. Most appealing for the purpose might worth a try.
  • Team working can greatly help. Do share your analysis, success and failures.

Bear in mind there might be more than one blocker.

from offlineimap.

pwnage101 avatar pwnage101 commented on May 18, 2024

Assuming this will be difficult to debug, can we at least implement a SIG{INT,TERM} handler which deletes the lockfile? I currently have to delete .offlineimap/*.lock files every time I resume from suspend because when offlineimap freezes it leaves the lockfiles hanging around.

from offlineimap.

nicolas33 avatar nicolas33 commented on May 18, 2024

Assuming this will be difficult to debug, can we at least implement a SIG{INT,TERM} handler which deletes the lockfile? I currently have to delete .offlineimap/*.lock files every time I resume from suspend because when offlineimap freezes it leaves the lockfiles hanging around.

Please, try v6.7.0 or later.

from offlineimap.

pwnage101 avatar pwnage101 commented on May 18, 2024

Ah, since I run offlineimap as a notmuch hook, when I hit CTRL-C offlineimap was getting reparented to init, returning me to the shell but without actually killing the sync threads. If i wait another couple of seconds after CTRL-C, the lockfiles disappear and I can re-run notmuch.

By the way, I am running v6.7.0, but I was wrongly blaming offlineimap for something that seems to be an issue with notmuch or my configuration.

from offlineimap.

nicolas33 avatar nicolas33 commented on May 18, 2024

@pwnage101 You might like to try SIGQUIT. Unix signals handling is explained in the manual.

from offlineimap.

sim590 avatar sim590 commented on May 18, 2024

While the popular reaction to this problem seems to be to restart offlineimap, I might point out that restarting offlineimap might not be ideal. For instance, if you have your passwords being retrieved by a subprocess using gpg-agent, each time the connectivity issue occurs, gpg-agent will ask for your password which can appear weird at first while you're not aware this is related to offlineimap restarting in the background and also annoying if it happens alot. Therefor, I'm really looking forward to a solution.

from offlineimap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.