DragonFly BSD
DragonFly bugs List (threaded) for 2005-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Firefox hangs in state 'kqread'


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 20 Mar 2005 10:43:44 -0800 (PST)

:Hello,
:
:I have finally come to the conclusion that the problem was introduced between 
:January 30th and February 1st, somewhere in libc_r.
:
:When I replace, on a latest -CURRENT world and kernel, /usr/lib/libc_r.so.4 by
:an older version dating from 01/30, the hangs disappear. 
:..
:
:Regards,
:
:Laurent

    This date range encompasses the first major threading commit for libc.

    I went through the code and one thing stuck out... actually two things
    stuck out.  _kevent() and _flock().

    /usr/src/lib/libc/net/res_send.c appears to call _kevent() when I
    believe it should be calling kevent().

    and /usr/src/lib/libc/yp/yplib.c calls _flock() when I believe it
    should be calling flock().

    David or Joerg... could you check out the use of kevent in 
    net/res_send.c ?

    I compiled a simple program which called res_send() -g -pthread -static
    and objdump -d'd the result.  res_send() appears to call __sys_kevent()
    directly and does not appear to running through libc_r's version of
    kevent().

    Laurent, could you please try this patch, and then recompile and 
    reinstall your libc_r ?

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>

Index: net/res_send.c
===================================================================
RCS file: /cvs/src/lib/libc/net/res_send.c,v
retrieving revision 1.4
diff -u -r1.4 res_send.c
--- net/res_send.c	31 Jan 2005 22:29:33 -0000	1.4
+++ net/res_send.c	20 Mar 2005 18:37:38 -0000
@@ -728,7 +728,7 @@
 
 			EV_SET(&kv, s, EVFILT_READ, EV_ADD | EV_ONESHOT, 0,0,0);
 
-			n = _kevent(kq, &kv, 1, &kv, 1, &ts);
+			n = kevent(kq, &kv, 1, &kv, 1, &ts);
 			if (n < 0) {
 				if (errno == EINTR) {
 					(void) gettimeofday(&ctv, NULL);



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