search for: maxfd

Displaying 20 results from an estimated 41 matches for "maxfd".

Did you mean: maxed
2020 Feb 26
2
[PATCH] lib: command: switch from select() to poll()
...t; -#include <sys/types.h> #include <sys/stat.h> -#include <sys/select.h> +#include <poll.h> #ifdef HAVE_SYS_TIME_H #include <sys/time.h> @@ -650,37 +649,41 @@ run_child (struct command *cmd) static int loop (struct command *cmd) { - fd_set rset, rset2; - int maxfd = -1, r; + struct pollfd fds[2]; + int r; size_t nr_fds = 0; CLEANUP_FREE char *buf = safe_malloc (cmd->g, BUFSIZ); ssize_t n; - FD_ZERO (&rset); + memset (&fds, 0, sizeof fds); + + fds[0].fd = cmd->errorfd; + fds[1].fd = cmd->outfd; if (cmd->errorfd >=...
2020 Feb 26
1
Re: [PATCH] lib: command: switch from select() to poll()
...t; +#include <poll.h> > > > > #ifdef HAVE_SYS_TIME_H > > #include <sys/time.h> > > @@ -650,37 +649,41 @@ run_child (struct command *cmd) > > static int > > loop (struct command *cmd) > > { > > - fd_set rset, rset2; > > - int maxfd = -1, r; > > + struct pollfd fds[2]; > > + int r; > > size_t nr_fds = 0; > > CLEANUP_FREE char *buf = safe_malloc (cmd->g, BUFSIZ); > > ssize_t n; > > > > - FD_ZERO (&rset); > > + memset (&fds, 0, sizeof fds); > > + &gt...
2020 Feb 26
0
Re: [PATCH] lib: command: switch from select() to poll()
....h> > -#include <sys/select.h> > +#include <poll.h> > > #ifdef HAVE_SYS_TIME_H > #include <sys/time.h> > @@ -650,37 +649,41 @@ run_child (struct command *cmd) > static int > loop (struct command *cmd) > { > - fd_set rset, rset2; > - int maxfd = -1, r; > + struct pollfd fds[2]; > + int r; > size_t nr_fds = 0; > CLEANUP_FREE char *buf = safe_malloc (cmd->g, BUFSIZ); > ssize_t n; > > - FD_ZERO (&rset); > + memset (&fds, 0, sizeof fds); > + > + fds[0].fd = cmd->errorfd; > + fds...
2006 Apr 01
1
Sys.sleep() burns up CPU on Solaris 8
...n/3 src/unix/sys-std.c --- src/unix/sys-std.c@@/main/3 Thu Jan 12 11:39:55 2006 +++ src/unix/sys-std.c Fri Mar 31 23:12:16 2006 @@ -294,13 +294,13 @@ else onintr(); } - tv.tv_sec = 0; - tv.tv_usec = usec; + tv.tv_sec = usec/1000000; + tv.tv_usec = usec % 1000000; maxfd = setSelectMask(R_InputHandlers, &readMask); if (ignore_stdin) FD_CLR(fileno(stdin), &readMask); if (R_SelectEx(maxfd+1, &readMask, NULL, NULL, - (usec >= 0) ? &tv : NULL, intr)) + (usec >= 0) ? &tv : NULL, intr) >...
2012 Nov 24
0
ssh-keyscan continuity patch --
...anohost.h" /* Flag indicating whether IPv4 or IPv6. This can be set on the command line. Default value is AF_UNSPEC means both IPv4 and IPv6. */ @@ -61,15 +62,20 @@ int hash_hosts = 0; /* Hash hostname on output */ +int log_verbose = 0; /* list all hosts checked */ + #define MAXMAXFD 256 /* The number of seconds after which to give up on a TCP connection */ +/* and the maximum time to wait for kex data from the remote server.*/ int timeout = 5; int maxfd; #define MAXCON (maxfd - 10) extern char *__progname; +extern int connclosed; +extern int conntimedout; fd_set...
2001 Jul 27
0
Updated ssh-keyscan patch for ssh2 support
...e command line. + Default value is AF_UNSPEC means both IPv4 and IPv6. */ +#ifdef IPV4_DEFAULT +int IPv4or6 = AF_INET; +#else +int IPv4or6 = AF_UNSPEC; +#endif + +#define KT_RSA1 1 +#define KT_DSA 2 +#define KT_RSA 4 +int get_keytypes = KT_RSA1; /* Get only RSA1 keys by default */ + #define MAXMAXFD 256 /* The number of seconds after which to give up on a TCP connection */ @@ -39,6 +57,8 @@ fd_set *read_wait; size_t read_wait_size; int ncon; +int nonfatal_fatal = 0; +jmp_buf kexjmp; /* * Keep a connection structure for each file descriptor. The state @@ -54,11 +74,13 @@ int c_ple...
2001 Aug 20
1
Idletimeout patch, third attempt
...rol packets + * do not. */ + switch(type) { + case SSH_MSG_CHANNEL_DATA: + case SSH_CMSG_STDIN_DATA: + case SSH_SMSG_STDOUT_DATA: + case SSH_SMSG_STDERR_DATA: + case SSH2_MSG_CHANNEL_DATA: + case SSH2_MSG_CHANNEL_EXTENDED_DATA: + time(&idletime_last); + } +} + +int +packet_select(int maxfds, + fd_set *readset, fd_set *writeset, fd_set *exceptset, + int max_time_milliseconds) +{ + struct timeval tv, *tvp=NULL; + int ret; + + if (idletimeout>0) { + /* Count the time to idletimeout */ + time_t diff=time(NULL)-idletime_last; + if (diff>=idletimeo...
2003 May 17
0
opensshd fd_set definition problem
...C: __libc_start_main (in /lib/libc-2.3.2.so) ==1059== by 0x804C560: (within /usr/sbin/sshd) ==1059== Address 0x41363BFC is 0 bytes after a block of size 4 alloc'd ==1058== checked 5467064 bytes. This turns out to be around line 1261 in sshd.c: fd_set *fdset; ...snip... fdsetsz = howmany(maxfd+1, NFDBITS) * sizeof(fd_mask); fdset = (fd_set *)xmalloc(fdsetsz); ...snip... ret = select(maxfd+1, fdset, NULL, NULL, NULL); My question is why don't you use: fdsetsz = sizeof( fd_set ); The 2.4.20 Linux kernel defines fd_set like this: #define __NFDBITS (8 * sizeof(unsigned long))...
2011 Dec 02
1
Panic when attempting index with Apache Solr : fts_solr plugin
...va-1.6.0-openjdk-1.6.0.0-55.1.9.10 (also tried Oracle Java 6u29) [root at mymailserver ~]# doveadm -D index -u username mailbox inbox doveadm(username): Info: INBOX: Caching mails seq=1..466 doveadm(username): Panic: file solr-connection.c: line 545 (solr_connection_post_more): assertion failed: (maxfd >= 0) doveadm(username): Error: Raw backtrace: /usr/local/lib/dovecot/libdovecot.so.0(+0x3b9b1) [0x14b9b1] -> /usr/local/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x47) [0x14bac7] -> /usr/local/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x1211ae] -> /usr/local/lib/dovecot/lib21_fts...
2002 Mar 21
2
bug in ssh-keyscan.c --
...if (nonfatal_fatal) + if (nonfatal_fatal) { + fatal_cleanup_called = 0; longjmp(kexjmp, -1); - else - fatal_cleanup(); + } } static void @@ -777,6 +778,7 @@ usage(); log_init("ssh-keyscan", log_level, SYSLOG_FACILITY_USER, 1); + fatal_add_cleanup(fatal_callback, NULL); maxfd = fdlim_get(1); if (maxfd < 0) --- log.c.orig Tue Feb 26 12:52:15 2002 +++ log.c Wed Mar 20 21:13:04 2002 @@ -216,15 +216,16 @@ } /* Cleanup and exit */ +int fatal_cleanup_called = 0; void fatal_cleanup(void) { struct fatal_cleanup *cu, *next_cu; - static int called = 0; - if (calle...
2001 May 14
2
openssh-2.9p1
...:37:13 2001 +++ openssh-2.9p1/ssh-keyscan.c Sun May 13 01:39:43 2001 @@ -30,7 +30,11 @@ static int argno = 1; /* Number of argument currently being parsed */ +#ifdef IPV4_DEFAULT +int family = AF_INET; /* IPv4 */ +#else int family = AF_UNSPEC; /* IPv4, IPv6 or both */ +#endif #define MAXMAXFD 256
2007 Oct 14
3
DO NOT REPLY [Bug 5020] New: hang using RSYNC_CONNECT_PROG
...;, pid=-1, argc=<value optimized out>, argv=0x56d998) at main.c:1084 #10 0x00000000004195fc in main (argc=2, argv=0x56d990) at main.c:1256 (gdb) up #1 0x0000000000421d72 in writefd_unbuffered (fd=8, buf=0x56eba0 "", len=4092) at io.c:1442 1442 count = select(maxfd + 1, using_r_fds ? &r_fds : NULL, (gdb) print maxfd $1 = <value optimized out> (gdb) print using_r_fds $2 = 1 (gdb) print r_fds $3 = {fds_bits = {64, 0 <repeats 15 times>}} -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mai...
2019 Dec 04
0
error in parallel:::sendMaster
...ters new child 15379 > child process 15379 started > parent[15366] created pipes: comm (7->6), sir (10->9) > parent registers new child 15380 > child process 15380 started > select_children: added child 15380 (6) > select_children: added child 15379 (5) > select_children: maxfd=6, wlen=2, wcount=2, timeout=-1.000000 > child 15380: send_master (550 bytes) > sr = 1 > - read select 1 children: 15380 > child 15380: 'mcexit' called > child 15380 is waiting for permission to exit > read_child_ci(15380) - read length returned 8 > read_child_ci(15...
2019 Dec 04
0
error in parallel:::sendMaster
...ters new child 15379 > child process 15379 started > parent[15366] created pipes: comm (7->6), sir (10->9) > parent registers new child 15380 > child process 15380 started > select_children: added child 15380 (6) > select_children: added child 15379 (5) > select_children: maxfd=6, wlen=2, wcount=2, timeout=-1.000000 > child 15380: send_master (550 bytes) > sr = 1 > - read select 1 children: 15380 > child 15380: 'mcexit' called > child 15380 is waiting for permission to exit > read_child_ci(15380) - read length returned 8 > read_child_ci(15...
2020 Jan 21
3
Instrumentation for metrics
> This makes me think that the syslog approach is probably the way to go Yeah, right. Another idea is to mirror the current preauth load via setproctitle()... That makes that data accessible even without a syscall (at least the writing of the data - quering needs syscalls, right), so that can be kept up-to-date and allows a high monitoring frequency as well. Multiple instances of SSHd (on
2013 Mar 02
1
panic in dovecot when using fts with solr
...6 2107 2110 2151 3 OK Search completed (32.210 secs). ---------------------------------------------------------------------- Mar 2 22:48:02 lapetus dovecot: indexer-worker(andre rodier at indiefield.co.uk): Panic: file solr-connection.c: line 545 (solr_connection_post_more): assertion failed: (maxfd >= 0) Mar 2 22:48:02 lapetus dovecot: indexer-worker(andre rodier at indiefield.co.uk): Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x4414a) [0x7f5f4237214a] -> /usr/lib/dovecot/libdovecot.so.0(+0x4418e) [0x7f5f4237218e] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f...
2007 Jan 23
2
Re: [nut-commits] svn commit r731
...->addr); > + if (stmp->port != NULL) > + free(stmp->port); > + free(stmp); > + > + stmp = snext; > + } > > /* cleanup client fds */ > tmpcli = firstclient; > @@ -681,22 +762,30 @@ > { > fd_set rfds; > struct timeval tv; > - int res, maxfd; > + int res, maxfd = -1; > ctype *tmpcli, *tmpnext; > upstype *utmp, *unext; > + stype *stmp, *snext; > > if (reload_flag) { > conf_reload(); > reload_flag = 0; > } > - > - FD_ZERO(&rfds); > - FD_SET(listenfd, &rfds); > > tv.tv...
2007 Mar 19
23
puppet hangs while trying to restart a daemon
Hello all, puppet hangs while trying to restart a daemon when the associated config file changes, here the log: Mar 19 11:30:04 ingentTest puppetd[27390]: Starting Puppet client version 0.22.0 puppetd[27390]: Starting configuration run puppetd[27390]: (/ingenttest/qualsevolnode/guaita[guaita]/File[/etc/guaita.conf]/content) synced puppetd[27390]:
2008 Aug 05
1
Also seeing high winbindd CPU usage
I think somebody had a similar problem (also on Solaris), but that thread seemed to die. I've compiled (with Sun Studio cc) and installed samba-3.2.1 on a Solaris 10 x64 box, which is a member of a (Windows Server 2003 controlled) domain. I previously had samba 3.0.28a running on the same machine without any problems. Now winbindd is eating up all of the CPU (on the CPU it's assigned
2012 Nov 18
4
panic fts_solr for bad attachment
...re is a problem with an unknown bad attachment. I run "doveadm index -A '*'". After a while I receive: doveadm(xyz): Error: fts_solr: Invalid XML input at line 1: mismatched tag doveadm(xyz): Panic: file solr-connection.c: line 545 (solr_connection_post_more): assertion failed: (maxfd >= 0) doveadm(xyz): Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x3c14a) [0x7f7ce2c1714a] -> /usr/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x2a) [0x7f7ce2c1720a] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f7ce2bee81a] -> /usr/lib/dovecot/modules/lib21_fts_so...