Giter Club home page Giter Club logo

Comments (7)

fangfufu avatar fangfufu commented on June 14, 2024 1

Okay, I cannot reproduce the exact bug in 1.1.8, even after the trying to use your server. However, I can confirm that 1.1.8 hangs when there are multiple simultaneous I/O requests. I basically ran three instances of pv $VIDEO_FILENAME > /dev/null, 1.1.8 hangs after like 5 minutes. 1.1.9 works fine.

Previously in order to test my code, I mounted Debian CD image server, ran one instance of cat $ISO_FILENAME > /dev/null, it worked fine. So I thought my code worked fine.

I guess in future we need to come up with a more comprehensive testing regime.

from httpdirfs.

fangfufu avatar fangfufu commented on June 14, 2024

Could you give me access to that server and that MKV file, please? Could you also let me know which program you used to play that MKV file, please? Please feel free to send me an email at [email protected], if you don't fancy sending me anything in public.

I am going to investigate it later this evening.

from httpdirfs.

fangfufu avatar fangfufu commented on June 14, 2024

Okay, can you run it with -f, and give me the full log please? I can't reproduce it, but I have a good idea what might have caused it. The same file segment might have been requested twice by two different threads. Edit: The problem happens when a libcurl handle is added when a transfer task is already running! I had to dig into libcurl's source code to get what's going on! It is once again a multithreading problem!

@jcharaoui , could you reproduce this problem in the older version? I wonder why it didn't show up before.

from httpdirfs.

jcharaoui avatar jcharaoui commented on June 14, 2024

@fangfufu I'll send you a full log with -f ASAP. I'm positive this never happened with the current Debian version, 1.0.1. We'd have to bisect the repository to see which commit introduced the problem.

from httpdirfs.

fangfufu avatar fangfufu commented on June 14, 2024

I believe I have solved the problem in commit d6fbcb4.

If you look at the code in v1.0.1, curl handles would not have been added when transfers are happening, due to the mutexes.

httpdirfs/src/network.c

Lines 271 to 273 in 527cad6

pthread_mutex_lock(&transfer_lock);
CURLMcode res = curl_multi_add_handle(curl_multi, curl);
pthread_mutex_unlock(&transfer_lock);

I removed those mutexes, because I thought they weren't needed. They only occasionally show up, because it is one of those concurrency bug...

from httpdirfs.

fangfufu avatar fangfufu commented on June 14, 2024

Right, I am confident this is resolved. I have updated the changelog, Makefile, tagged a new version, and created a new release. Feel free to close the issue once you tested it out.

from httpdirfs.

fangfufu avatar fangfufu commented on June 14, 2024

This bug is definitely resolved.

from httpdirfs.

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.