Re: portsnap Generating a Bad file descriptor Error Message

2012-09-10 Thread Pierre-Luc Drouin
On Tue, Sep 4, 2012 at 10:14 AM, Pierre-Luc Drouin pldro...@gmail.comwrote:

 Hi,

 so I have been having problems using portsnap lately. I always get a Bad
 file descriptor message when trying using it on one of my i386 machine:

 Looking up portsnap5.freebsd.org mirrors... none found.
 Fetching snapshot tag from portsnap5.freebsd.org... done.
 Fetching snapshot metadata... done.
 Fetching snapshot generated at Mon Sep  3 20:04:44 EDT 2012:
 86abb3c6f24b24e7fdadda42805f9ae38f487177dcb949  0% of   67 MB0  Bps
 fetch:
 http://portsnap5.freebsd.org/s/86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz:
 Bad file descriptor
 fetch:
 86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz: Bad
 file descriptor

 I tried fsck -y the /var, /tmp and /usr partitions and everything seems
 fine. What could the problem be?

 Thanks!


Hi,

Anyone has an idea about what could be causing this problem?

Thank you!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: portsnap Generating a Bad file descriptor Error Message

2012-09-10 Thread Polytropon
On Mon, 10 Sep 2012 08:56:29 -0400, Pierre-Luc Drouin wrote:
 On Tue, Sep 4, 2012 at 10:14 AM, Pierre-Luc Drouin pldro...@gmail.comwrote:
 
  Hi,
 
  so I have been having problems using portsnap lately. I always get a Bad
  file descriptor message when trying using it on one of my i386 machine:
 
  Looking up portsnap5.freebsd.org mirrors... none found.
  Fetching snapshot tag from portsnap5.freebsd.org... done.
  Fetching snapshot metadata... done.
  Fetching snapshot generated at Mon Sep  3 20:04:44 EDT 2012:
  86abb3c6f24b24e7fdadda42805f9ae38f487177dcb949  0% of   67 MB0  Bps
  fetch:
  http://portsnap5.freebsd.org/s/86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz:
  Bad file descriptor
  fetch:
  86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz: Bad
  file descriptor
 
  I tried fsck -y the /var, /tmp and /usr partitions and everything seems
  fine. What could the problem be?
 
  Thanks!
 
 
 Hi,
 
 Anyone has an idea about what could be causing this problem?

I'm not familiar enough with portsnap (I use CVS) so I can just
throw some guesses around:

The message Bad file descriptor is issued by fetch and seems
to be for _your_ side of the connection, and I assume it is
regarding the place where the requested file will be fetched
to. I don't exactly know _where_ that is. It could be in
the ports tree or in a temporary location (from where the
results are then written to /usr/ports). The manpage mentions
a default workdir of /var/db/portsnap which is on the /var
partition. You checked that, no errors.

Just check what /var/db/portsnap contains. In worst case,
remove portsnap/ and recreate that directory. I have no
idea what it is supposed to contain, maybe make a copy of
it. You could also try to manually create the file, e. g.
by issuing

# touch 
/var/db/portsnap/86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz

Look if the file is there. Use

# stat 
/var/db/portsnap/86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz

to check if everything is okay.

You could also try to manually fetch the file using fetch or
maybe even wget, just to see if it can be downloaded and
written properly, to a different location, e. g.

# cd /tmp
# fetch 
http://portsnap5.freebsd.org/s/86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz

or

# cd /tmp
# wget 
http://portsnap5.freebsd.org/s/86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz

That should be _no_ problem (with the correct file name of course).

Again, Bad file descriptor is often seen in relation to file
system trouble. I've seen that in the past myself.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: portsnap Generating a Bad file descriptor Error Message

2012-09-10 Thread Pierre-Luc Drouin
Hi,

Yes, files are written to the /var filesystem. I have tried fetching the
file manually and I have even tried to newfs the partition again and to
copy the files back. I also tried to delete the portsnap directory
completely. None of this fixed the error. Note that I access the web
through a proxy, but I tried untaring the file
86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgzhttp://portsnap5.freebsd.org/s/86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgzand
I did not get any error from tar, so I guess the file I got is not
corrupted.

On Mon, Sep 10, 2012 at 9:43 AM, Polytropon free...@edvax.de wrote:

 On Mon, 10 Sep 2012 08:56:29 -0400, Pierre-Luc Drouin wrote:
  On Tue, Sep 4, 2012 at 10:14 AM, Pierre-Luc Drouin pldro...@gmail.com
 wrote:
 
   Hi,
  
   so I have been having problems using portsnap lately. I always get a
 Bad
   file descriptor message when trying using it on one of my i386
 machine:
  
   Looking up portsnap5.freebsd.org mirrors... none found.
   Fetching snapshot tag from portsnap5.freebsd.org... done.
   Fetching snapshot metadata... done.
   Fetching snapshot generated at Mon Sep  3 20:04:44 EDT 2012:
   86abb3c6f24b24e7fdadda42805f9ae38f487177dcb949  0% of   67 MB0  Bps
   fetch:
  
 http://portsnap5.freebsd.org/s/86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz
 :
   Bad file descriptor
   fetch:
   86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz:
 Bad
   file descriptor
  
   I tried fsck -y the /var, /tmp and /usr partitions and everything seems
   fine. What could the problem be?
  
   Thanks!
  
 
  Hi,
 
  Anyone has an idea about what could be causing this problem?

 I'm not familiar enough with portsnap (I use CVS) so I can just
 throw some guesses around:

 The message Bad file descriptor is issued by fetch and seems
 to be for _your_ side of the connection, and I assume it is
 regarding the place where the requested file will be fetched
 to. I don't exactly know _where_ that is. It could be in
 the ports tree or in a temporary location (from where the
 results are then written to /usr/ports). The manpage mentions
 a default workdir of /var/db/portsnap which is on the /var
 partition. You checked that, no errors.

 Just check what /var/db/portsnap contains. In worst case,
 remove portsnap/ and recreate that directory. I have no
 idea what it is supposed to contain, maybe make a copy of
 it. You could also try to manually create the file, e. g.
 by issuing

 # touch
 /var/db/portsnap/86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz

 Look if the file is there. Use

 # stat
 /var/db/portsnap/86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz

 to check if everything is okay.

 You could also try to manually fetch the file using fetch or
 maybe even wget, just to see if it can be downloaded and
 written properly, to a different location, e. g.

 # cd /tmp
 # fetch
 http://portsnap5.freebsd.org/s/86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz

 or

 # cd /tmp
 # wget
 http://portsnap5.freebsd.org/s/86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz

 That should be _no_ problem (with the correct file name of course).

 Again, Bad file descriptor is often seen in relation to file
 system trouble. I've seen that in the past myself.




 --
 Polytropon
 Magdeburg, Germany
 Happy FreeBSD user since 4.0
 Andra moi ennepe, Mousa, ...

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


portsnap Generating a Bad file descriptor Error Message

2012-09-04 Thread Pierre-Luc Drouin
Hi,

so I have been having problems using portsnap lately. I always get a Bad
file descriptor message when trying using it on one of my i386 machine:

Looking up portsnap5.freebsd.org mirrors... none found.
Fetching snapshot tag from portsnap5.freebsd.org... done.
Fetching snapshot metadata... done.
Fetching snapshot generated at Mon Sep  3 20:04:44 EDT 2012:
86abb3c6f24b24e7fdadda42805f9ae38f487177dcb949  0% of   67 MB0  Bps
fetch:
http://portsnap5.freebsd.org/s/86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz:
Bad file descriptor
fetch:
86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz: Bad
file descriptor

I tried fsck -y the /var, /tmp and /usr partitions and everything seems
fine. What could the problem be?

Thanks!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: portsnap Generating a Bad file descriptor Error Message

2012-09-04 Thread Jamie Paul Griffin
[ Pierre-Luc Drouin wrote on Tue  4.Sep'12 at 10:14:18 -0400 ]

 Hi,
 
 so I have been having problems using portsnap lately. I always get a Bad
 file descriptor message when trying using it on one of my i386 machine:
 
 Looking up portsnap5.freebsd.org mirrors... none found.
 Fetching snapshot tag from portsnap5.freebsd.org... done.
 Fetching snapshot metadata... done.
 Fetching snapshot generated at Mon Sep  3 20:04:44 EDT 2012:
 86abb3c6f24b24e7fdadda42805f9ae38f487177dcb949  0% of   67 MB0  Bps
 fetch:
 http://portsnap5.freebsd.org/s/86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz:
 Bad file descriptor
 fetch:
 86abb3c6f24b24e7fdadda42805f9ae38f487177dcb9493f5e0cb4f792490b2f.tgz: Bad
 file descriptor
 
 I tried fsck -y the /var, /tmp and /usr partitions and everything seems
 fine. What could the problem be?
 
I'm not getting that error but I am getting these:

sort: write failed: standard output: Broken pipe
sort: write error

Unrelated i'd imagine but seems portsnap has some issues?

Jamie
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


probably stupid questions about select() and FS_SET in a multithreaded environment [ select() failed (Bad file descriptor) ]

2011-10-16 Thread Vikash Badal
Greetings,

Can some point me in the correction direction please.

I have a treaded socket application that has a problem with select() returning 
-1.
The select() and accept() is taken care of in one thread. The worker threads 
deal with client requests after the new client connection is pushed to queue.

The logged error is :
select() failed (Bad file descriptor) getdtablesize = 65536

Sysctls at the moment  are:
kern.maxfiles: 65536 
kern.maxfilesperproc: 65536


code
void client_accept(int listen_socket)
{
...
   while ( loop )
   {
  FD_ZERO(socket_set);
  FD_SET(listen_socket, socket_set);
  timeout.tv_sec = 1;
  timeout.tv_usec = 0;

  rcode = select(listen_socket + 1, socket_set, NULL, NULL, timeout);

  if ( rcode  0 )
  {
 Log(DEBUG_0, ERROR: select() failed (%s) getdtablesize = %d,
 strerror(errno), getdtablesize());
 loop = 0;
 sleep(30);
 fcloseall();
 assert(1==0);
  }

  if ( rcode  0 )
  {
  remotelen = sizeof(remote);
  client_sock = accept(listen_socket, .
  
  if (msgsock != -1 )
  { 
 // Allocate memory for request
 request = malloc(sizeof(struct requests));
 // test for malloc etc ...
 // set request values ...
 //
 // Push request to a queue. 
  }
  }

   }
 ...
}
void* tcpworker(void* arg)
{
   // initialise stuff

   While ( loop )
   {
  // pop request from queue
  
  If ( request != NULL )
  {
 // deal with request
 free(request)
  }
   }   
}

/code
When the problem occurs, i have between 1000 and 1400 clients connected.

Questions:
1. do i need to FD_CLR(client_sock,socket_set) before i push to a queue ?
2. do i need to FD_CLR(client_sock, socket_set) when this client request 
closes in the the tcpworker() function ?
3. would setting kern.maxfilesperproc and kern.maxfiles to higher values solve 
the problem or just take longer for the problem to re-appear.
4. should is replace select() with kqueue() as from google-ing it seems 
select() is not that great.


Thanks
Vikash

Please note: This email and its content are subject to the disclaimer as 
displayed at the following link 
http://www.is.co.za/legal/E-mail+Confidentiality+Notice+and+Disclaimer.htm. 
Should you not have Web access, send a mail to disclaim...@is.co.za and a copy 
will be emailed to you.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: probably stupid questions about select() and FS_SET in a multithreaded environment [ select() failed (Bad file descriptor) ]

2011-10-16 Thread Tijl Coosemans
On Sunday 16 October 2011 18:18:39 Vikash Badal wrote:
 Greetings,
 
 Can some point me in the correction direction please.
 
 I have a treaded socket application that has a problem with select()
 returning -1.
 The select() and accept() is taken care of in one thread. The worker
 threads deal with client requests after the new client connection is
 pushed to queue.
 
 The logged error is :
 select() failed (Bad file descriptor) getdtablesize = 65536
 
 Sysctls at the moment  are:
 kern.maxfiles: 65536 
 kern.maxfilesperproc: 65536
 
 
 code
 void client_accept(int listen_socket)
 {
 ...
while ( loop )
{
   FD_ZERO(socket_set);
   FD_SET(listen_socket, socket_set);
   timeout.tv_sec = 1;
   timeout.tv_usec = 0;
 
   rcode = select(listen_socket + 1, socket_set, NULL, NULL, timeout);
 
   if ( rcode  0 )
   {
  Log(DEBUG_0, ERROR: select() failed (%s) getdtablesize = %d,
  strerror(errno), getdtablesize());
  loop = 0;
  sleep(30);
  fcloseall();
  assert(1==0);
   }
 
   if ( rcode  0 )
   {
   remotelen = sizeof(remote);
   client_sock = accept(listen_socket, .
   
   if (msgsock != -1 )
   { 
  // Allocate memory for request
  request = malloc(sizeof(struct requests));
  // test for malloc etc ...
  // set request values ...
  //
  // Push request to a queue. 
   }
   }
 
}
  ...
 }
 void* tcpworker(void* arg)
 {
// initialise stuff
 
While ( loop )
{
   // pop request from queue
   
   If ( request != NULL )
   {
  // deal with request
  free(request)
   }
}   
 }
 
 /code
 When the problem occurs, i have between 1000 and 1400 clients
 connected.
 
 Questions:
 1. do i need to FD_CLR(client_sock,socket_set) before i push to a
 queue ?
 2. do i need to FD_CLR(client_sock, socket_set) when this client
 request closes in the the tcpworker() function ?
 3. would setting kern.maxfilesperproc and kern.maxfiles to higher
 values solve the problem or just take longer for the problem to
 re-appear.
 4. should is replace select() with kqueue() as from google-ing it
 seems select() is not that great.

The size of an fd_set is limited by FD_SETSIZE which is 1024 by
default. So if you pass a descriptor larger than that to FD_SET() or
select(), you have a buffer overflow and memory beyond the fd_set can
become corrupted.

You can define FD_SETSIZE to a larger value before including
sys/select.h, but you should also verify if a descriptor is less than
FD_SETSIZE before using it with select or any of the fd_set macros and
return error if not.

kqueue doesn't have this problem, but it's not as portable as select.


signature.asc
Description: This is a digitally signed message part.


Re: [warn] kevent: Bad file descriptor

2009-05-09 Thread Mel Flynn
On Friday 08 May 2009 23:23:32 Gary Gatten wrote:
 I just compiled and installed nTop 3.3.10 and now I'm getting this
 error.  Had an older version running before this with no problem.  I'm
 on 6.0 RELEASE.  I'm still googling, any quick fixes would be GREATLY
 appreciated!

Shot in the dark: mount /proc. 
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


[warn] kevent: Bad file descriptor

2009-05-08 Thread Gary Gatten
I just compiled and installed nTop 3.3.10 and now I'm getting this
error.  Had an older version running before this with no problem.  I'm
on 6.0 RELEASE.  I'm still googling, any quick fixes would be GREATLY
appreciated!  I've been debugging and compiling all day and want to
leave with this $hhh   IT  working!

 

TIA!

 

Gary

 






font size=1
div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 
1.0pt 0in'
/div
This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system.
/font

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


bad file descriptor when mounting an ext2fs.

2008-06-10 Thread anhnmncb
Hi, list,
Recently, I encounter a very annoying issue, when I try to
mount an ext2fs filesystem in laptop disk, after mounted it without any
errors, I can't access it, ls /mnt/da0s3 says bad file
descriptor. In that disk, also has msdos and ufs fs, but they
work well.
I tried reformat whole disk, and fsck.ext2 -f that ext2fs
slice, nothing works at all.
But my a local disk has ext2fs too, it can be mounted and used
well, don't know why?
-- 
Reguards,

anhnmncb.
PGP key: 44A31344
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: bad file descriptor when mounting an ext2fs.

2008-06-10 Thread Gonzalo Nemmi
On Tuesday 10 June 2008 07:37:56 anhnmncb wrote:
 Hi, list,
 Recently, I encounter a very annoying issue, when I try to
 mount an ext2fs filesystem in laptop disk, after mounted it without
 any errors, I can't access it, ls /mnt/da0s3 says bad file
 descriptor. In that disk, also has msdos and ufs fs, but they
 work well.
 I tried reformat whole disk, and fsck.ext2 -f that ext2fs
 slice, nothing works at all.
 But my a local disk has ext2fs too, it can be mounted and used
 well, don't know why?

The same thing happens in here too ..
The same question It has also been posted in this list on Friday 09 May 2008 
14:40:06 by Isaac Mushinsky and me, but nobody answered ...
On FreeBSD 7.0 i386 and Linux i386 in here, I get either get a 'Bad file 
descriptor' for directory /linux' or 

$ mount -t etx2fs /dev/ad0s7 /linux
$ ls /linux 
No such file or directory

I've got all of my music, pdfs, pictures and on a ext3 and I only need to 
mount it in order to get FreeBSD's Amarok access to my music collection.

If somebody has solution or a pointer to a solution or whatever may help on 
this matter, I would greatly appreciate his/hers reply :)

Blessings
-- 
Gonzalo Nemmi
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: stunnel: warning: can't get client address: Bad file descriptor

2008-06-09 Thread Adamsonh

hi, stunnel 4.25 does not kill all stunnel instances after issuing stop;
you have to kill all old stunnel jobs before restarting it.


noahwallach wrote:
 
 Just upgraded stunnel and getting the following error message in the
 /var/log/messages file.  It appears that when I restart stunnel it 
 complains Error binding pop3s to 0.0.0.0:995 and bind: Address already 
 in use (48).  therefore the 995 port never becomes available during the 
 restart.  Why is that happening?  She the stunel logs below.
 
 any clues?
 
  snip ---
 
 Jun  8 13:17:04  stunnel: warning: can't get client address: Bad file
 descriptor
 Jun  8 13:17:34  last message repeated 530400 times
 Jun  8 13:18:00  last message repeated 488687 times
 
  snip ---
 
 
  here is the stunnel.log -
 
 n# tail -n 50 -f /var/log/stunnel.log
 Jun  8 00:00:00 typhoon newsyslog[72831]: logfile turned over
 2008.06.08 04:05:41 LOG7[21238:134664192]: Snagged 64 random bytes from 
 /root/.rnd
 2008.06.08 04:05:41 LOG7[21238:134664192]: Wrote 1024 new random bytes 
 to /root/.rnd
 2008.06.08 04:05:41 LOG7[21238:134664192]: RAND_status claims sufficient 
 entropy for the PRNG
 2008.06.08 04:05:41 LOG7[21238:134664192]: PRNG seeded successfully
 2008.06.08 04:05:41 LOG7[21238:134664192]: Certificate: 
 /usr/local/etc/stunnel/mail.pem
 2008.06.08 04:05:41 LOG7[21238:134664192]: Certificate loaded
 2008.06.08 04:05:41 LOG7[21238:134664192]: Key file: 
 /usr/local/etc/stunnel/mail.pem
 2008.06.08 04:05:41 LOG7[21238:134664192]: Private key loaded
 2008.06.08 04:05:41 LOG7[21238:134664192]: SSL context initialized for 
 service pop3s
 2008.06.08 04:05:41 LOG5[21238:134664192]: stunnel 4.25 on 
 i386-unknown-freebsd6.2 with OpenSSL 0.9.8h 28 May 2008
 2008.06.08 04:05:41 LOG5[21238:134664192]: Threading:PTHREAD SSL:ENGINE 
 Sockets:POLL,IPv6 Auth:LIBWRAP
 2008.06.08 04:05:41 LOG6[21238:134664192]: file ulimit = 11095 (can be 
 changed with 'ulimit -n')
 2008.06.08 04:05:41 LOG6[21238:134664192]: poll() used - no FD_SETSIZE 
 limit for file descriptors
 2008.06.08 04:05:41 LOG5[21238:134664192]: 5417 clients allowed
 2008.06.08 04:05:41 LOG7[21238:134664192]: FD 5 in non-blocking mode
 2008.06.08 04:05:41 LOG7[21238:134664192]: FD 6 in non-blocking mode
 2008.06.08 04:05:41 LOG7[21238:134664192]: FD 7 in non-blocking mode
 2008.06.08 04:05:41 LOG7[21238:134664192]: SO_REUSEADDR option set on 
 accept socket
 2008.06.08 04:05:41 LOG3[21238:134664192]: Error binding pop3s to 
 0.0.0.0:995
 2008.06.08 04:05:41 LOG3[21238:134664192]: bind: Address already in use
 (48)
 
 
 --- configuration ---
 
 # cat /usr/local/etc/stunnel/stunnel.conf
 # Sample stunnel configuration file
 # Copyright by Michal Trojnara 2002
 
 # Comment it out on Win32
 cert = /usr/local/etc/stunnel/mail.pem
 chroot = /var/run/stunnel
 #chroot = /var/run
 # PID is created inside chroot jail
 pid = /stunnel.pid
 setuid = stunnel
 setgid = stunnel
 # grep stunnel /etc/rc.conf
 stunnel_enable=YES
 # cat /usr/local/etc/rc.d/stunnel
 #!/bin/sh
 #
 # $FreeBSD: ports/security/stunnel/files/stunnel.in,v 1.9 2008/01/26
 14:18:12 roam Exp $
 #
 
 # PROVIDE: stunnel
 # REQUIRE: NETWORKING SERVERS
 # BEFORE: DAEMON
 # KEYWORD: shutdown
 
 #
 # Add some of the following variables to /etc/rc.conf to configure
 stunnel:
 # stunnel_enable (bool):Set to NO by default.
 #   Set it to YES to enable stunnel.
 # stunnel_config (str): Default
 /usr/local/etc/stunnel/stunnel.conf
 #   Set it to the full path to the config file
 #   that stunnel will use during the automated
 #   start-up.
 # stunnel_pidfile (str):Default
 /usr/local/var/stunnel/stunnel.pid
 #   Set it to the value of 'pid' in
 #   the stunnel.conf file.
 #
 
 . /etc/rc.subr
 
 name=stunnel
 rcvar=`set_rcvar`
 
 load_rc_config $name
 
 : ${stunnel_enable=NO}
 : ${stunnel_config=/usr/local/etc/stunnel/${name}.conf}
 : ${stunnel_pidfile=/var/run/stunnel/${name}.pid}
 
 command=/usr/local/bin/stunnel
 command_args=${stunnel_config}
 pidfile=${stunnel_pidfile}
 
 required_files=${stunnel_config}
 
 run_rc_command $1
 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]
 
 

-- 
View this message in context: 
http://www.nabble.com/stunnel%3A-warning%3A-can%27t-get-client-address%3A-Bad-file-descriptor-tp17722812p17728956.html
Sent from the freebsd-questions mailing list archive at Nabble.com.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


stunnel: warning: can't get client address: Bad file descriptor

2008-06-08 Thread Noah
Just upgraded stunnel and getting the following error message in the 
/var/log/messages file.  any clues?


 snip ---

Jun  8 13:17:04  stunnel: warning: can't get client address: Bad file 
descriptor

Jun  8 13:17:34  last message repeated 530400 times
Jun  8 13:18:00  last message repeated 488687 times



 snip ---



--- configuration ---

# cat /usr/local/etc/stunnel/stunnel.conf
# Sample stunnel configuration file
# Copyright by Michal Trojnara 2002

# Comment it out on Win32
cert = /usr/local/etc/stunnel/mail.pem
chroot = /var/run/stunnel
#chroot = /var/run
# PID is created inside chroot jail
pid = /stunnel.pid
setuid = stunnel
setgid = stunnel
# grep stunnel /etc/rc.conf
stunnel_enable=YES
# cat /usr/local/etc/rc.d/stunnel
#!/bin/sh
#
# $FreeBSD: ports/security/stunnel/files/stunnel.in,v 1.9 2008/01/26 
14:18:12 roam Exp $

#

# PROVIDE: stunnel
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown

#
# Add some of the following variables to /etc/rc.conf to configure stunnel:
# stunnel_enable (bool):Set to NO by default.
#   Set it to YES to enable stunnel.
# stunnel_config (str): Default 
/usr/local/etc/stunnel/stunnel.conf

#   Set it to the full path to the config file
#   that stunnel will use during the automated
#   start-up.
# stunnel_pidfile (str):Default /usr/local/var/stunnel/stunnel.pid
#   Set it to the value of 'pid' in
#   the stunnel.conf file.
#

. /etc/rc.subr

name=stunnel
rcvar=`set_rcvar`

load_rc_config $name

: ${stunnel_enable=NO}
: ${stunnel_config=/usr/local/etc/stunnel/${name}.conf}
: ${stunnel_pidfile=/var/run/stunnel/${name}.pid}

command=/usr/local/bin/stunnel
command_args=${stunnel_config}
pidfile=${stunnel_pidfile}

required_files=${stunnel_config}

run_rc_command $1

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


stunnel: warning: can't get client address: Bad file descriptor

2008-06-08 Thread Noah

Just upgraded stunnel and getting the following error message in the
/var/log/messages file.  It appears that when I restart stunnel it 
complains Error binding pop3s to 0.0.0.0:995 and bind: Address already 
in use (48).  therefore the 995 port never becomes available during the 
restart.  Why is that happening?  She the stunel logs below.


any clues?

 snip ---

Jun  8 13:17:04  stunnel: warning: can't get client address: Bad file
descriptor
Jun  8 13:17:34  last message repeated 530400 times
Jun  8 13:18:00  last message repeated 488687 times

 snip ---


 here is the stunnel.log -

n# tail -n 50 -f /var/log/stunnel.log
Jun  8 00:00:00 typhoon newsyslog[72831]: logfile turned over
2008.06.08 04:05:41 LOG7[21238:134664192]: Snagged 64 random bytes from 
/root/.rnd
2008.06.08 04:05:41 LOG7[21238:134664192]: Wrote 1024 new random bytes 
to /root/.rnd
2008.06.08 04:05:41 LOG7[21238:134664192]: RAND_status claims sufficient 
entropy for the PRNG

2008.06.08 04:05:41 LOG7[21238:134664192]: PRNG seeded successfully
2008.06.08 04:05:41 LOG7[21238:134664192]: Certificate: 
/usr/local/etc/stunnel/mail.pem

2008.06.08 04:05:41 LOG7[21238:134664192]: Certificate loaded
2008.06.08 04:05:41 LOG7[21238:134664192]: Key file: 
/usr/local/etc/stunnel/mail.pem

2008.06.08 04:05:41 LOG7[21238:134664192]: Private key loaded
2008.06.08 04:05:41 LOG7[21238:134664192]: SSL context initialized for 
service pop3s
2008.06.08 04:05:41 LOG5[21238:134664192]: stunnel 4.25 on 
i386-unknown-freebsd6.2 with OpenSSL 0.9.8h 28 May 2008
2008.06.08 04:05:41 LOG5[21238:134664192]: Threading:PTHREAD SSL:ENGINE 
Sockets:POLL,IPv6 Auth:LIBWRAP
2008.06.08 04:05:41 LOG6[21238:134664192]: file ulimit = 11095 (can be 
changed with 'ulimit -n')
2008.06.08 04:05:41 LOG6[21238:134664192]: poll() used - no FD_SETSIZE 
limit for file descriptors

2008.06.08 04:05:41 LOG5[21238:134664192]: 5417 clients allowed
2008.06.08 04:05:41 LOG7[21238:134664192]: FD 5 in non-blocking mode
2008.06.08 04:05:41 LOG7[21238:134664192]: FD 6 in non-blocking mode
2008.06.08 04:05:41 LOG7[21238:134664192]: FD 7 in non-blocking mode
2008.06.08 04:05:41 LOG7[21238:134664192]: SO_REUSEADDR option set on 
accept socket
2008.06.08 04:05:41 LOG3[21238:134664192]: Error binding pop3s to 
0.0.0.0:995

2008.06.08 04:05:41 LOG3[21238:134664192]: bind: Address already in use (48)


--- configuration ---

# cat /usr/local/etc/stunnel/stunnel.conf
# Sample stunnel configuration file
# Copyright by Michal Trojnara 2002

# Comment it out on Win32
cert = /usr/local/etc/stunnel/mail.pem
chroot = /var/run/stunnel
#chroot = /var/run
# PID is created inside chroot jail
pid = /stunnel.pid
setuid = stunnel
setgid = stunnel
# grep stunnel /etc/rc.conf
stunnel_enable=YES
# cat /usr/local/etc/rc.d/stunnel
#!/bin/sh
#
# $FreeBSD: ports/security/stunnel/files/stunnel.in,v 1.9 2008/01/26
14:18:12 roam Exp $
#

# PROVIDE: stunnel
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown

#
# Add some of the following variables to /etc/rc.conf to configure stunnel:
# stunnel_enable (bool):Set to NO by default.
#   Set it to YES to enable stunnel.
# stunnel_config (str): Default
/usr/local/etc/stunnel/stunnel.conf
#   Set it to the full path to the config file
#   that stunnel will use during the automated
#   start-up.
# stunnel_pidfile (str):Default /usr/local/var/stunnel/stunnel.pid
#   Set it to the value of 'pid' in
#   the stunnel.conf file.
#

. /etc/rc.subr

name=stunnel
rcvar=`set_rcvar`

load_rc_config $name

: ${stunnel_enable=NO}
: ${stunnel_config=/usr/local/etc/stunnel/${name}.conf}
: ${stunnel_pidfile=/var/run/stunnel/${name}.pid}

command=/usr/local/bin/stunnel
command_args=${stunnel_config}
pidfile=${stunnel_pidfile}

required_files=${stunnel_config}

run_rc_command $1


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


/compat/linux/bin/cp Bad file descriptor

2008-04-03 Thread Liang Zhang
I installed linux_base-fc4 from Ports. When I use /compat/linux/bin/cp with
option -p, an error occurred.
For example, I type:

$ /compat/linux/bin/cp -p a b

This message is shown:

/compat/linux/bin/cp: preserving times for `b': Bad file descriptor

Does anyone know this?
Thanks!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Need your help: Bad file descriptor and too many files open

2005-10-20 Thread Axel . Gruner

Hi,

I get the following messages sometimes if i try to restart sshd:

#etc/rc.d/sshd restart
eval: Pipe call failed: Bad file descriptor
eval: Pipe call failed: Bad file descriptor
[...]
#/etc/rc.d/sshd restart
/etc/rc.subr: Pipe call failed: Too many open files in system

I am running 5.4-RELEASE-p6. Dual XEON 3.06GHz with 2 GB of RAM.

sysctl:
#sysctl -a kern.openfiles
kern.openfiles: 9607
#sysctl -a kern.maxfiles
kern.maxfiles: 65536

/etc/sysctl.conf:
kern.maxfiles=65536
kern.ipc.nmbclusters=64000
kern.ipc.nmbufs=256000
kern.maxproc=8192
kern.ipc.somaxconn=4096

#vmstat -i
interrupt  total   rate
irq24: xl0  46574469169
[...]
irq29: em0 1  0
irq30: em1 1  0

Device Polling is active.

load averages:  1.00,  1.08,  1.09
647 processes: 1 running, 644 sleeping, 2 zombie

A lot of users connects via ssh (x-forward). Also sometimes they can not
connect because of too many open files.

So what could be the problem? Any hints?

Thanks in advance.

asg



# DISCLAIMER   #
#  #
# Der Inhalt dieser E-Mail ist vertraulich. Falls Sie nicht der#
# angegebene Empfaenger sind oder falls diese Email irrtuemlich an Sie #
# addressiert wurde, verstaendigen Sie bitte den Absender sofort und   #
# loeschen Sie die Email umgehend. Das unerlaubte Kopieren sowie die   #
# unbefugte Uebermittlung sind nicht gestattet.#
# Die Sicherheit von Uebermittlungen per Email kann nicht garantiert   #
# werden. Falls Sie eine Bestaetigung wuenschen, fordern Sie bitte den #
# Inhalt der Email als Hardcopy an.#
#  #
#  #
# The contents of this  e-mail are confidential.   #
# If you are not the named addressee you should not disseminate,   #
# distribute or copy this e-mail. Please notify the sender immediately #
# if you have received this e-mail by mistake and delete this e-mail   #
# from your system. Finally, the recipient should check this email and #
# any attachments for the presence of viruses. The company accepts no  #
# liability for any damage caused by any virus transmitted by this #
# email.   #
#  #
# SuedFactoring GmbH, Heilbronner Strasse 86, 70191 Stuttgart  #

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Bad file descriptor

2005-01-11 Thread David Jenkins
Hi all,

I have no idea what's causing the problem here but it seems that mail cannot
be delivered to the root account - I know I should have mail forwarded to a
different user in the aliases file...

I'm running 5.3-RELEASE-p2 (haven't applied the latest patch yet) and
GENERIC kernel. The MTA is sendmail, the box is only used for web
services for a few friends.

Anyway, last night, when the daily periodic was run by cron it appears the
mail could not be delivered to root.

The sendmail logs show the error

DSN: Service unavailable (/var/mail/root: lstat: file changed after open)

I have tried emailing other user accounts, and that works fine. I have tried
emailing root again, and I get exactly the same errors.

So, I checked /var/mail - here's the interesting thing.

# ls
some user accounts root some more user accounts

# ls -a
. .. some user accounts root some more user accounts

# ls -la
.
..
some user accounts
some more user accounts

i.e. root's file does not show.

# touch root
touch: root: Bad file descriptor

I tried

# vi /var/mail/root
(which created a new file, I saved it (empty), and the box paniced and
rebooted)

I've checked google / the mailing list archives but can't seem to find
anything relevant (I must be searching for the wrong keywords). If
someone could give me a few pointers that would be great.

Cheers,
David
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


syslogd: select: Bad file descriptor

2004-02-10 Thread Sten Daniel Sørsdal

Feb 10 08:07:45 xx syslogd: select: Bad file descriptor

FreeBSD 4.9-RELEASE-p1 i386

run as in a ttys wrapper script:
/usr/sbin/syslogd -4 -A -cc -n -s -d -f /etc/syslog.conf

the output of script/command is not redirected to /var/log but i 
suspect it happens when newsyslog runs.

Has anyone encountered the same? Does anyone know of a remedy?

_// Sten Daniel Sørsdal
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


ntop: Bad file descriptor on device 1

2003-09-21 Thread Pat Lashley
I've just installed the ntop port, on a 4.8-STABLE system that has
two NICs.  When I run ntop, it always gives me this error:
**ERROR** Reading packets on device 1(sis0): 'read: Bad file descriptor'

In this case sis0 is the second NIC listed.  If I swap the order in the
-i option, it will report the error on '...device 1(sis1)...'  In either
case, it does not report any data for that NIC.
My ports directory is up to date; but the -STABLE system was last
cvsupp'd and built on 25 April.
Any clues what might be causing this or how to fix it?

Thanks,
-Pat
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: bad file descriptor

2003-06-19 Thread Sunil Sunder Raj
Hi,
1) First get the inode no of the file
ls -li #pico29506#
2) find . -inum inode no -delete

Regards
SSR

From: Jaime [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: bad file descriptor
Date: Tue, 17 Jun 2003 09:06:10 -0400 (EDT)
Can anyone explain this?  It looks like I can't delete a given
file.  This file has been causing weird errors with just about everything,
including tar, rm, ls -l, etc.  It resides on a vinum RAID-5 array, which
is the only strange thing I can think of about it.
zeus# ls
#pico29506# .login  .shrc   
cdtashirt.jpg
.addressbook.login_conf 
.spamassassin   cdtashirtstitch.jpg
.addressbook.lu .mail_aliases   December 
2002 Newsletter.docs   dead.letter
.aspell.en.prepl.mailrc Documents   
mail
.aspell.en.pws  .pinerc 
Lawrence.JPGmbox
.aspell.english.prepl   .profileOctober 
2002 Newsletter.doc public_html
.aspell.english.pws .qmail.backup.from.cyrusOctober 
2002 Newsletter.doc.
.cshrc  .rhosts acker
zeus# rm #pico29506#
rm: #pico29506#: Bad file descriptor
zeus# whoami
root

Thanks in advance,
Jaime
To affect the quality of the day, that is the highest of arts.
 - Henry David Thoreau, _Where_I_Live_
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]
_
Chill out. Win a Himalayan holiday! 
http://server1.msn.co.in/sp03/summerfun/index.asp

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


bad file descriptor

2003-06-17 Thread Jaime
Can anyone explain this?  It looks like I can't delete a given
file.  This file has been causing weird errors with just about everything,
including tar, rm, ls -l, etc.  It resides on a vinum RAID-5 array, which
is the only strange thing I can think of about it.

zeus# ls
#pico29506# .login  .shrc  
 cdtashirt.jpg
.addressbook.login_conf .spamassassin  
 cdtashirtstitch.jpg
.addressbook.lu .mail_aliases   December 2002 
Newsletter.docs   dead.letter
.aspell.en.prepl.mailrc Documents  
 mail
.aspell.en.pws  .pinerc Lawrence.JPG   
 mbox
.aspell.english.prepl   .profileOctober 2002 
Newsletter.doc public_html
.aspell.english.pws .qmail.backup.from.cyrusOctober 2002 
Newsletter.doc.
.cshrc  .rhosts acker
zeus# rm #pico29506#
rm: #pico29506#: Bad file descriptor
zeus# whoami
root

Thanks in advance,
Jaime

To affect the quality of the day, that is the highest of arts.
 - Henry David Thoreau, _Where_I_Live_
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: bad file descriptor

2003-06-17 Thread heikki soerum
On Tue, 17 Jun 2003 09:06:10 -0400 (EDT)
Jaime [EMAIL PROTECTED] wrote:
   Can anyone explain this?  It looks like I can't delete a given
 file.  This file has been causing weird errors with just about
 everything, including tar, rm, ls -l, etc.  It resides on a vinum
 RAID-5 array, which is the only strange thing I can think of about it.
 
 zeus# ls
 #pico29506# .login  .shrc 
  cdtashirt.jpg
 .addressbook.login_conf
 .spamassassin   cdtashirtstitch.jpg.addressbook.lu
 .mail_aliases   December 2002
 Newsletter.docs   dead.letter
 .aspell.en.prepl.mailrc
 Documents   mail.aspell.en.pws 
 .pinerc Lawrence.JPG   
 mbox.aspell.english.prepl   .profile   
 October 2002 Newsletter.doc public_html.aspell.english.pws
 .qmail.backup.from.cyrusOctober 2002 Newsletter.doc.
 .cshrc  .rhosts acker
 zeus# rm #pico29506#
 rm: #pico29506#: Bad file descriptor
 zeus# whoami
 root

# is usually an special character, I usually delete such files with
Midnight Commander (mc shell), another possibility might be to not use
 but rather use an \ backslash before every special character.
I'm not guaranteeing that it would work though. :/

Heikki S.


-- 
If people say that here and there someone has been taken away and
maltreated,
I can only reply: You can't make an omelette without breaking eggs.
-- Hermann Goering
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: bad file descriptor

2003-06-17 Thread Bill Moran
Jaime wrote:
Can anyone explain this?  It looks like I can't delete a given
file.  This file has been causing weird errors with just about everything,
including tar, rm, ls -l, etc.  It resides on a vinum RAID-5 array, which
is the only strange thing I can think of about it.
zeus# ls
#pico29506# .login  .shrc  
 cdtashirt.jpg
.addressbook.login_conf .spamassassin  
 cdtashirtstitch.jpg
.addressbook.lu .mail_aliases   December 2002 
Newsletter.docs   dead.letter
.aspell.en.prepl.mailrc Documents  
 mail
.aspell.en.pws  .pinerc Lawrence.JPG   
 mbox
.aspell.english.prepl   .profileOctober 2002 
Newsletter.doc public_html
.aspell.english.pws .qmail.backup.from.cyrusOctober 2002 
Newsletter.doc.
.cshrc  .rhosts acker
zeus# rm #pico29506#
rm: #pico29506#: Bad file descriptor
zeus# whoami
root
That looks like a recovery file from the pico editor.

It's unlikely, but possible that your system crashed during a pico
editing session and left this file behind with a broken file
descriptor.  If such is the case, fsck might be able to fix it.
Try unmounting the filesystem (or booting into single user mode
if you must) and running 'fsck -f'.  Once it's finished and you've
rebooted the system, see if you can then delete the file.
--
Bill Moran
Potential Technologies
http://www.potentialtech.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: bad file descriptor

2003-06-17 Thread Jaime
On Tue, 17 Jun 2003, heikki soerum wrote:
  zeus# rm #pico29506#
  rm: #pico29506#: Bad file descriptor
  zeus# whoami
  root

 # is usually an special character, I usually delete such files with
 Midnight Commander (mc shell), another possibility might be to not use
  but rather use an \ backslash before every special character.

I tried that first.  That didn't work, either.  :(

Jaime
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: bad file descriptor

2003-06-17 Thread Dan Nelson
In the last episode (Jun 17), Jaime said:
 On Tue, 17 Jun 2003, heikki soerum wrote:
   zeus# rm #pico29506#
   rm: #pico29506#: Bad file descriptor
   zeus# whoami
   root
 
  # is usually an special character, I usually delete such files with
  Midnight Commander (mc shell), another possibility might be to not use
   but rather use an \ backslash before every special character.
 
   I tried that first.  That didn't work, either.  :(

Bad file descriptor when trying to access a file usually means
filesystem corruption.  A fsck run should delete it, and if it doesn't
you can use the clri command to zap the inode (dismount the filesystem
first) then run fsck.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Sendmail - File descriptors missing on startup: stdin, stderr;Bad file descriptor

2002-10-31 Thread Duncan Anker
On Fri, 2002-11-01 at 11:48, Tuc wrote:
 Hi,
 
   Having a problem that we can't figure out. 2 different people
 installed machines, one is working fine, the other gives :
 
 Oct 31 00:07:34 lodur1 sendmail[47337]: File descriptors missing on startup: std
 in, stderr; Bad file descriptor
 
   constantlyCan't figure out why... Binary sum is the same,
 config is the same except for the generation time Where to look? I'm
 seriously puzzled

Not sure if this is your problem, but try fsck'ing the disk.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



sendmail: File descriptors missing on startup: stderr; Bad file descriptor

2002-09-27 Thread Dan Langille

I keep seeing this in /var/log/maillog but do not know the cause:

   sendmail[42390]: File descriptors missing on startup: stderr; Bad
 file descriptor

I'm on FreeBSD 4.6-STABLE #0: Thu Sep 26 09:02:16 EDT 2002 with 
sendmail 8.12.5

Any ideas on cause/fix?

Thanks.
-- 
Dan Langille
I'm looking for a computer job:
http://www.freebsddiary.org/dan_langille.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: sendmail: File descriptors missing on startup: stderr; Bad file descriptor

2002-09-27 Thread Matthew Seaman

On Fri, Sep 27, 2002 at 09:03:28AM -0400, Dan Langille wrote:
 I keep seeing this in /var/log/maillog but do not know the cause:
 
sendmail[42390]: File descriptors missing on startup: stderr; Bad
  file descriptor
 
 I'm on FreeBSD 4.6-STABLE #0: Thu Sep 26 09:02:16 EDT 2002 with 
 sendmail 8.12.5
 
 Any ideas on cause/fix?

What command line are you using to start sendmail? That error message
suggests that the stderr file descriptor, which sendmail inherits from
the shell where it is started, is bogus.  The kernel will sanity check
the standard descriptors when starting up SUID or SGID processes, and
if any are closed, will open them up again on /dev/null.  There was an
egregious security bug exploiting that situation going the rounds a
few months ago.  See
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-02%3A23.stdio.asc

However, that was fixed before 4.6-RELEASE.  Also I believe that it
was never possible to attack sendmail that way because the first thing
sendmail does when being started in daemon mode is to walk through
it's filedescriptor table and close them all down.  The standard 0, 1,
2 descriptors are then immediately re-opened onto /dev/null. That's
something that should be standard procedure for starting up any
daemonized process and it is built into the daemon(3) function.

Cheers,

Matthew


-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
  Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message