public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/11687] New: Allow customizing of __FD_SETSIZE
@ 2010-06-10 10:15 christoph at familiekling dot de
  2010-06-10 15:23 ` [Bug libc/11687] " pasky at suse dot cz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: christoph at familiekling dot de @ 2010-06-10 10:15 UTC (permalink / raw)
  To: glibc-bugs

Hello,

I need to raise __FD_SETSIZE for an application's select() (see
misc/sys/select.h) and the only way is to change the bits/typesizes.h header file.

I therefore suggest to add a #ifndef __FD_SETSIZE to the definition in
bits/typesizes.h in order to allow a developer to use a custom value.


Regards,

Christoph Kling

-- 
           Summary: Allow customizing of __FD_SETSIZE
           Product: glibc
           Version: 2.10
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: christoph at familiekling dot de
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11687

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libc/11687] Allow customizing of __FD_SETSIZE
  2010-06-10 10:15 [Bug libc/11687] New: Allow customizing of __FD_SETSIZE christoph at familiekling dot de
@ 2010-06-10 15:23 ` pasky at suse dot cz
  2010-06-21  8:53 ` mtk dot manpages at gmail dot com
  2010-06-21 11:23 ` pasky at suse dot cz
  2 siblings, 0 replies; 5+ messages in thread
From: pasky at suse dot cz @ 2010-06-10 15:23 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From pasky at suse dot cz  2010-06-10 15:22 -------
You cannot simply change FD_SETSIZE like this and expect anything to work. The
FD_SETSIZE value is part of the ABI and depends mainly on the kernel - if you
use larger fdset size, the syscall will not work anyway. You would have to hack
your kernel too, and then you are completely on your own anyway; other strange
problems can also pop up due to different structure sizes in already compiled
programs.

In short, FD_SETSIZE is not remotely a variable that would be
runtime-adjustable, and it's not defined as a fixed value just for the sake of
it. If you need to handle more fds, you will need different methods like poll()
or epoll().

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


http://sourceware.org/bugzilla/show_bug.cgi?id=11687

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libc/11687] Allow customizing of __FD_SETSIZE
  2010-06-10 10:15 [Bug libc/11687] New: Allow customizing of __FD_SETSIZE christoph at familiekling dot de
  2010-06-10 15:23 ` [Bug libc/11687] " pasky at suse dot cz
@ 2010-06-21  8:53 ` mtk dot manpages at gmail dot com
  2010-06-21 11:23 ` pasky at suse dot cz
  2 siblings, 0 replies; 5+ messages in thread
From: mtk dot manpages at gmail dot com @ 2010-06-21  8:53 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From mtk dot manpages at gmail dot com  2010-06-21 08:52 -------
(In reply to comment #1)
> You cannot simply change FD_SETSIZE like this and expect anything to work. The
> FD_SETSIZE value is part of the ABI and depends mainly on the kernel - if you
> use larger fdset size, the syscall will not work anyway. 

Petr, Did you test this? I've happily raised FD_SETSIZE by modifying glibc
headers, and used set sizes up to 16k. No kernel mod required.


> You would have to hack
> your kernel too, and then you are completely on your own anyway; other strange
> problems can also pop up due to different structure sizes in already compiled
> programs.
> 
> In short, FD_SETSIZE is not remotely a variable that would be
> runtime-adjustable, and it's not defined as a fixed value just for the sake of
> it. If you need to handle more fds, you will need different methods like poll()
> or epoll().

Elsewhere, the reporter explained why that's not possible for him. People
porting legacy applications do run into this problem. There seems no obvious
reason for glibc not to allow FD_SETSIZE to conditionally raised in the headers.
I posted exactly the same request years ago, and got the same response to my bug
report from the maintainer. But, AFAICS, there is no problem.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11687

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libc/11687] Allow customizing of __FD_SETSIZE
  2010-06-10 10:15 [Bug libc/11687] New: Allow customizing of __FD_SETSIZE christoph at familiekling dot de
  2010-06-10 15:23 ` [Bug libc/11687] " pasky at suse dot cz
  2010-06-21  8:53 ` mtk dot manpages at gmail dot com
@ 2010-06-21 11:23 ` pasky at suse dot cz
  2 siblings, 0 replies; 5+ messages in thread
From: pasky at suse dot cz @ 2010-06-21 11:23 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From pasky at suse dot cz  2010-06-21 11:22 -------
No, sorry, that claim about syscall not working with larger FD_SETSIZE was
indeed wrong.

But what if fdset is part of some API, e.g. a select() wrapper? You are in to a
huge mess at that point. The correct solution is to port the application to a
saner API than select(), if you want something quick'n'dirty you can just copy
the appropriate header over to your tree and modify your local version. But I
don't see the value of making this very problematic change easier.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11687

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libc/11687] Allow customizing of __FD_SETSIZE
       [not found] <bug-11687-131@http.sourceware.org/bugzilla/>
@ 2014-06-30 17:49 ` fweimer at redhat dot com
  0 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2014-06-30 17:49 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=11687

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-30 17:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-10 10:15 [Bug libc/11687] New: Allow customizing of __FD_SETSIZE christoph at familiekling dot de
2010-06-10 15:23 ` [Bug libc/11687] " pasky at suse dot cz
2010-06-21  8:53 ` mtk dot manpages at gmail dot com
2010-06-21 11:23 ` pasky at suse dot cz
     [not found] <bug-11687-131@http.sourceware.org/bugzilla/>
2014-06-30 17:49 ` fweimer at redhat dot com

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).