From nobody  Fri Nov 27 14:30:23 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id OAA01256;
          Fri, 27 Nov 1998 14:30:23 -0800 (PST)
          (envelope-from nobody)
Message-Id: <199811272230.OAA01256@hub.freebsd.org>
Date: Fri, 27 Nov 1998 14:30:23 -0800 (PST)
From: fehr@regolith.net
To: freebsd-gnats-submit@freebsd.org
Subject: /stand/sysinstall core dumps (signal 11) if you try to allocate 25 partitions at once.
X-Send-Pr-Version: www-1.0

>Number:         8867
>Category:       bin
>Synopsis:       sysinstall(8): [patch] /stand/sysinstall core dumps (signal 11) if you try to allocate 25 partitions at once.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-sysinstall
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 27 14:40:00 PST 1998
>Closed-Date:    
>Last-Modified:  Sat Jun 29 05:52:17 UTC 2013
>Originator:     Eric Fehr
>Release:        3.0-RELEASE
>Organization:
Internet Direct
>Environment:
FreeBSD momma.bigmomma.com 3.0-RELEASE FreeBSD 3.0-RELEASE #0: Sat Oct 17 17:45:06 GMT 1998    
jkh@kickme.freebsd.org:/usr/src/sys/compile/GENERIC  i386

>Description:
When allocating partitions via sysinstall, upon creating the 25th entry, a Signal 11 is generated.
>How-To-Repeat:
Create 25 partitions in sysinstall.
>Fix:

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->murray 
Responsible-Changed-By: nbm 
Responsible-Changed-When: Sat Aug 5 13:52:46 PDT 2000 
Responsible-Changed-Why:  
sysinstall problems seem to go to murray 

http://www.freebsd.org/cgi/query-pr.cgi?pr=8867 
Responsible-Changed-From-To: murray->eric 
Responsible-Changed-By: murray 
Responsible-Changed-When: Thu Aug 30 15:45:56 PDT 2001 
Responsible-Changed-Why:  
Eric is working on our installer tools now. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=8867 
Responsible-Changed-From-To: eric->freebsd-qa 
Responsible-Changed-By: eric 
Responsible-Changed-When: Mon Oct 1 11:57:15 PDT 2001 
Responsible-Changed-Why:  
assign idle sysinstall bugs to freebsd-qa, as suggested by murray 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=8867 

From: Seth Kingsley <sethk@meowfishies.com>
To: freebsd-gnats-submit@FreeBSD.org, fehr@regolith.net
Cc:  
Subject: Re: i386/8867: /stand/sysinstall core dumps (signal 11) if you try to allocate 25 partitions at once.
Date: 8 Apr 2002 22:04:38 -0700

 --Kj7319i9nmIyA2yE
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 The following patch does two things, in addition to solving the problem
 above:
 
 1. Do not allow the creation of more slices than allowed by the target
    architecture (4 on i386, 16 on PC98).
 2. Advise the user, upon creation of the last slice, that they will
    waste space unless they use the maximum available size.
 
 Index: disks.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /home/ncvs/src/usr.sbin/sysinstall/disks.c,v
 retrieving revision 1.130
 diff -u -p -r1.130 disks.c
 --- disks.c	2002/03/28 08:23:33	1.130
 +++ disks.c	2002/04/09 04:45:34
 @@ -54,8 +54,8 @@ enum size_units_t { UNIT_BLOCKS, UNIT_KI
  #define CHUNK_START_ROW		5
 =20
  /* Where we keep track of MBR chunks */
 -static struct chunk *chunk_info[16];
 -static int current_chunk;
 +static struct chunk *chunk_info[NDOSPART + 1];
 +static int current_chunk, num_chunks;
 =20
  static void	diskPartitionNonInteractive(Device *dev);
  static u_char *	bootalloc(char *name, size_t *size);
 @@ -64,22 +64,21 @@ static void
  record_chunks(Disk *d)
  {
      struct chunk *c1 =3D NULL;
 -    int i =3D 0;
      int last_free =3D 0;
 =20
      if (!d->chunks)
  	msgFatal("No chunk list found for %s!", d->name);
 =20
 -    for (c1 =3D d->chunks->part; c1; c1 =3D c1->next) {
 +    for (num_chunks =3D 0, c1 =3D d->chunks->part; c1 && num_chunks < NDOS=
 PART; c1 =3D c1->next) {
  	if (c1->type =3D=3D unused && c1->size > last_free) {
  	    last_free =3D c1->size;
 -	    current_chunk =3D i;
 +	    current_chunk =3D num_chunks;
  	}
 -	chunk_info[i++] =3D c1;
 +	chunk_info[num_chunks++] =3D c1;
      }
 -    chunk_info[i] =3D NULL;
 -    if (current_chunk >=3D i)
 -	current_chunk =3D i - 1;
 +    chunk_info[num_chunks] =3D NULL;
 +    if (current_chunk >=3D num_chunks)
 +	current_chunk =3D num_chunks - 1;
  }
 =20
  static int Total;
 @@ -410,14 +409,24 @@ diskPartition(Device *dev)
  		int subtype;
  		chunk_e partitiontype;
  #endif
 -		snprintf(tmp, 20, "%lu", chunk_info[current_chunk]->size);
 -		val =3D msgGetInput(tmp, "Please specify the size for new FreeBSD slice =
 in blocks\n"
 -				  "or append a trailing `M' for megabytes (e.g. 20M).");
 -		if (val && (size =3D strtol(val, &cp, 0)) > 0) {
 -		    if (*cp && toupper(*cp) =3D=3D 'M')
 -			size *=3D ONE_MEG;
 -		    else if (*cp && toupper(*cp) =3D=3D 'G')
 -			size *=3D ONE_GIG;
 +		size =3D -1;
 +		if (current_chunk =3D=3D (NDOSPART - 1) &&
 +			!msgYesNo("This is the last slice available. Would you like to\n"
 +			    "create it using the maximum available size, to avoid wasting\n"
 +			    "space?"))
 +		    size =3D chunk_info[current_chunk]->size;
 +		else {
 +		    snprintf(tmp, 20, "%lu", chunk_info[current_chunk]->size);
 +		    val =3D msgGetInput(tmp, "Please specify the size for new FreeBSD sl=
 ice in blocks\n"
 +				      "or append a trailing `M' for megabytes (e.g. 20M).");
 +		    if (val && (size =3D strtol(val, &cp, 0)) > 0) {
 +			if (*cp && toupper(*cp) =3D=3D 'M')
 +			    size *=3D ONE_MEG;
 +			else if (*cp && toupper(*cp) =3D=3D 'G')
 +			    size *=3D ONE_GIG;
 +		    }
 +		}
 +		if (size > 0) {
  #ifdef PC98
  		    Create_Chunk(d, chunk_info[current_chunk]->offset, size,
  			freebsd, 3,
 
 --=20
 || Seth Kingsley || sethk@meowfishies.com ||
 || http://www.meowfishies.com/ | Meow ^_^ ||
 
 --Kj7319i9nmIyA2yE
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.6 (FreeBSD)
 Comment: For info see http://www.gnupg.org
 
 iD8DBQE8snZmD1AymFxBOwgRAlsNAJ0YJAPTMrDEutY+rEAg+uSSmxjevQCeMVCR
 ULODk4yLLY2HYbfseywgaww=
 =eLWP
 -----END PGP SIGNATURE-----
 
 --Kj7319i9nmIyA2yE--
Responsible-Changed-From-To: freebsd-qa->qa 
Responsible-Changed-By: johan 
Responsible-Changed-When: Sat Aug 24 19:38:06 PDT 2002 
Responsible-Changed-Why:  
Use short names for mailing list to make searches    
using the web query form work with the shown responsible. 

This also makes open PRs show up in the summery mail. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=8867 

From: bruce@cran.org.uk
To: bug-followup@freebsd.org, fehr@regolith.net
Cc:  
Subject: Re: bin/8867: sysinstall(8): [patch] /stand/sysinstall core dumps (signal 11) if you try to allocate 25 partitions at once.
Date: Fri, 29 Feb 2008 12:22:22 +0000

 This is still an issue on 7.0: sysinstall doesn't limit the number of
 partitions you can create but segfaults soon after too many have been
 created.
 
 --
 Bruce
Responsible-Changed-From-To: freebsd-bugs->randi 
Responsible-Changed-By: randi 
Responsible-Changed-When: Sat Jun 6 19:48:34 UTC 2009 
Responsible-Changed-Why:  
11 years later, the bug still exists. Taking this. :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=8867 
Responsible-Changed-From-To: randi->freebsd-sysinstall 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Jun 29 05:52:04 UTC 2013 
Responsible-Changed-Why:  
back to mailing list. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=8867 
>Unformatted:
