<?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: Use Pthread[CMA-F-EXIT_THREAD] in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476135#M42709</link>
    <description>Dear Sirs~&lt;BR /&gt;   When I change LINK parameter as follows&lt;BR /&gt;LINK/THREADS_ENABLE =&amp;gt; LINK/THREADS_ENABLE=UPCALLS&lt;BR /&gt;   This situation didn't seem to occur. The Server has two CPUs. I don't know the root case. If you have any suggestion, please let me know...Thanks a lot~&lt;BR /&gt;</description>
    <pubDate>Thu, 13 Aug 2009 00:41:38 GMT</pubDate>
    <dc:creator>JimsanTsai</dc:creator>
    <dc:date>2009-08-13T00:41:38Z</dc:date>
    <item>
      <title>Use Pthread[CMA-F-EXIT_THREAD]</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476134#M42708</link>
      <description>Dear Sirs~&lt;BR /&gt;   I'm programming in OpenVMS 7.3-2, COMPAQ C V6.5. I use pthread and socket to implement 16 clients for send/recv data(16 socket connection and they are never be closed!).&lt;BR /&gt;   When I start to send/recv data for a while, I get error message as follows:&lt;BR /&gt;----------------------------------------------&lt;BR /&gt;%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=000000000000&lt;BR /&gt;0000, PC=0000000000000000, PS=0000001B&lt;BR /&gt;%TRACE-F-TRACEBACK, symbolic stack dump follows&lt;BR /&gt;  image    module    routine             line      rel PC           abs PC&lt;BR /&gt;                                            0 0000000000000000 0000000000000000&lt;BR /&gt; QUEUESYNCAGENT                                              ?                ?&lt;BR /&gt; PTHREAD$RTL                                0 0000000000055E8C 000000007BD3FE8C&lt;BR /&gt; PTHREAD$RTL                                0 0000000000042C90 000000007BD2CC90&lt;BR /&gt;                                            0 0000000000000000 0000000000000000&lt;BR /&gt; PTHREAD$RTL                                                 ?                ?&lt;BR /&gt;                                            0 FFFFFFFF80275F14 FFFFFFFF80275F14&lt;BR /&gt;%CMA-F-EXIT_THREAD, current thread has been requested to exit&lt;BR /&gt;----------------------------------------------&lt;BR /&gt;    This error generates two dmp file as follows:&lt;BR /&gt;1.QueueSyncAgent.DMP;1&lt;BR /&gt;&lt;BR /&gt;%DEBUG-I-AIMGMISMATCH, the image file DISK$DATA1:[USER.JIMSANTSAI.MQ]QUEUESYNCAG&lt;BR /&gt;ENT.DSF;1 does not appear to match with the target (or dumpfile) image&lt;BR /&gt;%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=000000000000&lt;BR /&gt;0000, PC=0000000000000000, PS=0000001B&lt;BR /&gt;break on unhandled exception at 0 in THREAD 3&lt;BR /&gt; image name                      set    base address         end address&lt;BR /&gt;&lt;BR /&gt; CMA$TIS_SHR                     no     000000007B95A000     000000007B96BFFF&lt;BR /&gt; DECC$SHR_EV56                   no     000000007C03C000     000000007C0D1FFF&lt;BR /&gt; DPML$SHR                        no     000000007BCB8000     000000007BCFDFFF&lt;BR /&gt; LIBOTS                          no     000000007B63E000     000000007B645FFF&lt;BR /&gt; LIBRTL                          no     000000007B5EC000     000000007B63DFFF&lt;BR /&gt; PTHREAD$RTL                     no     000000007BCFE000     000000007BD69FFF&lt;BR /&gt;*QUEUESYNCAGENT                  yes    0000000000010000     00000000000503FF&lt;BR /&gt; TCPIP$ACCESS_SHR                no     000000000094E000     00000000009EE9FF&lt;BR /&gt; TCPIP$IPC_SHR                   no     00000000008CC000     000000000094D1FF&lt;BR /&gt; UCX$IPC_SHR                     no     00000000009F0000     0000000000A711FF&lt;BR /&gt;&lt;BR /&gt; total images: 10&lt;BR /&gt;  Thread Name                      State           Substate    Policy       Pri&lt;BR /&gt;  ------ ------------------------- --------------- ----------- ------------ ---&lt;BR /&gt;       1 default thread            blocked         join      2 SCHED_OTHER  11&lt;BR /&gt;       2 &lt;ANONYMOUS&gt;               ready gbl       $hiber      SCHED_OTHER  11&lt;BR /&gt;       3 &lt;ANONYMOUS&gt;               running V3                  SCHED_OTHER  11&lt;BR /&gt;       4 &lt;ANONYMOUS&gt;               ready gbl                   SCHED_OTHER  11&lt;BR /&gt;       5 &lt;ANONYMOUS&gt;               ready gbl       $setast     SCHED_OTHER  11&lt;BR /&gt;       6 &lt;ANONYMOUS&gt;               blocked         $synch   64 SCHED_OTHER  11&lt;BR /&gt;       7 &lt;ANONYMOUS&gt;               running V2                  SCHED_OTHER  11&lt;BR /&gt;       8 &lt;ANONYMOUS&gt;               ready gbl       $hiber      SCHED_OTHER  11&lt;BR /&gt;       9 &lt;ANONYMOUS&gt;               ready gbl       $hiber      SCHED_OTHER  11&lt;BR /&gt;      10 &lt;ANONYMOUS&gt;               ready gbl       $hiber      SCHED_OTHER  11&lt;BR /&gt;      11 &lt;ANONYMOUS&gt;               ready gbl       $hiber      SCHED_OTHER  11&lt;BR /&gt;      12 &lt;ANONYMOUS&gt;               ready gbl       $hiber      SCHED_OTHER  11&lt;BR /&gt;      13 &lt;ANONYMOUS&gt;               ready gbl       $setast     SCHED_OTHER  11&lt;BR /&gt;      14 &lt;ANONYMOUS&gt;               ready gbl       ims  160006 SCHED_OTHER  11&lt;BR /&gt;      15 &lt;ANONYMOUS&gt;               ready gbl       $setast     SCHED_OTHER  11&lt;BR /&gt;      16 &lt;ANONYMOUS&gt;               ready gbl       $setast     SCHED_OTHER  11&lt;BR /&gt;      17 &lt;ANONYMOUS&gt;               ready gbl       $setast     SCHED_OTHER  11&lt;BR /&gt; module name    routine name     line           rel PC           abs PC&lt;BR /&gt;                                            0000000000000000 0000000000000000&lt;BR /&gt;----- the above looks like a null frame in the same scope as the frame below&lt;BR /&gt;*QUEUESYNCAGENT QueueSyncThread                            ?                ?&lt;BR /&gt; SHARE$PTHREAD$RTL_DATA0                    0000000000025E8C 000000007BD3FE8C&lt;BR /&gt; SHARE$PTHREAD$RTL_DATA0                    0000000000012C90 000000007BD2CC90&lt;BR /&gt;                                            0000000000000000 0000000000000000&lt;BR /&gt;----- the above looks like a null frame in the same scope as the frame below&lt;BR /&gt; SHARE$PTHREAD$RTL_DATA0                                   ?                ?&lt;BR /&gt;                                            FFFFFFFF80275F14 FFFFFFFF80275F14&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;&lt;BR /&gt;2.QueueSyncAgent.DMP;1&lt;BR /&gt;&lt;BR /&gt;%DEBUG-I-AIMGMISMATCH, the image file DISK$DATA1:[USER.JIMSANTSAI.MQ]QUEUESYNCAG&lt;BR /&gt;ENT.DSF;1 does not appear to match with the target (or dumpfile) image&lt;BR /&gt;%CMA-F-NOMSG, Message number 004081A4&lt;BR /&gt;break on unhandled exception preceding SHARE$PTHREAD$RTL_DATA3+76648 in THREAD 3&lt;BR /&gt; image name                      set    base address         end address&lt;BR /&gt;&lt;BR /&gt; CMA$TIS_SHR                     no     000000007B95A000     000000007B96BFFF&lt;BR /&gt; DBGTBKMSG                       no     00000000081BA000     00000000081C79FF&lt;BR /&gt; DECC$MSG                        no     000000000819E000     00000000081A1FFF&lt;BR /&gt; DECC$SHR_EV56                   no     000000007C03C000     000000007C0D1FFF&lt;BR /&gt; DPML$SHR                        no     000000007BCB8000     000000007BCFDFFF&lt;BR /&gt; LIBOTS                          no     000000007B63E000     000000007B645FFF&lt;BR /&gt; LIBRTL                          no     000000007B5EC000     000000007B63DFFF&lt;BR /&gt; PTHREAD$RTL                     no     000000007BCFE000     000000007BD69FFF&lt;BR /&gt;*QUEUESYNCAGENT                  yes    0000000000010000     00000000000503FF&lt;BR /&gt; SHRIMGMSG                       no     0000000008196000     000000000819C9FF&lt;BR /&gt; TCPIP$ACCESS_SHR                no     000000000094E000     00000000009EE9FF&lt;BR /&gt; TCPIP$IPC_SHR                   no     00000000008CC000     000000000094D1FF&lt;BR /&gt; TCPIP$MSG                       no     00000000081A2000     00000000081B81FF&lt;BR /&gt; TRACE                           no     000000007B976000     000000007BA77FFF&lt;BR /&gt; UCX$IPC_SHR                     no     00000000009F0000     0000000000A711FF&lt;BR /&gt;&lt;BR /&gt; total images: 15&lt;BR /&gt;  Thread Name                      State           Substate    Policy       Pri&lt;BR /&gt;  ------ ------------------------- --------------- ----------- ------------ ---&lt;BR /&gt;       1 default thread            blocked         join      2 SCHED_OTHER  11&lt;BR /&gt;       2 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;       3 &lt;ANONYMOUS&gt;               running V2                  SCHED_OTHER  11&lt;BR /&gt;       4 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;       5 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;       6 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;       7 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;       8 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;       9 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;      10 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;      11 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;      12 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;      13 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;      14 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;      15 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;      16 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt;      17 &lt;ANONYMOUS&gt;               blocked         $hiber      SCHED_OTHER  11&lt;BR /&gt; module name    routine name     line           rel PC           abs PC&lt;BR /&gt; SHARE$PTHREAD$RTL_DATA0                    0000000000012B68 000000007BD2CB68&lt;BR /&gt; SHARE$PTHREAD$RTL_DATA0                    000000000003C698 000000007BD56698&lt;BR /&gt;                                            FFFFFFFF80165084 FFFFFFFF80165084&lt;BR /&gt;                                            FFFFFFFF8027521C FFFFFFFF8027521C&lt;BR /&gt; SHARE$TRACE_DATA1                          00000000000002CC 000000007B9962CC&lt;BR /&gt;                                            FFFFFFFF802761A0 FFFFFFFF802761A0&lt;BR /&gt;----- above condition handler called with exception 0000000C:&lt;BR /&gt;%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=000000000000&lt;BR /&gt;0000, PC=0000000000000000, PS=0000001B&lt;BR /&gt;----- end of exception message&lt;BR /&gt;                                            FFFFFFFF800A60BC FFFFFFFF800A60BC&lt;BR /&gt;                                            0000000000000000 0000000000000000&lt;BR /&gt;----- the above looks like a null frame in the same scope as the frame below&lt;BR /&gt;*QUEUESYNCAGENT QueueSyncThread                            ?                ?&lt;BR /&gt; SHARE$PTHREAD$RTL_DATA0                    0000000000025E8C 000000007BD3FE8C&lt;BR /&gt; SHARE$PTHREAD$RTL_DATA0                    0000000000012C90 000000007BD2CC90&lt;BR /&gt;                                            0000000000000000 0000000000000000&lt;BR /&gt;----- the above looks like a null frame in the same scope as the frame below&lt;BR /&gt; SHARE$PTHREAD$RTL_DATA0                                   ?                ?&lt;BR /&gt;                                            FFFFFFFF80275F14 FFFFFFFF80275F14&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;    If you have and suggestion, thanks a lot...&lt;BR /&gt;&lt;BR /&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;&lt;/ANONYMOUS&gt;</description>
      <pubDate>Mon, 10 Aug 2009 06:20:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476134#M42708</guid>
      <dc:creator>JimsanTsai</dc:creator>
      <dc:date>2009-08-10T06:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Use Pthread[CMA-F-EXIT_THREAD]</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476135#M42709</link>
      <description>Dear Sirs~&lt;BR /&gt;   When I change LINK parameter as follows&lt;BR /&gt;LINK/THREADS_ENABLE =&amp;gt; LINK/THREADS_ENABLE=UPCALLS&lt;BR /&gt;   This situation didn't seem to occur. The Server has two CPUs. I don't know the root case. If you have any suggestion, please let me know...Thanks a lot~&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Aug 2009 00:41:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476135#M42709</guid>
      <dc:creator>JimsanTsai</dc:creator>
      <dc:date>2009-08-13T00:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Use Pthread[CMA-F-EXIT_THREAD]</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476136#M42710</link>
      <description>Your code appears to have one or more bugs; stuff on the stack appears to be getting zeroed.  I'd guess that enabling the upcalls option merely moves things around in memory; that the bug is still latent here.  &lt;BR /&gt;&lt;BR /&gt;Some research into the trigger for the AIMGMISMATCH is warranted.&lt;BR /&gt;&lt;BR /&gt;These things are not going to get resolved here; only through debugging.  Through fenceposts / canaries.  Through application-integrated logging.  These and all the steps and tools and techniques that are necessary when maintaining large applications.&lt;BR /&gt;&lt;BR /&gt;You would be wrong to assume that ACCVIOs in system routines are not your problem, too.  It's quite possible and even rather common to trigger these reports through application errors.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Aug 2009 12:07:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476136#M42710</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-08-13T12:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Use Pthread[CMA-F-EXIT_THREAD]</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476137#M42711</link>
      <description>&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;LINK/THREADS_ENABLE =&amp;gt; LINK/THREADS_ENABLE=UPCALLS&lt;BR /&gt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;This actually disables multiple kernel threads.</description>
      <pubDate>Thu, 13 Aug 2009 15:20:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476137#M42711</guid>
      <dc:creator>H.Becker</dc:creator>
      <dc:date>2009-08-13T15:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Use Pthread[CMA-F-EXIT_THREAD]</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476138#M42712</link>
      <description>Dear Hoff&amp;amp;Becker~&lt;BR /&gt;    Thanks for your advice~ Let me explian my program logic as follows:&lt;BR /&gt;&lt;BR /&gt;Step1.Initial pthread attribute.&lt;BR /&gt;nRetNumber=pthread_attr_init(&amp;amp;attr);&lt;BR /&gt;&lt;BR /&gt;Step2.set attribute stackize to 8192000 bytes.&lt;BR /&gt;nRetNumber=pthread_attr_setstacksize&lt;BR /&gt;(&amp;amp;attr,DEF_PER_THREAD_STACK_SIZE);&lt;BR /&gt;&lt;BR /&gt;Step3.&lt;BR /&gt;nRetNumber=pthread_create(&amp;amp;QSyncpth, &amp;amp;attr, QueueSyncThread, (void*)pstthreadparam);&lt;BR /&gt;-----------------------------------------&lt;BR /&gt;QueueSyncThread Logic:&lt;BR /&gt;  3.1 socket connect to another server&lt;BR /&gt;  3.2 send data to another server&lt;BR /&gt;  3.3 recv data from another server&lt;BR /&gt;  3.4 sleep(1)&lt;BR /&gt;  Looping 3.2~3.4&lt;BR /&gt;-----------------------------------------&lt;BR /&gt;  Looping step 1~3 to create 16 threads.&lt;BR /&gt;&lt;BR /&gt;Step4.pthread join&lt;BR /&gt;nRetNumber=pthread_join(QSyncpth,NULL);&lt;BR /&gt;&lt;BR /&gt;   For example: pstthreadparam means number 1~16, When I use LINK/THREADS_ENABLE=MULTIPLE_KERNEL_THREADS, all threads get the parameter pstthreadparam always equal to 16. So I chage it to UPCALLS, it never happen again.&lt;BR /&gt;   I don't know the root cause, but it never crash since 8/12(UPCALLS). Otherwise, I mapping the global section frequently in each thread.&lt;BR /&gt;   Some advice to me???thanks~</description>
      <pubDate>Fri, 14 Aug 2009 00:14:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476138#M42712</guid>
      <dc:creator>JimsanTsai</dc:creator>
      <dc:date>2009-08-14T00:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Use Pthread[CMA-F-EXIT_THREAD]</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476139#M42713</link>
      <description>If you're not already familiar with the OpenVMS Debugger, you'll want to skim the debugger manual.&lt;BR /&gt;&lt;BR /&gt;As for some previous articles related to the access violation (ACCVIO) error...&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://labs.hoffmanlabs.com/node/800" target="_blank"&gt;http://labs.hoffmanlabs.com/node/800&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://labs.hoffmanlabs.com/node/401" target="_blank"&gt;http://labs.hoffmanlabs.com/node/401&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://labs.hoffmanlabs.com/node/848" target="_blank"&gt;http://labs.hoffmanlabs.com/node/848&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You've threads involved here, which makes the whole application and the debugging sequence here rather more complicated.&lt;BR /&gt;&lt;BR /&gt;First step?  Find the area of the code that is involved with the error, and work toward the error.  Use (program) the debugger, or (add?) use integrated logging, or both. &lt;BR /&gt;&lt;BR /&gt;It's exceedingly unlikely folks will be able to help you with this application debugging here in ITRC, except in fairly general suggestions.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Aug 2009 00:44:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476139#M42713</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-08-14T00:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Use Pthread[CMA-F-EXIT_THREAD]</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476140#M42714</link>
      <description>Dear Hoff~&lt;BR /&gt;   Thanks for your advice. I'll study the references and try to find out the bugs of my application.</description>
      <pubDate>Fri, 14 Aug 2009 00:49:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476140#M42714</guid>
      <dc:creator>JimsanTsai</dc:creator>
      <dc:date>2009-08-14T00:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Use Pthread[CMA-F-EXIT_THREAD]</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476141#M42715</link>
      <description>Dear Sirs~&lt;BR /&gt;     I add code as follows to catch signal:&lt;BR /&gt;-------------------------------------&lt;BR /&gt; for(i=1;i&amp;lt;=NSIG;i++)&lt;BR /&gt; {&lt;BR /&gt;  signal(i, abortTheProcessWhenAnExceptionOccurs);&lt;BR /&gt; }&lt;BR /&gt;-------------------------------------&lt;BR /&gt; And I get a dump file as follows:&lt;BR /&gt;&lt;BR /&gt;DBG&amp;gt; sh call&lt;BR /&gt; module name    routine name     line           rel PC           abs PC&lt;BR /&gt; SHARE$PTHREAD$RTL_DATA0                    0000000000012B68 000000007BD2CB68&lt;BR /&gt; SHARE$DECC$SHR_EV56_DATA1                  00000000001B73F4 FFFFFFFF80B5F3F4&lt;BR /&gt; SHARE$DECC$SHR_EV56_DATA1                  00000000001B70BC FFFFFFFF80B5F0BC&lt;BR /&gt;                                            FFFFFFFF8017570C FFFFFFFF8017570C&lt;BR /&gt;                                            FFFFFFFF8017570C FFFFFFFF8017570C&lt;BR /&gt;----- above condition handler called with exception 0000000C:&lt;BR /&gt;%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=000000000000&lt;BR /&gt;0000, PC=0000000000000000, PS=0000001B&lt;BR /&gt;----- end of exception message&lt;BR /&gt;                                            FFFFFFFF800A60BC FFFFFFFF800A60BC&lt;BR /&gt;                                            0000000000000000 0000000000000000&lt;BR /&gt;----- the above looks like a null frame in the same scope as the frame below&lt;BR /&gt;*QUEUESYNCAGENT QueueSyncThread                            ?                ?&lt;BR /&gt; SHARE$PTHREAD$RTL_DATA0                    0000000000025E8C 000000007BD3FE8C&lt;BR /&gt; SHARE$PTHREAD$RTL_DATA0                    0000000000012C90 000000007BD2CC90&lt;BR /&gt;                                            0000000000000000 0000000000000000&lt;BR /&gt;----- the above looks like a null frame in the same scope as the frame below&lt;BR /&gt; SHARE$PTHREAD$RTL_DATA0                                   ?                ?&lt;BR /&gt;                                            FFFFFFFF80275F14 FFFFFFFF80275F14&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  The application running about 8~10 hours, then the exception occurs(SIGBUS), one of threads will be useless.&lt;BR /&gt;&lt;BR /&gt;There's my cc&amp;amp;link command:&lt;BR /&gt;CC:&lt;BR /&gt;cc/nowarning/check SRC$DIR:shmqinc_l200 /obj=OBJ$DIR:shmqinc_l200.obj&lt;BR /&gt;cc/nowarning SRC$DIR:log4c.c /obj=OBJ$DIR:log4c.obj&lt;BR /&gt;cc/nowarning SRC$DIR:Readini.c /obj=OBJ$DIR:Readini.obj&lt;BR /&gt;cc/nowarning SRC$DIR:SocketAPI.c /obj=OBJ$DIR:SocketAPI.obj&lt;BR /&gt;cc/debug/nowarning/reentrancy=multithread/list/machine/check AUO$MQ$SRC$DIR:QueueSyncAgent /obj=OBJ$DIR:QueueSyncAgent.obj&lt;BR /&gt;&lt;BR /&gt;LINK:&lt;BR /&gt;link/debug/threads_enable=UPCALLS/map/full/cross /exe=HOME$DIR:QueueSyncAgent.exe OBJ$DIR:QueueSyncAgent, OBJ$DIR:log4c, OBJ$DIR:shmqinc_l200, OBJ$DIR:SocketAPI, OBJ$DIR:Readini&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Aug 2009 10:36:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476141#M42715</guid>
      <dc:creator>JimsanTsai</dc:creator>
      <dc:date>2009-08-19T10:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Use Pthread[CMA-F-EXIT_THREAD]</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476142#M42716</link>
      <description>I generally catch exceptions with the debugger; you can use SET BREAK /EXCEPTION for that.  If the code is tossing exceptions around normally, then you can either program the debugger to ignore the "normal" ones, or you can insert a signal of SS$_DEBUG into the code in a handler such as yours.&lt;BR /&gt;&lt;BR /&gt;Now that you've located the area of the code that is involved with the error, start looking at what happened.  Look at variables.  Look at the context.  From here, look "upstream" in the code.  Find some code upstream of the trigger, set a breakpoint there, and work forward.&lt;BR /&gt;&lt;BR /&gt;Given the length of time involved in this application run before the error, I tend to use integrated logging here.  Looking at key variables at run-time, and logging progress and details.  This can sometimes help spot the trigger, or isolate the trigger.   (I've had a few of these cases over the years.)&lt;BR /&gt;&lt;BR /&gt;Depending on what the code is doing and how long this code is running, also look to implement some form of application checkpoint-restart, too.&lt;BR /&gt;&lt;BR /&gt;These cases are not fun to debug.  These are not easy to debug.  And that's with the source code access, and with access to the debugger and tools.  (This code looks to add interprocess communications into the mix, which adds more complexity, and more exposure to corner cases.)  For us folks out here in ITRC-land, questions such as this are basically impossible to help you with in anything other than generalities.&lt;BR /&gt;&lt;BR /&gt;Compiler warnings are your friends.&lt;BR /&gt;&lt;BR /&gt;I would encourage switching from CC /NOWARNINGS (or from its rough analog CC /STANDARD=VAXC) to at least CC /WARNINGS, and for complex and hairy or buggy (or where portability is required) to enable added warnings with CC /ENABLE= WARN= QUESTCODE during code debug and testing.  Fix the warnings reported by the compiler, and don't suppress them. (Debugging code with warnings is arguably premature. Take the time to fix the warnings first.)  &lt;BR /&gt;&lt;BR /&gt;The SIGBUS error is the C representation of what OpenVMS calls an ACCVIO.&lt;BR /&gt;&lt;BR /&gt;Or, if you're (really) stuck, talk to somebody else on the local engineering staff that has strong debug skills ("team programming" or whatever the kids call it now), or talk with your manager about this case and what to do.  That might be training, it might involve refactoring the code, or it might involve bringing in somebody that can help with the debug here.  But I'd start by fixing the warnings.&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Aug 2009 12:22:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476142#M42716</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-08-19T12:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Use Pthread[CMA-F-EXIT_THREAD]</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476143#M42717</link>
      <description>Dear Hoff~&lt;BR /&gt;   Thank for your advice, I modify the CC command to "cc/WARNINGS=ENABLE=QUESTCODE", and fix the warnings, about 4.5 hours, the application catch SIGILL(4) signal, the message as follows:&lt;BR /&gt;--------------------------------------&lt;BR /&gt;Catch Signal=[4]&lt;BR /&gt;%CMA-F-EXIT_THREAD, current thread has been requested to exit&lt;BR /&gt;%TRACE-F-TRACEBACK, symbolic stack dump follows&lt;BR /&gt;  image    module    routine             line      rel PC           abs PC&lt;BR /&gt; PTHREAD$RTL                                0 0000000000042B68 000000007BD2CB68&lt;BR /&gt; DECC$SHR_EV56                              0 00000000001B73F4 FFFFFFFF80B5F3F4&lt;BR /&gt; DECC$SHR_EV56                              0 00000000001B70BC FFFFFFFF80B5F0BC&lt;BR /&gt;                                            0 FFFFFFFF8017570C FFFFFFFF8017570C&lt;BR /&gt;                                            0 FFFFFFFF8017570C FFFFFFFF8017570C&lt;BR /&gt;----- above condition handler called with exception 00000454:&lt;BR /&gt;%SYSTEM-F-ROPRAND, reserved operand fault at PC=FFFFFFFF8015B074, PS=0000001B&lt;BR /&gt;----- end of exception message&lt;BR /&gt;                                            0 FFFFFFFF800A60BC FFFFFFFF800A60BC&lt;BR /&gt;                                            0 0000000000000000 FFFFFFFF8015B074&lt;BR /&gt; QUEUESYNCAGENT  QUEUESYNCAGENT  QueueSyncThread&lt;BR /&gt;                                        50718 00000000000015BC 00000000000215BC&lt;BR /&gt; PTHREAD$RTL                                0 0000000000055E8C 000000007BD3FE8C&lt;BR /&gt; PTHREAD$RTL                                0 0000000000042C90 000000007BD2CC90&lt;BR /&gt;                                            0 0000000000000000 0000000000000000&lt;BR /&gt; PTHREAD$RTL                                                 ?                ?&lt;BR /&gt;                                            0 FFFFFFFF80275F14 FFFFFFFF80275F14&lt;BR /&gt;&lt;BR /&gt;  The source code of QueueSyncThread line 50718 is:&lt;BR /&gt;      4   50718      memset(&amp;amp;szSendSocketBuf, DEFINE_NULL, sizeof(szSendSocketBuf));&lt;BR /&gt;&lt;BR /&gt;  Could I ignore the SIGILL signal???</description>
      <pubDate>Thu, 20 Aug 2009 06:50:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476143#M42717</guid>
      <dc:creator>JimsanTsai</dc:creator>
      <dc:date>2009-08-20T06:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Use Pthread[CMA-F-EXIT_THREAD]</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476144#M42718</link>
      <description>What is the declaration of szSendSocketBuf here?&lt;BR /&gt;&lt;BR /&gt;memset(&amp;amp;szSendSocketBuf, DEFINE_NULL, sizeof(szSendSocketBuf));&lt;BR /&gt;&lt;BR /&gt;I can guess what DEFINE_NULL is, but do confirm that, too.&lt;BR /&gt;&lt;BR /&gt;This memcpy statement may be an innocent bystander, too; the fault could be upstream.  &lt;BR /&gt;&lt;BR /&gt;I'd look to examine the values here, and see if I can find some code upstream to set watchpoints or to program the debugger to detect (the debugger supports conditionals) and break on the run-up to the error.&lt;BR /&gt;&lt;BR /&gt;If the buffer is shared among threads, it's possible there's a collision.  Interlocking among threads is required; it seems reasonable to expect untoward application behavior when a memset goes flying past when some other thread is busy reading the buffer, for instance.&lt;BR /&gt;&lt;BR /&gt;I prefer to honor errors and signals (and compiler warnings).  My general preference here (and unless I have specific reasons to the contrary) is to catch an (unexpected) error and to exit the application with a diagnostic.  I've worked with more than a few cases where continuing after an error has shown a nasty habit of contributing to an error avalanche, or to triggering secondary and more subtle errors,   Employing "catch and release" programming with errors is certainly possible, but requires great care.&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Aug 2009 13:15:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476144#M42718</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-08-20T13:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Use Pthread[CMA-F-EXIT_THREAD]</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476145#M42719</link>
      <description>Dear Hoff~&lt;BR /&gt;#define DEF_SEND_MSG_LENGTH 64000&lt;BR /&gt;   char szSendSocketBuf[DEF_SEND_MSG_LENGTH+1];   /*Send Buffer(Socket)*/ &lt;BR /&gt;&lt;BR /&gt;    There's only stThreadParam global variable in the application, and there's 16 of QueueSyncThread threads running concurrent.&lt;BR /&gt;    The thread structure as follows:&lt;BR /&gt;----------------------------------------&lt;BR /&gt;typedef struct&lt;BR /&gt;{&lt;BR /&gt; char szStage[10];     &lt;BR /&gt; char szGlobalSectionName[10];&lt;BR /&gt;}stThreadParam;&lt;BR /&gt;&lt;BR /&gt;void* QueueSyncThread(void* pstthparam)&lt;BR /&gt;{&lt;BR /&gt;  char szSendSocketBuf[DEF_SEND_MSG_LENGTH+1];     &lt;BR /&gt;  ...(other variables)&lt;BR /&gt;  &lt;BR /&gt;  /*get pstthparam value to local variable Process*/&lt;BR /&gt;  /*Read Ini Process*/&lt;BR /&gt;  /*Socket Connect to another Host*/&lt;BR /&gt;  &lt;BR /&gt;  /*Initial Variable(memset)*/&lt;BR /&gt;&lt;BR /&gt;  while(1)&lt;BR /&gt;  {&lt;BR /&gt;   memset(&amp;amp;szSendSocketBuf, DEFINE_NULL, sizeof(szSendSocketBuf));&lt;BR /&gt;   ...(initial other variables) &lt;BR /&gt;   &lt;BR /&gt;   /*mapping global section1*/&lt;BR /&gt;   /*mapping global section2*/&lt;BR /&gt;&lt;BR /&gt;   /*socket send*/&lt;BR /&gt;   /*socket recv*/&lt;BR /&gt;&lt;BR /&gt;   /*mapping global section3*/&lt;BR /&gt;   /*mapping global section1*/&lt;BR /&gt;  }&lt;BR /&gt; pthread_exit(NULL);&lt;BR /&gt;}&lt;BR /&gt;----------------------------------------&lt;BR /&gt;   I didn't use the mutex in the thread(16 threads do the same things, but mapping different global section).&lt;BR /&gt;   May I ask all variables in QueueSyncThread is share among threads?</description>
      <pubDate>Fri, 21 Aug 2009 04:38:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-pthread-cma-f-exit-thread/m-p/4476145#M42719</guid>
      <dc:creator>JimsanTsai</dc:creator>
      <dc:date>2009-08-21T04:38:59Z</dc:date>
    </item>
  </channel>
</rss>

