jech / polipo

The Polipo caching HTTP proxy
http://www.pps.jussieu.fr/~jch/software/polipo/
MIT License
1.8k stars 354 forks source link

Assertion failure in httpServerFinish: pipelined >= 1 #23

Open dmig opened 10 years ago

dmig commented 10 years ago

This issue is reproduceable on delicaclub.ru/forum (in random places). Reproduces only on mipsel build, couldn't catch on x86-64.

Here is a backtrace:

[dmig@my-router polipo]$ sudo gdb --args polipo -c /opt/etc/polipo/config
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 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 "mipsel-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/sbin/polipo...done.
(gdb) run
Starting program: /opt/sbin/polipo -c /opt/etc/polipo/config
[Inferior 1 (process 5876) exited normally]
(gdb) ^Z[1]+  Stopped                    sudo gdb --args polipo -c /opt/etc/polipo/config
[dmig@my-router polipo]$ ps | grep polipo
 5874 admin     8224 2    gdb --args polipo -c /opt/etc/polipo/config
 5879 admin     1404 S    /opt/sbin/polipo -c /opt/etc/polipo/config
 5881 dmig       884 R    grep polipo
[dmig@my-router polipo]$ fg
sudo gdb --args polipo -c /opt/etc/polipo/config

(gdb) attach 5879
Attaching to program: /opt/sbin/polipo, process 5879
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.0
Reading symbols from /lib/ld-uClibc.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-uClibc.so.0
0x77f624fc in poll () from /lib/libc.so.0
(gdb) continue 
Continuing.

Program received signal SIGABRT, Aborted.
0x77fae964 in raise () from /lib/libc.so.0
(gdb) bt
#0  0x77fae964 in raise () from /lib/libc.so.0
#1  0x77fa8064 in abort () from /lib/libc.so.0
#2  0x77f65888 in __assert () from /lib/libc.so.0
#3  0x00435bd4 in httpServerFinish (connection=0x4945f0, s=1, offset=0) at server.c:1171
#4  0x004369e0 in httpServerDelayedFinishHandler (event=0x495d08) at server.c:1342
#5  0x00406a18 in runTimeEventQueue () at event.c:492
#6  0x0040722c in eventLoop () at event.c:654
#7  0x0041dfb0 in main (argc=3, argv=0x7fff6d74) at main.c:165
(gdb)

See #22 for polipo config file.

dmig commented 10 years ago

I automated backtrace collection, so here are some more segfaults: https://dl.dropboxusercontent.com/u/490384/t/stack-traces-SIGABRT.tar.gz

Also, often crash cause is SIGPIPE https://dl.dropboxusercontent.com/u/490384/t/stack-traces-SIGPIPE.tar.gz

jech commented 10 years ago

Also, often crash cause is SIGPIPE https://dl.dropboxusercontent.com/u/490384/t/stack-traces-SIGPIPE.tar.gz

No, that's a gdb artifact -- Polipo is ignoring SIGPIPE, and SIGPIPE is a normal part of Polipo's behaviour.

leggewie commented 9 years ago

issue #22 and #23 are the same, are they not?

dmig commented 9 years ago

Actually yes, they are same. I created 2 different issues to separate backtraces