Fossil User Forum

Fossil leave .http files behind after sync with version 2.7
Login

Fossil leave .http files behind after sync with version 2.7

Fossil leave .http files behind after sync with version 2.7

(1) By anonymous on 2018-11-06 16:51:05 [source]

Hello all,

I've noticed fossil leaves these .http files after syncing when using a network file as the "host" repo. This has only started after upgrading to version 2.7. Is there a way to prevent this from happening? I'm usually having to go back and delete these artifacts later.

This doesn't seem to occur when syncing over http or SSH, only when using network/local files as the host repo.

Apologies if this is mentioned somewhere in the documentation. I searched but was unable to find any related information about these files.

Thanks

(2) By anonymous on 2018-11-07 17:02:05 in reply to 1 [link] [source]

Just confirming - I am seeing this as well.

But the problem is even more complicated - the connection sometimes (not always) stays alive for a longer time after the sync is done. I have a script, where I automatically create a file, add & commit it and leave autosync to backup it on local server. Some *http files stay sometimes "alive" for relatively long time, meaning not even a minute delay after the autosync was finished is not enough time to allow for removing the files through the same script. In other cases, you could remove the files immediately, without any wait time. Not sure why there are the differences, the file is almost exactly the same every time, give or take a line or two. Of course there is a way how to handle this, but it is still interesting to see the difference.

And to make it even more difficult - in few test repos I managed to commit the *http files using the addremove & commit commands :) It was a good way to trigger the user review of the global ignore options, if nothing else.

(3) By Richard Hipp (drh) on 2018-11-07 17:38:06 in reply to 1 [link] [source]

Can you provide more details about how to reproduce this problem?

Can I assume that this is only happening on Windows?

(4) By anonymous on 2018-11-07 20:19:57 in reply to 3 [link] [source]

OP here: I'm also seeing connections remain open even after syncing is done.

  • Yes, this is on Windows
  • I only seem to get this issue when I'm sycing to a local repo (same machine) or to a repo on a local network folder.
  • I do not have this issue when syncing to a repo via HTTP or SSH.

(5) By majka on 2018-11-08 08:46:17 in reply to 3 [link] [source]

For me, the same on Win10 64x, with the windows binaries (more often than not used from cygwin and from shell scripts).

The http files do come when syncing locally, using the file:// option. When I sync over http(s), nothing gets created or is visible.

Majka

(6) By majka on 2018-11-09 15:45:36 in reply to 3 [link] [source]

OK, I managed to get more details to this problem:

Not sure if the reason is the combination of x64 system (win 10) and the provided windows binary, or the binary itself.

I have succeeded to compile the x64 binary under cygwin from source in downloads. The http (and some more problems I had) are not there any more, the file:// protokol works as well as the http(s) one.

If anybody is interested, I could post the compiled exe. It would work without cygwin as well, it just needs the cygwin1.dll in the same folder.

(7) By Warren Young (wyoung) on 2018-11-09 18:59:42 in reply to 6 [link] [source]

A Cygwin build is significantly different from a native Windows build.

I'd expect your symptom to come back with a MinGW build under Cygwin. I hope you try it, because it would be diagnostic either way.

I've never build Fossil that way, but it looks like you need to edit win/Makefile.mingw to switch to the appropriate PREFIX for the MinGW cross-compilers you've got installed under Cygwin, then say

  $ make -f win/Makefile.mingw

If you don't edit Makefile.mingw first, it'll expect to find gcc and such in the PATH and end up finding the Cygwin versions.

Never mind the warning at the top of the file not to edit it. It's just saying that if you want your edits to be permanent across Fossil versions that you don't want to edit the generated version. For one-off changes like this, you can edit Makefile.mingw directly.

I have no idea what, if any, libraries you've got to install to make this work. I suspect you'll have to go out of your way to get an SSL-capable build working, for example.

(11) By majka on 2018-11-12 15:21:57 in reply to 7 [link] [source]

Unfortunatelly, I have to leave the win build to somebody else. I did try from latest source but didn't manage it.

(12) By anonymous on 2018-12-18 20:45:55 in reply to 11 [link] [source]

I managed to build fossil for myself using msys2 and mingw64.

I had to pass X64=1 as parameter, the PREFIX= is still empty.

Compiling on the windows command prompt doesn't work for me, i use MSYS2 bash prompt and the MINGW64 environment.

After adding LIB = -static i get no errors about missing libcrypto.DLLs

version info

This is fossil version 2.7 [19eaa3cae4] 2018-12-12 20:43:14 UTC
Compiled on Dec 18 2018 21:41:37 using mingw32 (64-bit)
Schema version 2015-01-24
Detected memory page size is 4096 bytes
zlib 1.2.11, loaded 1.2.11
hardened-SHA1 by Marc Stevens and Dan Shumow
SSL (OpenSSL 1.1.1  11 Sep 2018)
FOSSIL_ENABLE_LEGACY_MV_RM
MBCS_COMMAND_LINE
FOSSIL_STATIC_BUILD
SQLite 3.26.0 2018-12-01 12:34:55 bf8c1b2b7a
SQLITE_DEFAULT_FILE_FORMAT=4
SQLITE_DEFAULT_WAL_SYNCHRONOUS=1
SQLITE_ENABLE_DBSTAT_VTAB
SQLITE_ENABLE_FTS4
SQLITE_ENABLE_FTS5
SQLITE_ENABLE_JSON1
SQLITE_ENABLE_LOCKING_STYLE=0
SQLITE_ENABLE_STMTVTAB
SQLITE_LIKE_DOESNT_MATCH_BLOBS
SQLITE_MAX_EXPR_DEPTH=0
SQLITE_OMIT_DECLTYPE
SQLITE_OMIT_DEPRECATED
SQLITE_OMIT_GET_TABLE
SQLITE_OMIT_LOAD_EXTENSION
SQLITE_OMIT_PROGRESS_CALLBACK
SQLITE_OMIT_SHARED_CACHE
SQLITE_THREADSAFE=0
SQLITE_USE_ALLOCA

(8) By anonymous on 2018-11-09 21:02:54 in reply to 1 [link] [source]

I could replicate the issue using the downloaded v2.7 on win7 x64. Actually, both issues:

  1. 'fossil sync' from file:// cloned repo leaves .http files behind (at the repo's dir)
  2. 'fossil ui' for a repo that has a space in its path, throws a bad command message (breaking the path on the space and considering the right part of it as a command/exe

I haven't tried to debug it in depth, yet. But looking at some diffs between v2.6 and v2.7, here's some idea about unquoted file names, in src/winhttp.c

Possible?

(10) By anonymous on 2018-11-12 00:59:11 in reply to 8 [link] [source]

I managed to locate the reason for the issue 2) above, please see src/backoffice.c

Looks like the 'fossil backoffice -R <repo>' command is being spawned without enquoting the repo path (Windows-only). Thus, when the originating repo has a space in its path, a main.c:find_repository_option() would just take whatever part before the first space in the repo path. Then db.c:db_open_repository() predictably fails to open and throws the fossil_fatal().

(9) By Richard Hipp (drh) on 2018-11-10 14:23:48 in reply to 1 [link] [source]

I have made enhancements that should address this issue. Please rebuild your fossil.exe binary using the latest sources and let me know if you continue to see problems.

DETAILS:

When using the file:// method for accessing a local repository, Fossil actually fires up a separate process running "fossil httpd" on that local repository. See the code at https://www.fossil-scm.org/fossil/artifact/18a06326d071?ln=270-282. After it finishes processing the single HTTP request, it tries to start backoffice, which is what prevents the *.http files from being deleted. So, I modified the "http" command to disable backoffice if the --in option is present.