liuzongquan / serf

Automatically exported from code.google.com/p/serf
Apache License 2.0
0 stars 0 forks source link

serf_get crashes with segmentation fault on two requests and concurrent connections with SPNEGO auth #173

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Using FreeBSD 9.3-STABLE, Serf trunk@2500, MIT Kerberos 1.13.2.

Calling "/serf_get -d -c 2 -n 2 http://..." gives me "Segmentation fault: 11 
(Speicherabzug geschrieben)"

Serf has been compiled with debug options, full logs, GDB stracktrace and core 
file can be send privately.

Original issue reported on code.google.com by 1983-01...@gmx.net on 15 Aug 2015 at 8:56

GoogleCodeExporter commented 9 years ago
Hi, I'd be interested in seeing the logs & stack trace.
Maybe I'll also need a network trace, but let's start with the info you already 
have.

You can send them privately to lgo@apache.org.

thanks,
Lieven

Original comment by lieven.govaerts@gmail.com on 19 Aug 2015 at 6:54

GoogleCodeExporter commented 9 years ago
Hi Lieven, are you happy with the serf log output and the core file or do you 
want to see a Wireshark capture and Apache log file too?

Original comment by 1983-01...@gmx.net on 19 Aug 2015 at 8:01

GoogleCodeExporter commented 9 years ago
Serf log and printed stack trace are fine. A coredump file is not much use to 
me because I don't have a FreeBSD system. Thx.

Original comment by lieven.govaerts@gmail.com on 19 Aug 2015 at 10:42

GoogleCodeExporter commented 9 years ago
Appropriate files have been sent.

Original comment by 1983-01...@gmx.net on 19 Aug 2015 at 1:34

GoogleCodeExporter commented 9 years ago
The problem:

The authentication handler initializes the spnego authentication scheme only 
for the first connection to a specific server [1], but then uses the authn info 
object per connection [2]. That will fail for the 2nd, 3rd ... connection 
because there that object wasn't initialised.
[1] auth.c/handle_auth_headers() : authn_info = 
serf__get_authn_info_for_server(conn);
[2] auth_spnego.c/serf__handle_spnego_auth() : gss_authn_info_t *gss_info = 
(code == 401) ? conn->authn_info.baton 

Original comment by lieven.govaerts@gmail.com on 20 Aug 2015 at 8:02

GoogleCodeExporter commented 9 years ago
Lieven, that is obviously a bug isn't it?

This does not cause trouble unless Subversion will start using concurrent 
connections, does it?

Original comment by 1983-01...@gmx.net on 21 Aug 2015 at 10:18