On Sat, May 10, 2014 at 1:03 AM, Stephan Beal <sgb...@googlemail.com> wrote:
> For me fossil builds with -g (debug) flags by default, so you shouldn't > have to rebuild. > I ended up recompiling fossil just to be sure. On Mac OSX Mavericks, gdb has been replaced by lldb. I managed to get the process to hang again (it hadn't completed in over 10 minutes during a sync). I attached to it and went looking up the frames one by one. Here are the frames: frame #0: 0x00007fff8aef59f0 libsystem_kernel.dylib`read + 8 frame #1: 0x00007fff8fbfd84c libcrypto.0.9.8.dylib`conn_read + 76 frame #2: 0x00007fff8fbf7264 libcrypto.0.9.8.dylib`BIO_read + 100 frame #3: 0x00007fff86b6513d libssl.0.9.8.dylib`ssl3_read_n + 365 frame #4: 0x00007fff86b65b9f libssl.0.9.8.dylib`ssl3_read_bytes + 735 frame #5: 0x00007fff86b63dec libssl.0.9.8.dylib`ssl3_read + 156 frame #6: 0x00007fff86b4e4c9 libssl.0.9.8.dylib`ssl_read + 73 frame #7: 0x00007fff8fbf7264 libcrypto.0.9.8.dylib`BIO_read + 100 frame #8: 0x0000000105719ba2 fossil`ssl_receive(NotUsed=<unavailable>, pContent=<unavailable>, N=<unavailable>) + 50 at http_ssl.c:399 396 size_t got; 397 size_t total = 0; 398 while( N>0 ){ -> 399 got = BIO_read(iBio, pContent, N); 400 if( got<=0 ) break; 401 total += got; 402 N -= got; So, it's hanging in the BIO_read function. Global/static variables (command: ta v) are: (SSL_CTX *) sslCtx = 0x00007fa1c2e039b0 (char *) sslErrMsg = 0x0000000000000000 (SSL *) ssl = 0x00007fa1c2e04430 (BIO *) iBio = 0x00007fa1c2e043c0 Frame variables (fr v) are unfortunately: (void *) NotUsed = <variable not available> (void *) pContent = <variable not available> (size_t) N = <variable not available> (size_t) total = 0 (size_t) got = <variable not available> Going up a couple more frames gives context to where in the code it is stalling but I'm not sure whether it gives any insight to why. Perhaps if someone could give some guidance on how I can investigate further I can help diagnose. Here are the remaining frames all the way up to main: frame #9: 0x000000010571a3a6 fossil`transport_fetch(pUrlData=<unavailable>, zBuf=0x00007fa1c2e078b0, N=1000) + 102 at http_transport.c:311 308 } 309 }else if( pUrlData->isHttps ){ 310 #ifdef FOSSIL_ENABLE_SSL -> 311 got = ssl_receive(0, zBuf, N); 312 #else 313 got = 0; 314 #endif (lldb) up frame #10: 0x000000010571a548 fossil`transport_receive_line [inlined] transport_load_buffer(pUrlData=0x000000010589f430) + 236 at http_transport.c:393 390 transport.pBuf = pNew; 391 } 392 if( N>0 ){ -> 393 i = transport_fetch(pUrlData, &transport.pBuf[transport.nUsed], N); 394 if( i>0 ){ 395 transport.nRcvd += i; 396 transport.nUsed += i; (lldb) up frame #11: 0x000000010571a45c fossil`transport_receive_line(pUrlData=0x000000010589f430) + 76 at http_transport.c:416 413 i = iStart = transport.iCursor; 414 while(1){ 415 if( i >= transport.nUsed ){ -> 416 transport_load_buffer(pUrlData, pUrlData->isSsh ? 2 : 1000); 417 i -= iStart; 418 iStart = 0; 419 if( i >= transport.nUsed ){ (lldb) up frame #12: 0x0000000105718815 fossil`http_exchange(pSend=0x00007fff5a518640, pReply=0x00007fff5a518620, useLogin=1, maxRedirect=20) + 1301 at http.c:206 203 */ 204 closeConnection = 1; 205 iLength = -1; -> 206 while( (zLine = transport_receive_line(GLOBAL_URL()))!=0 && zLine[0]!=0 ){ 207 /* printf("[%s]\n", zLine); fflush(stdout); */ 208 if( fossil_strnicmp(zLine, "http/1.", 7)==0 ){ 209 if( sscanf(zLine, "HTTP/1.%d %d", &iHttpVersion, &rc)!=2 ) goto write_err; (lldb) up frame #13: 0x000000010576b1e3 fossil`client_sync(syncFlags=<unavailable>, configRcvMask=<unavailable>, configSendMask=<unavailable>) + 1955 at xfer.c:1560 1557 } 1558 fflush(stdout); 1559 /* Exchange messages with the server */ -> 1560 if( http_exchange(&send, &recv, (syncFlags & SYNC_CLONE)==0 || nCycle>0, 1561 MAX_REDIRECTS) ){ 1562 nErr++; 1563 break; (lldb) up frame #14: 0x000000010574d2a9 fossil`autosync(flags=<unavailable>) + 313 at sync.c:75 72 if( find_option("verbose","v",0)!=0 ) flags |= SYNC_VERBOSE; 73 fossil_print("Autosync: %s\n", g.urlCanonical); 74 url_enable_proxy("via proxy: "); -> 75 rc = client_sync(flags, configSync, 0); 76 if( rc ) fossil_warning("Autosync failed"); 77 return rc; 78 } (lldb) up frame #15: 0x00000001056f9f85 fossil`commit_cmd + 5365 at checkin.c:1927 1924 db_end_transaction(0); 1925 1926 if( !g.markPrivate ){ -> 1927 autosync(SYNC_PUSH|SYNC_PULL); 1928 } 1929 if( count_nonbranch_children(vid)>1 ){ 1930 fossil_print("**** warning: a fork has occurred *****\n"); (lldb) up frame #16: 0x0000000105726195 fossil`main(argc=<unavailable>, argv=<unavailable>) + 2325 at main.c:701 698 fossil_exit(1); 699 } 700 atexit( fossil_atexit ); -> 701 aCommand[idx].xFunc(); 702 fossil_exit(0); 703 /*NOT_REACHED*/ 704 return 0; (lldb)
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users