[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [workaround] doxygen segfaults on kfreebsd-*, hppa, armel



tags 591648 +patch
--

On penktadienis 20 Rugpj˙˙tis 2010 10:59:55 Mathieu Malaterre wrote:
BTW, I am not even sure this would fix the symptoms. I tried a rebuild
of gdcm using DOT_NUM_THREADS = 1 in the doxygen configuration (which
I would hope would be the old behavior).
It did solve the symptoms on most platforms, except hppa:

https://buildd.debian.org/fetch.cgi?pkg=gdcm&arch=hppa&ver=2.0.16-2&stamp=1
282239282&file=log&as=raw

For the record, hppa problem might be a different one, i.e. that (in)famous
threads+fork() bug #561203 [1]. Symptoms are pretty similar: doxygen hung once
and segfault'ed next time when building soprano.

The behaviour is not the same as previously, but it can be changed by attached patch. Which is IMHO, the right thing to do now.

BTW, openvrml just failed in doxygen run on armel.

Petr
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -734,6 +734,8 @@
 
 //--------------------------------------------------------------------
 
+#define DIRECT_DOT_RUN 1
+
 DotManager *DotManager::m_theInstance = 0;
 
 DotManager *DotManager::instance()
@@ -750,6 +752,7 @@
   m_dotRuns.setAutoDelete(TRUE);
   m_dotMaps.setAutoDelete(TRUE);
   m_queue = new DotRunnerQueue;
+#ifndef DIRECT_DOT_RUN  
   int i;
   int numThreads = QMIN(32,Config_getInt("DOT_NUM_THREADS"));
   if (numThreads==0) numThreads = QMAX(1,QThread::idealThreadCount()+1);
@@ -767,6 +770,7 @@
     }
   }
   ASSERT(m_workers.count()>0);
+#endif  
 }
 
 DotManager::~DotManager()
@@ -834,11 +838,17 @@
   portable_sysTimerStart();
   // fill work queue with dot operations
   DotRunner *dr;
+  int prev=1;
   for (li.toFirst();(dr=li.current());++li)
   {
+#ifdef DIRECT_DOT_RUN  
+    msg("Running dot for graph %d/%d\n",prev,numDotRuns);
+    if(!dr->run()) return FALSE;
+    prev++;
+  };  
+#else  
     m_queue->enqueue(dr);
   }
-  int prev=1;
   // wait for the queue to become empty
   while ((i=m_queue->count())>0)
   {
@@ -865,6 +875,7 @@
   {
     m_workers.at(i)->wait();
   }
+#endif  
   portable_sysTimerStop();
   if (setPath)
   {

Reply to: