#25450: Ports fail to fetch from Japanese ftp mirror ----------------------------------+----------------------------------------- Reporter: a.lathrop@… | Owner: macports-dev@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: base | Version: 1.9.1 Resolution: | Keywords: fetch Port: gsl, gettext | ----------------------------------+----------------------------------------- Comment(by florian@…): Here are some hints how to resolve this problem: 1) I traced down the problem to a buggy libcurl (7.19.7) which hangs on the call of select() in function Curl_socket_ready(). This is reproducible with the steps outlined in my previous post. This is the backtrace: {{{ #0 0x00007fff85e9d932 in select$DARWIN_EXTSN () #1 0x0000000100068bbd in Curl_socket_ready () #2 0x000000010003a9f2 in ftp_easy_statemach (conn=0x100800408) at ftp.c:3056 #3 0x000000010003ad28 in ftp_connect (conn=0x100800408, done=0x7fff5fbfecee) at ftp.c:3186 #4 0x0000000100044cb5 in Curl_protocol_connect (conn=0x100800408, protocol_done=0x7fff5fbfecee) at url.c:3070 #5 0x0000000100047ea8 in setup_conn (conn=0x100800408, hostaddr=0x100115338, protocol_done=0x7fff5fbfecee) at url.c:4711 #6 0x0000000100048024 in Curl_connect (data=0x100803c08, in_connect=0x7fff5fbfed20, asyncp=0x7fff5fbfecef, protocol_done=0x7fff5fbfecee) at url.c:4787 #7 0x0000000100059d5f in connect_host (data=0x100803c08, conn=0x7fff5fbfed20) at transfer.c:2488 #8 0x0000000100059ff7 in Curl_perform (data=0x100803c08) at transfer.c:2625 #9 0x000000010005aa9f in curl_easy_perform (curl=0x100803c08) at easy.c:557 #10 0x000000010000b2ee in operate (config=0x7fff5fbff350, argc=3, argv=0x7fff5fbff6a8) at main.c:5002 #11 0x000000010000bcbc in main (argc=3, argv=0x7fff5fbff6a8) at main.c:5317 }}} 2) Snow Leopard comes with libcurl 7.19.7 so this fails: {{{ http_proxy=0.0.0.0:0 FTP_PROXY=127.0.0.1:3128 /usr/bin/curl -v ftp://ftp.infradead.org/pub/openconnect/openconnect-3.15.tar.gz > /dev/null }}} 3) The bug is apparently fixed in the libcurl that the curl port installs. So the macport installed curl works as expected: {{{ http_proxy=0.0.0.0:0 FTP_PROXY=127.0.0.1:3128 /opt/local/bin/curl -v ftp://ftp.infradead.org/pub/openconnect/openconnect-3.15.tar.gz > /dev/null }}} 4) '''port fetch''' calls ''curl fetch'' from '''Pextlib''', however, Pextlib is linked against the buggy libcurl that comes with Snow Leopard: {{{ otool -L /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib: Pextlib.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libcurl.4.dylib (compatibility version 6.0.0, current version 6.1.0) /usr/lib/libedit.2.dylib (compatibility version 2.0.0, current version 2.11.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11) }}} 5) '''Conclusion''': The easiest fix would be to link Pextlib against the libcurl (currently 7.23.1) from macports and not rely on a 2 years old libcurl that comes with the system. The current version includes lots of bug fixes and probably several known security vulnerabilities. So I see no point in using the old one. -- Ticket URL: <https://trac.macports.org/ticket/25450#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS