Threaded libcurl crash
Posted: Thu Nov 01, 2012 11:43 pm
If libcurl is built with the threaded resolver it causes a crash in bsdsocket.library when multiple DNS lookups are occuring at once.
Here is an example stack trace from OS4.1 update 4 using this threaded version of libcurl: http://homepage.ntlworld.com/cdyoung/tm ... readed.lha (NB: SSL does not work on this build). It can be tested with NetSurf 2.9 by copying the archive version of libcurl.so.7 into NetSurf's directory.
Stack trace:
native kernel module kernel+0x00012450
native kernel module dos.library.kmod+0x0002a4a4
native kernel module dos.library.kmod+0x000221d8
native kernel module dos.library.kmod+0x00019404
native kernel module dos.library.kmod+0x00005ab4
module LIBS:bsdsocket.library at 0x6FB80EF8 (section 5 @ 0x2DED8)
module LIBS:bsdsocket.library at 0x6FB81260 (section 5 @ 0x2E240)
module LIBS:bsdsocket.library at 0x6FB8CA1C (section 5 @ 0x399FC)
module LIBS:bsdsocket.library at 0x6FB8DF44 (section 5 @ 0x3AF24)
module LIBS:bsdsocket.library at 0x6FB806E8 (section 5 @ 0x2D6C8)
libcurl.so.7:Curl_ipv4_resolve_r()+0xA8 (section 9 @ 0x32cf0)
libcurl.so.7:gethostbyname_thread()+0x20 (section 9 @ 0x41370)
libcurl.so.7:curl_thread_create_thunk()+0x4C (section 9 @ 0x3f630)
pthreads.library:run()+0x278 (section 1 @ 0x4134)
pthreads.library:ThreadCode()+0x35C (section 1 @ 0x44dc)
native kernel module dos.library.kmod+0x00022a0c
native kernel module kernel+0x0003af48
native kernel module kernel+0x0003afc8
Another one, this time with OWB:
Stack trace:
module LIBS:bsdsocket.library at 0x6FC02EB8 (section 5 @ 0x4CE98)
module LIBS:bsdsocket.library at 0x6FC051E8 (section 5 @ 0x4F1C8)
module LIBS:bsdsocket.library at 0x6FC055B0 (section 5 @ 0x4F590)
module LIBS:bsdsocket.library at 0x6FBE7FBC (section 5 @ 0x31F9C)
module LIBS:bsdsocket.library at 0x6FBF1A04 (section 5 @ 0x3B9E4)
module LIBS:bsdsocket.library at 0x6FBF0A88 (section 5 @ 0x3AA68)
module LIBS:bsdsocket.library at 0x6FBF0CE4 (section 5 @ 0x3ACC4)
module LIBS:bsdsocket.library at 0x6FBF125C (section 5 @ 0x3B23C)
module LIBS:bsdsocket.library at 0x6FBE36E8 (section 5 @ 0x2D6C8)
native kernel module newlib.library.kmod+0x00039970
OWB:Curl_ipv4_resolve_r()+0x7C (section 1 @ 0xe0f88c)
OWB:gethostbyname_thread()+0x20 (section 1 @ 0xdf1a38)
OWB:curl_thread_create_thunk()+0x38 (section 1 @ 0xe17c4c)
pthreads.library:run()+0x278 (section 1 @ 0x4134)
pthreads.library:ThreadCode()+0x35C (section 1 @ 0x44dc)
native kernel module dos.library.kmod+0x00022a0c
native kernel module kernel+0x0003af48
native kernel module kernel+0x0003afc8
Lots of discussion on this aw.net thread (post #43 onwards): http://amigaworld.net/modules/newbb/vie ... at&order=0
Here is an example stack trace from OS4.1 update 4 using this threaded version of libcurl: http://homepage.ntlworld.com/cdyoung/tm ... readed.lha (NB: SSL does not work on this build). It can be tested with NetSurf 2.9 by copying the archive version of libcurl.so.7 into NetSurf's directory.
Stack trace:
native kernel module kernel+0x00012450
native kernel module dos.library.kmod+0x0002a4a4
native kernel module dos.library.kmod+0x000221d8
native kernel module dos.library.kmod+0x00019404
native kernel module dos.library.kmod+0x00005ab4
module LIBS:bsdsocket.library at 0x6FB80EF8 (section 5 @ 0x2DED8)
module LIBS:bsdsocket.library at 0x6FB81260 (section 5 @ 0x2E240)
module LIBS:bsdsocket.library at 0x6FB8CA1C (section 5 @ 0x399FC)
module LIBS:bsdsocket.library at 0x6FB8DF44 (section 5 @ 0x3AF24)
module LIBS:bsdsocket.library at 0x6FB806E8 (section 5 @ 0x2D6C8)
libcurl.so.7:Curl_ipv4_resolve_r()+0xA8 (section 9 @ 0x32cf0)
libcurl.so.7:gethostbyname_thread()+0x20 (section 9 @ 0x41370)
libcurl.so.7:curl_thread_create_thunk()+0x4C (section 9 @ 0x3f630)
pthreads.library:run()+0x278 (section 1 @ 0x4134)
pthreads.library:ThreadCode()+0x35C (section 1 @ 0x44dc)
native kernel module dos.library.kmod+0x00022a0c
native kernel module kernel+0x0003af48
native kernel module kernel+0x0003afc8
Another one, this time with OWB:
Stack trace:
module LIBS:bsdsocket.library at 0x6FC02EB8 (section 5 @ 0x4CE98)
module LIBS:bsdsocket.library at 0x6FC051E8 (section 5 @ 0x4F1C8)
module LIBS:bsdsocket.library at 0x6FC055B0 (section 5 @ 0x4F590)
module LIBS:bsdsocket.library at 0x6FBE7FBC (section 5 @ 0x31F9C)
module LIBS:bsdsocket.library at 0x6FBF1A04 (section 5 @ 0x3B9E4)
module LIBS:bsdsocket.library at 0x6FBF0A88 (section 5 @ 0x3AA68)
module LIBS:bsdsocket.library at 0x6FBF0CE4 (section 5 @ 0x3ACC4)
module LIBS:bsdsocket.library at 0x6FBF125C (section 5 @ 0x3B23C)
module LIBS:bsdsocket.library at 0x6FBE36E8 (section 5 @ 0x2D6C8)
native kernel module newlib.library.kmod+0x00039970
OWB:Curl_ipv4_resolve_r()+0x7C (section 1 @ 0xe0f88c)
OWB:gethostbyname_thread()+0x20 (section 1 @ 0xdf1a38)
OWB:curl_thread_create_thunk()+0x38 (section 1 @ 0xe17c4c)
pthreads.library:run()+0x278 (section 1 @ 0x4134)
pthreads.library:ThreadCode()+0x35C (section 1 @ 0x44dc)
native kernel module dos.library.kmod+0x00022a0c
native kernel module kernel+0x0003af48
native kernel module kernel+0x0003afc8
Lots of discussion on this aw.net thread (post #43 onwards): http://amigaworld.net/modules/newbb/vie ... at&order=0