Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion fail: Trying to read from a previously fclose()'d resource (Windows) #79

Open
Bilge opened this issue May 18, 2021 · 3 comments

Comments

@Bilge
Copy link

Bilge commented May 18, 2021

When trying to do a simple HTTP request with HttpClient, I invariable receive a DnsException thrown by Amp\Dns\Rfc1035StubResolver:197, which is part of a MultiReasonException containing two such exceptions, whose previous exception is an AssertionError from byte-stream\lib\ResourceInputStream.php:135 where an assertion containing the following message fails:

Trying to read from a previously fclose()'d resource. Do NOT manually fclose() resources the loop still has a reference to.

Libraries

amphp/amp                             v2.5.2
amphp/beanstalk                       v0.3.2
amphp/byte-stream                     v1.8.1
amphp/cache                           v1.4.0
amphp/dns                             v1.2.3
amphp/hpack                           v3.1.0
amphp/http                            v1.6.3
amphp/http-client                     v4.5.5
amphp/http-client-cookies             v1.1.0
amphp/parallel                        v1.4.0
amphp/parser                          v1.0.0
amphp/postgres                        v1.3.3
amphp/process                         v1.1.1
amphp/serialization                   v1.0.0
amphp/socket                          v1.1.3
amphp/sql                             v1.0.1
amphp/sql-common                      v1.1.2
amphp/sync                            v1.4.0
amphp/uri                             v0.1.4
amphp/windows-registry                v0.3.3
@Bilge
Copy link
Author

Bilge commented May 20, 2021

Turns out rebooting Windows "fixed" this, but every time I hibernate and wake from sleep, it fails again. This never used to happen, so I guess a recent Windows 10 update terminally broke this, but again, only after putting the computer to sleep via hibernate.

@kelunik
Copy link
Member

kelunik commented May 20, 2021

@Bilge: Please try running https://github.com/amphp/windows-registry/blob/9be2c13bc44970d89572f9e0746969283dfa355a/examples/dns.php before and after hibernate.

@Bilge
Copy link
Author

Bilge commented May 20, 2021

After hibernation (Amp DNS is broken)

Found nameservers: 192.168.1.1:53

Note: The above appears to be an IP assigned to VirtualBox Host-Only Ethernet Adapter #4.

After reboot (Amp DNS is working)

Found nameservers: 188.172.144.120:53, 141.0.144.64:53

These are nameservers assigned by my ISP to my Wi-Fi adapter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants