<?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: Bus error (coredump) when running a script that contains sql commands in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/bus-error-coredump-when-running-a-script-that-contains-sql/m-p/2453032#M11622</link>
    <description>Hi Brad,&lt;BR /&gt;&lt;BR /&gt;Check the core file with "file core" and read signal online manual to determine the type of problem. You can also check it with "strings core|pg"&lt;BR /&gt;</description>
    <pubDate>Thu, 12 Oct 2000 16:08:09 GMT</pubDate>
    <dc:creator>CHRIS_ANORUO</dc:creator>
    <dc:date>2000-10-12T16:08:09Z</dc:date>
    <item>
      <title>Bus error (coredump) when running a script that contains sql commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bus-error-coredump-when-running-a-script-that-contains-sql/m-p/2453029#M11619</link>
      <description>I run a script containing sql commands on one box and everything works fine.  However, if I run the same script on another box, I get a "Bus error (coredump)" error message.  Where do I begin looking for the reasoning behind this error?  Could it be a kernel parameter difference?&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 12 Oct 2000 15:52:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bus-error-coredump-when-running-a-script-that-contains-sql/m-p/2453029#M11619</guid>
      <dc:creator>Brad Beard</dc:creator>
      <dc:date>2000-10-12T15:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Bus error (coredump) when running a script that contains sql commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bus-error-coredump-when-running-a-script-that-contains-sql/m-p/2453030#M11620</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;"Bus error" is the error that the system gives when it tries to find the end of a non-terminated string, asking for more and more data in its search for the end.  That is, the system asks for more data than the memory bus can give.&lt;BR /&gt; &lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 12 Oct 2000 16:01:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bus-error-coredump-when-running-a-script-that-contains-sql/m-p/2453030#M11620</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2000-10-12T16:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Bus error (coredump) when running a script that contains sql commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bus-error-coredump-when-running-a-script-that-contains-sql/m-p/2453031#M11621</link>
      <description>Hi Brad,&lt;BR /&gt;&lt;BR /&gt;Do you have Oracle support? If so, I would check out their Metalink site for resolution.&lt;BR /&gt;&lt;BR /&gt;For example, here is a possible hit:-&lt;BR /&gt;&lt;BR /&gt;Problem Description: &lt;BR /&gt;==================== &lt;BR /&gt;&lt;BR /&gt;You are on HP-UX 10.20 running RDBMS 7.3.4.1.  You have created a Korn&lt;BR /&gt;shell script that invokes SQL*Plus. One of the environment variables &lt;BR /&gt;declared within the script includes dashes '-'.  Depending on the &lt;BR /&gt;position of the dash, the script will either work or core dump.  For&lt;BR /&gt;example, this portion of the script with a three-level directory &lt;BR /&gt;structure works:&lt;BR /&gt;&lt;BR /&gt; #!/bin/ksh&lt;BR /&gt; #&lt;BR /&gt; # 3 Level Directory Structure&lt;BR /&gt; #&lt;BR /&gt; export TMP_DIR=/home/oracle/test-dir1 &lt;BR /&gt; sqlplus -s &amp;lt;&lt;EOF&gt;&lt;/EOF&gt; userid/password&lt;BR /&gt; spool $TMP_DIR/testsh3.out  &lt;BR /&gt; spool off&lt;BR /&gt; &lt;BR /&gt; @test.sql&lt;BR /&gt; EOF&lt;BR /&gt;&lt;BR /&gt;However, a similar script modified so that "TMP_DIR" is defined to include four &lt;BR /&gt;levels of directories fails with a core dump:&lt;BR /&gt;&lt;BR /&gt; #!/bin/ksh&lt;BR /&gt; #&lt;BR /&gt; # 4 Level Directory Structure&lt;BR /&gt; #&lt;BR /&gt; export TMP_DIR=/home/oracle/test-dir1/testdir2    &lt;BR /&gt; sqlplus -s &amp;lt;&lt;EOF&gt;&lt;/EOF&gt; userid/password&lt;BR /&gt; spool $TMP_DIR/testsh4.out&lt;BR /&gt; spool off&lt;BR /&gt;&lt;BR /&gt; @test.sql&lt;BR /&gt; EOF&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Problem Explanation: &lt;BR /&gt;==================== &lt;BR /&gt;&lt;BR /&gt;The version of the Korne shell that you are using may be causing this problem.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Search Words: &lt;BR /&gt;============= &lt;BR /&gt;&lt;BR /&gt;bus error&lt;BR /&gt;&lt;BR /&gt;Solution: CHECK VERSION OF "/BIN/KSH" AVAILABLE ON SYSTEM&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Solution Description: &lt;BR /&gt;===================== &lt;BR /&gt;&lt;BR /&gt;You need to verify the version of "/bin/ksh" that is being used:&lt;BR /&gt;&lt;BR /&gt; % which ksh&lt;BR /&gt;  ---&amp;gt; /bin/ksh&lt;BR /&gt; % what /bin/ksh&lt;BR /&gt; /bin/ksh:&lt;BR /&gt;        $Revision: 78.5.1.11 $&lt;BR /&gt;        Version 11/16/88&lt;BR /&gt;    PATCH_10_20: arith.o blok.o ctype.o defs.o edit.o echo.o expand.o fault.o &lt;BR /&gt;io.o string.o stak.o word.o emacs.o vi.o hpux_rel.o args.o builtin.o cmd.o main.&lt;BR /&gt;o msg.o print.o xec.o name.o macro.o error.o service.o test.o jobs.o&lt;BR /&gt;history.o 96/12/19&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Solution Description:&lt;BR /&gt;=====================&lt;BR /&gt;&lt;BR /&gt;If you are using "/bin/ksh" at one of the following levels, you need to get &lt;BR /&gt;Revision: 78.5.1.11 or Revision: 78.5.1.28&lt;BR /&gt;&lt;BR /&gt;  $Revision: 78.5.1.16 $&lt;BR /&gt;  $Revision: 78.5.1.22 $&lt;BR /&gt;   $Revision: 78.5.1.26 $&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;John&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Oct 2000 16:02:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bus-error-coredump-when-running-a-script-that-contains-sql/m-p/2453031#M11621</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2000-10-12T16:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Bus error (coredump) when running a script that contains sql commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bus-error-coredump-when-running-a-script-that-contains-sql/m-p/2453032#M11622</link>
      <description>Hi Brad,&lt;BR /&gt;&lt;BR /&gt;Check the core file with "file core" and read signal online manual to determine the type of problem. You can also check it with "strings core|pg"&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Oct 2000 16:08:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bus-error-coredump-when-running-a-script-that-contains-sql/m-p/2453032#M11622</guid>
      <dc:creator>CHRIS_ANORUO</dc:creator>
      <dc:date>2000-10-12T16:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: Bus error (coredump) when running a script that contains sql commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bus-error-coredump-when-running-a-script-that-contains-sql/m-p/2453033#M11623</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;Another possibility is this:-&lt;BR /&gt;&lt;BR /&gt;HPUX 10.20&lt;BR /&gt;&lt;BR /&gt;The ksh seems to intermittently coredump (and/or) erroneously run&lt;BR /&gt;with one of our scripts that performs Oracle database housecleaning&lt;BR /&gt;functions.&lt;BR /&gt;&lt;BR /&gt;This problem is quite serious to us since it can leave the database&lt;BR /&gt;in an undesirable state requiring manual cleaning.&lt;BR /&gt;&lt;BR /&gt;When run with set -x, we notice that several heredocs are not shown&lt;BR /&gt;in the output, these are the cases that do not execute correctly&lt;BR /&gt;and sometimes dump core:&lt;BR /&gt;&lt;BR /&gt;         existe=0&lt;BR /&gt;         + [ 0 = 0 ]&lt;BR /&gt;         + echo drop rel1012_temp&lt;BR /&gt;         drop rel1012_temp&lt;BR /&gt;         + tee /tmp/te1398&lt;BR /&gt;         + sqlplus -s ecfcctrp/ecfcctrp   &amp;lt;---- Here is the problem&lt;BR /&gt;         + existe=1&lt;BR /&gt;&lt;BR /&gt;     It should execute the sqlplus statement like the following one:&lt;BR /&gt;&lt;BR /&gt;         existe=0&lt;BR /&gt;         + [ 0 = 0 ]&lt;BR /&gt;         + echo drop rel1003_temp&lt;BR /&gt;         drop rel1003_temp&lt;BR /&gt;         + tee /tmp/te1398&lt;BR /&gt;         + sqlplus -s ecfcctrp/ecfcctrp&lt;BR /&gt;         + 0&amp;lt; /tmp/sh4300.57&lt;BR /&gt;&lt;BR /&gt;         Table dropped.&lt;BR /&gt;&lt;BR /&gt;         + existe=1&lt;BR /&gt;&lt;BR /&gt;There appears to be no heredoc temp file in the failed case, ie the&lt;BR /&gt;line:&lt;BR /&gt;&lt;BR /&gt;  '+ 0&amp;lt; /tmp/sh4300.57'.&lt;BR /&gt;&lt;BR /&gt;We would like this problem fixed as it impacts on our database use.&lt;BR /&gt;&lt;BR /&gt;Cause Text&lt;BR /&gt;&lt;BR /&gt;ksh(1) had limited the number of open files at&lt;BR /&gt;any time to 20, which was not sufficient in the&lt;BR /&gt;case of the script which used a large number of&lt;BR /&gt;heredocs. ksh(1) didn't handle the case when&lt;BR /&gt;this limit was exceeded, and hence it coredumped.&lt;BR /&gt;&lt;BR /&gt;sh-posix(1) did not have any limitation on the&lt;BR /&gt;number of open files. It was already using the&lt;BR /&gt;system configured value for this. But, the code&lt;BR /&gt;which calculated the index to the array into&lt;BR /&gt;which the io structures were stored, was not&lt;BR /&gt;correct, which resulted in core dump.&lt;BR /&gt;&lt;BR /&gt;Fix Text&lt;BR /&gt;&lt;BR /&gt;The fix has been checked-in to the current release of&lt;BR /&gt;HP-UX (11.01)&lt;BR /&gt;&lt;BR /&gt;A 10.20 ksh(1) patch - PHCO_17691 has been delivered&lt;BR /&gt;for the fix.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards.&lt;BR /&gt;John</description>
      <pubDate>Thu, 12 Oct 2000 16:17:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bus-error-coredump-when-running-a-script-that-contains-sql/m-p/2453033#M11623</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2000-10-12T16:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Bus error (coredump) when running a script that contains sql commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bus-error-coredump-when-running-a-script-that-contains-sql/m-p/2453034#M11624</link>
      <description>This is actually Sybase sql.  I have now found that the box where this script works has the POSIX cummulative patch and the box that it does not work on does NOT have this patch.  I am going to install this patch then retry.  I will let you know the outcome.  Thank you for your help.&lt;BR /&gt;&lt;BR /&gt;Brad</description>
      <pubDate>Thu, 12 Oct 2000 16:47:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bus-error-coredump-when-running-a-script-that-contains-sql/m-p/2453034#M11624</guid>
      <dc:creator>Brad Beard</dc:creator>
      <dc:date>2000-10-12T16:47:17Z</dc:date>
    </item>
  </channel>
</rss>

