guix-publish gets ERROR when serve gtk+.

  • Done
  • quality assurance status badge
Details
4 participants
  • Thompson, David
  • ???
  • ???
  • Ludovic Courtès
Owner
unassigned
Submitted by
???
Severity
normal
?
(address . bug-guix@gnu.org)
3c53a2735955b91d3849beb2e2159947@openmailbox.org
can't substitute gtk+ from a guix-publish server, it fails with:

GET /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2
In web/server/http.scm:
117:27 1 (http-read #<<http-server> socket: #<input-output: so...>)
In unknown file:
0 (peek-char #<input-output: socket 13>)
ERROR: In procedure fport_fill_input: Connection reset by peer
L
L
Ludovic Courtès wrote on 12 Nov 2015 21:28
(name . ???)(address . iyzsong@openmailbox.org)
87a8qjufn3.fsf@gnu.org
??? <iyzsong@openmailbox.org> skribis:

Toggle quote (9 lines)
> can't substitute gtk+ from a guix-publish server, it fails with:
>
> GET /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2
> In web/server/http.scm:
> 117:27 1 (http-read #<<http-server> socket: #<input-output: so...>)
> In unknown file:
> 0 (peek-char #<input-output: socket 13>)
> ERROR: In procedure fport_fill_input: Connection reset by peer

This means that the *client* closed the connection. Could you check
what happened on the client side?

It may be more convenient to use wget on the client-side to reproduce
the problem.

TIA,
Ludo’.
?
(address . ludo@gnu.org)
6d1b7b7f7b8c2f50ef10335c11d212fd@openmailbox.org
On 2015-11-13 04:28, ludo@gnu.org wrote:
Toggle quote (17 lines)
> ??? <iyzsong@openmailbox.org> skribis:
>
>> can't substitute gtk+ from a guix-publish server, it fails with:
>>
>> GET /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2
>> In web/server/http.scm:
>> 117:27 1 (http-read #<<http-server> socket: #<input-output:
>> so...>)
>> In unknown file:
>> 0 (peek-char #<input-output: socket 13>)
>> ERROR: In procedure fport_fill_input: Connection reset by peer
>
> This means that the *client* closed the connection. Could you check
> what happened on the client side?
>
> It may be more convenient to use wget on the client-side to reproduce
> the problem.
DEBUG output created by Wget 1.16.3 on linux-gnu.

URI encoding = 'ANSI_X3.4-1968'
converted 'http://localhost:8080/nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk%2B-3.18.2'(ANSI_X3.4-1968) - 'http://localhost:8080/nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2' (UTF-8)
Caching localhost => ::1 127.0.0.1
Closed fd 3
Created socket 3.
Releasing 0x0000000001448300 (new refcount 1).

---request begin---
GET /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2 HTTP/1.1
User-Agent: Wget/1.16.3 (linux-gnu)
Accept: */*
Accept-Encoding: identity
Host: localhost:8080
Connection: Keep-Alive
---request end---

---response begin---
HTTP/1.1 404 Not Found
Content-Length: 69
Content-Type: text/plain;charset=utf-8
---response end---
Registered socket 3 for persistent reuse.
URI content encoding = 'utf-8'
Skipping 69 bytes of body: [Resource not found: /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2] done.
Reusing fd 3.

---request begin---
GET /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk%2B-3.18.2 HTTP/1.1
User-Agent: Wget/1.16.3 (linux-gnu)
Accept: */*
Accept-Encoding: identity
Host: localhost:8080
Connection: Keep-Alive
---request end---

---response begin---
HTTP/1.1 200 OK
Content-Type: application/x-nix-archive;charset=ISO-8859-1
---response end---
URI content encoding = 'ISO-8859-1'
DEBUG output created by Wget 1.16.3 on linux-gnu.

URI encoding = 'ANSI_X3.4-1968'
converted 'http://localhost:8080/nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2'(ANSI_X3.4-1968) - 'http://localhost:8080/nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2' (UTF-8)
Caching localhost => ::1 127.0.0.1
Closed fd 3
Created socket 3.
Releasing 0x000000000218f260 (new refcount 1).

---request begin---
GET /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2 HTTP/1.1
User-Agent: Wget/1.16.3 (linux-gnu)
Accept: */*
Accept-Encoding: identity
Host: localhost:8080
Connection: Keep-Alive
---request end---

---response begin---
HTTP/1.1 404 Not Found
Content-Length: 69
Content-Type: text/plain;charset=utf-8
---response end---
Registered socket 3 for persistent reuse.
URI content encoding = 'utf-8'
Skipping 69 bytes of body: [Resource not found: /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2] done.
L
L
Ludovic Courtès wrote on 13 Nov 2015 09:07
(name . ???)(address . iyzsong@openmailbox.org)
8737waqq4x.fsf@gnu.org
??? <iyzsong@openmailbox.org> skribis:

Toggle quote (20 lines)
> ---request begin---
> GET /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2 HTTP/1.1
> User-Agent: Wget/1.16.3 (linux-gnu)
> Accept: */*
> Accept-Encoding: identity
> Host: localhost:8080
> Connection: Keep-Alive
>
> ---request end---
>
> ---response begin---
> HTTP/1.1 404 Not Found
> Content-Length: 69
> Content-Type: text/plain;charset=utf-8
>
> ---response end---
> Registered socket 3 for persistent reuse.
> URI content encoding = 'utf-8'
> Skipping 69 bytes of body: [Resource not found: /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2] done.

Here ‘guix publish’ returns 404, presumably because
/gnu/store/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2 is not on disk
or not valid.

Is this correct?

return? It should also return 404, otherwise there’s an inconsistency.

Thanks,
Ludo’.
?
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 21888@debbugs.gnu.org)
8737wanlzc.fsf@member.fsf.org
ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (27 lines)
> ??? <iyzsong@openmailbox.org> skribis:
>
>> ---request begin---
>> GET /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2 HTTP/1.1
>> User-Agent: Wget/1.16.3 (linux-gnu)
>> Accept: */*
>> Accept-Encoding: identity
>> Host: localhost:8080
>> Connection: Keep-Alive
>>
>> ---request end---
>>
>> ---response begin---
>> HTTP/1.1 404 Not Found
>> Content-Length: 69
>> Content-Type: text/plain;charset=utf-8
>>
>> ---response end---
>> Registered socket 3 for persistent reuse.
>> URI content encoding = 'utf-8'
>> Skipping 69 bytes of body: [Resource not found: /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2] done.
>
> Here ‘guix publish’ returns 404, presumably because
> /gnu/store/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2 is not on disk
> or not valid.
>
> Is this correct?
No, the gtk+ item is valid, and replace 'gtk+' with 'gtk%2B' in the url
will make wget download it happily.
Toggle quote (4 lines)
>
> Now, does http://localhost/1dlz1am0qmj1579f5p6j5cvfx9l2aw50.narinfo
> return? It should also return 404, otherwise there’s an
> inconsistency.
for the narinfo, It does return 200.
L
L
Ludovic Courtès wrote on 13 Nov 2015 14:29
(name . ???)(address . iyzsong@member.fsf.org)
87io56ni2t.fsf@gnu.org
iyzsong@member.fsf.org (???) skribis:

Toggle quote (32 lines)
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> ??? <iyzsong@openmailbox.org> skribis:
>>
>>> ---request begin---
>>> GET /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2 HTTP/1.1
>>> User-Agent: Wget/1.16.3 (linux-gnu)
>>> Accept: */*
>>> Accept-Encoding: identity
>>> Host: localhost:8080
>>> Connection: Keep-Alive
>>>
>>> ---request end---
>>>
>>> ---response begin---
>>> HTTP/1.1 404 Not Found
>>> Content-Length: 69
>>> Content-Type: text/plain;charset=utf-8
>>>
>>> ---response end---
>>> Registered socket 3 for persistent reuse.
>>> URI content encoding = 'utf-8'
>>> Skipping 69 bytes of body: [Resource not found: /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2] done.
>>
>> Here ‘guix publish’ returns 404, presumably because
>> /gnu/store/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2 is not on disk
>> or not valid.
>>
>> Is this correct?
> No, the gtk+ item is valid, and replace 'gtk+' with 'gtk%2B' in the url
> will make wget download it happily.

Oooh, I see. We’re missing a decoding phase here. David? :-)

Ludo’.
T
T
Thompson, David wrote on 13 Nov 2015 15:17
Re: bug#21888: guix-publish gets ERROR when serve gtk+.
(name . Ludovic Courtès)(address . ludo@gnu.org)
CAJ=RwfZMMhmztqeWU_SWr1pbOH0tAd=1Ec-6z6K8EfcPp+vU=w@mail.gmail.com
On Fri, Nov 13, 2015 at 8:29 AM, Ludovic Courtès <ludo@gnu.org> wrote:
Toggle quote (36 lines)
> iyzsong@member.fsf.org (???) skribis:
>
>> ludo@gnu.org (Ludovic Courtès) writes:
>>
>>> ??? <iyzsong@openmailbox.org> skribis:
>>>
>>>> ---request begin---
>>>> GET /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2 HTTP/1.1
>>>> User-Agent: Wget/1.16.3 (linux-gnu)
>>>> Accept: */*
>>>> Accept-Encoding: identity
>>>> Host: localhost:8080
>>>> Connection: Keep-Alive
>>>>
>>>> ---request end---
>>>>
>>>> ---response begin---
>>>> HTTP/1.1 404 Not Found
>>>> Content-Length: 69
>>>> Content-Type: text/plain;charset=utf-8
>>>>
>>>> ---response end---
>>>> Registered socket 3 for persistent reuse.
>>>> URI content encoding = 'utf-8'
>>>> Skipping 69 bytes of body: [Resource not found: /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2] done.
>>>
>>> Here ‘guix publish’ returns 404, presumably because
>>> /gnu/store/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2 is not on disk
>>> or not valid.
>>>
>>> Is this correct?
>> No, the gtk+ item is valid, and replace 'gtk+' with 'gtk%2B' in the url
>> will make wget download it happily.
>
> Oooh, I see. We’re missing a decoding phase here. David? :-)

I don't know when I'll be able to fix it, but it sounds easy. I'll
post a patch when I have time.

Thanks,

- Dave
L
L
Ludovic Courtès wrote on 8 Jun 2016 19:09
Re: bug#21888: guix-publish gets ERROR when serve gtk+.
(name . ???)(address . iyzsong@member.fsf.org)(address . 21888-done@debbugs.gnu.org)
87twh3d2vj.fsf@gnu.org
iyzsong@member.fsf.org (???) skribis:

Toggle quote (32 lines)
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> ??? <iyzsong@openmailbox.org> skribis:
>>
>>> ---request begin---
>>> GET /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2 HTTP/1.1
>>> User-Agent: Wget/1.16.3 (linux-gnu)
>>> Accept: */*
>>> Accept-Encoding: identity
>>> Host: localhost:8080
>>> Connection: Keep-Alive
>>>
>>> ---request end---
>>>
>>> ---response begin---
>>> HTTP/1.1 404 Not Found
>>> Content-Length: 69
>>> Content-Type: text/plain;charset=utf-8
>>>
>>> ---response end---
>>> Registered socket 3 for persistent reuse.
>>> URI content encoding = 'utf-8'
>>> Skipping 69 bytes of body: [Resource not found: /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2] done.
>>
>> Here ‘guix publish’ returns 404, presumably because
>> /gnu/store/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2 is not on disk
>> or not valid.
>>
>> Is this correct?
> No, the gtk+ item is valid, and replace 'gtk+' with 'gtk%2B' in the url
> will make wget download it happily.

‘guix publish’ correctly decodes URIs in ‘request-path-components’, but
‘uri-decode’ does this:

Toggle snippet (7 lines)
scheme@(guile-user)> ,use(web uri)
scheme@(guile-user)> (uri-decode "/gtk+")
$12 = "/gtk "
scheme@(guile-user)> (string-ref $12 4)
$13 = #\space

I think that ‘uri-decode’ is right, and that Wget is wrong when it fails
to replace ‘+’ with ‘%2B’.

Regardless, the problem is that the faulty /nar/…-gtk+ URI comes from a
.narinfo generated by ‘guix publish’ itself. The fix is for ‘guix
publish’ to properly percent-encode it in the narinfo.

Done in 93961f02987cf738d116cc85cc32d97c2a488222.

Thanks,
Ludo’.
Closed
?