RESOLVED FIXED 16099
Crash in CURL for empty POST
https://bugs.webkit.org/show_bug.cgi?id=16099
Summary Crash in CURL for empty POST
Seo Sanghyeon
Reported 2007-11-22 21:32:27 PST
SVN r27981. ./build-webkit --gtk. Open the URL with GtkLauncher. It immeidately crashes inside CURL. The URL posts an empty form. This prevents use of http://mail.daum.net/, the #1 webmail site in Korea.
Attachments
Fix crasher (788 bytes, patch)
2007-11-28 20:19 PST, Alp Toker
no flags
Avoid deadlock too (661 bytes, patch)
2007-11-28 20:28 PST, Alp Toker
no flags
patch (541 bytes, patch)
2007-12-08 00:43 PST, Luca Bruno
alp: review-
post empty data (526 bytes, patch)
2007-12-30 03:21 PST, Luca Bruno
no flags
add changelog entry (1.21 KB, patch)
2007-12-30 03:46 PST, Luca Bruno
alp: review+
Alp Toker
Comment 1 2007-11-28 20:19:54 PST
Created attachment 17586 [details] Fix crasher I haven't checked to see if there are other instances of this bug in ResourceHandleManager or whether there is a better place to do this check yet. Does it do the trick for you?
Alp Toker
Comment 2 2007-11-28 20:28:09 PST
Created attachment 17587 [details] Avoid deadlock too
Seo Sanghyeon
Comment 3 2007-12-03 18:44:24 PST
I still get the crash after applying the patch.
Luca Bruno
Comment 4 2007-12-08 00:43:40 PST
Created attachment 17787 [details] patch Can you try this one? Alp, the main problem is that the httpBody is NULL. The patch checks that in setupPOST like yours, but is it right that httpBody is being set to NULL somewhere?
Alp Toker
Comment 5 2007-12-15 08:36:31 PST
Comment on attachment 17787 [details] patch This page seems to just hang the browser now. The patch doesn't fix the hang. Probably due to recent fixes.
Luca Bruno
Comment 6 2007-12-28 12:42:47 PST
Doesn't crash to me after fixing job cancellation. Can you all check please?
Seo Sanghyeon
Comment 7 2007-12-28 20:14:24 PST
SVN r29020. ./autogen.sh; make. No patch. URL now hangs as described by Alp in #5.
Luca Bruno
Comment 8 2007-12-29 01:21:56 PST
Did you do make install and ran GtkLauncher without using the run-launcher right?
Seo Sanghyeon
Comment 9 2007-12-29 01:39:45 PST
Of course.
Luca Bruno
Comment 10 2007-12-29 04:32:00 PST
Can you please paste a traceback here?
Seo Sanghyeon
Comment 11 2007-12-29 04:39:22 PST
How does one produce a traceback of the hanged program?
Luca Bruno
Comment 12 2007-12-29 07:04:48 PST
I know i'm boring you :) but really i'm both trying to reproduce the bug and getting informations from you. Please ensure you're using the right library. You switched from qmake to autotools this may lead to using mismatched libraries. For example, retry using qmake with svn HEAD. Remove all libWebKit* from your system. Can you press ctrl+c inside gdb when it hangs? Maybe the problem is on font rendering? Are you able to open other korean web sites?
Seo Sanghyeon
Comment 13 2007-12-29 07:25:36 PST
> Are you able to open other Korean web sites? Yes, Korean web sites render fine. > Please ensure you're using the right library. $ ldd Programs/.libs/GtkLauncher | grep WebKit libWebKitGtk.so.1 => /opt/webkit/lib/libWebKitGtk.so.1 I checked the modification time of the above file. > Can you press ctrl+c inside gdb when it hangs? Program received signal SIGINT, Interrupt. [Switching to Thread 0xb598d6c0 (LWP 26137)] 0xffffe410 in __kernel_vsyscall () (gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb615fb5b in read () from /lib/i686/cmov/libc.so.6 #2 0xb60fdd49 in ?? () from /lib/i686/cmov/libc.so.6 #3 0xb60fff58 in _IO_sgetn () from /lib/i686/cmov/libc.so.6 #4 0xb60f3f5e in fread () from /lib/i686/cmov/libc.so.6 #5 0xb79db3da in ?? () from /usr/lib/libcurl.so.4 (much more ??s)
Luca Bruno
Comment 14 2007-12-29 07:42:55 PST
What are the first 2-3 functions of WebKit in the traceback? You stopped to libcurl... Which version of libcurl you have? Here 7.17.1
Seo Sanghyeon
Comment 15 2007-12-29 07:59:40 PST
No function of WebKit in the traceback. libcurl is Debian package libcurl3 7.17.1-1. The same version you have.
Luca Bruno
Comment 16 2007-12-29 10:43:07 PST
Without the patch doesn't hang to me. Maybe you have the patch still applied. Can you please revert the patch, update to HEAD and ensure there're no conflicts in WebCore/platform/network/curl/ReasourceHandleManager.cpp, then retry?
Seo Sanghyeon
Comment 17 2007-12-29 16:54:42 PST
I don't have any patch applied. Please don't treat me as an idiot. Apparently I'm not the only person who can reproduce this bug. I hope others will chime in.
Alp Toker
Comment 18 2007-12-29 18:18:53 PST
Seo, I think Luca was just going through some basic diagnostic steps. I've reproduced the hang with a TOT build. There is probably not much more to be speculated on this bug until it's traced using gdb. Could turn out to be a re-entrancy issue or anything. Another option is to experiment with new http backends -- they're not that hard to write and the current curl http backend is a bit messy.
Luca Bruno
Comment 19 2007-12-30 03:21:23 PST
Created attachment 18189 [details] post empty data Sorry Seo, i don't think you are an idiot really. Well i got finally this hang with svn HEAD. The patch is very simple, i just remove a condition which avoids empty POST from being transmitted. This seems to fix the problem. If that's the issue, I wonder the purpose of that condition and if this patch could bring a regression. Seo, can you try with this patch? Thanks.
Luca Bruno
Comment 20 2007-12-30 03:46:02 PST
Created attachment 18190 [details] add changelog entry
Alp Toker
Comment 21 2007-12-30 03:47:15 PST
Comment on attachment 18190 [details] add changelog entry r=me The old check was clearly wrong.
Alp Toker
Comment 22 2007-12-30 03:52:51 PST
Landed in r29037.
Note You need to log in before you can comment on or make changes to this bug.