gdb (no debugging symbols found)

134 views
Skip to first unread message

gert

unread,
Aug 8, 2008, 5:15:09 AM8/8/08
to modwsgi
So what did i do wrong this time after compiling trunk succesfully :)

apt-get install apache2-mpm-prefork apache2-prefork-dev python-dev gcc
gdb make mysql-server python-mysqldb python-soappy python-imaging
python-pexpect python
wget -r -nd -l1 http://modwsgi.googlecode.com/svn/trunk/mod_wsgi/
./configure
make
make install

I was thinking forgetting a dev package ?

I get segfaults starting modwsgi in embeded mode globel and want to
find out why

Starting program: /usr/sbin/apache2
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0xb773b700 (LWP 15796)]

Program exited normally.

gert

unread,
Aug 8, 2008, 5:18:00 AM8/8/08
to modwsgi
[Fri Aug 08 11:16:47 2008] [info] server seems busy, (you may need to
increase StartServers, or Min/MaxSpareServers), spawning 32 children,
there are 0 idle, and 0 total children
[Fri Aug 08 11:16:47 2008] [notice] child pid 23134 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23135 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23136 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23137 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23138 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23139 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23140 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23141 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23142 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23143 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23144 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23145 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23146 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23147 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23148 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23149 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23150 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23151 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23152 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23153 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23154 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23155 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23156 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23157 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23158 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23159 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23160 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23161 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23162 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23163 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23164 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:47 2008] [notice] child pid 23165 exit signal
Segmentation fault (11)
[Fri Aug 08 11:16:48 2008] [info] server seems busy, (you may need to
increase StartServers, or Min/MaxSpareServers), spawning 32 children,
there are 0 idle, and 0 total children

Graham Dumpleton

unread,
Aug 8, 2008, 5:56:17 AM8/8/08
to mod...@googlegroups.com
Have you been through all the likely problems for crashes described in:

http://code.google.com/p/modwsgi/wiki/InstallationIssues
http://code.google.com/p/modwsgi/wiki/ApplicationIssues

and have you also read properly:

http://code.google.com/p/modwsgi/wiki/DebuggingTechniques

and taken note of how to run Apache in single process mode to allow it
to be debugged?

Graham

2008/8/8 gert <gert.c...@gmail.com>:

gert

unread,
Aug 8, 2008, 6:52:40 AM8/8/08
to modwsgi
root@s2cuykens001:~/wsgi# gdb apache2
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/
gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show
copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(no debugging symbols found)
(gdb) run -X
Starting program: /usr/sbin/apache2 -X
[New Thread 0xb778d700 (LWP 29029)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb778d700 (LWP 29029)]
0xb77831ca in wsgi_hook_child_init () from /usr/lib/apache2/modules/
mod_wsgi.so
Current language: auto; currently asm
(gdb)

Graham Dumpleton

unread,
Aug 8, 2008, 7:45:27 AM8/8/08
to mod...@googlegroups.com
Modify makefile for mod_wsgi to try and include debugging options to
compiler. Eg:

CFLAGS = -g

or possibly:

CFLAGS = -Wc,'-g'

if it doesn't like that.

Use 'where' command in gdb to get full traceback. With -g option will
hopefully then show line numbers for mod_wsgi at least.

State exactly which revision of mod_wsgi being used if using trunk, or
update to very latest revision, so I can know what code is at actual
line number in file quoted.

BTW, does the problem occur if you using mod_wsgi 2.1 tar ball rather
than anything from subversion.

Graham

2008/8/8 gert <gert.c...@gmail.com>:

gert

unread,
Aug 8, 2008, 10:50:11 AM8/8/08
to modwsgi
2.1 works :)

[Fri Aug 08 16:46:39 2008] [info] mod_wsgi: Initializing Python.
[Fri Aug 08 16:46:39 2008] [info] mod_wsgi (pid=13765): Attach
interpreter ''.
[Fri Aug 08 16:46:39 2008] [info] mod_wsgi (pid=13766): Attach
interpreter ''.
[Fri Aug 08 16:46:39 2008] [info] mod_wsgi (pid=13767): Attach
interpreter ''.
[Fri Aug 08 16:46:39 2008] [info] mod_wsgi (pid=13768): Attach
interpreter ''.
[Fri Aug 08 16:46:39 2008] [info] mod_wsgi (pid=13769): Attach
interpreter ''.
[Fri Aug 08 16:46:39 2008] [notice] Apache/2.2.8 (Ubuntu) mod_wsgi/2.1-
BRANCH Python/2.5.2 configured -- resuming normal operations
[Fri Aug 08 16:46:39 2008] [info] Server built: Jun 25 2008 13:54:13
root@s2cuykens001:~#

Graham Dumpleton

unread,
Aug 9, 2008, 6:42:17 AM8/9/08
to mod...@googlegroups.com
But what was the result when you got debugging compiled into 3.0 trunk
and tried that in gdb?

Graham

2008/8/9 gert <gert.c...@gmail.com>:

gert

unread,
Aug 9, 2008, 7:53:24 AM8/9/08
to modwsgi
root@ns1:~/wsgi# gdb apache2
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0xb77da700 (LWP 22717)]
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb77da700 (LWP 22717)]
0xb77a7220 in wsgi_hook_child_init (p=0x81fbd80, s=0x80aa8f8)
at mod_wsgi.c:10531
10531 entries = (WSGIProcessGroup *)wsgi_daemon_list->elts;
(gdb)

Graham Dumpleton

unread,
Aug 9, 2008, 7:58:10 AM8/9/08
to mod...@googlegroups.com
Change code to:

if (wsgi_daemon_list) {


entries = (WSGIProcessGroup *)wsgi_daemon_list->elts;

for (i = 0; i < wsgi_daemon_list->nelts; ++i) {
entry = &entries[i];

close(entry->listener_fd);
entry->listener_fd = -1;
}
}

will crash embedded mode otherwise if no daemon processes defined.

Fixed in revision 981.

The code above was added when addressing leaking file descriptor issue.

Graham


2008/8/9 gert <gert.c...@gmail.com>:

gert

unread,
Aug 9, 2008, 8:13:29 AM8/9/08
to modwsgi
WHOHOOO IT WORKS :)

root@ns1:~/wsgi# tail -f /var/log/apache2/error.log
[Sat Aug 09 14:11:09 2008] [info] mod_wsgi (pid=24830, process='',
application=''): Loading WSGI script '/srv/www/gert/upload/upload.py'.
[Sat Aug 09 14:11:09 2008] [info] mod_wsgi (pid=24830, process='',
application=''): Loading WSGI script '/srv/www/gert/vi/vi.py'.
[Sat Aug 09 14:11:09 2008] [info] mod_wsgi (pid=24832, process='',
application=''): Loading WSGI script '/srv/www/gert/ssh/ssh.py'.
[Sat Aug 09 14:11:09 2008] [info] mod_wsgi (pid=24831, process='',
application=''): Loading WSGI script '/srv/www/gert/upload/upload.py'.
[Sat Aug 09 14:11:09 2008] [info] mod_wsgi (pid=24831, process='',
application=''): Loading WSGI script '/srv/www/gert/vi/vi.py'.
[Sat Aug 09 14:11:09 2008] [info] mod_wsgi (pid=24832, process='',
application=''): Loading WSGI script '/srv/www/gert/upload/upload.py'.
[Sat Aug 09 14:11:09 2008] [info] mod_wsgi (pid=24832, process='',
application=''): Loading WSGI script '/srv/www/gert/vi/vi.py'.
[Sat Aug 09 14:11:09 2008] [info] mod_wsgi (pid=24833, process='',
application=''): Loading WSGI script '/srv/www/gert/ssh/ssh.py'.
[Sat Aug 09 14:11:09 2008] [info] mod_wsgi (pid=24833, process='',
application=''): Loading WSGI script '/srv/www/gert/upload/upload.py'.
[Sat Aug 09 14:11:09 2008] [info] mod_wsgi (pid=24833, process='',
application=''): Loading WSGI script '/srv/www/gert/vi/vi.py'.
Reply all
Reply to author
Forward
0 new messages