* RE: gnatsd Too many open files error
[not found] <011401c41c25$a94e86c0$2c88030a@LTIRVAJIMS3>
@ 2004-04-07 18:06 ` Jim Searle
2004-04-07 18:51 ` Jim Searle
0 siblings, 1 reply; 2+ messages in thread
From: Jim Searle @ 2004-04-07 18:06 UTC (permalink / raw)
To: bug-gnats; +Cc: help-gnats
[-- Attachment #1.1: Type: text/plain, Size: 2070 bytes --]
I CC'ed hep-gnats since I've received no response from bug-gnats...
It seems that gnatsd never closes the PR.lock file, an strace of the REPL
command shows this:
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/gnats-adm/gnats.lock",
O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0) = 5
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/gnats-adm/index", O_RDONLY) = 6
close(6) = 0
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/gnats-adm/locks/3515.lock",
O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644) = 6
close(6) = 0
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/test/3515", O_RDONLY) = 6
close(6) = 0
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/test/3515", O_RDONLY) = 6
close(6) = 0
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/test/3515", O_RDONLY) = 6
close(6) = 0
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/test/3515",
O_RDWR|O_CREAT|O_TRUNC, 0666) = 6
close(6) = 0
unlink("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/test/3515.old") = 0
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/gnats-adm/indI6fqXL",
O_RDWR|O_CREAT|O_EXCL, 0600) = 6
close(6) = 0
unlink("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/gnats-adm/locks/3515.lock") =
0
unlink("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/gnats-adm/gnats.lock") = 0
-----Original Message-----
From: bug-gnats-bounces+jims=broadcom.com@gnu.org
[mailto:bug-gnats-bounces+jims=broadcom.com@gnu.org] On Behalf Of Jim Searle
Sent: Tuesday, April 06, 2004 3:23 PM
To: bug-gnats@gnu.org
Subject: gnatsd Too many open files error
If during a single gnatsd session I modify a field for a bunch of PR's, on
change number 252 I get this error:
640 Cannot create lock file
/tools/gnats/4.0/etc/gnats/db-vlsibcmx/gnats-adm/locks/1579.lock: Too many
open files
My simple command file is:
CHDB someDB someUser thePassword
REPL 1579 Priority
low
.
with the last 3 lines repeated 252 times.
[-- Attachment #1.2: Type: text/html, Size: 4833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 139 bytes --]
_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnats
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: gnatsd Too many open files error
2004-04-07 18:06 ` gnatsd Too many open files error Jim Searle
@ 2004-04-07 18:51 ` Jim Searle
0 siblings, 0 replies; 2+ messages in thread
From: Jim Searle @ 2004-04-07 18:51 UTC (permalink / raw)
To: bug-gnats; +Cc: help-gnats
[-- Attachment #1.1: Type: text/plain, Size: 2407 bytes --]
The attached patch fixes my problem.
-----Original Message-----
From: bug-gnats-bounces+jims=broadcom.com@gnu.org
[mailto:bug-gnats-bounces+jims=broadcom.com@gnu.org] On Behalf Of Jim Searle
Sent: Wednesday, April 07, 2004 10:55 AM
To: bug-gnats@gnu.org
Cc: help-gnats@gnu.org
Subject: RE: gnatsd Too many open files error
I CC'ed hep-gnats since I've received no response from bug-gnats...
It seems that gnatsd never closes the PR.lock file, an strace of the REPL
command shows this:
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/gnats-adm/gnats.lock",
O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0) = 5
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/gnats-adm/index", O_RDONLY) = 6
close(6) = 0
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/gnats-adm/locks/3515.lock",
O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644) = 6
close(6) = 0
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/test/3515", O_RDONLY) = 6
close(6) = 0
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/test/3515", O_RDONLY) = 6
close(6) = 0
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/test/3515", O_RDONLY) = 6
close(6) = 0
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/test/3515",
O_RDWR|O_CREAT|O_TRUNC, 0666) = 6
close(6) = 0
unlink("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/test/3515.old") = 0
open("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/gnats-adm/indI6fqXL",
O_RDWR|O_CREAT|O_EXCL, 0600) = 6
close(6) = 0
unlink("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/gnats-adm/locks/3515.lock") =
0
unlink("/tools/gnats/4.0/etc/gnats/db-vlsibcmx/gnats-adm/gnats.lock") = 0
-----Original Message-----
From: bug-gnats-bounces+jims=broadcom.com@gnu.org
[mailto:bug-gnats-bounces+jims=broadcom.com@gnu.org] On Behalf Of Jim Searle
Sent: Tuesday, April 06, 2004 3:23 PM
To: bug-gnats@gnu.org
Subject: gnatsd Too many open files error
If during a single gnatsd session I modify a field for a bunch of PR's, on
change number 252 I get this error:
640 Cannot create lock file
/tools/gnats/4.0/etc/gnats/db-vlsibcmx/gnats-adm/locks/1579.lock: Too many
open files
My simple command file is:
CHDB someDB someUser thePassword
REPL 1579 Priority
low
.
with the last 3 lines repeated 252 times.
[-- Attachment #1.2: Type: text/html, Size: 5726 bytes --]
[-- Attachment #2: patch_internal_1 --]
[-- Type: application/octet-stream, Size: 1196 bytes --]
*** internal.c Wed Apr 7 11:11:13 2004
--- ../../gnats-4.0-Linux/gnats/internal.c Wed Nov 5 20:04:08 2003
***************
*** 117,126 ****
lock_gnats (const DatabaseInfo database, ErrorDesc *err)
{
char *path;
! int count, res, fdes;
const int MAXWAIT = 10;
const int GRANULARITY = 1;
!
path = gnats_adm_dir (database, "gnats.lock");
--- 117,126 ----
lock_gnats (const DatabaseInfo database, ErrorDesc *err)
{
char *path;
! int count, res;
const int MAXWAIT = 10;
const int GRANULARITY = 1;
!
path = gnats_adm_dir (database, "gnats.lock");
***************
*** 129,139 ****
{
errno = 0;
/* use atomic create, to avoid races */
! fdes = open (path, O_CREAT | O_TRUNC | O_WRONLY | O_EXCL, 0);
! if (fdes != -1)
{
/* success */
- close(fdes);
break;
}
else
--- 129,137 ----
{
errno = 0;
/* use atomic create, to avoid races */
! if (open (path, O_CREAT | O_TRUNC | O_WRONLY | O_EXCL, 0) != -1)
{
/* success */
break;
}
else
[-- Attachment #3: Type: text/plain, Size: 139 bytes --]
_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnats
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-07 18:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <011401c41c25$a94e86c0$2c88030a@LTIRVAJIMS3>
2004-04-07 18:06 ` gnatsd Too many open files error Jim Searle
2004-04-07 18:51 ` Jim Searle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).