LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-17-2010, 05:35 PM   #1
davit_kk
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Rep: Reputation: 0
Problems with valgrind on httpd


Hello all,

In general I want to run callgrind on one of apache module and from the valgrind documentation I found that it is not possible because valgrind requires to run with executable (please correct me if I understood something wrong from documentation).
So now I'm trying to run callgrind with httpd but still have following problem:
Apache doesn't accept any URL. If I run httpd without valgrind everything works fine for me, but with valgrind nothing work.
Also, after some time valgrind crashes.

Can you please let me know what I'm doing wrong?
I think that it relates to some configurations of httpd or some valgrind options but I can't get the correct configuration.
This is very urgent for me so if you can please help me ASAP.

Thanks in advance,
Davit
 
Old 04-17-2010, 06:05 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
It may be that the slowdown caused by valgrind is enough to cause timeouts. Do you just want to run callgrind for profiling or you have more needs? It may be that you can use some specific options, but it depends on the things you want to do.
 
Old 04-18-2010, 03:20 AM   #3
davit_kk
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Hi Mara,

Thank you for response!

I just want to run callgrind for profiling to catch the slow parts of specific module of httpd.
Can you please send me those specific options which may fix my problem?
In addition after some time work valgrind prints out a lot of following messages:

Thread 299: status = VgTs_WaitSys
==25465== at 0x597FCF9: pthread_cond_wait@@GLIBC_2.3.2 (in .../libpthread-2.7.so)
==25465== by 0x530A71A: apr_thread_cond_wait (in .../libapr-1.so.0.2.12)
==25465== by 0x45A946: ap_queue_pop (in .../httpd)
==25465== by 0x45797D: worker_thread (in .../httpd)
==25465== by 0x5317F1C: dummy_worker (in .../libapr-1.so.0.2.12)
==25465== by 0x597BF96: start_thread (pthread_create.c:297)
==25465== by 0x5E642DC: clone (in .../libc-2.7.so)

and exits with following message:

Note: see also the FAQ.txt in the source distribution.
It contains workarounds to several common problems.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what Linux distro you are using. Thanks.

Looking forward to hear back from you soon.

Thanks in advance,
Davit
 
Old 04-21-2010, 03:53 AM   #4
davit_kk
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Problems with valgrind on httpd Reply to Thread (resolved)

Hi,

I found the problem and I think that solution might be useful for someone, so I'm posting it.
The problem was related to a number threads that httpd invoked. In valgrind (in latest version as well: 3.5.0) defined
#define VG_N_THREADS 300 (file include/pub_tool_threadstate.h)
which sets the limitation of invoked threads and if application runs more than 300 threads valgrind crashes.
If you changed this number and rebuild the valgrind your problem will be resolved.

Best Regards,
Davit
 
  


Reply

Tags
httpd, valgrind



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting httpd: httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax sethukpathi Linux - Networking 6 04-12-2008 11:26 AM
problems with /etc/rc.d/rc.httpd restart gawain Slackware 4 02-11-2007 10:52 AM
HttpD problems canegames Linux - Software 8 08-08-2006 04:06 PM
httpd problems iamthe Linux - Software 4 06-02-2005 02:36 PM
httpd problems leeman_s Linux - General 4 02-25-2004 04:44 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration