Here is what I got (hope I do it right):

$gdb --args fossil sync
Reading symbols from fossil...done.
(gdb) b http_ssl.c:394
Breakpoint 1 at 0x61187: file ./src/http_ssl.c, line 394.
(gdb) r
Starting program: /usr/bin/fossil sync
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Sync with https://johnfo...@asm32.info/fossil/repo/asmbb

Breakpoint 1, ssl_open (pUrlData=0x555555a60c08 <g+456>) at ./src/http_ssl.c:394
394         g.zIpAddr = mprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
(gdb) p ip
$1 = (const unsigned char *) 0x555555bb5c40 "\002"
(gdb) n
397       X509_free(cert);
(gdb) p g.zIpAddr
$2 = 0x0
(gdb) p g.zIpAddr
$3 = 0x0
(gdb) n
394         g.zIpAddr = mprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
(gdb) p g.zIpAddr
$4 = 0x0
(gdb) n
397       X509_free(cert);
(gdb) p g.zIpAddr
$5 = 0x555555c14130 "2.0.1.187"
(gdb) 


On Sat, 16 Sep 2017 11:29:43 -0500
Andy Goth <andrew.m.g...@gmail.com> wrote:

> Do you have gdb installed?
> 
> First, ensure you're using a recent version of Fossil, 2.2 or newer.
> 
> Run:
> 
> gdb --args fossil sync [any extra arguments go here]
> b http_ssl.c:394
> r
> 
> The sync will begin, then will be interrupted immediately before running
> the requested line of code.
> 
> Type "p ip" to print the ip array, though it might be formatted kind of
> funny due to being a character array. Then type "n" to execute the line of
> code, then type "p g.zIpAddr" to print the properly formatted IP address.
> 
> With that done, you can continue the sync by typing "c". Or you can abandon
> it by typing "q".
> 
> Report back with what you find.
> 
> On Fri, Sep 15, 2017 at 3:22 PM, Dewey Hylton <dewey.hyl...@gmail.com>
> wrote:
> 
> > Sadly, I do not know how to do such a thing as I am not a developer. The
> > concept is not foreign to me as I have a bit of experience with python, so
> > I'll give it a shot starting with Google. Pointers to get me on the right
> > track would be welcomed.
> >
> > > On Sep 15, 2017, at 3:58 PM, Richard Hipp <d...@sqlite.org> wrote:
> > >
> > >> On 9/15/17, Dewey Hylton <dewey.hyl...@gmail.com> wrote:
> > >> just for completeness ... i verified that i am seeing the same address
> > >> during a commit:
> > >>
> > >> Autosync:  https://redacted
> > >> Round-trips: 1   Artifacts sent: 0  received: 0
> > >> Pull done, sent: 390  received: 994  ip: 2.0.1.187
> > >> New_Version: 906246b7cd7e5fec91c69502981582bdbfc0a89e
> > >> Autosync:  https://redacted
> > >> Round-trips: 1   Artifacts sent: 2  received: 0
> > >> Sync done, sent: 1344  received: 1045  ip: 2.0.1.187
> > >
> > > Please rerun in a debugger with a breakpoint on this line:
> > >
> > >    https://www.fossil-scm.org/fossil/artifact/91aa0e52?ln=394
> > >
> > > And let me know if that is where g.zIpAddr is getting set and why it
> > > is being set to the wrong IP address.
> > >
> > >>
> > >>
> > >> i suppose the environment variables don't matter at this point, but
> > this is
> > >> what i see:
> > >>
> > >> uid=10080, gid=10080
> > >> g.zBaseURL = https://redacted
> > >> g.zHttpsURL =
> > >> g.zTop = /fossil/ansible-ceph
> > >> g.zPath = test_env
> > >> g.userUid = 6
> > >> g.zLogin = redacted
> > >> g.isHuman = 1
> > >> capabilities = abcefghijklmnopqrstwz
> > >> g.zRepositoryName = /data/fossil/ansible-ceph.fossil
> > >> load_average() = 0.000001
> > >> ------------------------------
> > >> GATEWAY_INTERFACE = CGI/1.0
> > >> HTTP_ACCEPT_ENCODING = gzip, deflate, br
> > >> HTTP_HOST = redacted
> > >> HTTP_USER_AGENT = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0)
> > >> Gecko/20100101 Firefox/55.0
> > >> PATH_INFO = test_env
> > >> QUERY_STRING =
> > >> REMOTE_ADDR = 127.0.0.1
> > >> REQUEST_METHOD = GET
> > >> REQUEST_URI = /ansible-ceph/test_env
> > >> SCRIPT_NAME = /ansible-ceph
> > >>
> > >>> On Fri, Sep 15, 2017 at 3:32 PM Richard Hipp <d...@sqlite.org> wrote:
> > >>>
> > >>>> On 9/15/17, Richard Hipp <d...@sqlite.org> wrote:
> > >>>>
> > >>>> Perhaps Apache is setting the REMOTE_ADDR environment variable.  What
> > >>>> does https://asm32.info/fossil/repo/asmbb/test_env show for the
> > >>>> administrator?  (You have that page turned off for anonymous, so I
> > >>>> cannot see it.)
> > >>>
> > >>> Nevermind - the problem is on the client side, not on the server.  So
> > >>> it is not an Apache problem....  Not sure what might be causing
> > >>> that....
> > >>>
> > >>> --
> > >>> D. Richard Hipp
> > >>> d...@sqlite.org
> > >>> _______________________________________________
> > >>> fossil-users mailing list
> > >>> fossil-users@lists.fossil-scm.org
> > >>> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
> > >>>
> > >>
> > >
> > >
> > > --
> > > D. Richard Hipp
> > > d...@sqlite.org
> > > _______________________________________________
> > > fossil-users mailing list
> > > fossil-users@lists.fossil-scm.org
> > > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
> > _______________________________________________
> > fossil-users mailing list
> > fossil-users@lists.fossil-scm.org
> > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
> >
> 
> 
> 
> -- 
> Andy Goth | <andrew.m.goth/at/gmail/dot/com>


-- 
http://fresh.flatassembler.net
http://asm32.info
John Found <johnfo...@asm32.info>
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to