Feh / nocache

minimize caching effects
BSD 2-Clause "Simplified" License
554 stars 53 forks source link

undesired side effects on git #30

Closed andreygursky closed 8 years ago

andreygursky commented 8 years ago

Hi,

trying following:

git clone https://github.com/Feh/nocache.git
cd nocache
nocache git pull

gives:

error: git-remote-https died of signal 11
Already up-to-date.

Replacing the clone url "https://" by "git://" makes the error to disappear. Any clue how nocache causes this?

Feh commented 8 years ago

Hi, to clarify, I can reproduce that issue on a recent Debian (with make && ./nocache git pull). I’ll take a look.

Feh commented 8 years ago

The segfault appears to happen only occasionally and in different parts (i.e. different forked commands from git pull crash). Currently I suspect a race condition between the library destructor and the program’s exit routines (I’ve verified the crashes go away by deleting the destroy() function contents). The way the mutex protects the fds[] data structure is … let’s say brittle, and not a good choice. I’m thinking about completely rewriting that part of the code.

Feh commented 8 years ago

I think my inkling was right. I revamped the way in which locks are handled, and can’t reproduce the issue any more. Could you check out the commit in branch hierarchial_lock_structure and see if it fixes the issue on your end, too? Thanks.

grawity commented 8 years ago

1f4c9ea4f2874682ec40163d6edb69e482204391 seems to fix crashes in both git-annex and gnutls-cli.

andreygursky commented 8 years ago

@Feh, thanks, git seems to work without the error now.

Feh commented 8 years ago

Thank you both for reporting this and the prompt feedback! I’ve merged the fix to the master branch and tagged it as a new version.