From charles@callen.phys.trinity.edu  Mon Oct  8 09:22:13 2001
Return-Path: <charles@callen.phys.trinity.edu>
Received: from callen.phys.trinity.edu (callen.phys.trinity.edu [131.194.133.231])
	by hub.freebsd.org (Postfix) with ESMTP id 6507E37B406
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  8 Oct 2001 09:22:13 -0700 (PDT)
Received: (from charles@localhost)
	by callen.phys.trinity.edu (8.11.6/8.11.4) id f98GM3E81443;
	Mon, 8 Oct 2001 11:22:03 -0500 (CDT)
	(envelope-from charles)
Message-Id: <200110081622.f98GM3E81443@callen.phys.trinity.edu>
Date: Mon, 8 Oct 2001 11:22:03 -0500 (CDT)
From: Charles Allen <charles.allen@ieee.org>
Reply-To: Charles Allen <charles.allen@ieee.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: OpenDX port dumps core in dxexec
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         31141
>Category:       ports
>Synopsis:       OpenDX port dumps core in dxexec
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 08 09:30:00 PDT 2001
>Closed-Date:    Fri Oct 12 03:40:33 PDT 2001
>Last-Modified:  Fri Oct 12 03:41:08 PDT 2001
>Originator:     Charles Allen
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD i386 4.4-STABLE Oct 5 20:09:03 CDT 2001
	4.4-STABLE cvsupped and rebuilt 2001-10-05.
	All ports up-to-date with that cvsup date as well.

>Description:
	The OpenDX port gets to the initial dialog, but when trying to
	run an example or open the tutorial example1.net file, it dumps
	core in	dxexec.  Gdb reports the following from the dxexec.core
	file:

(gdb) where
#0  0x289df878 in kill () from /usr/lib/libc_r.so.4
#1  0x28a29dc2 in abort () from /usr/lib/libc_r.so.4
#2  0x289f64da in _thread_exit () from /usr/lib/libc_r.so.4
#3  0x289f3ecb in _thread_init () from /usr/lib/libc_r.so.4
#4  0x28a2a5b0 in _thread_init_invoker::_thread_init_invoker () from /usr/lib/libc_r.so.4
#5  0x28a2a5e9 in _thread_init_invoker::_thread_init_invoker () from /usr/lib/libc_r.so.4
#6  0x28a2a612 in _thread_init_invoker::_thread_init_invoker () from /usr/lib/libc_r.so.4
#7  0x28a2a640 in _thread_init_invoker::_thread_init_invoker () from /usr/lib/libc_r.so.4
#8  0x289b15d2 in _init () from /usr/lib/libc_r.so.4
#9  0x283dd8d4 in _rtld () from /usr/libexec/ld-elf.so.1
(gdb) 



>How-To-Repeat:
	Install opendx port, try to run any example.

>Fix:
	None I could find.
>Release-Note:
>Audit-Trail:

From: Thomas Gellekum <tg@melaten.rwth-aachen.de>
To: Charles Allen <charles.allen@ieee.org>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, deischen@FreeBSD.ORG
Subject: Re: ports/31141: OpenDX port dumps core in dxexec
Date: 10 Oct 2001 13:46:12 +0200

 ,----
 | $ /usr/local/dx/bin_freebsd/dxexec                   
 | Memory cache will use 24 MB (2 for small items, 22 for large)
 | 
 | Fatal error 'Cannot allocate priority ready queue.' at line 241 in file
 | /home/FreeBSD/5/src/lib/libc_r/uthread/uthread_init.c (errno = 22)
 | Abort (core dumped) 
 `----
 
 I guess EINVAL comes from malloc(3) via brk(2) (but I'll need to build
 a libc_r with debugging symbols to make sure). First time I see this.
 
 I tried the other binaries from OpenDX, they seem to start up fine.
 
 Daniel, any ideas?
 
 tg

From: Daniel Eischen <eischen@vigrid.com>
To: Thomas Gellekum <tg@melaten.rwth-aachen.de>
Cc: Charles Allen <charles.allen@ieee.org>,
	FreeBSD-gnats-submit@FreeBSD.ORG, deischen@FreeBSD.ORG
Subject: Re: ports/31141: OpenDX port dumps core in dxexec
Date: Wed, 10 Oct 2001 08:40:33 -0400 (EDT)

 On 10 Oct 2001, Thomas Gellekum wrote:
 
 > ,----
 > | $ /usr/local/dx/bin_freebsd/dxexec                   
 > | Memory cache will use 24 MB (2 for small items, 22 for large)
 > | 
 > | Fatal error 'Cannot allocate priority ready queue.' at line 241 in file
 > | /home/FreeBSD/5/src/lib/libc_r/uthread/uthread_init.c (errno = 22)
 > | Abort (core dumped) 
 > `----
 > 
 > I guess EINVAL comes from malloc(3) via brk(2) (but I'll need to build
 > a libc_r with debugging symbols to make sure). First time I see this.
 > 
 > I tried the other binaries from OpenDX, they seem to start up fine.
 > 
 > Daniel, any ideas?
 
 The above error message looks very similar to old error messages that
 were caused either by the threads library not being properly initialized
 (before trying to use functions within it), or by having relying on
 old libraries that use libgcc_r, or something like that...
 
 -- 
 Dan Eischen

From: Thomas Gellekum <tg@melaten.rwth-aachen.de>
To: Charles Allen <charles.allen@ieee.org>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: ports/31141: OpenDX port dumps core in dxexec
Date: 11 Oct 2001 13:40:04 +0200

 --=-=-=
 
 Can you please try the attached patch?
 
 tg
 
 
 --=-=-=
 Content-Type: text/x-patch
 Content-Disposition: attachment;
   filename="patch-src:exec:libdx:memory.c"
 
 --- src/exec/libdx/memory.c.orig	Mon May 21 07:06:59 2001
 +++ src/exec/libdx/memory.c	Thu Oct 11 10:15:47 2001
 @@ -1057,6 +1057,19 @@
  #define LARGE(x) ((int)x>=(int)large)
  #endif
  
 +#ifdef	freebsd
 +#define initvalues
 +#define SMALL_BASE    0               /* use data segment */
 +#define SMALL_GET     _dxfgetmem      /* expand by using DosSetMem */
 +#define LARGE_GET     _dxfgetmem      /* expand by using DosSetMem */
 +#define LARGE_INIT    2 MEG           /* doesn't matter; consistent w/ sgi */
 +#define LARGE_INCR    2 MEG           /* doesn't matter; consistent w/ sgi */
 +#define SIZE_ROUND    2 MEG           /* doesn't matter; consistent w/ sgi */
 +#define MALLOC_NONE   1               /* provide malloc from global arena */
 +#define SMALL(x) ((long)x<(long)large)
 +#define LARGE(x) ((long)x>=(long)large)
 +#endif
 +
  #ifdef	cygwin
  #define initvalues
  #define SMALL_BASE    0               /* use data segment */
 
 --=-=-=--
State-Changed-From-To: open->closed 
State-Changed-By: tg 
State-Changed-When: Fri Oct 12 03:40:33 PDT 2001 
State-Changed-Why:  
Should be fixed in latest version of the port. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31141 
>Unformatted:
