<?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: child process hangs on pthread_mutex_lock in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702725#M659430</link>
    <description>&amp;gt;I meant the libc patch version: how can I understand this?&lt;BR /&gt;&lt;BR /&gt;Your current version can be found with:&lt;BR /&gt;swlist -l file | fgrep /usr/lib/hpux32/libc.so.1&lt;BR /&gt;  OS-Core.CORE2-SHLIBS: /usr/lib/hpux32/libc.so.1&lt;BR /&gt;  PHCO_39526.CORE2-SHLIBS: /usr/lib/hpux32/libc.so.1&lt;BR /&gt;&lt;BR /&gt;This says I have PHCO_39526 installed.</description>
    <pubDate>Wed, 27 Oct 2010 10:47:36 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2010-10-27T10:47:36Z</dc:date>
    <item>
      <title>child process hangs on pthread_mutex_lock</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702714#M659419</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have a C multi-thread process that periodically forks.&lt;BR /&gt;&lt;BR /&gt;Sometimes child process hangs and WDB output says:&lt;BR /&gt;&lt;BR /&gt;c32dabd0 in __ksleep+0x10 () from /usr/lib/libc.2&lt;BR /&gt;#1  0xc3b002a4 in __sleep_1x1+0x610 () from /usr/lib/libpthread.1&lt;BR /&gt;#2  0xc3af8f98 in __mxn_sleep+0xdd8 () from /usr/lib/libpthread.1&lt;BR /&gt;#3  0xc3ac501c in &lt;UNKNOWN_PROCEDURE&gt; + 0x3800 () from /usr/lib/libpthread.1&lt;BR /&gt;#4  0xc3ac59b0 in pthread_mutex_lock+0xd0 () from /usr/lib/libpthread.1&lt;BR /&gt;#5  0xc3211540 in __thread_mutex_lock+0x70 () from /usr/lib/libc.2&lt;BR /&gt;#6  0xc32164f0 in printf+0x118 () from /usr/lib/libc.2&lt;BR /&gt;#7  0x156c0 in Print (TrcLevel=4, LineNum=748, Format=0x241a8 "CHILD PROCESS - ExecAction - CloseSock_3(%d)") at CommFunc.c:1015&lt;BR /&gt;#8  0x8f50 in ExecAction (action=0x40016064, loc_phase=0x40001820 "-p") at HAReplicationManager.c:748&lt;BR /&gt;#9  0x74b0 in main (arc=1, argv=0x64101000) at HAReplicationManager.c:506&lt;BR /&gt;&lt;BR /&gt;The routine is:&lt;BR /&gt;&lt;BR /&gt;void Print (int TrcLevel, int LineNum, const char * Format, ...)&lt;BR /&gt;{&lt;BR /&gt;  char loc_buff [BF];&lt;BR /&gt;  va_list UnNamedParams;&lt;BR /&gt;&lt;BR /&gt;  va_start (UnNamedParams, Format);&lt;BR /&gt;&lt;BR /&gt;  if (trc_level &amp;gt;= TrcLevel)&lt;BR /&gt;  {&lt;BR /&gt;    sprintf (loc_buff, "%d %05d %s %d - ", mypid, LineNum, print_date(), trc_level);&lt;BR /&gt;    vsprintf (loc_buff + (strlen (loc_buff)), Format, UnNamedParams);&lt;BR /&gt;    printf ("%s\n", loc_buff);&lt;BR /&gt;    fflush (NULL);&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;  va_end (UnNamedParams);&lt;BR /&gt;&lt;BR /&gt;  return;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;and line 1015 is:&lt;BR /&gt;&lt;BR /&gt;printf ("%s\n", loc_buff);&lt;BR /&gt;&lt;BR /&gt;Now I have checked all points in which I use pthread_mutex_lock but I cannot find any relation with the above line.&lt;BR /&gt;&lt;BR /&gt;A further info: "mypid" and "trc_level" are  variables defined in father process.&lt;BR /&gt;&lt;BR /&gt;Finally, fork env managed through:&lt;BR /&gt;pthread_atfork_err = pthread_atfork(prepare, parent, child);&lt;BR /&gt;&lt;BR /&gt;In which direction can I proceed to investigate?&lt;BR /&gt;&lt;BR /&gt;Many thanks&lt;BR /&gt;&lt;BR /&gt;Giuseppe&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/UNKNOWN_PROCEDURE&gt;</description>
      <pubDate>Thu, 21 Oct 2010 09:46:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702714#M659419</guid>
      <dc:creator>Fedele Giuseppe</dc:creator>
      <dc:date>2010-10-21T09:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: child process hangs on pthread_mutex_lock</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702715#M659420</link>
      <description>Hi Giuseppe:&lt;BR /&gt;&lt;BR /&gt;In the manpages for 'thread_safety(5)' it is noted that "Cancellation Points can occur when a thread is executing in the following interfaces...vprintf()..."&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 21 Oct 2010 11:59:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702715#M659420</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-10-21T11:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: child process hangs on pthread_mutex_lock</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702716#M659421</link>
      <description>&amp;gt;I have a C multi-thread process that periodically forks.&lt;BR /&gt;&lt;BR /&gt;In general, you don't want to do this.  What do you do after the fork, exec?&lt;BR /&gt;&lt;BR /&gt;To do this properly, this requires you do create atfork handlers for every resource you lock.  So when you fork, these get unlocked in the child.  Otherwise the child will think a non-existent thread still has the mutex/resource locked.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;The routine is:&lt;BR /&gt;void Print(int TrcLevel, int LineNum, const char * Format, ...)&lt;BR /&gt;&lt;BR /&gt;Your problem is with the libc mutex.&lt;BR /&gt;Do you have any other threads active in the child?&lt;BR /&gt;If not, this seems like a libc bug, what HP-UX version are you using?  Do you have the latest libc patches?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;fork env managed through:&lt;BR /&gt;pthread_atfork_err = pthread_atfork(prepare, parent, child);&lt;BR /&gt;&lt;BR /&gt;Ok, it seems you know about pthread_atfork.</description>
      <pubDate>Fri, 22 Oct 2010 03:55:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702716#M659421</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-10-22T03:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: child process hangs on pthread_mutex_lock</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702717#M659422</link>
      <description>Hi the OS is HP-UX B.11.31 on a itanium server.&lt;BR /&gt;&lt;BR /&gt;Giuseppe&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Oct 2010 06:39:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702717#M659422</guid>
      <dc:creator>Fedele Giuseppe</dc:creator>
      <dc:date>2010-10-22T06:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: child process hangs on pthread_mutex_lock</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702718#M659423</link>
      <description>&amp;gt;the OS is HP-UX B.11.31&lt;BR /&gt;&lt;BR /&gt;Do you have the latest libc patch PHCO_40292, installed?&lt;BR /&gt;If so, time to talk to the Response Center.</description>
      <pubDate>Fri, 22 Oct 2010 08:30:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702718#M659423</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-10-22T08:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: child process hangs on pthread_mutex_lock</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702719#M659424</link>
      <description>The PHCO_40292 patch is NOT present.</description>
      <pubDate>Fri, 22 Oct 2010 09:12:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702719#M659424</guid>
      <dc:creator>Fedele Giuseppe</dc:creator>
      <dc:date>2010-10-22T09:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: child process hangs on pthread_mutex_lock</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702720#M659425</link>
      <description>Doet this patch fix this problem or similar issues?&lt;BR /&gt;&lt;BR /&gt;When can I get its delivery notes doc?&lt;BR /&gt;&lt;BR /&gt;Giuseppe</description>
      <pubDate>Mon, 25 Oct 2010 07:46:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702720#M659425</guid>
      <dc:creator>Fedele Giuseppe</dc:creator>
      <dc:date>2010-10-25T07:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: child process hangs on pthread_mutex_lock</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702721#M659426</link>
      <description>&amp;gt;Does this patch fix this problem or similar issues?&lt;BR /&gt;&lt;BR /&gt;I just mentioned it because it is the latest.  What libc patch do you have?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;When can I get its delivery notes doc?&lt;BR /&gt;&lt;BR /&gt;The same place you get the patch.</description>
      <pubDate>Mon, 25 Oct 2010 08:14:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702721#M659426</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-10-25T08:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: child process hangs on pthread_mutex_lock</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702722#M659427</link>
      <description>How can I get such info?&lt;BR /&gt;&lt;BR /&gt;Giuseppe</description>
      <pubDate>Tue, 26 Oct 2010 14:47:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702722#M659427</guid>
      <dc:creator>Fedele Giuseppe</dc:creator>
      <dc:date>2010-10-26T14:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: child process hangs on pthread_mutex_lock</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702723#M659428</link>
      <description>Hi Giuseppe:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; When can I get its delivery notes doc?&lt;BR /&gt;&lt;BR /&gt;If you mean more information about the patch Dennis suggested (PHCO_40292) then you can see the patch notes with the patch:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www11.itrc.hp.com/service/patch/patchDetail.do?patchid=PHCO_40292&amp;amp;sel={hpux:11.31,}&amp;amp;BC=main" target="_blank"&gt;http://www11.itrc.hp.com/service/patch/patchDetail.do?patchid=PHCO_40292&amp;amp;sel={hpux:11.31,}&amp;amp;BC=main&lt;/A&gt;|pdb|search|&lt;BR /&gt;&lt;BR /&gt;You can do this by going to the ITRC Patch Database and choosing "find a specific patch" with PHCO_40292 as the argument.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 26 Oct 2010 15:48:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702723#M659428</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-10-26T15:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: child process hangs on pthread_mutex_lock</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702724#M659429</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I meant the libc patch version: how can I understand this?&lt;BR /&gt;&lt;BR /&gt;In any case thanks for the info.&lt;BR /&gt;&lt;BR /&gt;Giuseppe&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Oct 2010 10:01:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702724#M659429</guid>
      <dc:creator>Fedele Giuseppe</dc:creator>
      <dc:date>2010-10-27T10:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: child process hangs on pthread_mutex_lock</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702725#M659430</link>
      <description>&amp;gt;I meant the libc patch version: how can I understand this?&lt;BR /&gt;&lt;BR /&gt;Your current version can be found with:&lt;BR /&gt;swlist -l file | fgrep /usr/lib/hpux32/libc.so.1&lt;BR /&gt;  OS-Core.CORE2-SHLIBS: /usr/lib/hpux32/libc.so.1&lt;BR /&gt;  PHCO_39526.CORE2-SHLIBS: /usr/lib/hpux32/libc.so.1&lt;BR /&gt;&lt;BR /&gt;This says I have PHCO_39526 installed.</description>
      <pubDate>Wed, 27 Oct 2010 10:47:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702725#M659430</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-10-27T10:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: child process hangs on pthread_mutex_lock</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702726#M659431</link>
      <description>You can get a patch family tree with:&lt;BR /&gt;&lt;A href="http://www.itrc.hp.com/service/patch/patchTree.do?patchid=PHCO_39526" target="_blank"&gt;http://www.itrc.hp.com/service/patch/patchTree.do?patchid=PHCO_39526&lt;/A&gt;</description>
      <pubDate>Wed, 27 Oct 2010 10:49:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/child-process-hangs-on-pthread-mutex-lock/m-p/4702726#M659431</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-10-27T10:49:30Z</dc:date>
    </item>
  </channel>
</rss>

