Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4037312

VM needs to be more careful checking for NULL returns from malloc and friends

    XMLWordPrintable

Details

    • generic, sparc
    • solaris_9

    Description

      michael.ogorman@Ireland 1997-03-07
      ==================================
      The Hotjava web browser coredumps when there is not enough swap space
      on the machine. No messages are sent to the console but a core file
      is found in the users home directory. I have reproduced this several
      times on an Ultra1. When I add swap space to the machine the problem
      disappears.


      michaelo@orange[123]> swap -l
      swapfile dev swaplo blocks free
      /dev/dsk/c0t0d0s1 32,1 16 164144 0
      michaelo@orange[124]> df -k swap
      Filesystem kbytes used avail capacity Mounted on
      swap 13392 2344 11048 18% /tmp
      michaelo@orange[125]>
      ...
      Try to run Hotjava 3 times. when I go to load up a page I get
      a coredump. No messages on the console. No messages from Hotjava.
      ...

      michaelo@orange[126]> file *core*
      core_java: ELF 32-bit MSB core file SPARC Version 1, from 'java'
      core_java_2: ELF 32-bit MSB core file SPARC Version 1, from 'java'
      core_java_3: ELF 32-bit MSB core file SPARC Version 1, from 'java'
      michaelo@orange[127]>

      This will not look very impressive to a customer. A copy of netscape
      can be started under the same circumstances. A copy of framemaker notifies
      the user that there may be a shortage of swap space:
      --------
      michaelo@orange[150]> imaker
      starting imaker ...
      michaelo@orange[151]> imaker: Using /usr/dist/share/framemaker,v5.1/fminit
      imaker: Starting FrameMaker 5. Copyright (c) 1986-1995 Frame Technology Corp.
      imaker: Cannot allocate bitmap pool.
      There is insufficient swap space memory for FrameMaker to run. You need to exit some other process(es) to free enough memory to start FrameMaker.
      imaker: Cannot initialize bitmaps.
      Not enough swap space memory. Exit some processes to free some memory, and try again.
      --------

      But hotjava simply core dumps when you go to load a page.


      Machine configuration:
      Sun Ultra1 167 MHz
      Memory size: 64 Megabytes
      OS: 2.6 build 28


      Location of core files:
      /net/trex.ireland/crashdump/hotjava/4037312

      bren.caperon@Eng 1997-04-02

      Happens on both green and native

      =>[1] _stackdump(0xef5c56d0, 0x6, 0xef5c56e0, 0xee9013ce, 0x81010100, 0xff0000), at 0xef5a9b80
        [2] _panic(0xef5c58c8, 0xef5c5a98, 0xef5c4aec, 0x7efefeff, 0x81010100, 0xff00), at 0xef5a96f0
        ---- called from signal handler with signal 10 (SIGBUS) ------
        [3] 0x141(), at 0x140
        [4] _alloc_stack(0x102000, 0xee901bfc, 0xef5cdbac, 0xef5c5a68, 0x100000, 0xef5c4aec), at 0xef5a7da8
        [5] _alloc_thread(0xef5c5abc, 0x100000, 0xee901c1c, 0xef5c4aec, 0x1, 0x0), at 0xef5ae864
        [6] _idle_thread_create(0xef5c4aec, 0x1cf48, 0x0, 0x0, 0x0, 0x0), at 0xef5ae628
        [7] _new_lwp(0x0, 0xef5b0aa0, 0x1, 0xef5b0aa0, 0x0, 0xef5c4aec), at 0xef5a7bc0
        [8] __door_return(0x0, 0x20900100, 0x0, 0x0, 0xee901d98, 0x4), at 0xef436414
        [9] _sc_door_func(0x67c9, 0x0, 0x0, 0xef5b0c38, 0x0, 0x0), at 0xef5b0b28
      dbx: core file read error: address 0x3e not in data space
      dbx: attempt to read stack failed - bad frame pointer
            t@1 a l@1 ?() LWP suspended in __open()
            t@2 b l@2 ?() LWP suspended in __signotifywait()
            t@3 ?() sleep on 0xef5c65c8 in _swtch()
            t@4 _start() sleep on 0x255d0 in _swtch()
            t@5 _start() sleep on 0xef5c6290 in _swtch()
            t@6 _start() sleep on 0x22614 in _swtch()
            t@7 _start() sleep on 0x22974 in _swtch()
            t@8 _start() sleep on 0x22b24 in _swtch()
            t@9 a l@5 _start() sleep on 0x23034 in __lwp_sema_wait()
           t@10 a l@3 _start() LWP suspended in _poll()
           t@11 a l@4 _start() sleep on 0x225a8 in __lwp_sema_wait()
           t@12 b l@6 _co_timerset() LWP suspended in __lwp_sema_wait()
           t@14 _start() sleep on 0x2310c in _swtch()
           
      GREEN

      =>[1] __lwp_kill(0x0, 0x6, 0x0, 0xef7a9d54, 0xc, 0x0), at 0xef439104
        [2] sysAbort(0x0, 0xefffed88, 0xefffd758, 0xa, 0x0, 0x0), at 0xef7866c0
        ---- called from signal handler with signal 10 (SIGBUS) ------
        [3] _memset(), at 0xef691880
        [4] allocateContextAndStack(0xecdc1de0, 0xecdc2000, 0xefffdbc4, 0xef7aa158, 0x1, 0xef4a1c30), at 0xef7875d8
        [5] sysThreadCreate(0x20000, 0x0, 0xef77aef8, 0xefffdbc4, 0xed5f2ee0, 0x13), at 0xef78f848
        [6] threadCreate(0xed5f2ee0, 0x0, 0x20000, 0xef77aef8, 0x0, 0xed88ee05), at 0xef77b744
        [7] java_lang_Thread_start(0xed5f2ee0, 0xed88edd8, 0xef7a9c28, 0xef7a9d28, 0x3b6c93fe, 0x1e), at 0xef77b094
        [8] JITSynchronizedNativeStub(0x1, 0xed5b4cb8, 0xef7a9c28, 0xfffffff8, 0x0, 0xed88edd5), at 0xef25b900
        [9] 0x1dd570(0xed5f10e8, 0xed5f10e8, 0xed5f2ec0, 0xed5f2ec0, 0x3b6c9c79, 0x3b57cb), at 0x1dd56f
        [10] 0x1deb14(0xed5f10e8, 0xed5f2ec0, 0x0, 0xed5f2ed8, 0x3b6c9c7b, 0xed88ed8d), at 0x1deb13
        [11] 0x1d7618(0xed5f10e8, 0xed5f2ec0, 0x184460, 0x1846c0, 0xed5b4688, 0xed5b4698), at 0x1d7617
        [12] 0x1d7594(0xed5f2ec0, 0xed5f0fa0, 0x0, 0xef761df4, 0x3170ab, 0x306040), at 0x1d7593
        [13] 0x315f8c(0xed5f2ec0, 0xed5f0fa0, 0x0, 0x317070, 0x317090, 0xffffffff), at 0x315f8b
        [14] 0x315de8(0xed5f10f0, 0xed5f10f0, 0xffffffff, 0xffffffff, 0xed5f0fa0, 0xed5f2ec0), at 0x315de7
        [15] 0x317070(0xed5f2cf0, 0xed5f10f0, 0xffffffff, 0xffffffff, 0xed5f0fa0, 0xed5b4468), at 0x31706f
        [16] 0x315c00(0xed5f0fa0, 0xed5f10f0, 0xffffffff, 0xffffffff, 0xed5f0fa0, 0xed5f2cf0), at 0x315bff
        [17] 0x317008(0xed5f0fa0, 0xed5f10f0, 0xed5f0fa0, 0xfffffff8, 0x0, 0xed889655), at 0x317007
        [18] 0x316ce4(0xed5f0fa0, 0xed5f11e8, 0xef7a9c28, 0x0, 0xed5f2ce0, 0x1dabe23d), at 0x316ce3
        [19] 0x212bd8(0xed5f11e8, 0x0, 0x1, 0xfffffff8, 0x0, 0xed8895cd), at 0x212bd7
        [20] 0x216344(0xed5f11e8, 0xed5f0eb8, 0xef7a9c28, 0x0, 0xed5f2cb8, 0x1dabe1d7), at 0x216343
        [21] 0x212bd8(0xed5f0eb8, 0x0, 0x8, 0x3027e0, 0xed5f2340, 0xed5b4058), at 0x212bd7
        [22] 0x216344(0xed5f0eb8, 0xed5f2348, 0xef7a9c28, 0x7, 0xefffe490, 0x3b57c8), at 0x216343
        [23] 0x1a67e0(0xed5f2300, 0xed5f0eb8, 0x0, 0xed5b0fe8, 0x610, 0x2fda80), at 0x1a67df
        [24] 0x1a9044(0xed5f2300, 0xed5f23e0, 0xed5f0eb8, 0x301444, 0x301510, 0xffffffff), at 0x1a9043
        [25] 0x309e60(0xed5f2300, 0xed5f0eb8, 0xef7a9c28, 0x24b260, 0xed5b9508, 0xed5b4058), at 0x309e5f
        [26] 0x30144c(0xed5b94c8, 0xed5f0eb8, 0xed5adee8, 0x70, 0x70, 0xffffffff), at 0x30144b
        [27] 0x300d28(0xed5b1058, 0xed5f0eb8, 0x1, 0x0, 0x2f8570, 0xffffffff), at 0x300d27
        [28] 0x300978(0xed5b1058, 0xed5f0eb8, 0xed5ad8c0, 0xed5c93e0, 0xed5c9408, 0xed59bf40), at 0x300977

      Attachments

        Activity

          People

            never Tom Rodriguez
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: