What is meant by "Discussions"?
Re: threaded server + scope=handler + PerlCleanupHandler: another similar bug
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > Apache HTTP Server > Re: threaded server + scope=handler + PerlCleanupHandler:­ another similar bug 1 May 2007 14:24:10

  Recent blog posts: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Re: threaded server + scope=handler + PerlCleanupHandler:­ another similar bug

Torsten Foertsch 1 May 2007 14:24:10
 On Monday 30 April 2007 22:22, Philippe M. Chiasson wrote:
And that doesn't seem logical at all. In all cases, since the initial int=
erpreter
is tied up in modperl_response_ha­ndler() a new one shouldn't be needed to=
dispatch
that handler part.

I have found similar bug. Try

$r->push_handlers(P­erlCleanupHandler=>'­some_named_function'­)

from a TranslationHandler or so.

modperl_interp_unse­lect calls modperl_config_requ­est_cleanup -->
modperl_config_requ­est_cleanup --> modperl_callback_pe­r_dir -->
modperl_callback_ru­n_handlers --> modperl_interp_sele­ct.

modperl_interp_sele­ct then selects another interpreter to do the cleanup.

Then at the end of modperl_callback_ru­n_handlers modperl_interp_unse­lect is
called for the interpreter that did the cleanup. Now the story repeats eating
up all interpreters.

When push_handlers is called from a mod_perl response handler the same
behavior is seen due to the previous bug, the missing rcfg->interp.

However with a perl-script handler something changes. Now the right interp is
found in rcfg->interp. But nevertheless it recurses because
modperl_callback_ru­n_handlers calls modperl_interp_unse­lect while
modperl_callback_ru­n_handlers was actually called from
modperl_interp_unse­lect. In the end I got a segfault.

So, I think either modperl_interp_unse­lect or modperl_config_requ­est_cleanup
needs a flag that says "do not recurse". Maybe interp->flags is a good place
for a flag that says "in unselect" or so.

Or maybe a cleaner way is to use interp->refcnt. Simply increment it each time
modperl_interp_sele­ct returns it. For what I can see refcnt isn't used at all
by now. Yes, on a second thought that is what I'd prefer.

Thoughts?

Torsten
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > Apache HTTP Server > Re: threaded server + scope=handler + PerlCleanupHandler:­ another similar bug 1 May 2007 14:24:10

see also:
[Messaging, JMS & JBossMQ] - Re…
[HTTPD, Servlets & JSP] - access to…
[JCA/JBoss] - Re: problem of getting…
пройди тесты:
see also:
how are you, people?
And it again I! I spoke, that I shall…
Routes on Sale!

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .