[IRCServices Coding] fork: resource temporarily unavailable

Craig McLure frostycoolslug at hotmail.com
Mon Jul 8 16:29:38 PDT 2002


after a seemingly random amount of time, services 5 takes up all process IDs 
on a system so that any other app trying to fork gets "resource temporarily 
unavailable" we thought it was my custom modules originally so we unloaded 
themthe problem continued.
Then we thought it was the box, so we moved to a new provider
and yet again we got the problem... so it must be in the core of services 
somewhere.
It occurs on cygwin, redhat, Mandrake and Slackware to our knowledge usually 
in recv (log enclosed below):

--[ SNIP ]--
[May 31 00:10:12 2002] unknown message from server (:test.chatspike.net SMO 
o
[May 31 00:10:12 2002] operserv/sline: warning: client IP addresses not 
available
[May 31 00:10:12 2002] user: New maximum user count: 1
[May 31 00:10:12 2002] Read error from server: Resource temporarily 
unavailable
--[ /SNIP ]--

--[ SNIP ]--
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] sockets: accept(4): Invalid argument
[Jun 03 20:35:56 2002] Read error from server: Resource temporarily 
unavailable
--[ /SNIP ]--

The box eventually reaches the point in which we cant even SSH into the box 
as it cant fork a new process.
then the only way to fix the problem is /os restart or wait for it to commit 
suicide that way.

the errors occure from pre0 to present.

Also under CYGWIN (not sure if related..)

--[ SNIP ]--
[Jun 28 17:22:40 2002] PANIC! buffer = :test.chatspike.net NOTICE AUTH :*** 
Couldn't resolve your hostname; using your IP address instead
[Jun 28 17:22:40 2002] Services terminating: Arithmetic exception
--[ /SNIP ]--

Here is a full debug of services starting

--[ SNIP ]--
[Jun 04 04:30:56.460154 2002] IRC Services 5.0pre0 starting up (options: 
debug)
[Jun 04 04:30:57.508271 2002] debug: Loading language 0 from file 
`languages/en_us'
[Jun 04 04:30:57.910403 2002] debug: Loading language 10 from file 
`languages/nl'
[Jun 04 04:30:58.494873 2002] debug: Loading language 9 from file 
`languages/de'
[Jun 04 04:30:58.953611 2002] debug: Loading language 8 from file 
`languages/it'
[Jun 04 04:30:58.299709 2002] debug: Loading language 2 from file 
`languages/ja_euc'
[Jun 04 04:30:59.710164 2002] debug: Loading language 3 from file 
`languages/ja_sjis'
[Jun 04 04:30:59.055359 2002] debug: Loading language 5 from file 
`languages/pt'
[Jun 04 04:30:59.507050 2002] debug: Loading language 4 from file 
`languages/es'
[Jun 04 04:31:00.148606 2002] debug: Loading language 7 from file 
`languages/tr'
[Jun 04 04:31:01.697643 2002] debug: Loaded languages
[Jun 04 04:31:01.718681 2002] debug: Loading module `protocol/unreal'
[Jun 04 04:31:01.925415 2002] debug: Successfully loaded module 
`protocol/unreal'
[Jun 04 04:31:01.935691 2002] debug: Loading module `database/version4'
[Jun 04 04:31:01.968551 2002] debug: Successfully loaded module 
`database/version4'
[Jun 04 04:31:01.970623 2002] debug: Loading module `operserv/main'
[Jun 04 04:31:01.071957 2002] debug: Successfully loaded module 
`operserv/main'
[Jun 04 04:31:01.075053 2002] debug: Loading module `operserv/akill'
[Jun 04 04:31:01.130590 2002] debug: Successfully loaded module 
`operserv/akill'
[Jun 04 04:31:01.132072 2002] debug: Loading module `operserv/news'
[Jun 04 04:31:01.200207 2002] debug: Successfully loaded module 
`operserv/news'
[Jun 04 04:31:01.201676 2002] debug: Loading module `operserv/sessions'
[Jun 04 04:31:01.240783 2002] debug: Successfully loaded module 
`operserv/sessions'
[Jun 04 04:31:01.250335 2002] debug: Loading module `operserv/sline'
[Jun 04 04:31:01.326200 2002] debug: Successfully loaded module 
`operserv/sline'
[Jun 04 04:31:01.327671 2002] debug: Loading module `nickserv/main'
[Jun 04 04:31:01.443053 2002] debug: Successfully loaded module 
`nickserv/main'
[Jun 04 04:31:01.444523 2002] debug: Loading module `nickserv/access'
[Jun 04 04:31:01.450464 2002] debug: Successfully loaded module 
`nickserv/access'
[Jun 04 04:31:01.451872 2002] debug: Loading module `nickserv/autojoin'
[Jun 04 04:31:01.455518 2002] debug: Successfully loaded module 
`nickserv/autojoin'
[Jun 04 04:31:01.456924 2002] debug: Loading module `nickserv/link'
[Jun 04 04:31:01.481702 2002] debug: Successfully loaded module 
`nickserv/link'
[Jun 04 04:31:01.483103 2002] debug: Loading module `chanserv/main'
[Jun 04 04:31:02.565011 2002] debug: Successfully loaded module 
`chanserv/main'
[Jun 04 04:31:02.566516 2002] debug: Loading module `chanserv/access-levels'
[Jun 04 04:31:02.572908 2002] debug: Successfully loaded module 
`chanserv/access-levels'
[Jun 04 04:31:02.584062 2002] debug: Loading module `chanserv/access-xop'
[Jun 04 04:31:02.601665 2002] debug: Successfully loaded module 
`chanserv/access-xop'
[Jun 04 04:31:02.603084 2002] debug: Loading module `memoserv/main'
[Jun 04 04:31:02.631097 2002] debug: Successfully loaded module 
`memoserv/main'
[Jun 04 04:31:02.632525 2002] debug: Loading module `memoserv/ignore'
[Jun 04 04:31:02.664631 2002] debug: Successfully loaded module 
`memoserv/ignore'
[Jun 04 04:31:02.666258 2002] debug: Loading module `statserv/main'
[Jun 04 04:31:02.332792 2002] statserv/main: StatServ initialised: Log 
Channel="#services", Nick="StatServ"
[Jun 04 04:31:02.414299 2002] debug: Successfully loaded module 
`statserv/main'
[Jun 04 04:31:02.415756 2002] debug: Loading module `httpd/main'
[Jun 04 04:31:03.373919 2002] httpd/main: Listening on 127.0.0.1:8080
[Jun 04 04:31:03.375956 2002] debug: Successfully loaded module `httpd/main'
[Jun 04 04:31:03.377310 2002] debug: Loading module `httpd/auth-ip'
[Jun 04 04:31:03.382979 2002] debug: Successfully loaded module 
`httpd/auth-ip'
[Jun 04 04:31:03.384358 2002] debug: Loading module `httpd/auth-password'
[Jun 04 04:31:03.406551 2002] debug: Successfully loaded module 
`httpd/auth-password'
[Jun 04 04:31:03.407985 2002] debug: Loading module `httpd/dbaccess'
[Jun 04 04:31:03.467954 2002] debug: Successfully loaded module 
`httpd/dbaccess'
[Jun 04 04:31:03.469424 2002] debug: Loading module `misc/xml-export'
[Jun 04 04:31:03.477162 2002] debug: Successfully loaded module 
`misc/xml-export'
[Jun 04 04:31:03.478735 2002] debug: Loading module `misc/xml-import'
[Jun 04 04:31:03.484250 2002] debug: Successfully loaded module 
`misc/xml-import'
[Jun 04 04:31:03.495042 2002] debug: Loading module `misc/loveserv'
[Jun 04 04:31:03.530735 2002] debug: Successfully loaded module 
`misc/loveserv'
[Jun 04 04:31:04.532994 2002] debug: Loaded modules
[Jun 04 04:31:10.407854 2002] Initiated connection to 127.0.0.1:7025
[Jun 04 04:31:11.977804 2002] debug: Sent: PROTOCTL SJOIN SJOIN2 SJ3 NICKv2 
VHP VL NOQUIT UMODE2 TOKEN
[Jun 04 04:31:11.980098 2002] debug: Sent: PASS :cheezypass
[Jun 04 04:31:11.982204 2002] debug: Sent: SERVER services.chatspike.net 1 
:U0-*-254 ChatSpikes Services Server
[Jun 04 04:31:11.984460 2002] debug: Sent: :services.chatspike.net TSCTL 
SVSTIME 1023161471
[Jun 04 04:31:11.005110 2002] sockets: accept(4): Invalid argument
[Jun 04 04:31:11.476130 2002] debug: Sent: NICK OperServ 1 1023161471 
services chatspike.net services.chatspike.net 0 +oiSqd chatspike.net 
:Operator Service
[Jun 04 04:31:11.478680 2002] debug: Sent: NICK Global 1 1023161471 services 
chatspike.net services.chatspike.net 0 +oiSqd chatspike.net :Global Service
[Jun 04 04:31:11.480950 2002] debug: Sent: NICK NickServ 1 1023161471 
services chatspike.net services.chatspike.net 0 +oSqd chatspike.net 
:Nickname Service
[Jun 04 04:31:11.483447 2002] debug: Sent: NICK ChanServ 1 1023161471 
services chatspike.net services.chatspike.net 0 +oSqd chatspike.net :Channel 
Service
[Jun 04 04:31:11.485719 2002] debug: Sent: NICK MemoServ 1 1023161471 
services chatspike.net services.chatspike.net 0 +oSqd chatspike.net :Memo 
Service
[Jun 04 04:31:11.488062 2002] debug: Sent: NICK StatServ 1 1023161471 
services chatspike.net services.chatspike.net 0 +iSqd chatspike.net 
:Statistics Service
[Jun 04 04:31:11.490124 2002] debug: Sent: :StatServ JOIN #services
[Jun 04 04:31:11.492266 2002] debug: Sent: :StatServ MODE #services +ao 
StatServ StatServ
[Jun 04 04:31:11.496367 2002] debug: Sent: NICK LoveServ 1 1023161471 
services chatspike.net services.chatspike.net 0 +Sqd chatspike.net :Network 
Love Service - Feel the love!
[Jun 04 04:31:12.498727 2002] debug: Sent: :LoveServ JOIN #services
[Jun 04 04:31:12.500790 2002] debug: Sent: :LoveServ MODE #services +ao 
LoveServ LoveServ
[Jun 04 04:31:12.502400 2002] debug: Received: :test.chatspike.net NOTICE 
AUTH :*** Looking up your hostname...
[Jun 04 04:31:12.627324 2002] debug: sockets: read(0): Resource temporarily 
unavailable
[Jun 04 04:31:12.629587 2002] Read error from server: Resource temporarily 
unavailable
--[ /SNIP ]--

it only bails that fast under CYGWIN, normally takes some time otherwise, 
but commands like OP become "temporarily unavailable"

its also preventing the servers services arnt connected to from picking up 
modes from other servers.. also some times traffic goes 1 way, servers 
services are not connected too will pick up all data from all servers but 
the server services are connected to, so services are rendered "br0ked" to 
the rest of the network

any1 else having these probs? any solutions? we are starting to get angry 
users ;)

I hope i have given enuf detail here for some1 to make a solution, if u need 
anything else, just ask :)

--
Craig McLure
Craig at chatspike.net
Network Administrator of the ChatSpike IRC Network.
ChatSpike, the users network! www.chatspike.net


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com