pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/39012 (boehm-gc coredumps on GC_INIT under hpcmips (mipsel))



Additional information:

I have tried building boehm-gc from the latest pkgsrc and can now
provide a more precise backtrace.

  Script started on Mon Jul  7 05:30:12 2008
  bash-3.2# gdb ./a.out
  GNU gdb 5.3nb1
  Copyright 2002 Free Software Foundation, Inc.
  This GDB was configured as "mipsel--netbsd"...
  (gdb) run
  Starting program: /usr/pkgsrc/devel/boehm-gc/work/gc-7.0/a.out

  Program received signal SIGSEGV, Segmentation fault.
  0x7df456e8 in GC_find_limit_with_bound () at os_dep.c:917
  917                   GC_noop1((word)(*result));
  (gdb) c
  Continuing.

  Program received signal SIGSEGV, Segmentation fault.
  0x7df456e8 in GC_find_limit_with_bound () at os_dep.c:917
  917                   GC_noop1((word)(*result));
  (gdb) c
  Continuing.

  Program received signal SIGSEGV, Segmentation fault.
  0x7df3b920 in GC_FirstDLOpenedLinkMap () at dyn_load.c:455
  455                           = ((struct r_debug *)(dp->d_un.d_ptr))->r_map;

  (gdb) list
  450       if( cachedResult == 0 ) {
  451           int tag;
  452           for( dp = _DYNAMIC; (tag = dp->d_tag) != 0; dp++ ) {
  453               if( tag == DT_DEBUG ) {
  454                   struct link_map *lm
  455                           = ((struct r_debug *)(dp->d_un.d_ptr))->r_map;
  456                   if( lm != 0 ) cachedResult = lm->l_next; /*
might be NIL */
  457                   break;
  458               }
  459           }

  (gdb) bt
  #0  0x7df3b920 in GC_FirstDLOpenedLinkMap () at dyn_load.c:455
  #1  0x7df3b9f0 in GC_register_dynamic_libraries () at dyn_load.c:475
  #2  0x7df42cd0 in GC_push_roots () from ./.libs/libgc.so.1
  #3  0x7df422d4 in GC_mark_some () from ./.libs/libgc.so.1
  #4  0x7df3809c in GC_stopped_mark () from ./.libs/libgc.so.1
  #5  0x7df384d8 in GC_try_to_collect_inner () from ./.libs/libgc.so.1
  #6  0x00400adc in main (argc=1, argv=0x7fffdca4, envp=0x7fffdcac) at
gctest.c:7
  (gdb) quit
  The program is running.  Exit anyway? (y or n) y
  bash-3.2# exit

  Script done on Mon Jul  7 05:31:04 2008

Note that the first two segfaults are red herrings. Apparently some
OSes (including NetBSD?) do not have a native way to find the
beginning and end of the main data segment, so boehm-gc must perform a
search at startup which causes segmentation faults.

The true bug appears to be releated to the dynamic library tracing
routines in dyn_load.c. The following page has helpful information
about the porting changes necessary to enable dynamic library support:

  http://www.hpl.hp.com/personal/Hans_Boehm/gc/porting.html

The page also mentions that if DYNAMIC_LOADING is undefined in
gcconfig.h, tracing of dynamic library data will be disabled. This
might be a quick, if rather unsatisfying, way to get boehm-gc
"working" in NetBSD/mipsel.

--Ben


Home | Main Index | Thread Index | Old Index