From nobody@FreeBSD.ORG Thu May 11 20:53:29 2000 Return-Path: Received: by hub.freebsd.org (Postfix, from userid 32767) id C14CB37BC88; Thu, 11 May 2000 20:53:29 -0700 (PDT) Message-Id: <20000512035329.C14CB37BC88@hub.freebsd.org> Date: Thu, 11 May 2000 20:53:29 -0700 (PDT) From: hwc@openfind.com.tw Sender: nobody@FreeBSD.ORG To: freebsd-gnats-submit@FreeBSD.org Subject: pthread hang and Fatal error '_waitq_insert: Already in queue' at line' X-Send-Pr-Version: www-1.0 >Number: 18510 >Category: misc >Synopsis: pthread hang and Fatal error '_waitq_insert: Already in queue' at line' >Confidential: no >Severity: critical >Priority: medium >Responsible: jasone >State: closed >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Thu May 11 21:00:01 PDT 2000 >Closed-Date: Tue May 23 09:45:41 PDT 2000 >Last-Modified: Tue May 23 09:46:53 PDT 2000 >Originator: Wei-Chen Huang >Release: FreeBSD 4.0 and 3.4 >Organization: openfind (http://www.openfind.com) >Environment: FreeBSD sable1.iis.sinica.edu.tw 4.0-STABLE FreeBSD 4.0-STABLE #1: Fri May 12 11:19:20 CST 2000 root@sable1.iis. sinica.edu.tw:/usr/src/sys/compile/SABLE1_MP i386 >Description: I'm programing a http proxy using pthread .. Sometimes program will hang and cpu is 9x%.... I rebuild libc_r with -D_PTHREADS_INVARIANTS -g then, got Fatal error '_pq_remove: Not in priority queue' at line ? in file /usr/src/lib/libc_r/uthread/uthread_priority_queue.c (errno = ?) program terminated.... I'v modified some code, to log thread_id, capture signal and let the program continue... Then *26 ERR-'_waitq_insert: Already in queue',thread id='134639616' thread id=134639616 capture SIGPIPE *26 ERR-'_pq_remove: Not in priority queue',thread id='134642688' *26 ERR-'_waitq_insert: Already in queue',thread id='134642688' *26 ERR-'_pq_remove: Not in priority queue',thread id='134642688' *26 ERR-'_waitq_insert: Already in queue',thread id='134642688' *26 ERR-'_pq_remove: Not in priority queue',thread id='134642688' *26 ERR-'_waitq_insert: Already in queue',thread id='134642688' *26 ERR-'_pq_remove: Not in priority queue',thread id='134642688' *26 ERR-'_waitq_insert: Already in queue',thread id='134642688' infinite loop This condition happened in FreeBSD 3.4, and FreeBSD 4.0, I'v updated source code (cvsup) and make world.. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: Responsible-Changed-From-To: freebsd-bugs->jasone Responsible-Changed-By: jasone Responsible-Changed-When: Fri May 12 00:26:04 PDT 2000 Responsible-Changed-Why: Over to maintainer. From: "hwc" To: , Cc: Subject: Re: misc/18510: pthread hang and Fatal error '_waitq_insert: Already in queue' at line' Date: Sat, 13 May 2000 19:08:25 +0800 This is a multi-part message in MIME format. ------=_NextPart_000_001E_01BFBD0E.9D472320 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Dear Sir: I'v logged more information, and found ... >*26 ERR-'_waitq_insert: Already in queue',thread id=3D'134639616' > thread id=3D134639616 capture SIGPIPE >*26 ERR-'_pq_remove: Not in priority queue',thread id=3D'134642688' >*26 ERR-'_waitq_insert: Already in queue',thread id=3D'134642688' >*26 ERR-'_pq_remove: Not in priority queue',thread id=3D'134642688' >*26 ERR-'_waitq_insert: Already in queue',thread id=3D'134642688' 134639616 is the main thread, 134642688 is the garbage collector thread.... hope this informaation will be helpful.. -- Huang Wei-Chen ------=_NextPart_000_001E_01BFBD0E.9D472320 Content-Type: text/html; charset="big5" Content-Transfer-Encoding: quoted-printable
Dear Sir:
 
I'v  logged more information, and = found=20 ...
 
>*26 ERR-'_waitq_insert: Already in=20 queue',thread = id=3D'134639616'
>       =20 thread id=3D134639616    capture SIGPIPE
>*26=20 ERR-'_pq_remove: Not in priority queue',thread = id=3D'134642688'
>*26=20 ERR-'_waitq_insert: Already in queue',thread id=3D'134642688'
>*26 = ERR-'_pq_remove: Not in priority queue',thread = id=3D'134642688'
>*26=20 ERR-'_waitq_insert: Already in queue',thread = id=3D'134642688'
134639616 is the main = thread,
134642688 is the garbage collector=20 thread....
hope this informaation will be=20 helpful..
--
Huang Wei-Chen
 
 

 
------=_NextPart_000_001E_01BFBD0E.9D472320-- From: "Wei-Chen Huang" To: , Cc: Subject: Re: misc/18510: pthread hang and Fatal error '_waitq_insert: Already in queue' at line' Date: Tue, 23 May 2000 17:32:20 +0800 Sorry... It seems my fault!!! I'v used pthread_mutex_lock when dumping message in signal handling function, and it is undefined to call these pthread functions in signal handler .... Sorry.. to waste your time.. again. -- Huang Wei-Chen State-Changed-From-To: open->closed State-Changed-By: jasone State-Changed-When: Tue May 23 09:45:41 PDT 2000 State-Changed-Why: The PR originator determined the problem to be an application programming error. >Unformatted: