After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 578984 - Crash with SIGPIPE in soup_socket_write()
Crash with SIGPIPE in soup_socket_write()
Status: RESOLVED NOTABUG
Product: libsoup
Classification: Core
Component: HTTP Transport
2.26.x
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2009-04-14 21:57 UTC by Enrico Tröger
Modified: 2009-04-15 13:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Two backtraces of the crashes (3.32 KB, text/plain)
2009-04-14 21:59 UTC, Enrico Tröger
Details

Description Enrico Tröger 2009-04-14 21:57:41 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 :).
Comment 1 Enrico Tröger 2009-04-14 21:59:50 UTC
Created attachment 132663 [details]
Two backtraces of the crashes
Comment 2 Dan Winship 2009-04-14 22:02:10 UTC
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.
Comment 3 Enrico Tröger 2009-04-14 22:19:00 UTC
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?
Comment 4 Dan Winship 2009-04-14 22:30:40 UTC
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).
Comment 5 Enrico Tröger 2009-04-15 13:56:04 UTC
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 :).