[isf-wifidog] seg fault

Clifford Thurber clifford at hdn.net
Lun 28 Juil 15:43:14 EDT 2008


Sorry I just realized I left off the back trace in the debugger output. I
recompiled wifidog using CFLAGS="-O0" to turn off any optimization and then
ran wifidog in gdb. It did not drop a core fie but here is the ouput.


root at wifidog wifidog]# gdb wifidog
GNU gdb Fedora (6.8-11.fc9)
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 "x86_64-redhat-linux-gnu"...
(no debugging symbols found)
(gdb) set args -f -d 7
(gdb) run
Starting program: /usr/local/bin/wifidog -f -d 7
(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)
[6][Mon Jul 28 12:39:09 2008][19550](conf.c:630) Reading configuration file
'/usr/local/etc/wifidog.conf'
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:668) Parsing token:
ExternalInterface, value: eth0
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:668) Parsing token:
GatewayInterface, value: eth1
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:668) Parsing token: AuthServer,
value: {
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:337) Adding
auth.ilesansfil.org:80 (SSL: 443) / to the auth server list
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:364) Auth server added
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:668) Parsing token:
ClientTimeout, value: 5
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:668) Parsing token:
FirewallRuleSet, value: global
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:401) Adding Firewall Rule Set
global
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:464) Firewall Rule Set global
added.
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:668) Parsing token:
FirewallRuleSet, value: validating-users
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:401) Adding Firewall Rule Set
validating-users
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:440) p1 = [FirewallRule]; p2 =
[allow to 0.0.0.0/0]
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:487) leftover: allow to
0.0.0.0/0
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:569) Adding Firewall Rule allow
(null) port (null) to 0.0.0.0/0
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:464) Firewall Rule Set
validating-users added.
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:668) Parsing token:
FirewallRuleSet, value: known-users
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:401) Adding Firewall Rule Set
known-users
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:440) p1 = [FirewallRule]; p2 =
[allow to 0.0.0.0/0]
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:487) leftover: allow to
0.0.0.0/0
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:569) Adding Firewall Rule allow
(null) port (null) to 0.0.0.0/0
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:464) Firewall Rule Set
known-users added.
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:668) Parsing token:
FirewallRuleSet, value: unknown-users
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:401) Adding Firewall Rule Set
unknown-users
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:440) p1 = [FirewallRule]; p2 =
[allow udp port 53]
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:487) leftover: allow udp port 53
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:569) Adding Firewall Rule allow
udp port 53 to 0.0.0.0/0
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:440) p1 = [FirewallRule]; p2 =
[allow tcp port 53]
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:487) leftover: allow tcp port 53
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:569) Adding Firewall Rule allow
tcp port 53 to 0.0.0.0/0
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:440) p1 = [FirewallRule]; p2 =
[allow udp port 67]
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:487) leftover: allow udp port 67
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:569) Adding Firewall Rule allow
udp port 67 to 0.0.0.0/0
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:440) p1 = [FirewallRule]; p2 =
[allow tcp port 67]
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:487) leftover: allow tcp port 67
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:569) Adding Firewall Rule allow
tcp port 67 to 0.0.0.0/0
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:464) Firewall Rule Set
unknown-users added.
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:668) Parsing token:
FirewallRuleSet, value: locked-users
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:401) Adding Firewall Rule Set
locked-users
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:440) p1 = [FirewallRule]; p2 =
[block to 0.0.0.0/0]
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:487) leftover: block to
0.0.0.0/0
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:569) Adding Firewall Rule block
(null) port (null) to 0.0.0.0/0
[7][Mon Jul 28 12:39:09 2008][19550](conf.c:464) Firewall Rule Set
locked-users added.
[7][Mon Jul 28 12:39:09 2008][19550](gateway.c:313) Initializing signal
handlers
[6][Mon Jul 28 12:39:09 2008][19550](gateway.c:372) Setting started_time
[7][Mon Jul 28 12:39:09 2008][19550](gateway.c:382) Finding IP address of
eth1
[New Thread 0x7fd4fe4d36f0 (LWP 19550)]

Program received signal SIGSEGV, Segmentation fault.
0x0000003ea6280eb0 in strlen () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc.x86_64
(gdb) bt
#0  0x0000003ea6280eb0 in strlen () from /lib64/libc.so.6
#1  0x0000003ea6280be6 in strdup () from /lib64/libc.so.6
#2  0x000000000040bfdc in safe_strdup ()
#3  0x0000000000409c64 in get_iface_ip ()
#4  0x000000000040720b in main_loop ()
#5  0x00000000004078a2 in main ()
(gdb) exit


On Mon, Jul 28, 2008 at 3:18 PM, Clifford Thurber <clifford at hdn.net> wrote:

> Hi Guys,
>
> This is what I have let me know what other information I can provide.
>
>  [root at wifidog wifidog]# gdb wifidog
> GNU gdb Fedora (6.8-11.fc9)
> 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 "x86_64-redhat-linux-gnu"...
> (gdb) svn checkout https://dev.wifidog.org/svn/trunk/wifidog
> Undefined command: "svn".  Try "help".
> (gdb) Quit
> (gdb) quit
> [root at wifidog wifidog]# gdb wifidog
> GNU gdb Fedora (6.8-11.fc9)
> 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 "x86_64-redhat-linux-gnu"...
> (gdb) run -f -d 7
> Starting program: /usr/local/bin/wifidog -f -d 7
> [Thread debugging using libthread_db enabled]
> [6][Mon Jul 28 12:10:26 2008][15736](conf.c:630) Reading configuration file
> '/usr/local/etc/wifidog.conf'
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:668) Parsing token:
> ExternalInterface, value: eth0
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:668) Parsing token:
> GatewayInterface, value: eth1
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:668) Parsing token: AuthServer,
> value: {
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:337) Adding
> auth.ilesansfil.org:80 (SSL: 443) / to the auth server list
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:364) Auth server added
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:668) Parsing token:
> ClientTimeout, value: 5
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:668) Parsing token:
> FirewallRuleSet, value: global
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:401) Adding Firewall Rule Set
> global
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:464) Firewall Rule Set global
> added.
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:668) Parsing token:
> FirewallRuleSet, value: validating-users
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:401) Adding Firewall Rule Set
> validating-users
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:440) p1 = [FirewallRule]; p2 =
> [allow to 0.0.0.0/0]
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:487) leftover: allow to
> 0.0.0.0/0
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:569) Adding Firewall Rule allow
> (null) port (null) to 0.0.0.0/0
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:464) Firewall Rule Set
> validating-users added.
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:668) Parsing token:
> FirewallRuleSet, value: known-users
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:401) Adding Firewall Rule Set
> known-users
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:440) p1 = [FirewallRule]; p2 =
> [allow to 0.0.0.0/0]
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:487) leftover: allow to
> 0.0.0.0/0
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:569) Adding Firewall Rule allow
> (null) port (null) to 0.0.0.0/0
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:464) Firewall Rule Set
> known-users added.
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:668) Parsing token:
> FirewallRuleSet, value: unknown-users
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:401) Adding Firewall Rule Set
> unknown-users
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:440) p1 = [FirewallRule]; p2 =
> [allow udp port 53]
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:487) leftover: allow udp port
> 53
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:569) Adding Firewall Rule allow
> udp port 53 to 0.0.0.0/0
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:440) p1 = [FirewallRule]; p2 =
> [allow tcp port 53]
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:487) leftover: allow tcp port
> 53
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:569) Adding Firewall Rule allow
> tcp port 53 to 0.0.0.0/0
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:440) p1 = [FirewallRule]; p2 =
> [allow udp port 67]
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:487) leftover: allow udp port
> 67
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:569) Adding Firewall Rule allow
> udp port 67 to 0.0.0.0/0
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:440) p1 = [FirewallRule]; p2 =
> [allow tcp port 67]
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:487) leftover: allow tcp port
> 67
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:569) Adding Firewall Rule allow
> tcp port 67 to 0.0.0.0/0
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:464) Firewall Rule Set
> unknown-users added.
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:668) Parsing token:
> FirewallRuleSet, value: locked-users
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:401) Adding Firewall Rule Set
> locked-users
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:440) p1 = [FirewallRule]; p2 =
> [block to 0.0.0.0/0]
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:487) leftover: block to
> 0.0.0.0/0
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:569) Adding Firewall Rule block
> (null) port (null) to 0.0.0.0/0
> [7][Mon Jul 28 12:10:26 2008][15736](conf.c:464) Firewall Rule Set
> locked-users added.
> [7][Mon Jul 28 12:10:26 2008][15736](gateway.c:313) Initializing signal
> handlers
> [6][Mon Jul 28 12:10:26 2008][15736](gateway.c:372) Setting started_time
> [7][Mon Jul 28 12:10:26 2008][15736](gateway.c:382) Finding IP address of
> eth1
> [New Thread 0x7fb3b80206f0 (LWP 15736)]
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000003ea6280eb0 in strlen () from /lib64/libc.so.6
> Missing separate debuginfos, use: debuginfo-install glibc.x86_64
> (gdb)
>
>
> As per Alex's suggestion I am also  going to recompile with the no -O, -O2
> flags and -g to get symobs now.
>
> Thanks
> Clifford
>
>
>
> On Mon, Jul 28, 2008 at 3:06 PM, acv <acv at miniguru.ca> wrote:
>
>>        It's not finding the wifidog binary in your path. Pass the
>> full path on the command-line.
>>
>> Alex
>>
>> On Mon, Jul 28, 2008 at 03:01:40PM -0400, Clifford Thurber wrote:
>> > Date: Mon, 28 Jul 2008 15:01:40 -0400
>> > From: "Clifford Thurber" <clifford at hdn.net>
>> > To: "WiFiDog Captive Portal" <wifidog at listes.ilesansfil.org>
>> > Subject: Re: [isf-wifidog] seg fault
>> >
>> > Alex,
>> > Thanks for your prompt reply. I am a little out of my league with gdb. I
>> > tried to follow  your instructions but ended up with the following:
>> >
>> > [root at wifidog ~]# gdb wifidog
>> > GNU gdb Fedora (6.8-11.fc9)
>> > 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 "x86_64-redhat-linux-gnu"...
>> > wifidog: No such file or directory.
>> > (gdb) -f -d 7
>> > Undefined command: "-f".  Try "help".
>> > (gdb) run -f -d 7
>> > Starting program:  -f -d 7
>> > No executable file specified.
>> > Use the "file" or "exec-file" command.
>> > (gdb) wifidog -f -d 7
>> > Undefined command: "wifidog".  Try "help".
>> > (gdb)
>> >
>> >
>> > Thanks again for your help. If you could let me know what I am doing
>> wrong
>> > with the debugger I will post the stack trace ASAP.
>> >
>> > Thanks
>> > Clifford
>> >
>> > On Mon, Jul 28, 2008 at 2:45 PM, acv <acv at miniguru.ca> wrote:
>> >
>> > > This looks like a bug in util.c:get_iface_ip()
>> > >
>> > > A backtrace would be helpful. To get one ($ = unix shell, gdb> = gdb
>> > > command
>> > > prompt):
>> > >
>> > > $ gdb wifidog
>> > >  .... load messages ....
>> > > gdb> run <you_command_line_arguments here>
>> > >  .... program output followed by seg fault ....
>> > > gdb> bt
>> > >  .... back trace ....
>> > > gdb> exit
>> > >
>> > >        If possible, compile without optimization (no -O, -O2 flags on
>> CC
>> > > command-line) and debugging symbols (-g on CC command-line) that way
>> we can
>> > > get exact source-code line where the crash happens.
>> > >
>> > > Alex
>> > >
>> > > On Mon, Jul 28, 2008 at 02:20:05PM -0400, Clifford Thurber wrote:
>> > > >
>> > > > I checked out the latest wifidog and wifidog-auth last week and was
>> able
>> > > to
>> > > > configure and compile everything successfuly. However when I start
>> > > > wifidog(which is running on the same machine as the auth-server) I
>> get a
>> > > > segfault near the end of startup. When I run wifidog in the
>> foreground
>> > > this
>> > > > is what I say before the seg fault:
>> > > >
>> > > >
>> > > > [7][Mon Jul 28 11:10:23 2008](conf.c:389) p1 = [FirewallRule]; p2 =
>> > > [allow
>> > > > tcp port 67]
>> > > > [7][Mon Jul 28 11:10:23 2008](conf.c:433) leftover: allow tcp port
>> 67
>> > > > [7][Mon Jul 28 11:10:23 2008](conf.c:515) Adding Firewall Rule allow
>> tcp
>> > > > port 67 to 0.0.0.0/0
>> > > > [7][Mon Jul 28 11:10:23 2008](conf.c:413) Firewall Rule Set
>> unknown-users
>> > > > added.
>> > > > [7][Mon Jul 28 11:10:23 2008](gateway.c:193) Finding IP address of
>> eth1
>> > > > Segmentation fault
>> > > >
>> > > >
>> > > > I see the following in the logs shortly after:
>> > > >
>> > > >
>> > > > Jul 28 11:10:04 wifidog kernel: wifidog[12304]: segfault at 2d8196c8
>> ip
>> > > > 3ea6280eb0 sp 7fff3582bcc8 error 4 in libc-2.8.so
>> [3ea6200000+162000]
>> > > > Jul 28 11:10:12 wifidog kernel: wifidog[12307]: segfault at 65a46c8
>> ip
>> > > > 3ea6280eb0 sp 7fff0e5b4a38 error 4 in libc-2.8.so
>> [3ea6200000+162000]
>> > > > Jul 28 11:10:23 wifidog kernel: wifidog[12308]: segfault at 342366c8
>> ip
>> > > > 3ea6280eb0 sp 7fff3c2466c8 error 4 in libc-2.8.so
>> [3ea6200000+162000]
>> > > >
>> > > >
>> > > > Below is the related information for hardware/software versions:
>> > > >
>> > > > gcc --version
>> > > > gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
>> > > > Copyright (C) 2008 Free Software Foundation, Inc.
>> > > > This is free software; see the source for copying conditions.  There
>> is
>> > > NO
>> > > > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>> > > PURPOSE.
>> > > >
>> > > >
>> > > > root at wifidog ~]# uname -a
>> > > > Linux wifidog 2.6.25-14.fc9.x86_64 #1 SMP Thu May 1 06:06:21 EDT
>> 2008
>> > > x86_64
>> > > > x86_64 x86_64 GNU/Linux
>> > > >
>> > > >
>> > > > root at wifidog ~]# ldd /usr/bin/wifidog
>> > > >     linux-vdso.so.1 =>  (0x00007fff9d5fe000)
>> > > >     libhttpd.so.0 => /usr/lib64/libhttpd.so.0 (0x000000387b800000)
>> > > >     libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003eaf600000)
>> > > >     libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003ea6e00000)
>> > > >     libc.so.6 => /lib64/libc.so.6 (0x0000003ea6200000)
>> > > >     /lib64/ld-linux-x86-64.so.2 (0x0000003ea5000000)
>> > > >
>> > > >
>> > > > I get the seg fault whether I install wifidog from packages or
>> compile
>> > > from
>> > > > source. Would someone be able to help me out with this? I am not
>> sure
>> > > where
>> > > > to look at this point. Are there any known issues with the versions
>> I am
>> > > > using? I have looked through the FAQs and didn't see anything
>> relevant to
>> > > > this problem.
>> > > >
>> > > > Thanks
>> > > > Clifford
>> > >
>> > > > _______________________________________________
>> > > > WiFiDog mailing list
>> > > > WiFiDog at listes.ilesansfil.org
>> > > > http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
>> > >
>> > > _______________________________________________
>> > > WiFiDog mailing list
>> > > WiFiDog at listes.ilesansfil.org
>> > > http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
>> > >
>>
>> > _______________________________________________
>> > WiFiDog mailing list
>> > WiFiDog at listes.ilesansfil.org
>> > http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
>>
>> _______________________________________________
>> WiFiDog mailing list
>> WiFiDog at listes.ilesansfil.org
>> http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listes.ilesansfil.org/pipermail/wifidog/attachments/20080728/116113a1/attachment-0001.htm 


Plus d'informations sur la liste de diffusion WiFiDog