in reply to shared scalar freed early

Unfortunately I cannot post the script.

There is simply not enough information here to even begin to diagnose the problem. It's equivalent to going to the garage because your car is overheating and presenting them with two instantaneous temp. gauge readings, and no car.


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". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: shared scalar freed early
by chris212 (Scribe) on Feb 22, 2017 at 18:13 UTC
    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?

      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!