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!