[Mono-list] Shutting down finalizer thread timed out.

mlemay mlemay at adknowledge.com
Mon Jan 18 22:43:22 EST 2010

This is my second try sending this message.  It'd be nice to see an answer
added to a FAQ or something.  At least, it'd be nice to be told to RTFM :-)

Hello.  I have a mono application that runs every five minutes from cron on
an Ubuntu 9.04 machine.  It's running on an AWS m1.large machine, the exact
specs for which are difficult to ascertain.  My application scans a
directory for files, which it typically finds 100 at a time two or three
times an hour.  It fires up 10 threads which each read from separate files
and write to their own output files.  There are very minor contention issues
I have to deal with: 

+ I use a System.Collections.Generic.Queue to store the files in the main
thread, and each thread has to access that queue to get a file to process,
so I use lock () { } sections.

+ I fire up the threads before I start looking for files, and the thread
that looks for files continues to find files after the reader threads have
started processing files, so I have the reader threads block on a
System.Threading.Semaphore (i.e., with WaitOne ()) to wait for files to show
up in the queue.  The thread that finds files triggers the semaphore (i.e.,
with Release ()).

After the main thread finishes finding files, it joins each reader thread
with Thread.Join (), logs the amount of time it took to run, and leaves Main
() without fanfare.

I'm currently building the application in Debug for Any CPU in Developer
Studio 2008 pro.  Ultimately I will build for Release, of course, but this
is obviously an ongoing development project.

Periodically, I get the following error:

** (/opt/MVT/www/bin/mvt/ProcessFiles/ProcessFiles.exe:7482): WARNING **:
Shutting down finalizer thread timed out.

I have found a few references to the "Shutting down finalizer thread timed
out." message in google searches, but it always seems attached to some other
catastrophic error.  As far as I can tell, the application runs successfully
and all threads properly exit by the time this happens.  I can't seem to
identify any issue that correlates to this problem (e.g., a surge in files
that get processed, or my application needing to consume an unusual amount
of memory to run, etc.).

What does this warning actually mean, and can I safely ignore it?


View this message in context: http://old.nabble.com/Shutting-down-finalizer-thread-timed-out.-tp27026897p27026897.html
Sent from the Mono - General mailing list archive at Nabble.com.

More information about the Mono-list mailing list