Skip to Content.
Sympa Menu

freetds - Re: [freetds] big problem when I use dbopen

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] big problem when I use dbopen
  • Date: Thu, 2 Sep 2010 11:18:46 +0200

2010/9/2 Difei Qi <fredericqi AT gmail.com>:
> hello, I encounter a big problem when I use freeTDS.
> My program must receive thousands of connections from different users. When
> I have open these handles, if I use "dbopen()"  of freeTDS,the problem will
> core dump at once.
>
> You can simply test the situation in this way:
> first turn on the ulimit -n on Linux to append open files to a high num,
> saying, 10240;
> and then open more then 1900 handles of one file and do not close them,and
> then try to "dbopen()", the problem will immediately core dump.
>
> FILE *fp[2000]
> for(int i=0;i<1900;i++)
> (
>    fp[i]=fopen("noclosefile","r");
>    //don't close them;
> )
> .....
>
> dbopen();
>
> then the problem will core dump!
> thanks for you help!

fixed on post versions. Core is due to FD_SET called with file handle
>= FD_SETSIZE. Now we use poll function when available or we check
file handle value instead of core.

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page