From elsukov@rdu.kirov.ru  Tue Sep 13 12:46:37 2005
Return-Path: <elsukov@rdu.kirov.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 742F616A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 13 Sep 2005 12:46:37 +0000 (GMT)
	(envelope-from elsukov@rdu.kirov.ru)
Received: from mail.rdu.kirov.ru (ns.rdu.kirov.ru [217.9.151.217])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B897443D45
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 13 Sep 2005 12:46:36 +0000 (GMT)
	(envelope-from elsukov@rdu.kirov.ru)
Received: from rdu.kirov.ru (localhost [127.0.0.1])
	by mail.rdu.kirov.ru (Postfix) with ESMTP id 78F06115662
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 13 Sep 2005 16:46:33 +0400 (MSD)
Received: (from elsukov@localhost)
	by rdu.kirov.ru (8.12.10/8.12.9/Submit) id j8DCkXGK026207;
	Tue, 13 Sep 2005 16:46:33 +0400 (MSD)
Message-Id: <200509131246.j8DCkXGK026207@rdu.kirov.ru>
Date: Tue, 13 Sep 2005 16:46:33 +0400 (MSD)
From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
Reply-To: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: 6.0-BETA4 hangs while trying idprio
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         86067
>Category:       kern
>Synopsis:       [sched_ule] 6.0-BETA4 hangs while trying idprio
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jeff
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 13 12:50:15 GMT 2005
>Closed-Date:    Tue Jul 04 15:14:43 GMT 2006
>Last-Modified:  Tue Jul 04 15:14:43 GMT 2006
>Originator:     Andrey V. Elsukov
>Release:        6.0-BETA4 FreeBSD 6.0-BETA4 #8: Wed Sep  7
>Organization:
>Environment:
System: FreeBSD test.xxxxx.xxxxx.xx 6.0-BETA4 FreeBSD 6.0-BETA4 #8: Wed Sep  7 15:54:41 MSD 2005     butcher@test.xxxxx.xxxxx.xx:/usr/obj/usr/src/sys/TEST  i386

diff -ub GENERIC TEST
-ident          GENERIC
+ident          TEST
-options        SCHED_4BSD              # 4BSD scheduler
+options        SCHED_ULE               # ULE scheduler
+options        KDB_TRACE
+options                SC_PIXEL_MODE
+options                SC_TWOBUTTON_MOUSE

>Description:
	I tried run this command (as root): 
	# idprio 31 nice -n 20 top 
	It's not running. I break it with Ctrl+C. I tried run it some times. 
	And system hangs without kernle panic/dump.
	
>How-To-Repeat:
	I tryid this 4 times.
>Fix:
	Currently i don't know.
>Release-Note:
>Audit-Trail:

From: Gleb Smirnoff <glebius@FreeBSD.org>
To: "Andrey V. Elsukov" <bu7cher@yandex.ru>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: kern/86067: 6.0-BETA4 hangs while trying idprio
Date: Tue, 13 Sep 2005 16:58:25 +0400

 On Tue, Sep 13, 2005 at 04:46:33PM +0400, Andrey V. Elsukov wrote:
 A> -options        SCHED_4BSD              # 4BSD scheduler
 A> +options        SCHED_ULE               # ULE scheduler
 A> 
 A> >Description:
 A> 	I tried run this command (as root): 
 A> 	# idprio 31 nice -n 20 top 
 A> 	It's not running. I break it with Ctrl+C. I tried run it some times. 
 A> 	And system hangs without kernle panic/dump.
 
 Is it reproducible with SCHED_4BSD?
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE

Adding to audit trail from email on freebsd-bugs:

No. With SHED_4BSD this command works.

--
WBR, Andrey V. Elsukov
Responsible-Changed-From-To: freebsd-bugs->jeff 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Wed Sep 14 06:13:26 GMT 2005 
Responsible-Changed-Why:  
The problem is ULE specific. 

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

From: David Xu <davidxu@freebsd.org>
To: bug-followup@freebsd.org, bu7cher@yandex.ru
Cc:  
Subject: Re: kern/86067: [sched_ule] 6.0-BETA4 hangs while trying idprio
Date: Wed, 21 Sep 2005 16:40:26 +0800

 Can you try following patch ? This patch does not fully fix
 the problem, but it is worth to try.
 
 David Xu
 
 Index: sched_ule.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/kern/sched_ule.c,v
 retrieving revision 1.157
 diff -u -r1.157 sched_ule.c
 --- sched_ule.c    19 Aug 2005 11:51:41 -0000    1.157
 +++ sched_ule.c    21 Sep 2005 08:33:09 -0000
 @@ -863,6 +863,7 @@
      struct runq *swap;
      struct kse *ke;
      int nice;
 +    int class;
  
      mtx_assert(&sched_lock, MA_OWNED);
      swap = NULL;
 @@ -880,6 +881,9 @@
              kseq->ksq_next = swap;
              continue;
          }
 +        class = PRI_BASE(ke->ke_ksegrp->kg_pri_class);
 +        if (class != PRI_TIMESHARE)
 +            return (ke);
          /*
           * If we encounter a slice of 0 the kse is in a
           * TIMESHARE kse group and its nice was too far out
 

From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: David Xu <davidxu@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: kern/86067: [sched_ule] 6.0-BETA4 hangs while trying idprio
Date: Wed, 21 Sep 2005 14:44:03 +0400

 David Xu wrote:
 > Can you try following patch ? This patch does not fully fix
 > the problem, but it is worth to try.
 
 Yes, this works. Thanks.
 
 -- 
 WBR, Andrey V. Elsukov
 
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Tue Jul 4 15:14:11 UTC 2006 
State-Changed-Why:  
David Xu has fixed the issue in HEAD and RELENG_6. 

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