<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DCE Threads problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/dce-threads-problem/m-p/2836892#M90384</link>
    <description>Hey, two VERY important things more:&lt;BR /&gt;&lt;BR /&gt;1. All threads SHARE the signal handlers. You cannot instal handler per thread, but per process. However handler is called for one specific thread that handles the signal (little messy, but that how it's designed).&lt;BR /&gt;&lt;BR /&gt;2. Signal is handled by only one thread, not all of them. It is not specified which thread will be chosen to handle the signal.&lt;BR /&gt;&lt;BR /&gt;Concluding - it goes like this:&lt;BR /&gt;&lt;BR /&gt;You register handler per process (only one function for each signal). When the signal comes, kernel gets the first thread that has that signal not blocked, and from this thread calls the handler that is registered for this signal. If its SIG_DFL it does defaults...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Adam&lt;BR /&gt;&lt;BR /&gt;P.S.: I'm affraid it's too late, as the case is marked as solved. :(&lt;BR /&gt;</description>
    <pubDate>Mon, 04 Nov 2002 19:21:30 GMT</pubDate>
    <dc:creator>Adam J Markiewicz</dc:creator>
    <dc:date>2002-11-04T19:21:30Z</dc:date>
    <item>
      <title>DCE Threads problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dce-threads-problem/m-p/2836889#M90381</link>
      <description>Basically I have a multithreaded process and each thread has a set of signal handers registered. When I catch a SIGTERM I want to do some garbage collection before I shutdown the process. In the process of cleaning up some of my objects the process core dumps and I get a core file and a cma_dump.log file.&lt;BR /&gt;&lt;BR /&gt;In the cma_dump.log file I get the following message at the top.&lt;BR /&gt;%Internal DCE Threads problem (version CMA BL10+), terminating execution.&lt;BR /&gt;% Reason: dispatch: no available VP (uniprocessor)&lt;BR /&gt;&lt;BR /&gt;Can some one point me in the right direction as to where to find info on the various DCE Thread problems or what kind of scenario would cause the error that I am getting.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Erich&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Oct 2002 15:34:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dce-threads-problem/m-p/2836889#M90381</guid>
      <dc:creator>Erich Hochmuth</dc:creator>
      <dc:date>2002-10-31T15:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: DCE Threads problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dce-threads-problem/m-p/2836890#M90382</link>
      <description>You've got to be careful handling signals in a multi-threaded program.  Basically, you should have one dedicated "sigwait" thread, as described in the sigwait(2) man page:&lt;BR /&gt;&lt;BR /&gt;    Threads Considerations&lt;BR /&gt;      The sigwait family of routines enable a thread to synchronously wait&lt;BR /&gt;      for signals.  This makes the sigwait routines ideal for handling&lt;BR /&gt;      signals in a multithreaded process.  The suggested method for signal&lt;BR /&gt;      handling in a multithreaded process is to have all threads block the&lt;BR /&gt;      signals of interest and dedicate one thread to call a sigwait function&lt;BR /&gt;      to wait for the signals.  When a signal causes a sigwait function to&lt;BR /&gt;      return, the code to handle the signal can be placed immediately after&lt;BR /&gt;      the return from the sigwait routine.  After the signal is handled, a&lt;BR /&gt;      sigwait function can again be called to wait for another signal.&lt;BR /&gt;&lt;BR /&gt;      In order to ensure that the dedicated thread handles the signal, it is&lt;BR /&gt;      essential that all threads, including the thread issuing the sigwait&lt;BR /&gt;      call, block the signals of interest.  Otherwise, the signal could be&lt;BR /&gt;      delivered to a thread other than the dedicated signal handling thread.&lt;BR /&gt;      This could result in the default action being carried out for the&lt;BR /&gt;      signal.  It is important that the thread issuing the sigwait call also&lt;BR /&gt;      block the signal.  This will prevent signals from carrying out the&lt;BR /&gt;      default signal action while the dedicated signal handling thread is&lt;BR /&gt;      between calls to a sigwait function.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 31 Oct 2002 16:09:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dce-threads-problem/m-p/2836890#M90382</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2002-10-31T16:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: DCE Threads problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dce-threads-problem/m-p/2836891#M90383</link>
      <description>Hi Erich,&lt;BR /&gt;&lt;BR /&gt;CMA threads are NOT kernel threads, and hence lack some kernel internal data structures (only available once for the process, i.e. shared by its threads). For that reason you have to use so-called "jacket-routines" to encapsulate many system-calls. But some features are simply not "jacketable", like receiving signals :-(&lt;BR /&gt;So like the previous reply already read, you should use exactly ONE thread to do ALL the signals handling (and the rest of your threads to IGNORE signals), or you'll have to switch to kernel-level threads (not available for HP-UX10.x!). But the semantics of those are different, so your software has to ported - simple re-compilation is NOT sufficient...&lt;BR /&gt;&lt;BR /&gt;FWIW,&lt;BR /&gt;Wodisch&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Oct 2002 16:36:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dce-threads-problem/m-p/2836891#M90383</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2002-10-31T16:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: DCE Threads problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dce-threads-problem/m-p/2836892#M90384</link>
      <description>Hey, two VERY important things more:&lt;BR /&gt;&lt;BR /&gt;1. All threads SHARE the signal handlers. You cannot instal handler per thread, but per process. However handler is called for one specific thread that handles the signal (little messy, but that how it's designed).&lt;BR /&gt;&lt;BR /&gt;2. Signal is handled by only one thread, not all of them. It is not specified which thread will be chosen to handle the signal.&lt;BR /&gt;&lt;BR /&gt;Concluding - it goes like this:&lt;BR /&gt;&lt;BR /&gt;You register handler per process (only one function for each signal). When the signal comes, kernel gets the first thread that has that signal not blocked, and from this thread calls the handler that is registered for this signal. If its SIG_DFL it does defaults...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Adam&lt;BR /&gt;&lt;BR /&gt;P.S.: I'm affraid it's too late, as the case is marked as solved. :(&lt;BR /&gt;</description>
      <pubDate>Mon, 04 Nov 2002 19:21:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dce-threads-problem/m-p/2836892#M90384</guid>
      <dc:creator>Adam J Markiewicz</dc:creator>
      <dc:date>2002-11-04T19:21:30Z</dc:date>
    </item>
  </channel>
</rss>

