|
|
| Author |
Message |
< Yaws mailing list ~ yaws_server:gserv_loop/1 goes into spindo_acc |
| Guest |
Posted: Tue Dec 05, 2006 10:56 pm |
|
|
|
Guest
|
Mikael Karlsson wrote:
> I have a problem when doing a yaws_api:setconf in R11B on sparc_solaris. I do
> not know the root cause yet but I can see that the funs
> yaws_server:gserv_loop and acceptor0 goes into a infinite loop when the
> do_accept in acceptor0 returns with an error ({error,einval}).
>
> gserv_loop enters the clause:
>
> {_From, next} when Ready == [] ->
> New = acceptor(GS),
> gserv_loop(GS, Ready, Rnum, New);
>
> the call to acceptor spawns a process with fun acceptor0, which first calls
> do_accept and then sends {self(), next} back to the gserv_loop which calls
> acceptor again, and so forth. Since do_accept returns immediately with an
> error everything goes into a spin.
>
> acceptor0(GS, Top) ->
> ?TC([{record, GS, gs}]),
> put(gc, GS#gs.gconf),
> X = do_accept(GS),
> Top ! {self(), next},
>
> I guess that there should be another handling of this when do_accept returns
> with an error.
Hmmm, the (TM) right behaviour if accept fails is ... probably
to try to accept() again. Anybody's got an opinion on that ?
In your case, I think the loop stems from
fault embedded mode configs. einval is the reason, the args to accept
are somehow weird.
You need to debug this, stage 1 would be to print out the
arg to accept()
/klacke
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Dec 06, 2006 9:50 am |
|
|
|
Guest
|
Tue 05 december 2006 23:55 Claes Wikstrom wrote:
> Hmmm, the (TM) right behaviour if accept fails is ... probably
> to try to accept() again. Anybody's got an opinion on that ?
>
>
> In your case, I think the loop stems from
> fault embedded mode configs. einval is the reason, the args to accept
> are somehow weird.
>
> You need to debug this, stage 1 would be to print out the
> arg to accept()
>
>
> /klacke
Well it is a bit more tricky here.
First:
Everything works fine on R10, but not on R11 (I have only tested R11B on
Sparc-Solaris so far).
Second:
I am not running in embedded mode, instead I first call yaws_api:getconf, and
then I only modify the SConfs part:
insert(Yapps) when is_list(Yapps) ->
{ok, Gconf, Sconfs} = yaws_api:getconf(),
NewSconfs = (catch insert_yapps_in_sconfs(Yapps, Sconfs)),
yaws_api:setconf(Gconf, NewSconfs).
It is gen_tcp:accept(GS#gs.l) in do_accept that returns {errror,einval} and
the argument GS#gs.l is an Erlang port. When things go into spin I can see
that it is called with the same port id all the time, which is logical since
GS do not change in the gserv_loop clause that is used:
{_From, next} when Ready == [] ->
New = acceptor(GS),
gserv_loop(GS, Ready, Rnum, New);
I agree more debugging is needed to get to the root cause though.
/Mikael
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|