GNOME Bugzilla – Bug 578984
Crash with SIGPIPE in soup_socket_write()
Last modified: 2009-04-15 13:56:04 UTC
Sometimes libsoup 2.26.0 crashes with SIGPIPE when loading some sites in Midori. Attached are two GDB backtraces of such crashes. Both times, I opened http://www.tvmovie.de/TV_Programm.10.0.html so I guess it's related to something this site tries to load. And because it doesn't happen always, maybe 2 of 10 times, I assume it's related to some advertisement which are loaded randomly by the site. To reproduce: just open http://www.tvmovie.de/TV_Programm.10.0.html a few times with Midori (and a recent Webkit build which uses libsoup), with a bit of luck it crashes :).
Created attachment 132663 [details] Two backtraces of the crashes
The SIGPIPE is not in any way related to the crash that you are seeing, it's just gdb being confusing. You need to tell gdb "handle SIGPIPE nostop" in order to make it not stop when the process receives a SIGPIPE, and then it will eventually reach the point where the *real* crash is happening.
Ah ok. When I set gdb to ignore SIGPIPE signals, it doesn't crash at all. But still strange that it happens. Does it mean that the connection to the server got lost, so maybe it's just because of crappy adfarm servers?
If it's not crashing when you're not in gdb or when you tell gdb to not stop on SIGPIPE then there's no bug. It happens when a server lets you make a persistent connection, but then later the server closes the connection because it doesn't want you to hold it open forever. It's perfectly ordinary, it's just that the way sockets work requires that the process get a SIGPIPE in this situation. libsoup handles the SIGPIPE fine, but gdb doesn't *know* that it's going to handle it, so it automatically breaks when the signal arrives (since if libsoup *didn't* handle it, the default behavior would be to kill the application).
Ok, thanks for the information. Without gdb, it didn't crash. I was just hunting another, unrelated crasher and noticed this while running Midori in gdb. Sorry for the noise :).