Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Perl seg fault while joining threads

by sundialsvc4 (Abbot)
on Jul 07, 2015 at 22:54 UTC ( #1133654=note: print w/replies, xml ) Need Help??

in reply to Perl seg fault while joining threads

I wonder idly if Perl’s “copy-on-write” (COW) behavior could possibly be a factor here.   Perl would copy data-structures related to RabbitMQ into each child, even though the children weren’t the threads that had actually initialized it.   Therefore, if Rabbit has any sort of “destructor” subroutine, that destructor would see the initialized data-structures and of course try to clean it up.   I can see that there could be trouble brewing in that case ... closing library handles multiple times, closing (library) resources that this thread never allocated, and so on.   Even if Perl didn’t “double-free” anything, a library certainly could . . .

BrowserUK, you’ve had plenty of experience with both Perl threads and libraries.   In your experience, does this Perl-specific COW behavior typically cause grief in cases like this one?   (And, BTW, I mean that as a serious, face-value question, addressed to an expert in such things.)

  • Comment on Re: Perl seg fault while joining threads

Replies are listed 'Best First'.
Re^2: Perl seg fault while joining threads
by kamrul (Acolyte) on Jul 08, 2015 at 16:14 UTC
    Can locking be a solution ?
      Can locking be a solution ?


      But then, nothing in the post to which you've replied makes any sense. It is pure speculation by a totally discredited monk who as far as we can tell has never written a single line of working Perl code, much less anything that uses threads.

      He picks up terms like blotting paper and regurgitates them in interesting combinations much like the waffle generator. Except, he's old school; and does it all manually with his own artistic flair.

      On a more to the point note: If you were to post a more complete description of your problem (including the code, or a reference where I can view it if it is big), I might be able to offer you a solution to your problems.

      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
      I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1133654]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2019-12-16 08:13 GMT
Find Nodes?
    Voting Booth?

    No recent polls found