Coder Social home page Coder Social logo

Behaviour in forked processes about davix HOT 7 CLOSED

cern-fts avatar cern-fts commented on July 25, 2024
Behaviour in forked processes

from davix.

Comments (7)

gbitzes avatar gbitzes commented on July 25, 2024

Indeed, I don't think davix has been designed with explicit support for forked processes, I'm not sure how easy it'll be to add it. In theory, if there isn't an active davix context at the point of forking, both parent and child should be able to use the library by creating a new context.

Yes, example code on how to reproduce the problem would be much appreciated.

from davix.

gganis avatar gganis commented on July 25, 2024

Thanks for the prompt reply.
Can you work with the ROOT master?

from davix.

gbitzes avatar gbitzes commented on July 25, 2024

Yes, just let me know the commit of ROOT you're working with and I'll compile it.

from davix.

gganis avatar gganis commented on July 25, 2024

Any commit since Friday afternoon (specifically any commit including c4712f03106c50c8fc1e789e7d21cae1434a22f3).
Under tutorials/multicore there is a new tutorial mp103_processSelector.C. To reproduce the problem uncomment the lines defining __reproduce_davix .
You can run the tutorial with
$ root -l -q tutorials/multicore/mp103_processSelector.C
If built with -Dtesting=ON, you can use
$ ctest -V -R mp103_processSelector

Let me know if you need any help.

from davix.

gbitzes avatar gbitzes commented on July 25, 2024

Hi, I'm running the example. Is this the message that indicates the error? I don't get any crashes.
Error in <TDavixFile::Init>: http://root.cern.ch/files/h1/dstarmb.root not a ROOT file

If I disable connection reuse in davix, the message goes away. It seems that the forked process is trying to re-use the old TCP connection of the parent. I'll see about installing some kind of fork handler, which clears the session cache.

from davix.

gganis avatar gganis commented on July 25, 2024

Hi,
Yes, that is the indication of the problem.
It does not crash any longer because I have added a protection and error handling.
The forked process get something unexpected when it establish a connection for a new file. I assume this is
because it re-uses improperly something from the parent.

Thanks for looking at it.

On 21 Sep 2016, at 11:09, Georgios Bitzes [email protected] wrote:

Hi, I'm running the example. Is this the message that indicates the error? I don't get any crashes.
Error in TDavixFile::Init: http://root.cern.ch/files/h1/dstarmb.root not a ROOT file

If I disable connection reuse in davix, the message goes away. It seems that the forked process is trying to re-use the old TCP connection of the parent. I'll see about installing some kind of fork handler, which clears the session cache.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #15 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ABp52uEa4Rt4aW7botEetc-yWVzitSbvks5qsPQugaJpZM4J-9LT.

from davix.

gbitzes avatar gbitzes commented on July 25, 2024

The solution I implemented is to keep track of all allocated davix contexts, and after a fork go through all of them in the child process and clear their session caches.

Seems to work, the error message is gone. I'm not sure how fork-safe davix is now, certainly not if a transfer is currently taking place, but this specific case seems fine. Feel free to give it a try, you can get the latest development version from our unstable repos.

Thanks for the report! The fix will land in davix 0.6.5.

from davix.

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.