<?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 SIGSEGV, SEGV_MAPERR - Address not mapped to object in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6170827#M496090</link>
    <description>&lt;P&gt;Again I run into problem, where I have tryed everything I know, but still can't resolve this..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getting SEGV_MAPERR in destructor of std::string class, which is allocated on stack&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from $sp diff I suspect it's thread stack overflow, but I'm using 16MB as stack size there ...&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2013 14:43:54 GMT</pubDate>
    <dc:creator>Pinkerik</dc:creator>
    <dc:date>2013-08-15T14:43:54Z</dc:date>
    <item>
      <title>SIGSEGV, SEGV_MAPERR - Address not mapped to object</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6170827#M496090</link>
      <description>&lt;P&gt;Again I run into problem, where I have tryed everything I know, but still can't resolve this..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getting SEGV_MAPERR in destructor of std::string class, which is allocated on stack&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from $sp diff I suspect it's thread stack overflow, but I'm using 16MB as stack size there ...&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2013 14:43:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6170827#M496090</guid>
      <dc:creator>Pinkerik</dc:creator>
      <dc:date>2013-08-15T14:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: SIGSEGV, SEGV_MAPERR - Address not mapped to object</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6171185#M496091</link>
      <description>&lt;P&gt;&amp;gt;from $sp diff I suspect it's thread stack overflow,&lt;/P&gt;&lt;P&gt;&amp;gt;(gdb) p $sp - $sp_save $1 = 1968&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No, that's trivially small.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gr32: 0x181978&lt;/P&gt;&lt;P&gt;0x9fffffffbf3e3c20:0 &amp;lt;__pthread_mutex_destroy_ng+0x80&amp;gt;: (p1) ld2 r23=[r32]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have a corrupted pointer.&amp;nbsp; Possibly writing beyond the bounds of a heap object and blasting this mutex pointer.&lt;/P&gt;&lt;P&gt;You could use gdb's heap-check option to catch this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What does this show?&lt;/P&gt;&lt;P&gt;(gdb) frame 4&lt;/P&gt;&lt;P&gt;(gdb) p *this&lt;/P&gt;&lt;P&gt;(gdb) x /s *(char**)this&lt;/P&gt;&lt;P&gt;(gdb) x /16gx *(char**)this-8*8&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2013 20:29:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6171185#M496091</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2013-08-15T20:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: SIGSEGV, SEGV_MAPERR - Address not mapped to object</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6171703#M496092</link>
      <description>&lt;PRE&gt;(gdb) f 4
#4  0x9fffffffb97a2b80:0 in std::basic_string&amp;lt;char,std::char_traits&amp;lt;char&amp;gt;,std::allocator&amp;lt;char&amp;gt; &amp;gt;::~basic_string (this=0x9fffffffb84d0890)
    at /opt/aCC/include_std/string:361
361             _C_unlink();
(gdb) p *this
$2 = {
  _C_data = 0x60000000004f8240 "insert into sym_xv_gl_acct_dwh (id$,msg_id$,ref_id$,type_code$,rec_version$,accrued_bal, acct_close_date, acct_close_reason, acct_desc, acct_no,acct_open_date, acct_status, acct_type, actual_agg_bal_c"..., 
  static __nullref = &amp;lt;optimized out&amp;gt;, static npos = &amp;lt;optimized out&amp;gt;}
(gdb) x /s *(char**)this
0x60000000004f8240:      "insert into sym_xv_gl_acct_dwh (id$,msg_id$,ref_id$,type_code$,rec_version$,accrued_bal, acct_close_date, acct_close_reason, acct_desc, acct_no,acct_open_date, acct_status, acct_type, actual_agg_bal_c"...
(gdb) x /16gx *(char**)this-8*8
0x60000000004f8200:     0x6000000000120150      0x0000000000000581
0x60000000004f8210:     0x000000000f0fff01      0x0000000000000000
0x60000000004f8220:     0x0000000000181978      0xffffffffffffffff
0x60000000004f8230:     0x0000000000000532      0x0000000000000532
0x60000000004f8240:     0x696e736572742069      0x6e746f2073796d5f
0x60000000004f8250:     0x78765f676c5f6163      0x63745f6477682028
0x60000000004f8260:     0x6964242c6d73675f      0x6964242c7265665f
0x60000000004f8270:     0x6964242c74797065      0x5f636f6465242c72&lt;/PRE&gt;&lt;P&gt;I already tryed running gdb with set heap-check bounds/leaks on, but it craches at the same place&lt;/P&gt;&lt;P&gt;but it has one more frame in backtrace&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#2 0x9fffffffbf6e2240:0 in __rtc_pthread_mutex_destroy (mutex=&amp;lt;not available&amp;gt;)
at ../../../Src/gnu/gdb/thread_event/analysis.c:166&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2013 06:30:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6171703#M496092</guid>
      <dc:creator>Pinkerik</dc:creator>
      <dc:date>2013-08-16T06:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: SIGSEGV, SEGV_MAPERR - Address not mapped to object</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6171725#M496093</link>
      <description>&lt;P&gt;(gdb) x /16gx *(char**)this-8*8&lt;/P&gt;&lt;P&gt;0x60000000004f8200: 0x6000000000120150 0x0000000000000581&lt;/P&gt;&lt;P&gt;0x60000000004f8210: 0x000000000f0fff01 0x0000000000000000&lt;/P&gt;&lt;P&gt;0x60000000004f8220: 0x0000000000181978 0xffffffffffffffff&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The high byte of 0x60000000004f8210 is being blasted.&amp;nbsp; It probably should be 0x60 to match the other data addresses.&lt;/P&gt;&lt;P&gt;I think 0x6000000000120150 is the heap region back link and 0x0000000000000581 is the length of the current region.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;I already tryed running gdb with set heap-check bounds/leaks on&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What did "show heap-check" show?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2013 06:49:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6171725#M496093</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2013-08-16T06:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: SIGSEGV, SEGV_MAPERR - Address not mapped to object</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6171807#M496094</link>
      <description>&lt;PRE&gt;(gdb) show heap-check
Current heap check settings are :
        Check leaks      : on
        Check bounds     : on
        Check free()     : off
        Check string     : off
        Scrambling       : off
        Frame count      : 4
        Min-leak-size    : 0
        Min-heap-size    : 0
        Block-size       : 0
        Header-size      : 16
        Footer-size      : 1
        Seed-value       : 5
        Random-range     : 100
        Null-check       : -1
        Null-check-size  : -1
        Heap-size        : 0
        Heap Interval    : 0
        Repeat Count     : 100
        High-mem Count   : 0
        Watch Address    : 0x00000000
        retain-freed-blocks : off&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tryed to debug it command by command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[Switching to thread 5 (system thread 3895793)]

Breakpoint 1, OciConnection::ParseStatement (this=0x6000000001360090, 
    statement=0x600000000136ae90, error=0x9fffffff5df30b20)
    at /home/clag/projects/tomas/oci_wrapper/src/oci_connection.cc:292
292       std::string stmt_str(statement-&amp;gt;stmt_str());
(gdb) 
(gdb) n
293       std::string bind_name;
(gdb) x /16gx *(char**)&amp;amp;stmt_str-8*8
0x600000000128b5d0:     0x000000000f0fff00      0x0000000000000000
0x600000000128b5e0:     0xfeedfacefeedface      0xfeedfacefeedface
0x600000000128b5f0:     0x6000000000023d08      0x0000000000000003
0x600000000128b600:     0x00000000000003bb      0x00000000000003bb
0x600000000128b610:     0x73656c6563742061      0x6363727565645f62
0x600000000128b620:     0x616c2c2061636374      0x5f636c6f73655f64
0x600000000128b630:     0x6174652c20616363      0x745f636c6f73655f
0x600000000128b640:     0x726561736f6e2c20      0x616363745f646573
(gdb) n
295       std::transform(stmt_str.begin(), stmt_str.end(), stmt_str.begin(), ::tolower);
(gdb) 
297       size_t pos = 0, end_pos;
(gdb) 
299       if (statement-&amp;gt;type() == OciStatement::EXPORT) {
(gdb) 
300         while ((end_pos = stmt_str.find_first_of(":\'", pos)) != std::string::npos) {
(gdb)  
421       return *error;
(gdb) 
0x9fffffffb96e8ce0:0    421       return *error;
(gdb) 
0x9fffffffb96e8d10:0    421       return *error;
(gdb) 

Program received signal SIGSEGV, Segmentation fault
  si_code: 1 - SEGV_MAPERR - Address not mapped to object.
0x9fffffffbf2f7c20:0 in __pthread_mutex_destroy_ng+0x80 ()
   from /usr/lib/hpux64/libpthread.so.1
(gdb) f 5
#5  0x9fffffffb96b2b80:0 in std::basic_string&amp;lt;char,std::char_traits&amp;lt;char&amp;gt;,std::allocator&amp;lt;char&amp;gt; &amp;gt;::~basic_string (this=0x9fffffff5df30890)
    at /opt/aCC/include_std/string:361
361             _C_unlink();
(gdb) x /16gx *(char**)this-8*8     
0x60000000015f4b90:     0x000000000f0fff04      0x0000000000000000
0x60000000015f4ba0:     0xfeedfacefeedface      0xfeedfacefeedface
0x60000000015f4bb0:     0x000000000137e428      0xffffffffffffffff
0x60000000015f4bc0:     0x00000000000003bb      0x00000000000003bb
0x60000000015f4bd0:     0x73656c6563742061      0x6363727565645f62
0x60000000015f4be0:     0x616c2c2061636374      0x5f636c6f73655f64
0x60000000015f4bf0:     0x6174652c20616363      0x745f636c6f73655f
0x60000000015f4c00:     0x726561736f6e2c20      0x616363745f646573
(gdb) print *this
$1 = {
  _C_data = 0x60000000015f4bd0 "select accrued_bal, acct_close_date, acct_close_reason, acct_desc, acct_no,acct_open_date, acct_status, acct_type, actual_agg_bal_ctd, actual_agg_bal_mtd,actual_agg_bal_ytd, actual_bal, actual_bal_o, "..., 
  static __nullref = &amp;lt;optimized out&amp;gt;, static npos = &amp;lt;optimized out&amp;gt;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;And just in those few commands it crashes&lt;/P&gt;&lt;P&gt;Now I'm completely lost&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;inline const std::string &amp;amp;stmt_str() const { return stmt_str_; }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2013 08:05:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6171807#M496094</guid>
      <dc:creator>Pinkerik</dc:creator>
      <dc:date>2013-08-16T08:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: SIGSEGV, SEGV_MAPERR - Address not mapped to object</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6171941#M496095</link>
      <description>&lt;P&gt;Found out what the problem was,&lt;/P&gt;&lt;P&gt;thing is that the library in which the call crashed (OciConnection::ParseStatement) wasn't compiled with -mt flag, while the main program was&lt;/P&gt;&lt;P&gt;I tryed to replace&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;std::string stmt_str(statement-&amp;gt;stmt_str());&lt;/PRE&gt;&lt;P&gt;with&lt;/P&gt;&lt;PRE&gt;const std::string &amp;amp;stmt_str(statement-&amp;gt;stmt_str());&lt;/PRE&gt;&lt;P&gt;and after it went through the function, and started to crash with new error message:&lt;/P&gt;&lt;PRE&gt;aCC runtime: Use of "-mt" must be consistent during both compilation and linking&lt;/PRE&gt;&lt;P&gt;After that I've used&amp;nbsp;&lt;SPAN&gt;/usr/ccs/bin/footprints to check that, recompile my other libs and everything is ok now&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I could have return to&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;std::string stmt_str(statement-&amp;gt;stmt_str());&lt;/PRE&gt;&lt;P&gt;and everything works fine&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for help, and sorry for taking your time&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2013 11:49:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6171941#M496095</guid>
      <dc:creator>Pinkerik</dc:creator>
      <dc:date>2013-08-16T11:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: SIGSEGV, SEGV_MAPERR - Address not mapped to object</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6172241#M496096</link>
      <description>&lt;P&gt;&amp;gt;(gdb) show heap-check&lt;/P&gt;&lt;P&gt;&amp;gt;Check free() : off&lt;/P&gt;&lt;P&gt;&amp;gt;Check string : off&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may want to turn these on next time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;And just in those few commands it crashes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could single step instructions with "si".&amp;nbsp; And if the address is the same, you could set a watchpoint on that address.&lt;/P&gt;&lt;P&gt;0x60000000015f4bb0: 0x000000000137e42&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;wasn't compiled with -mt flag, while the main program was ...&amp;nbsp;and everything works fine&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Great news.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2013 17:32:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sigsegv-segv-maperr-address-not-mapped-to-object/m-p/6172241#M496096</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2013-08-16T17:32:04Z</dc:date>
    </item>
  </channel>
</rss>

