Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: shared scalar freed early

by chris212 (Scribe)
on Feb 22, 2017 at 18:13 UTC ( [id://1182544]=note: print w/replies, xml ) Need Help??


in reply to Re: shared scalar freed early
in thread shared scalar freed early

I guess I was hoping someone might be familiar with a known defect causing the "overheating" or might point me in the direction for troubleshooting it (like check oil and coolant). I've been trying to find out what I can about it. A variable will not be freed unless the refcount reaches zero? So why would Perl decrement the refcount for a shared scalar in a threaded script too many times? Perl is doing something it shouldn't, right?

Replies are listed 'Best First'.
Re^3: shared scalar freed early
by BrowserUk (Patriarch) on Feb 22, 2017 at 18:28 UTC

    My best guess based on the scant information is that your main thread is ending without properly waiting for your other threads to be cleaned up. But it is nothing but a guess.

      All the threads are joined. There are no active threads. No threads are detached. This code after the final join and before line 884 does not print anything:

      foreach my $th(threads->list()) { print $th->tid()."\n"; }

      I will ask this afternoon about sharing the code. This is urgent enough that I might get approval. Thanks for the help!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-19 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found