Skip to content

[Windows] fatal error: all goroutines are asleep - deadlock! #72

Description

@CarterLi
$ curlie example.com
HTTP/1.1 200 OK
Age: 171654
Cache-Control: max-age=604800
Content-Type: text/html; charset=UTF-8
Date: Sun, 14 May 2023 01:37:42 GMT
Etag: "3147526947+ident"
Expires: Sun, 21 May 2023 01:37:42 GMT
Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT
Server: ECS (sab/5785)
Vary: Accept-Encoding
X-Cache: HIT
Content-Length: 1256

fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan receive]:
os/exec.(*Cmd).Wait(0xc000148160)
        /opt/hostedtoolcache/go/1.17.13/x64/src/os/exec/exec.go:518 +0x188
os/exec.(*Cmd).Run(0xc000072120)
        /opt/hostedtoolcache/go/1.17.13/x64/src/os/exec/exec.go:341 +0x39
main.main()
        /home/runner/work/curlie/curlie/main.go:167 +0x1485

goroutine 6 [chan receive]:
main.(*blockedWrite).Write(0xc0000040d8, {0xc000086000, 0x4e8, 0x8000})
        /home/runner/work/curlie/curlie/main.go:199 +0x35
io.copyBuffer({0x92c500, 0xc0000040d8}, {0x92c560, 0xc000006050}, {0x0, 0x0, 0x0})
        /opt/hostedtoolcache/go/1.17.13/x64/src/io/io.go:425 +0x204
io.Copy(...)
        /opt/hostedtoolcache/go/1.17.13/x64/src/io/io.go:382
os/exec.(*Cmd).writerDescriptor.func1()
        /opt/hostedtoolcache/go/1.17.13/x64/src/os/exec/exec.go:311 +0x3a
os/exec.(*Cmd).Start.func1(0x0)
        /opt/hostedtoolcache/go/1.17.13/x64/src/os/exec/exec.go:444 +0x25
created by os/exec.(*Cmd).Start
        /opt/hostedtoolcache/go/1.17.13/x64/src/os/exec/exec.go:443 +0x965

while curl works fine

$ curl -v example.com
*   Trying 93.184.216.34:80...
* Connected to example.com (93.184.216.34) port 80 (#0)
> GET / HTTP/1.1
> Host: example.com
> User-Agent: curl/8.0.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Age: 79461
< Cache-Control: max-age=604800
< Content-Type: text/html; charset=UTF-8
< Date: Sun, 14 May 2023 01:38:50 GMT
< Etag: "3147526947"
< Expires: Sun, 21 May 2023 01:38:50 GMT
< Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT
< Server: ECS (sab/5751)
< Vary: Accept-Encoding
< X-Cache: HIT
< Content-Length: 1256
<
<!doctype html>
<html>
<head>
    <title>Example Domain</title>

    <meta charset="utf-8" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <style type="text/css">
    body {
        background-color: #f0f0f2;
        margin: 0;
        padding: 0;
        font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

    }
    div {
        width: 600px;
        margin: 5em auto;
        padding: 2em;
        background-color: #fdfdff;
        border-radius: 0.5em;
        box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);
    }
    a:link, a:visited {
        color: #38488f;
        text-decoration: none;
    }
    @media (max-width: 700px) {
        div {
            margin: 0 auto;
            width: auto;
        }
    }
    </style>
</head>

<body>
<div>
    <h1>Example Domain</h1>
    <p>This domain is for use in illustrative examples in documents. You may use this
    domain in literature without prior coordination or asking for permission.</p>
    <p><a href="https://www.iana.org/domains/example">More information...</a></p>
</div>
</body>
</html>
* Connection #0 to host example.com left intact

Windows 11 (10.0.22624.1755), installed with scoop

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions