<?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: mktime and getenv(3) hang in signal handler in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/mktime-hang/m-p/5514081#M640176</link>
    <description>&lt;P&gt;Your application is likely to be illegal and you gambled and lost.&amp;nbsp; ;-)&lt;/P&gt;&lt;P&gt;You can't call mktime(3) or localtime(3) in a signal handler.&amp;nbsp; I.e. it isn't async signal safe.&amp;nbsp; See thread_safety(5)&lt;/P&gt;&lt;P&gt;You might be able to call gmtime(3)?&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jan 2012 08:53:19 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2012-01-31T08:53:19Z</dc:date>
    <item>
      <title>mktime hang</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mktime-hang/m-p/5513997#M640175</link>
      <description>&lt;P&gt;Our system is running on HPUX11.31&lt;/P&gt;&lt;P&gt;We have some processes that are running forever and very very rarely one is hanging without apparent reason.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As these process is running on live system it's quite difficult to investiguate : maintenance people just kill then restart the process that is working fine for a long while until the next occurence.&lt;/P&gt;&lt;P&gt;Yet, recently we had the problem on our integration platform : one developper got the call stack when the process hangs (but it's only a JPG file)&lt;/P&gt;&lt;P&gt;The call stack is :&lt;/P&gt;&lt;P&gt;#0 0xc000000000432750:0 in __ksleep&lt;BR /&gt;#1 0xc0000000001c51c0:0 in __mnx_sleep&lt;BR /&gt;#2 0xc00000000013fce0:0 in __pthread_mutex_lock??&lt;BR /&gt;#3 0xc00000000013dc90:0 in __pthread_mutex_lock??&lt;BR /&gt;#4 0xc00000000013da20:0 in pthread_mutex_lock??&lt;BR /&gt;#5 0xc000000000453e50:0 in __pthread_mutex_lock??&lt;BR /&gt;#6 0xc0000000003252a0:0 in getenv+0xfa0 ()&lt;BR /&gt;#7 0xc000000000320a90:0 in tzset+0x110 ()&lt;BR /&gt;#8 0xc00000000031d550:0 in localtime_r+0x120 ()&lt;BR /&gt;#9 0xc00000000031d210:0 in localtime+0x30 ()&lt;BR /&gt;#10 0x400000000004a630:0 in fg_cur_date_asc ()&lt;BR /&gt;#11 0x4000000000014f30:0 in fl_alarm_rcv_timer_signal ()&lt;BR /&gt;#12 &amp;lt;signal handler called&amp;gt;&lt;BR /&gt;#13 0xc00000000013db20:0 in __pthread_mutex_lock_ng+0xe0 ()&lt;BR /&gt;#14 0xc00000000013da20:0 in pthread_mutex_lock+0x20 ()&lt;BR /&gt;#15 0xc000000000453e50:0 in __pthread_mutex_lock+0xb0 ()&lt;BR /&gt;#16 0xc0000000003252a0:0 in getenv+0xfa0 ()&lt;BR /&gt;#17 0xc000000000320a90:0 in tzset+0x110 ()&lt;BR /&gt;#18 0xc000000000328810:0 in mktime+0x150 ()&lt;BR /&gt;#19 0x400000000004d2d0:0 in fg_dasc_to_dsec ()&lt;BR /&gt;#20 0x4000000000017c70:0 in fl_alarm_fault ()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone already observed this hang ?&lt;/P&gt;&lt;P&gt;Please advice,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2012 08:04:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mktime-hang/m-p/5513997#M640175</guid>
      <dc:creator>BERTRAND_7</dc:creator>
      <dc:date>2012-01-31T08:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: mktime and getenv(3) hang in signal handler</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mktime-hang/m-p/5514081#M640176</link>
      <description>&lt;P&gt;Your application is likely to be illegal and you gambled and lost.&amp;nbsp; ;-)&lt;/P&gt;&lt;P&gt;You can't call mktime(3) or localtime(3) in a signal handler.&amp;nbsp; I.e. it isn't async signal safe.&amp;nbsp; See thread_safety(5)&lt;/P&gt;&lt;P&gt;You might be able to call gmtime(3)?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2012 08:53:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mktime-hang/m-p/5514081#M640176</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-01-31T08:53:19Z</dc:date>
    </item>
  </channel>
</rss>

