Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: Is this absurd, or have I not RTFM?

by morgon (Deacon)
on May 19, 2014 at 13:40 UTC ( #1086663=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Is this absurd, or have I not RTFM?
in thread Is this absurd, or have I not RTFM?

I've tried it with 5.18.1 on Debian testing and I got a run that looked like this:

2014/05/19-15:32:58 Server closing! ======= BEGIN DESTROY:16356======== ============ END DESTROY:16356======== ======= BEGIN DESTROY:16355======== ============ END DESTROY:16355======== ======= BEGIN DESTROY:16356======== ============ END DESTROY:16356========
So everything is balanced nicely but the destructor for 16366 ran twice.

Could it be that the parent forks, child exits parent forks again, second child gets the same pid than the previously exited child?

So that the identical pids actually refer to different processes? But afik pids simply increase before they wrap around so that should not be possible.


Comment on Re^4: Is this absurd, or have I not RTFM?
Download Code
Re^5: Is this absurd, or have I not RTFM?
by petermogensen (Sexton) on May 19, 2014 at 13:48 UTC

    I should maybe say that I have seen that happen too... It's not 100% certain that there's an "END" missing. But mostly it is. .. and that could well change with other versions of OS/Perl/Net::Server.

    The main problem is that DESTROY is called twice. Doing an strace of the process reveals that it's called twice in the same trace.

    Also... this can happen in both parent and child (though I've never seen it in more than one process at a time)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (14)
As of 2014-12-22 16:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (121 votes), past polls