summaryrefslogtreecommitdiff
path: root/doc/bugs/windows_port_-_git_annex_add_hangs_when_adding_17_files_at_once_or_more_.mdwn
blob: 50f020b192be5eafc4f6c11b349b9a590e5db089 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
### Please describe the problem.
git annex add hangs on the windows port when adding many files at once. It seems like the magic number is 17. 17 and greater hangs

Running in debug, it hangs on this:

    [2013-06-14 13:59:46 Eastern Daylight Time] feed: git ["--git-dir=C:\\temp\\backup\\q10\\.git","--work-tree=C:\\temp\\backup\\q10","update-index","-z","--index-info"]


### What steps will reproduce the problem?

[[!format sh """
git init t17
cd t17
git annex init
for /l %a in (1,1,17) do @echo %a > %a.txt

git annex add .
add 1.txt (checksum...) ok
add 10.txt (checksum...) ok
add 11.txt (checksum...) ok
add 12.txt (checksum...) ok
add 13.txt (checksum...) ok
add 14.txt (checksum...) ok
add 15.txt (checksum...) ok
add 16.txt (checksum...) ok
add 17.txt (checksum...) ok
add 2.txt (checksum...) ok
add 3.txt (checksum...) ok
add 4.txt (checksum...) ok
add 5.txt (checksum...) ok
add 6.txt (checksum...) ok
add 7.txt (checksum...) ok
add 8.txt (checksum...) ok
add 9.txt (checksum...) ok
(Recording state in git...)

** gets stuck here

"""]]

### What version of git-annex are you using? On what operating system?

	git-annex version: 4.20130601-gc01f842
	build flags: Pairing Testsuite S3 WebDAV DNS
	local repository version: 4
	default repository version: 3
	supported repository versions: 3 4
	upgrade supported from repository versions: 2



### Please provide any additional information below.

[[!format sh """
# If you can, paste a complete transcript of the problem occurring here.
# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log

** 16 works fine
git init t16
cd t16
for /l %a in (1,1,16) do @echo %a > %a.txt
git annex init
git annex add .


** not 17
git init t18
cd t18
for /l %a in (1,1,17) do @echo %a > %a.txt

C:\temp\backup\t18>git annex init
init
  Detected a crippled filesystem.

  Enabling direct mode.

  Detected a filesystem without fifo support.

  Disabling ssh connection caching.
ok
(Recording state in git...)

C:\temp\backup\t18>git annex add . --debug
[2013-06-14 14:05:28 Eastern Daylight Time] read: git ["--git-dir=C:\\temp\\back
up\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","ls-files","--others","--excl
ude-standard","-z","--","."]
[2013-06-14 14:05:28 Eastern Daylight Time] read: git ["--git-dir=C:\\temp\\back
up\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","ls-files","--modified","-z",
"--","."]
[2013-06-14 14:05:28 Eastern Daylight Time] chat: git ["--git-dir=C:\\temp\\back
up\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","cat-file","--batch"]
add 1.txt [2013-06-14 14:05:28 Eastern Daylight Time] chat: git ["--git-dir=C:\\
temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","check-attr","-z","
--stdin","annex.backend","annex.numcopies","--"]
(checksum...) [2013-06-14 14:05:28 Eastern Daylight Time] chat: git ["--git-dir=
C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","cat-file","--b
atch"]
[2013-06-14 14:05:28 Eastern Daylight Time] chat: git ["--git-dir=C:\\temp\\back
up\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","hash-object","-t","blob","-w
","--stdin"]
ok
add 10.txt (checksum...) [2013-06-14 14:05:28 Eastern Daylight Time] chat: git [
"--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","has
h-object","-t","blob","-w","--stdin"]
ok
add 11.txt (checksum...) [2013-06-14 14:05:28 Eastern Daylight Time] chat: git [
"--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","has
h-object","-t","blob","-w","--stdin"]
ok
add 12.txt (checksum...) [2013-06-14 14:05:28 Eastern Daylight Time] chat: git [
"--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","has
h-object","-t","blob","-w","--stdin"]
ok
add 13.txt (checksum...) [2013-06-14 14:05:28 Eastern Daylight Time] chat: git [
"--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","has
h-object","-t","blob","-w","--stdin"]
ok
add 14.txt (checksum...) [2013-06-14 14:05:28 Eastern Daylight Time] chat: git [
"--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","has
h-object","-t","blob","-w","--stdin"]
ok
add 15.txt (checksum...) [2013-06-14 14:05:28 Eastern Daylight Time] chat: git [
"--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","has
h-object","-t","blob","-w","--stdin"]
ok
add 16.txt (checksum...) [2013-06-14 14:05:28 Eastern Daylight Time] chat: git [
"--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","has
h-object","-t","blob","-w","--stdin"]
ok
add 17.txt (checksum...) [2013-06-14 14:05:29 Eastern Daylight Time] chat: git [
"--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","has
h-object","-t","blob","-w","--stdin"]
ok
add 2.txt (checksum...) [2013-06-14 14:05:29 Eastern Daylight Time] chat: git ["
--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","hash
-object","-t","blob","-w","--stdin"]
ok
add 3.txt (checksum...) [2013-06-14 14:05:29 Eastern Daylight Time] chat: git ["
--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","hash
-object","-t","blob","-w","--stdin"]
ok
add 4.txt (checksum...) [2013-06-14 14:05:29 Eastern Daylight Time] chat: git ["
--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","hash
-object","-t","blob","-w","--stdin"]
ok
add 5.txt (checksum...) [2013-06-14 14:05:29 Eastern Daylight Time] chat: git ["
--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","hash
-object","-t","blob","-w","--stdin"]
ok
add 6.txt (checksum...) [2013-06-14 14:05:29 Eastern Daylight Time] chat: git ["
--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","hash
-object","-t","blob","-w","--stdin"]
ok
add 7.txt (checksum...) [2013-06-14 14:05:29 Eastern Daylight Time] chat: git ["
--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","hash
-object","-t","blob","-w","--stdin"]
ok
add 8.txt (checksum...) [2013-06-14 14:05:29 Eastern Daylight Time] chat: git ["
--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","hash
-object","-t","blob","-w","--stdin"]
ok
add 9.txt (checksum...) [2013-06-14 14:05:29 Eastern Daylight Time] chat: git ["
--git-dir=C:\\temp\\backup\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","hash
-object","-t","blob","-w","--stdin"]
ok
(Recording state in git...)
[2013-06-14 14:05:29 Eastern Daylight Time] feed: git ["--git-dir=C:\\temp\\back
up\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","update-index","-z","--index-
info"]
[2013-06-14 14:05:29 Eastern Daylight Time] chat: git ["--git-dir=C:\\temp\\back
up\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","hash-object","-w","--stdin-p
aths"]
[2013-06-14 14:05:29 Eastern Daylight Time] feed: git ["--git-dir=C:\\temp\\back
up\\t18\\.git","--work-tree=C:\\temp\\backup\\t18","update-index","-z","--index-
info"]


**gets stuck here and never finishes**


# End of transcript or log.
"""]]

> Reproduced this, and git update-index was in fact not hanging. 
> Instead, after that was done, it tried to stop the git hash-object
> process, and this hung. 
> 
> It seems that the use of runInteractiveProcess is at fault somehow,
> and I guess it must be due to it opening a pipe for stderr, which
> I don't need or want. Perhaps I need to ensure I read from that pipe,
> or windows keeps the process from terminating. (Unix would just toss the piped
> data away.)
> 
> That was the only place runInteractiveProcess was used, so I replaced
> it with an alternative that lets stderr be inherited. With this change,
> I have successfully added 1000 files to the annex in one go, with no
> hang. Provisionally [[done]]. --[[Joey]]