Re: relayd crash

2013-08-23 Thread Stuart Henderson
On 2013/08/23 04:03, Bogdan Andu wrote:
 $ sudo gdb ./relayd
 GNU gdb 6.3
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and
 you are
 welcome to change it and/or distribute copies of it under certain
 conditions.
 Type show copying to see the conditions.
 There is absolutely no warranty for GDB.  Type show warranty for
 details.
 This GDB was configured as amd64-unknown-openbsd5.3...
 (gdb) attach 32389
 Attaching to program: /usr/src/usr.sbin/relayd-current/relayd, process
 32389
 Loaded symbols for /usr/src/usr.sbin/relayd-current/relayd
 Reading symbols from /usr/lib/libevent.so.3.1...done.
 Loaded symbols for /usr/lib/libevent.so.3.1
 Reading symbols from /usr/lib/libssl.so.19.0...done.
 Loaded symbols for /usr/lib/libssl.so.19.0
 Reading symbols from /usr/lib/libcrypto.so.22.0...done.
 Loaded symbols for /usr/lib/libcrypto.so.22.0
 Reading symbols from /usr/lib/libutil.so.11.4...done.
 Loaded symbols for /usr/lib/libutil.so.11.4
 Reading symbols from /usr/lib/libc.so.66.2...done.
 Loaded symbols for /usr/lib/libc.so.66.2
 Reading symbols from /usr/libexec/ld.so...done.
 Loaded symbols for /usr/libexec/ld.so
 [Switching to thread 1032389]
 0x05462804581a in kevent () at stdin:2
 2   stdin: No such file or directory.
 in stdin
 Current language:  auto; currently asm
 (gdb) continue
 Continuing.
 Program received signal SIGSEGV, Segmentation fault.

A backtrace from this one would be helpful, that will hopefully show the
chain of functions which called event_queue_insert()..

 event_queue_insert (base=0x0, ev=0x54621afd208, queue=8) at /usr/src/
 lib/libevent/event.c:997
 997 base-event_count++;
 Current language:  auto; currently c
 (gdb)
 Continuing.

 But why this child crashes in /usr/src/lib/libevent/event.c, line 997 ?

It is attempting to dereference a null pointer.

 event_queue_insert (base=0x0, ev=0x54621afd208, queue=8) at 
 /usr/src/lib/libevent/event.c:997
  
 997 base-event_count++;
  ^^



Re: relayd crash

2013-08-23 Thread Bogdan Andu
 or
directory.
    in stdin
(gdb) 
Continuing.

Program exited normally.
(gdb) 
The program is not being run.
(gdb) 
The program is not being run.
CHILD #1:

$ sudo gdb ./relayd
GNU gdb 6.3
Copyright 2004 Free Software
Foundation, Inc.
GDB is free software, covered by the GNU General Public
License, and you are
welcome to change it and/or distribute copies of it under
certain conditions.
Type show copying to see the conditions.
There is
absolutely no warranty for GDB.  Type show warranty for details.
This GDB
was configured as amd64-unknown-openbsd5.3...
(gdb) attach 32389
Attaching
to program: /usr/src/usr.sbin/relayd-current/relayd, process 32389
Loaded
symbols for /usr/src/usr.sbin/relayd-current/relayd
Reading symbols from
/usr/lib/libevent.so.3.1...done.
Loaded symbols for /usr/lib/libevent.so.3.1
Reading symbols from /usr/lib/libssl.so.19.0...done.
Loaded symbols for
/usr/lib/libssl.so.19.0
Reading symbols from
/usr/lib/libcrypto.so.22.0...done.
Loaded symbols for
/usr/lib/libcrypto.so.22.0
Reading symbols from
/usr/lib/libutil.so.11.4...done.
Loaded symbols for /usr/lib/libutil.so.11.4
Reading symbols from /usr/lib/libc.so.66.2...done.
Loaded symbols for
/usr/lib/libc.so.66.2
Reading symbols from /usr/libexec/ld.so...done.
Loaded
symbols for /usr/libexec/ld.so
[Switching to thread 1032389]
0x05462804581a in kevent () at stdin:2
2   stdin: No such file or
directory.
    in stdin
Current language:  auto; currently asm
(gdb)
continue
Continuing.
Program received signal SIGSEGV, Segmentation fault.
event_queue_insert (base=0x0, ev=0x54621afd208, queue=8) at
/usr/src/lib/libevent/event.c:997
997 base-event_count++;
Current language:  auto; currently c
(gdb) 
Continuing.

Program terminated
with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb)
The program is not being run.
(gdb) 
The program is not being run.

CHILD #2:
$ sudo gdb ./relayd
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for
GDB.  Type show warranty for details.
This GDB was configured as
amd64-unknown-openbsd5.3...
(gdb) attach 10140
Attaching to program:
/usr/src/usr.sbin/relayd-current/relayd, process 10140
Loaded symbols for
/usr/src/usr.sbin/relayd-current/relayd
Reading symbols from
/usr/lib/libevent.so.3.1...done.
Loaded symbols for /usr/lib/libevent.so.3.1
Reading symbols from /usr/lib/libssl.so.19.0...done.
Loaded symbols for
/usr/lib/libssl.so.19.0
Reading symbols from
/usr/lib/libcrypto.so.22.0...done.
Loaded symbols for
/usr/lib/libcrypto.so.22.0
Reading symbols from
/usr/lib/libutil.so.11.4...done.
Loaded symbols for /usr/lib/libutil.so.11.4
Reading symbols from /usr/lib/libc.so.66.2...done.
Loaded symbols for
/usr/lib/libc.so.66.2
Reading symbols from /usr/libexec/ld.so...done.
Loaded
symbols for /usr/libexec/ld.so
[Switching to thread 1010140]
0x05462804581a in kevent () at stdin:2
2   stdin: No such file or
directory.
    in stdin
Current language:  auto; currently asm
(gdb)
continue
Continuing.
Program received signal SIGPIPE, Broken pipe.
0x05462805eb8a in write () at stdin:2
2   stdin: No such file or
directory.
    in stdin
(gdb) 
Continuing.
Program received signal
SIGTERM, Terminated.
0x05462804581a in kevent () at stdin:2
2  
stdin: No such file or directory.
    in stdin
(gdb) 
Continuing.
Program received signal SIGTERM, Terminated.
0x05462804581a in kevent ()
at stdin:2
2   in stdin
(gdb) 
Continuing.

Program exited normally.
(gdb) 
The program is not being run.


It seems that child with pid 32389
receives a SIGSEGV signal, amking the other threads to crash.

But why this
child crashes in /usr/src/lib/libevent/event.c, line 997 ?


If the message is
unreadable I can re-send it in attachement




From: Chris Cappuccio ch...@nmedia.net
To: Bogdan Andu bo...@yahoo.com
Cc: Stuart Henderson s...@spacehopper.org; misc@openbsd.org
misc@openbsd.org 
Sent: Friday, August 23, 2013 8:45 AM
Subject: Re: relayd
crash
 

You can't debug relayd without attaching to all of the processes (you
must use multiple simultaneous gdb sessions)

Bogdan Andu [bo...@yahoo.com]
wrote:
 ok,
 
 I checked out relayd -current, compiled with debug symbols,
launched gdb
 and attached to pfe pid :
 
 pwd: /usr/src/usr.sbin/relayd

 $ sudo gdb ./relayd
 GNU gdb 6.3
 Copyright 2004 Free Software Foundation,
Inc.
 GDB is free
 software, covered by the GNU General Public License, and
you are
 welcome to
 change it and/or distribute copies of it under certain
conditions.
 Type show
 copying to see the conditions.
 There is
absolutely no warranty for GDB.? Type
 show warranty for details.
 This
GDB was configured as
 amd64-unknown-openbsd5.3...
 (gdb) attach 27726

Attaching to program

Re: relayd crash

2013-08-22 Thread Bogdan Andu
Here are the results of running relayd in debug mode, attached to pid of pfe
child:

pwd: /usr/src/usr.sbin/relayd

$ sudo gdb ./relayd
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by
the GNU General Public License, and you are
welcome to change it and/or
distribute copies of it under certain conditions.
Type show copying to see
the conditions.
There is absolutely no warranty for GDB.  Type show
warranty for details.
This GDB was configured as
amd64-unknown-openbsd5.3...
(gdb) attach 28300
Attaching to program:
/usr/src/usr.sbin/relayd/relayd, process 28300
Loaded symbols for
/usr/src/usr.sbin/relayd/relayd
Reading symbols from
/usr/lib/libevent.so.3.1...done.
Loaded symbols for /usr/lib/libevent.so.3.1
Reading symbols from /usr/lib/libssl.so.19.0...done.
Loaded symbols for
/usr/lib/libssl.so.19.0
Reading symbols from
/usr/lib/libcrypto.so.22.0...done.
Loaded symbols for
/usr/lib/libcrypto.so.22.0
Reading symbols from
/usr/lib/libutil.so.11.4...done.
Loaded symbols for /usr/lib/libutil.so.11.4
Reading symbols from /usr/lib/libc.so.66.2...done.
Loaded symbols for
/usr/lib/libc.so.66.2
Reading symbols from /usr/libexec/ld.so...done.
Loaded
symbols for /usr/libexec/ld.so
[Switching to thread 1028300]
0x1c765263481a in kevent () at stdin:2
2       stdin: No such
file or directory.
        in stdin
Current language:  auto;
currently asm
(gdb) continue
Continuing.
Program exited normally.
(gdb) 
The
program is not being run.
(gdb) 
The program is not being run.
(gdb) 
The
program is not being run.
(gdb) 
The program is not being run.
(gdb) 
The
program is not being run.
(gdb) 
The program is not being run.
(gdb) 
The
program is not being run.
(gdb) 
The program is not being run.
(gdb) 
The
program is not being run.
(gdb) 
The program is not being run.
(gdb) 
The
program is not being run.
(gdb) 
The program is not being run.
(gdb) 
The
program is not being run.
(gdb) 
The program is not being run.
(gdb) 
The
program is not being run.
(gdb) 
The program is not being run.
(gdb) 
The
program is not being run.
(gdb) 
The program is not being run.
(gdb) 
The
program is not being run.
(gdb) 
The program is not being run.
(gdb) 


But
the daemon relayd crashed.

Bogdan




 From:
Stuart Henderson s...@spacehopper.org
To: Bogdan Andu bo...@yahoo.com 
Cc:
misc@openbsd.org misc@openbsd.org 
Sent: Wednesday, August 21, 2013 6:06
PM
Subject: Re: relayd crash
 

On 2013/08/21 06:32, Bogdan Andu wrote:

[Switching to thread 1027726]
 0x029e250da81a in kevent () at stdin:2

2       stdin: No such file or directory.
         in stdin

Current language:  auto; currently asm
 (gdb)

oh, I forgot, you will need
to continue here ;)

 
 launched qualys scan and now waiting for crash to
occur - will take 2
 hours.
 
 Unfortunately the relayd patch branch failed
with the same error, and
 that is why I tried relayd -current
 
 I'll come
back with crash results

━━━━━━━━━━━━━━━━━━━━━━━━━â”
â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â
”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”
 From: Stuart
Henderson s...@spacehopper.org
 To: misc@openbsd.org
 Sent: Wednesday,
August 21, 2013 3:51 PM
 Subject: Re: relayd crash
 
 On 2013-08-21, Bogdan
Andu bo...@yahoo.com wrote:
  I tried relayd -current and crashed with the
error:
  pwd:
  /usr/src/usr.sbin/relayd
 
  $ sudo ./relayd -f
/etc/relayd.conf -d
  . A LOT
  OF LOGS 
  relay
www_ssl, session 1368 (1 active), 0,
  64.39.111.90 - :0, SSL accept error
  relay www_ssl, session 1369 (1 active),
  0, 64.39.111.90 -
127.0.0.1:8080, done
  pfe exiting, pid 8360
  lost child:
  relay
terminated; signal 11
  hce exiting, pid 18726
  parent terminating, pid

 2704
 
 Build it with debug symbols (make clean, make DEBUG=-g install)

and re-run it, then you can attach gdb to the pfe process (use ps
 to find
the correct pid and 'gdb /usr/sbin/relayd' and 'attach pid'.
 Now when you
trigger the crash you should be able to get a backtrace.



Re: relayd crash

2013-08-22 Thread Chris Cappuccio
You can't debug relayd without attaching to all of the processes (you must use 
multiple simultaneous gdb sessions)

Bogdan Andu [bo...@yahoo.com] wrote:
 ok,
 
 I checked out relayd -current, compiled with debug symbols, launched gdb
 and attached to pfe pid :
 
 pwd: /usr/src/usr.sbin/relayd
 
 $ sudo gdb ./relayd
 GNU gdb 6.3
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free
 software, covered by the GNU General Public License, and you are
 welcome to
 change it and/or distribute copies of it under certain conditions.
 Type show
 copying to see the conditions.
 There is absolutely no warranty for GDB.? Type
 show warranty for details.
 This GDB was configured as
 amd64-unknown-openbsd5.3...
 (gdb) attach 27726
 Attaching to program:
 /usr/src/usr.sbin/relayd/relayd, process 27726
 Loaded symbols for
 /usr/src/usr.sbin/relayd/relayd
 Reading symbols from
 /usr/lib/libevent.so.3.1...done.
 Loaded symbols for /usr/lib/libevent.so.3.1
 Reading symbols from /usr/lib/libssl.so.19.0...done.
 Loaded symbols for
 /usr/lib/libssl.so.19.0
 Reading symbols from
 /usr/lib/libcrypto.so.22.0...done.
 Loaded symbols for
 /usr/lib/libcrypto.so.22.0
 Reading symbols from
 /usr/lib/libutil.so.11.4...done.
 Loaded symbols for /usr/lib/libutil.so.11.4
 Reading symbols from /usr/lib/libc.so.66.2...done.
 Loaded symbols for
 /usr/lib/libc.so.66.2
 Reading symbols from /usr/libexec/ld.so...done.
 Loaded
 symbols for /usr/libexec/ld.so
 [Switching to thread 1027726]
 0x029e250da81a in kevent () at stdin:2
 2?? stdin: No such file or
 directory.
 ??? in stdin
 Current language:? auto; currently asm
 (gdb)
 launched qualys scan and now waiting for crash to occur - will take 2 hours.
 Unfortunately the relayd patch branch failed with the same error, and that is
 why I tried relayd -current
 
 
 I'll come back with crash results
 
  From: Stuart Henderson s...@spacehopper.org
 To: misc@openbsd.org 
 Sent: Wednesday, August 21, 2013 3:51 PM
 Subject: Re:
 relayd crash
  
 
 On 2013-08-21, Bogdan Andu bo...@yahoo.com wrote:
  I tried
 relayd -current and crashed with the error:
  pwd:
  /usr/src/usr.sbin/relayd
 
  $ sudo ./relayd -f /etc/relayd.conf -d
  . A LOT
  OF LOGS
 
  relay www_ssl, session 1368 (1 active), 0,
  64.39.111.90
 - :0, SSL accept error
  relay www_ssl, session 1369 (1 active),
  0,
 64.39.111.90 - 127.0.0.1:8080, done
  pfe exiting, pid 8360
  lost child:
 
 relay terminated; signal 11
  hce exiting, pid 18726
  parent terminating, pid
  2704
 
 Build it with debug symbols (make clean, make DEBUG=-g install)
 and
 re-run it, then you can attach gdb to the pfe process (use ps
 to find the
 correct pid and 'gdb /usr/sbin/relayd' and 'attach pid'.
 Now when you
 trigger the crash you should be able to get a backtrace.

-- 
Semicolons; use them



Re: relayd crash

2013-08-21 Thread Alexey E. Suslikov
Bogdan Andu bog09 at yahoo.com writes:

 machine is OpenBSD 5.3/amd64 GENERIC.MP

relayd on 5.3 is buggy. you either need newer version,
or backport a fix.



Re: relayd crash

2013-08-21 Thread Bogdan Andu

 From: Alexey E. Suslikov alexey.susli...@gmail.com
To: misc@openbsd.org 
Sent: Wednesday, August 21, 2013 11:40 AM
Subject: Re: relayd crash
 

Bogdan Andu bog09 at yahoo.com writes:

 machine is OpenBSD 5.3/amd64 GENERIC.MP

relayd on 5.3 is buggy. you either need newer version,
or backport a fix.

so, between the following two options what is the best (given the fact the 
machine is OpenBSD 5.3)?

1. checkout in 5.3 from current, compile and install on 5.3;
2. checkout in 5.3 relayd with tag OPENBSD_5_2, compile and install in 5.3

Bogdan



Re: relayd crash

2013-08-21 Thread Alexey E. Suslikov
Bogdan Andu bog09 at yahoo.com writes:

  From: Alexey E. Suslikov alexey.suslikov at gmail.com
 To: misc at openbsd.org 
 Sent: Wednesday, August 21, 2013 11:40 AM
 Subject: Re: relayd crash
 
 Bogdan Andu bog09 at yahoo.com writes:
 
  machine is OpenBSD 5.3/amd64 GENERIC.MP
 
 relayd on 5.3 is buggy. you either need newer version,
 or backport a fix.
 
 so, between the following two options what is the best (given the fact the
machine is OpenBSD 5.3)?
 
 1. checkout in 5.3 from current, compile and install on 5.3;

-current is not directly compatible with older releases due
to time_t switch.

 2. checkout in 5.3 relayd with tag OPENBSD_5_2, compile and install in 5.3

haven't tried by myself, cause I follow -current in most cases.

search archives for relayd crash, I remember people cherry
picking the diff.



Re: relayd crash

2013-08-21 Thread Peter Hessler
On 2013 Aug 21 (Wed) at 02:16:32 -0700 (-0700), Bogdan Andu wrote:
:
: From: Alexey E. Suslikov alexey.susli...@gmail.com
:To: misc@openbsd.org 
:Sent: Wednesday, August 21, 2013 11:40 AM
:Subject: Re: relayd crash
: 
:
:Bogdan Andu bog09 at yahoo.com writes:
:
: machine is OpenBSD 5.3/amd64 GENERIC.MP
:
:relayd on 5.3 is buggy. you either need newer version,
:or backport a fix.
:
:so, between the following two options what is the best (given the fact the 
machine is OpenBSD 5.3)?
:
:1. checkout in 5.3 from current, compile and install on 5.3;
:2. checkout in 5.3 relayd with tag OPENBSD_5_2, compile and install in 5.3
:
:Bogdan
:

Checkout the stable branch on OPENBSD_5_3 as it already has a fix for relayd.

http://www.openbsd.org/stable.html


-- 
A long-forgotten loved one will appear soon.  Buy the negatives at any
price.



Re: relayd crash

2013-08-21 Thread Bogdan Andu
I tried relayd -current and crashed with the error:
pwd:
/usr/src/usr.sbin/relayd

$ sudo ./relayd -f /etc/relayd.conf -d
. A LOT
OF LOGS 
relay www_ssl, session 1368 (1 active), 0,
64.39.111.90 - :0, SSL accept error
relay www_ssl, session 1369 (1 active),
0, 64.39.111.90 - 127.0.0.1:8080, done
pfe exiting, pid 8360
lost child:
relay terminated; signal 11
hce exiting, pid 18726
parent terminating, pid
2704

now I am trying relayd from patch branch - OPENBSD_5_3 and see what
happens

relaunched the free qualys scan


I let you know the results when the
scan finishes




 From: Peter Hessler
phess...@theapt.org
To: Bogdan Andu bo...@yahoo.com 
Cc: Alexey E.
Suslikov alexey.susli...@gmail.com; misc@openbsd.org misc@openbsd.org
Sent: Wednesday, August 21, 2013 1:45 PM
Subject: Re: relayd crash
 

On 2013
Aug 21 (Wed) at 02:16:32 -0700 (-0700), Bogdan Andu wrote:
:
: From: Alexey E. Suslikov
alexey.susli...@gmail.com
:To: misc@openbsd.org 
:Sent: Wednesday, August
21, 2013 11:40 AM
:Subject: Re: relayd crash
: 
:
:Bogdan Andu bog09 at
yahoo.com writes:
:
: machine is OpenBSD 5.3/amd64 GENERIC.MP
:
:relayd on
5.3 is buggy. you either need newer version,
:or backport a fix.
:
:so,
between the following two options what is the best (given the fact the machine
is OpenBSD 5.3)?
:
:1. checkout in 5.3 from current, compile and install on
5.3;
:2. checkout in 5.3 relayd with tag OPENBSD_5_2, compile and install in
5.3
:
:Bogdan
:

Checkout the stable branch on OPENBSD_5_3 as it already has a
fix for relayd.

http://www.openbsd.org/stable.html


-- 
A long-forgotten
loved one will appear soon.  Buy the negatives at any
price.



Re: relayd crash

2013-08-21 Thread Stuart Henderson
On 2013-08-21, Bogdan Andu bo...@yahoo.com wrote:
 I tried relayd -current and crashed with the error:
 pwd:
 /usr/src/usr.sbin/relayd

 $ sudo ./relayd -f /etc/relayd.conf -d
 . A LOT
 OF LOGS 
 relay www_ssl, session 1368 (1 active), 0,
 64.39.111.90 - :0, SSL accept error
 relay www_ssl, session 1369 (1 active),
 0, 64.39.111.90 - 127.0.0.1:8080, done
 pfe exiting, pid 8360
 lost child:
 relay terminated; signal 11
 hce exiting, pid 18726
 parent terminating, pid
 2704

Build it with debug symbols (make clean, make DEBUG=-g install)
and re-run it, then you can attach gdb to the pfe process (use ps
to find the correct pid and 'gdb /usr/sbin/relayd' and 'attach pid'.
Now when you trigger the crash you should be able to get a backtrace.



Re: relayd crash

2013-08-21 Thread Bogdan Andu
ok,

I checked out relayd -current, compiled with debug symbols, launched gdb
and attached to pfe pid :

pwd: /usr/src/usr.sbin/relayd

$ sudo gdb ./relayd
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free
software, covered by the GNU General Public License, and you are
welcome to
change it and/or distribute copies of it under certain conditions.
Type show
copying to see the conditions.
There is absolutely no warranty for GDB.  Type
show warranty for details.
This GDB was configured as
amd64-unknown-openbsd5.3...
(gdb) attach 27726
Attaching to program:
/usr/src/usr.sbin/relayd/relayd, process 27726
Loaded symbols for
/usr/src/usr.sbin/relayd/relayd
Reading symbols from
/usr/lib/libevent.so.3.1...done.
Loaded symbols for /usr/lib/libevent.so.3.1
Reading symbols from /usr/lib/libssl.so.19.0...done.
Loaded symbols for
/usr/lib/libssl.so.19.0
Reading symbols from
/usr/lib/libcrypto.so.22.0...done.
Loaded symbols for
/usr/lib/libcrypto.so.22.0
Reading symbols from
/usr/lib/libutil.so.11.4...done.
Loaded symbols for /usr/lib/libutil.so.11.4
Reading symbols from /usr/lib/libc.so.66.2...done.
Loaded symbols for
/usr/lib/libc.so.66.2
Reading symbols from /usr/libexec/ld.so...done.
Loaded
symbols for /usr/libexec/ld.so
[Switching to thread 1027726]
0x029e250da81a in kevent () at stdin:2
2   stdin: No such file or
directory.
    in stdin
Current language:  auto; currently asm
(gdb)
launched qualys scan and now waiting for crash to occur - will take 2 hours.
Unfortunately the relayd patch branch failed with the same error, and that is
why I tried relayd -current


I'll come back with crash results

 From: Stuart Henderson s...@spacehopper.org
To: misc@openbsd.org 
Sent: Wednesday, August 21, 2013 3:51 PM
Subject: Re:
relayd crash
 

On 2013-08-21, Bogdan Andu bo...@yahoo.com wrote:
 I tried
relayd -current and crashed with the error:
 pwd:
 /usr/src/usr.sbin/relayd

 $ sudo ./relayd -f /etc/relayd.conf -d
 . A LOT
 OF LOGS

 relay www_ssl, session 1368 (1 active), 0,
 64.39.111.90
- :0, SSL accept error
 relay www_ssl, session 1369 (1 active),
 0,
64.39.111.90 - 127.0.0.1:8080, done
 pfe exiting, pid 8360
 lost child:

relay terminated; signal 11
 hce exiting, pid 18726
 parent terminating, pid
 2704

Build it with debug symbols (make clean, make DEBUG=-g install)
and
re-run it, then you can attach gdb to the pfe process (use ps
to find the
correct pid and 'gdb /usr/sbin/relayd' and 'attach pid'.
Now when you
trigger the crash you should be able to get a backtrace.



Re: relayd crash

2013-08-21 Thread Stuart Henderson
On 2013/08/21 06:32, Bogdan Andu wrote:
 [Switching to thread 1027726]
 0x029e250da81a in kevent () at stdin:2
 2   stdin: No such file or directory.
 in stdin
 Current language:  auto; currently asm
 (gdb)

oh, I forgot, you will need to continue here ;)

 
 launched qualys scan and now waiting for crash to occur - will take 2
 hours.
 
 Unfortunately the relayd patch branch failed with the same error, and
 that is why I tried relayd -current
 
 I'll come back with crash results
 ━━━
 From: Stuart Henderson s...@spacehopper.org
 To: misc@openbsd.org
 Sent: Wednesday, August 21, 2013 3:51 PM
 Subject: Re: relayd crash
 
 On 2013-08-21, Bogdan Andu bo...@yahoo.com wrote:
  I tried relayd -current and crashed with the error:
  pwd:
  /usr/src/usr.sbin/relayd
 
  $ sudo ./relayd -f /etc/relayd.conf -d
  . A LOT
  OF LOGS 
  relay www_ssl, session 1368 (1 active), 0,
  64.39.111.90 - :0, SSL accept error
  relay www_ssl, session 1369 (1 active),
  0, 64.39.111.90 - 127.0.0.1:8080, done
  pfe exiting, pid 8360
  lost child:
  relay terminated; signal 11
  hce exiting, pid 18726
  parent terminating, pid
  2704
 
 Build it with debug symbols (make clean, make DEBUG=-g install)
 and re-run it, then you can attach gdb to the pfe process (use ps
 to find the correct pid and 'gdb /usr/sbin/relayd' and 'attach pid'.
 Now when you trigger the crash you should be able to get a backtrace.



Re: relayd crash

2013-08-21 Thread Bogdan Andu
yes.

we waiting for tests to finish - I launched 3 concurrent tests.
tomorrow I'll give you the results.





From: Stuart Henderson s...@spacehopper.org
To: Bogdan Andu bo...@yahoo.com
Cc: misc@openbsd.org misc@openbsd.org 
Sent: Wednesday, August 21, 2013
6:06 PM
Subject: Re: relayd crash
 

On 2013/08/21 06:32, Bogdan Andu wrote:

[Switching to thread 1027726]
 0x029e250da81a in kevent () at stdin:2

2       stdin: No such file or directory.
         in stdin

Current language:  auto; currently asm
 (gdb)

oh, I forgot, you will need
to continue here ;)

 
 launched qualys scan and now waiting for crash to
occur - will take 2
 hours.
 
 Unfortunately the relayd patch branch failed
with the same error, and
 that is why I tried relayd -current
 
 I'll come
back with crash results

━━━━━━━━━━━━━━━━━━━━━━━━━â”
â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â
”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”
 From: Stuart
Henderson s...@spacehopper.org
 To: misc@openbsd.org
 Sent: Wednesday,
August 21, 2013 3:51 PM
 Subject: Re: relayd crash
 
 On 2013-08-21, Bogdan
Andu bo...@yahoo.com wrote:
  I tried relayd -current and crashed with the
error:
  pwd:
  /usr/src/usr.sbin/relayd
 
  $ sudo ./relayd -f
/etc/relayd.conf -d
  . A LOT
  OF LOGS 
  relay
www_ssl, session 1368 (1 active), 0,
  64.39.111.90 - :0, SSL accept error
  relay www_ssl, session 1369 (1 active),
  0, 64.39.111.90 -
127.0.0.1:8080, done
  pfe exiting, pid 8360
  lost child:
  relay
terminated; signal 11
  hce exiting, pid 18726
  parent terminating, pid

 2704
 
 Build it with debug symbols (make clean, make DEBUG=-g install)

and re-run it, then you can attach gdb to the pfe process (use ps
 to find
the correct pid and 'gdb /usr/sbin/relayd' and 'attach pid'.
 Now when you
trigger the crash you should be able to get a backtrace.



Re: Relayd crash on reload

2013-07-17 Thread Mathieu Blanc

Le 16/07/2013 15:53, Mathieu BLANC a écrit :

Hi !

I have read several mails/bug in the mailing list about reloading
relayd. But i didn't understand if all the bugs were fixed or not ?
[...]
If i launch the daemon with relayd -d -vvv, and relayctl reload, i
have this error :

parent_sig_handler: reload requested with SIGHUP
parent_reload: level 0 config file /etc/relayd.conf
relayd in free(): error: chunk is already free 0x139b3e2e6400
init_filter: filter init done
init_tables: created 0 tables
flush_table: flushed table std_https1
kill_tables: deleted 1 tables
flush_rulesets: flushed rules
pfe exiting, pid 1270
lost child: hce terminated; signal 6
relay exiting, pid 18390
relay exiting, pid 17435
relay exiting, pid 579
relay exiting, pid 7823
relay exiting, pid 25910
parent terminating, pid 23068

I know that relayd can't be reloaded if we have relays with SSL, but
i've just a redirect (with check https...). I've tested with check tcp
(and not check https /), and it seems that reload is OK with this !
Am I missing something ?

Thanks in advance !



Sebastian (benoit-li...@fb12.de) asked me to test this patch : 
http://www.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/relayd/ssl.c.diff?r1=1.18;r2=1.19;sortby=date


I've tried this morning, and relayctl reload doesn't crash anymore. 
Thanks to him ;)


--
Mathieu



Re: Relayd crash on reload

2013-07-16 Thread Alexey E. Suslikov
Mathieu BLANC mathieu.blanc at smile.fr writes:

 I have read several mails/bug in the mailing list about reloading 
 relayd. But i didn't understand if all the bugs were fixed or not ?

you need to try out -current relayd first.