Linux-Development-Sys Digest #165, Volume #7 Tue, 7 Sep 99 12:14:19 EDT
Contents:
Re: Max threads and TCP connections? (XuYifeng)
Re: Init pb : respawning too fast (FIT)
Problems building a cross-compiler (Sasa Ostrouska)
Re: How do you revert from Afterstep to KDE? (Sasa Ostrouska)
Re: Can I compile the kernel using a cc other than gcc? (Villy Kruse)
Re: why not C++? (Nathan Myers)
Re: Max threads and TCP connections? (Peter Samuelson)
Problem porting to LINUX ("Georg S. Lorrig")
Re: Can I compile the kernel using a cc other than gcc? (Peter Samuelson)
Re: embedded linux ("Gregory Lepere")
Re: Problems building a cross-compiler ([EMAIL PROTECTED])
Re: Richards Stevens died (Ryan)
Re: Max threads and TCP connections? (David Schwartz)
linuxthreads and mutexes ([EMAIL PROTECTED])
Re: Unix and the ISO/IEC 14882-1998 Standard C++ Library (Jeff McWilliams)
Problem compiling GNU/libc6 on Debian (Olivier Girondel)
----------------------------------------------------------------------------
From: XuYifeng <[EMAIL PROTECTED]>
Subject: Re: Max threads and TCP connections?
Date: Tue, 07 Sep 1999 15:53:50 +0800
Hi,
Linux thread has limit thread numbers no more than 500, according current
Linux Pthread designing, every thread will allocate 2 M bytes stack, so 500
threads allocate 1G space,
but there also have data space and code space, shared memory space, so 500 is
maximum.
XuYifeng
Andrey Fisunenko wrote:
> >
> >Bill LN wrote:
> >>
> >> Is it possible to maintain 1 million TCP connections from a single
> >> Linux box? What would the bandwidth and memory and OS ramifications be
> >> if I try to hold 1 million TCP connections open at once ?
> >
> > In my experience, 16,000 seems to be the maximum. I encountered some
> >nasty memory allocation problems in the Linux kernel above that.
> >
>
> We try to run sleeping threads by call pthread_create (on Red Hat with
> kernel 2.2.5)
> and increase limitations by set-limits.
> But we can't get more then about 400 ptrheads.
> What's wrong?
> How you got 16000? Those test compiled and executed under FreeBSD creates
> pthreads while system has enough memory.
>
> It seems to be one of the weakest sides of Linux?
>
> And all tend to reply in book manner -
> "You don't need that amount of thread".
>
> But "if stars light in night someone needs that".
> _There are_ tons of tasks where threads are more natural than fork or
> something like that.
> Some tasks can not be solved without threads at all.
------------------------------
From: FIT <[EMAIL PROTECTED]>
Subject: Re: Init pb : respawning too fast
Date: Tue, 07 Sep 1999 11:08:35 +0200
Reply-To: [EMAIL PROTECTED]
Hi,
I posted a similar question (quoted below) to which I never received a reply.
The problem still exists. Do You think Your suggestion might solve it as well
?
Thanks, Arno
Juergen Heinzl wrote:
> In article <7r0961$295$[EMAIL PROTECTED]>, Gregory Lepere wrote:
> >Hello,
> >
> >I'm trying to embed Linux. So, I start with a minimal system.
> >But when I boot Linux. The kernel loading is ok. The init loading is ok.
> >It start with the inittab. And, it didn't start getty. It says :
> >"Id 1 respawning too fast: disabled for 5 minutes" when trying to start
> >getty.
> >I think getty is dying as soon as it starts up.
> >So, I check the librairies it depends on.
> >I update them to correct versions and do a ldconfig.
> >But it's always the same result.
> >
> >Could someone help ? Thank you.
>
> If possible, say you can still boot a system via lilo interrupt
> lilo, then boot via ...
> boot: vmunix S
> ... where vmunix is your kernels' name. On the shell you can
> run a getty using tty2 (e.g.) to see what happens, using any
> diagnostic options or stuff like strace available.
>
> Ta',
> Juergen
>
> --
> \ Real name : J�rgen Heinzl \ no flames /
> \ EMail Private : [EMAIL PROTECTED] \ send money instead /
======================snipp====================
>
> Hello,
>
> using a red hat 6.0 GPL distribution I encountered the following problem
> which up to now turned out to be too hard for me to crack:
>
> I cannot start the printer (spool) demon lpd, no matter what tricks I
> try. I cannot start it from the command line (/etc/rc.d/rc5.d/Sxxlpd
> start) nor with an init script (no matter what run level I chose). Even
> if lpd is the only service apart from kernel daemon and sys logger at
> that run level it is not started. If I want to print using 'lpr' I get
> the message 'lpd: connection denied, jobs queued but cannot start
> daemon). If I do not start X and thus see more of the boot messages I
> notice the error message 'ld 'fx' respawning too fats - suspended for
> five minutes'. As I assume this may be causative for later problems I
> tried to work on that but no way.
> So I should be extremely thankful if somebody would be so kind as to
> advise me how too tackle thease problems.
>
> Thank You very much in advance
>
> Arno R. Schleich
>
>
==========================snipp=====================
--
Functional Imaging Technologies GmbH
Siemensstr. 40/41
12247 Berlin
Germany
fon.: +49 (0)30 76 90 24 80
fax.: +49 (0)30 76 90 24 81
mailto:[EMAIL PROTECTED]
htp://www.functional-imaging.com
------------------------------
From: Sasa Ostrouska <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Problems building a cross-compiler
Date: Tue, 07 Sep 1999 11:14:04 +0200
Hello !
Can anybody help me to build a cross-compiler ? I'm
trying and i get the following error but don't understand why ?
make[1]: Leaving directory `/usr/src/buildegcs/texinfo'
Building the C and C++ compiler
make[1]: Entering directory `/usr/src/buildegcs/gcc'
rm -f tmplibgcc2.a
for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3
_ashldi3 _ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2
_floatdidf _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi
_fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi
_fixtfdi _fixunstfdi _floatditf __gcc_bcmp _varargs __dummy _eprintf _bb
_shtab _clear_cache _trampoline __main _exit _ctors _pure; \
do \
echo ${name}; \
/usr/src/buildegcs/gcc/xgcc -B/usr/src/buildegcs/gcc/ -O2
-DCROSS_COMPILE -DIN_GCC -g -O2 -I./include -fPIC -g1 -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -I. -I/usr/src/egcs-1.1.2/gcc
-I/usr/src/egcs-1.1.2/gcc/config -c -DL${name} \
/usr/src/egcs-1.1.2/gcc/libgcc2.c -o ${name}.o; \
if [ $? -eq 0 ] ; then true; else exit 1; fi; \
i586-pc-linux-gnu-ar rc tmplibgcc2.a ${name}.o; \
rm -f ${name}.o; \
done
_muldi3
/usr/src/egcs-1.1.2/gcc/libgcc2.c:41: stdlib.h: No such file or
directory
/usr/src/egcs-1.1.2/gcc/libgcc2.c:42: unistd.h: No such file or
directory
make[1]: *** [libgcc2.a] Error 1
make[1]: Leaving directory `/usr/src/buildegcs/gcc'
make: *** [cross] Error 2
I'm using the slackware 4.0 with egcs-1.1.2 . Pls. if somebody can help
or if you need additional informations contact me.
Thank you in advance.
Sasa
------------------------------
From: Sasa Ostrouska <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.alpha,comp.os.linux.development.apps
Subject: Re: How do you revert from Afterstep to KDE?
Date: Tue, 07 Sep 1999 11:30:18 +0200
Change in your .xinitrc file the exec afterstep to exec startkde
Bye Sasa
Mal wrote:
> How do you revert from Afterstep to KDE? I initially had KDE running on
>
> RedHat6, however i swithed to Afterstep. How does one revert back to
>
> KDE. I have tried a switch too, but for some reason there is no option to
>
> go back to KDE.
>
> ------------------ Posted via CNET Linux Help ------------------
> http://www.searchlinux.com
------------------------------
From: [EMAIL PROTECTED] (Villy Kruse)
Crossposted-To: comp.os.linux.hardware,comp.os.linux.portable
Subject: Re: Can I compile the kernel using a cc other than gcc?
Date: 7 Sep 1999 11:34:19 +0200
H. Peter Anvin <[EMAIL PROTECTED]> wrote:
>Newsflash: you *can't* write a kernel without non-portable
>extensions.
All of the unix versions comming out of AT&T and Berkely used the standard
(pre-ANSI) C compiler wihout any of these extensions. When necessary
pure assembly code was also used in places where the C compiler wasn't
adequate.
--
Villy
------------------------------
From: [EMAIL PROTECTED] (Nathan Myers)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: why not C++?
Date: 7 Sep 1999 03:05:40 -0700
Don Waugaman <[EMAIL PROTECTED]> wrote:
>I might add that a suitable compiler design would be to check for NULL or
>otherwise illegal pointers when they are dereferenced, which would mean
>that incorrect dereferencing happens in the caller code rather than the
>called code, thus moving the effect of the error closer to the site of the
>error.
It's easier than that, and in fact g++ can be persuaded to generate
code to check for 0 when initializing a reference.
--
Nathan Myers
[EMAIL PROTECTED] http://www.cantrip.org/
------------------------------
From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: Max threads and TCP connections?
Date: 7 Sep 1999 07:14:17 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>
[Peter Samuelson <[EMAIL PROTECTED]>]
> > TCP/IP numbers its ports with a 16-bit number, so there's a limit
> > of 65,536 ports per protocol (TCP or UDP). Each client connection
> > requires one port, though server connections can share.
[Kaz Kylheku <[EMAIL PROTECTED]>]
> TCP connections are identified by four numbers. The source and
> destination IP and the source and destination port number. That
> gives you a vast number of different distinct connections, even if
> you constrain one endpoint.
>
> In the case of a passive server, all incoming connections share the
> same *local* port number and IP. For example, in the case of a HTTP
> daemon listening on port 80, all browser connections have port 80 on
> the server side, and the IP address of the network interface on which
> they are arriving. In principle, there could be much more than 65536
> such connections, because port numbers are not a problem. Of course,
> there couldn't be more than 65536 from any *single* IP.
>
> So running out of port numbers should not be an issue in the case of
> *incoming* connections, which is probably what you care about here.
>
> Of course, any given host can only have so many *outgoing*
> connections, because normally, each active connection is given a
> unique ephemeral local port number. (This restriction could probably
> be overcome with some deep hackery.)
Congratulations for saying in 179 words what took me 31 words. (: (:
> > One other thing to consider is where these connections are coming from.
[...]
> > If they're coming in from routers, keep in mind the hard TCP/IP
> > limit of 65,536 connections between your server and each router.
> What hard limit is that? Routers don't normally care about your
> connections, they just forward IP packets. You don't connect to the
> router, you forward connectionless datagrams to it.
Of course. Brain fart on my part -- I must have been thinking in terms
of NAT. Note also, though, that if anything's coming through a
firewall which wants to keep track of connections so it can
differentiate between a new connection and an established one....
--
Peter Samuelson
<sampo.creighton.edu!psamuels>
------------------------------
From: "Georg S. Lorrig" <[EMAIL PROTECTED]>
Subject: Problem porting to LINUX
Date: Tue, 07 Sep 1999 14:44:29 +0200
Hello,
a friend of mine asked me to port a small application from a Motorola
running SystemV to an Intel PC (preferred running Linux). The
application consists of two C modules that do scren-io (using curses)
and retrieve pathnames and the like.
I tried to compile those modules using UWin/DOS (which has a curses
portation to the windows environment), and it worked fine (just some
warnings). When I try to compile those modules under Linux (Red Hat 6.0,
German version using "cc -c C_TEST.C" I get some _hundred_ error
messages. It seems that cc doesn't like almost any function declaration
and the like.
At that point I'm hopelessly lost, since I have a good understanding of
COBOL (at least I think so) and some other mainframe languages, but I
can't solve this problem.
If anyone would have a look at the sources (download them fron
http://www.lorrig.com/csource.zip) and give me some hints how to get
this baby running?
George
------------------------------
From: [EMAIL PROTECTED] (Peter Samuelson)
Crossposted-To: comp.os.linux.hardware,comp.os.linux.portable
Subject: Re: Can I compile the kernel using a cc other than gcc?
Date: 7 Sep 1999 06:42:09 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>
[H. Peter Anvin <[EMAIL PROTECTED]>]
> > Newsflash: you *can't* write a kernel without non-portable
> > extensions.
[Villy Kruse <[EMAIL PROTECTED]>]
> All of the unix versions comming out of AT&T and Berkely used the
> standard (pre-ANSI) C compiler wihout any of these extensions.
No. There was *no* standard C compiler in those days, in the sense
we're talking about, which is "standards-conforming", since there was
no standard to conform to. At least nothing as generic yet minute as
ANSI. And anyway, do you believe for a moment that those earlier
kernels didn't depend on *any* compiler behavior that wasn't explicitly
set down in K&R? I don't.
What they used was the *de facto* standard compiler for their
platforms. And, sure enough, the Linux kernel uses the de facto
standard C compiler for the Linux platform. GCC.
--
Peter Samuelson
<sampo.creighton.edu!psamuels>
------------------------------
From: "Gregory Lepere" <[EMAIL PROTECTED]>
Subject: Re: embedded linux
Date: Tue, 7 Sep 1999 15:51:56 +0200
You can try mini-distributions like CC-Linux, Byld, LEM, LRP, ...
A good link : http://www.linuxlinks.com/Distributions/Mini_Distributions/
I'm using an embedded linux system with no X fit in 2.5 Mo flash memory.
So, it works. The miracle became true.
I think the best for you is LEM : base + X11 less than 10 Mo.
Dr. Sven Bode a �crit dans le message <[EMAIL PROTECTED]>...
>is there a xwindows linux system which will work with less then 10 MB
>RAM and about 16MB Flashdisk.
>If so, what development tools for application is recommended ?
>Any help from you will help us to get rid of M$ ;-)
>--
>Sven Bode
>[EMAIL PROTECTED]
>Tel ++49 30 69 0003 13
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Problems building a cross-compiler
Date: 07 Sep 1999 09:19:47 -0400
Don't build in the source directory.
------------------------------
From: [EMAIL PROTECTED] (Ryan)
Crossposted-To: comp.unix.programmer,comp.os.linux.development.apps
Subject: Re: Richards Stevens died
Date: Tue, 07 Sep 1999 13:52:40 GMT
On 5 Sep 1999 18:46:57 GMT, [EMAIL PROTECTED] (Scott Lanning)
wrote:
>http://www.bigdealclassifieds.com/classified/plsql/
>classlevel3_step?wClass=0002&wPubdate=Friday&wRowstart=1&wLessOrMore
>
What tragic news. I feel like we should do something in his memory.
======
Remove nospam information if you must reply via e-mail.
[EMAIL PROTECTED]
======
------------------------------
From: David Schwartz <[EMAIL PROTECTED]>
Subject: Re: Max threads and TCP connections?
Date: Tue, 07 Sep 1999 07:38:59 -0700
Andrey Fisunenko wrote:
> We try to run sleeping threads by call pthread_create (on Red Hat with
> kernel 2.2.5)
> and increase limitations by set-limits.
> But we can't get more then about 400 ptrheads.
> What's wrong?
> How you got 16000? Those test compiled and executed under FreeBSD creates
> pthreads while system has enough memory.
Not 16,000 threads. You'd never have enough memory for all those
stacks. Why would anyone even attempt anything so stupid?
> It seems to be one of the weakest sides of Linux?
>
> And all tend to reply in book manner -
> "You don't need that amount of thread".
>
> But "if stars light in night someone needs that".
> _There are_ tons of tasks where threads are more natural than fork or
> something like that.
> Some tasks can not be solved without threads at all.
Sure, whatever. But you don't need a large number of threads. You may
need some threads, but only about as many threads as you have
processors, plus maybe a few extra for specific tasks (like firing
timers, or waiting for signals).
DS
------------------------------
From: [EMAIL PROTECTED]
Subject: linuxthreads and mutexes
Date: Tue, 07 Sep 1999 14:18:35 GMT
Hello,
Is it possible to use mutexes in linuxthreads to
synchronize threads of different processes?
Here is what I am doing:
- Create a memory-mapped file and put a mutex in
it.
- Have two processes open this memory-mapped
file and use the mutex for synchronization.
My program segmentation faults in
pthread_mutex_unlock. I can catch the
segmentation fault by running it through gdb.
Here is what happens:
Program received signal SIGSEGV, Segmentation
fault.
[Switching to Thread 5135]
Program received signal SIGSEGV, Segmentation
fault.
__pthread_unlock (lock=0x40186d88) at
spinlock.c:82
spinlock.c:82: No such file or directory.
(gdb) where
#0 __pthread_unlock (lock=0x40186d88) at
spinlock.c:82
#1 0x4001e9ff in __pthread_mutex_unlock
(mutex=0x40186d78) at mutex.c:126
Thanks for any help,
Babak Najafi
[EMAIL PROTECTED]
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
From: [EMAIL PROTECTED] (Jeff McWilliams)
Crossposted-To:
comp.programming.threads,comp.std.c++,comp.unix.programmer,linux.redhat.development
Subject: Re: Unix and the ISO/IEC 14882-1998 Standard C++ Library
Date: 07 Sep 99 15:09:17 GMT
Reply-To: [EMAIL PROTECTED]
In article <7r17ha$22qa$[EMAIL PROTECTED]>, Scott Robert Ladd wrote:
>
>I don't know if gcc has decent locale support... I just haven't had a chance
>to look, but you might want to take a gander.
>
>--
> * Scott Robert Ladd
> * Coyote Gulch Productions - http://www.coyotegulch.com
>
The last time I checked (admittedly, 7 months ago) egcs did not support
std::wstring, and trying to use std::basic_string<wchar_t> also broke
during the compile.
Somebody is doing it though - as Debian is beginning to support many packages
with Japanese (Kanji ??) support. http://www.debian.or.jp/ is the
Debian JP Project website - so SOMEBODY is doing il8n.
Jeff
--
Jeff McWilliams - Advanced Development Engineer, ACE Technologies
[EMAIL PROTECTED]
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:[EMAIL PROTECTED] ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
------------------------------
From: Olivier Girondel <[EMAIL PROTECTED]>
Subject: Problem compiling GNU/libc6 on Debian
Date: Tue, 07 Sep 1999 15:20:58 +0000
Reply-To: [EMAIL PROTECTED]
Hi,
I'm running Debian (slink), and i tried this days to compile the
lic6...
The compilation process is ok (egcs-2.91 or gcc-2.95) but things go
wrong with the dynamic
linker -> unresolved _dl_initial_searchlist (right after ldconfig),
which really is a *big* problem (when you
don't have sash... :-))
I'm kinda stuck right now, so "everything who could help would be...
helpful..."
Thanks,
Olivier
--
"To know recursion, you must first know recursion."
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************