amphp / dns

Async DNS resolution for PHP based on Amp.
https://amphp.org/dns
MIT License
157 stars 32 forks source link

Random nameserver failures at start of program on Windows #74

Closed Bilge closed 6 years ago

Bilge commented 6 years ago

This problem typically only manifests itself when the program is first run, and occurs intermittently (not guaranteed to be reproducible). In my test output (sorry about formatting), I initiate two requests that fail immediately with DNS errors and never complete. Then, a third request is sent that completes successfully. All three requests are made to the same address (http://example.com). A further 50 requests are made to the same address that complete without error; only the first two (initiated at the same time, at the beginning) fail.

[2018-03-25 11:36:37] Async.DEBUG: Importing app #5206 (1/53)...
[2018-03-25 11:36:37] Async.DEBUG: Importing app #5207 (2/53)...
[2018-03-25 11:36:37] Async.ERROR: REQ 5206: Amp\Dns\ConfigException: At least one nameserver is required for a valid config in amphp\dns\lib\Config.php:13 Stack trace: #0 amphp\dns\lib\WindowsConfigLoader.php(78): Amp\Dns\Config->__construct(Array, Array) #1 [internal function]: Amp\Dns\WindowsConfigLoader->Amp\Dns\{closure}() #2 amphp\amp\lib\Coroutine.php(74): Generator->send(Array) #3 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, Array) #4 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Array) #5 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, '# Copyright (c)...') #6 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve('# Copyright (c)...') #7 amphp\amp\lib\Internal\ResolutionQueue.php(51): Amp\Coroutine->Amp\{closure}(NULL, '# Copyright (c)...') #8 amphp\amp\lib\Success.php(33): Amp\Internal\ResolutionQueue->__invoke(NULL, '# Copyright (c)...') #9 amphp\amp\lib\Internal\Placeholder.php(122): Amp\Success->onResolve(Object(Amp\Internal\ResolutionQueue)) #10 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Object(Amp\Success)) #11 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #12 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #13 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #14 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #15 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, 'dobe.com\r\n127.0...') #16 amphp\amp\lib\Deferred.php(41): class@anonymous->resolve('dobe.com\r\n127.0...') #17 amphp\byte-stream\lib\ResourceInputStream.php(100): Amp\Deferred->resolve('dobe.com\r\n127.0...') #18 amphp\amp\lib\Loop\Driver.php(112): Amp\ByteStream\ResourceInputStream::Amp\ByteStream\{closure}('bf', 'dobe.com\r\n127.0...') #19 amphp\amp\lib\Loop\Driver.php(70): Amp\Loop\Driver->tick() #20 amphp\amp\lib\Loop.php(76): Amp\Loop\Driver->run() #21 src\Import\ImportAsync.php(45): Amp\Loop::run(Object(Closure)) #22 src\Import\ImportAsyncCommand.php(26): ScriptFUSION\Steam250\Import\ImportAsync->import('applist.json') #23 symfony\console\Command\Command.php(252): ScriptFUSION\Steam250\Import\ImportAsyncCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #24 symfony\console\Application.php(946): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #25 symfony\console\Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(ScriptFUSION\Steam250\Import\ImportAsyncCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #26 symfony\console\Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #27 src\Application.php(31): Symfony\Component\Console\Application->run() #28 bin\250(9): ScriptFUSION\Steam250\Application->start() #29 {main}  Next Amp\Artax\DnsException: Resolving the specified domain failed: 'example.com' in amphp\artax\lib\DefaultClient.php:422 Stack trace: #0 amphp\artax\lib\DefaultClient.php(201): Amp\Artax\DefaultClient->doWrite(Object(Amp\Artax\Internal\RequestCycle)) #1 [internal function]: Amp\Artax\DefaultClient->Amp\Artax\{closure}() #2 amphp\amp\lib\Coroutine.php(71): Generator->throw(Object(Amp\Dns\ConfigException)) #3 amphp\amp\lib\Failure.php(26): Amp\Coroutine->Amp\{closure}(Object(Amp\Dns\ConfigException), NULL) #4 amphp\amp\lib\Internal\Placeholder.php(122): Amp\Failure->onResolve(Object(Closure)) #5 amphp\amp\lib\Internal\Placeholder.php(151): Amp\Coroutine->resolve(Object(Amp\Failure)) #6 amphp\amp\lib\Coroutine.php(93): Amp\Coroutine->fail(Object(Amp\Dns\ConfigException)) #7 amphp\amp\lib\Failure.php(26): Amp\Coroutine->Amp\{closure}(Object(Amp\Dns\ConfigException), NULL) #8 amphp\amp\lib\Internal\Placeholder.php(122): Amp\Failure->onResolve(Object(Closure)) #9 amphp\amp\lib\Internal\Placeholder.php(151): Amp\Coroutine->resolve(Object(Amp\Failure)) #10 amphp\amp\lib\Coroutine.php(93): Amp\Coroutine->fail(Object(Amp\Dns\ConfigException)) #11 amphp\amp\lib\Failure.php(26): Amp\Coroutine->Amp\{closure}(Object(Amp\Dns\ConfigException), NULL) #12 amphp\amp\lib\Internal\Placeholder.php(122): Amp\Failure->onResolve(Object(Closure)) #13 amphp\amp\lib\Internal\Placeholder.php(151): Amp\Coroutine->resolve(Object(Amp\Failure)) #14 amphp\amp\lib\Coroutine.php(93): Amp\Coroutine->fail(Object(Amp\Dns\ConfigException)) #15 amphp\amp\lib\Internal\ResolutionQueue.php(51): Amp\Coroutine->Amp\{closure}(Object(Amp\Dns\ConfigException), NULL) #16 amphp\amp\lib\Failure.php(26): Amp\Internal\ResolutionQueue->__invoke(Object(Amp\Dns\ConfigException), NULL) #17 amphp\amp\lib\Internal\Placeholder.php(122): Amp\Failure->onResolve(Object(Amp\Internal\ResolutionQueue)) #18 amphp\amp\lib\Internal\Placeholder.php(151): Amp\Coroutine->resolve(Object(Amp\Failure)) #19 amphp\amp\lib\Coroutine.php(93): Amp\Coroutine->fail(Object(Amp\Dns\ConfigException)) #20 amphp\amp\lib\Failure.php(26): Amp\Coroutine->Amp\{closure}(Object(Amp\Dns\ConfigException), NULL) #21 amphp\amp\lib\Internal\Placeholder.php(122): Amp\Failure->onResolve(Object(Closure)) #22 amphp\amp\lib\Internal\Placeholder.php(151): Amp\Coroutine->resolve(Object(Amp\Failure)) #23 amphp\amp\lib\Coroutine.php(93): Amp\Coroutine->fail(Object(Amp\Dns\ConfigException)) #24 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(Object(Amp\Dns\ConfigException), Array) #25 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Array) #26 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, '# Copyright (c)...') #27 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve('# Copyright (c)...') #28 amphp\amp\lib\Internal\ResolutionQueue.php(51): Amp\Coroutine->Amp\{closure}(NULL, '# Copyright (c)...') #29 amphp\amp\lib\Success.php(33): Amp\Internal\ResolutionQueue->__invoke(NULL, '# Copyright (c)...') #30 amphp\amp\lib\Internal\Placeholder.php(122): Amp\Success->onResolve(Object(Amp\Internal\ResolutionQueue)) #31 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Object(Amp\Success)) #32 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #33 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #34 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #35 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #36 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, 'dobe.com\r\n127.0...') #37 amphp\amp\lib\Deferred.php(41): class@anonymous->resolve('dobe.com\r\n127.0...') #38 amphp\byte-stream\lib\ResourceInputStream.php(100): Amp\Deferred->resolve('dobe.com\r\n127.0...') #39 amphp\amp\lib\Loop\Driver.php(112): Amp\ByteStream\ResourceInputStream::Amp\ByteStream\{closure}('bf', 'dobe.com\r\n127.0...') #40 amphp\amp\lib\Loop\Driver.php(70): Amp\Loop\Driver->tick() #41 amphp\amp\lib\Loop.php(76): Amp\Loop\Driver->run() #42 src\Import\ImportAsync.php(45): Amp\Loop::run(Object(Closure)) #43 src\Import\ImportAsyncCommand.php(26): ScriptFUSION\Steam250\Import\ImportAsync->import('applist.json') #44 symfony\console\Command\Command.php(252): ScriptFUSION\Steam250\Import\ImportAsyncCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #45 symfony\console\Application.php(946): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #46 symfony\console\Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(ScriptFUSION\Steam250\Import\ImportAsyncCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #47 symfony\console\Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #48 src\Application.php(31): Symfony\Component\Console\Application->run() #49 bin\250(9): ScriptFUSION\Steam250\Application->start() #50 {main} [] []
[2018-03-25 11:36:37] Async.ERROR: REQ 5207: Amp\Dns\ConfigException: At least one nameserver is required for a valid config in amphp\dns\lib\Config.php:13 Stack trace: #0 amphp\dns\lib\WindowsConfigLoader.php(78): Amp\Dns\Config->__construct(Array, Array) #1 [internal function]: Amp\Dns\WindowsConfigLoader->Amp\Dns\{closure}() #2 amphp\amp\lib\Coroutine.php(74): Generator->send(Array) #3 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, Array) #4 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Array) #5 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, '# Copyright (c)...') #6 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve('# Copyright (c)...') #7 amphp\amp\lib\Internal\ResolutionQueue.php(51): Amp\Coroutine->Amp\{closure}(NULL, '# Copyright (c)...') #8 amphp\amp\lib\Success.php(33): Amp\Internal\ResolutionQueue->__invoke(NULL, '# Copyright (c)...') #9 amphp\amp\lib\Internal\Placeholder.php(122): Amp\Success->onResolve(Object(Amp\Internal\ResolutionQueue)) #10 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Object(Amp\Success)) #11 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #12 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #13 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #14 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #15 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, 'dobe.com\r\n127.0...') #16 amphp\amp\lib\Deferred.php(41): class@anonymous->resolve('dobe.com\r\n127.0...') #17 amphp\byte-stream\lib\ResourceInputStream.php(100): Amp\Deferred->resolve('dobe.com\r\n127.0...') #18 amphp\amp\lib\Loop\Driver.php(112): Amp\ByteStream\ResourceInputStream::Amp\ByteStream\{closure}('bf', 'dobe.com\r\n127.0...') #19 amphp\amp\lib\Loop\Driver.php(70): Amp\Loop\Driver->tick() #20 amphp\amp\lib\Loop.php(76): Amp\Loop\Driver->run() #21 src\Import\ImportAsync.php(45): Amp\Loop::run(Object(Closure)) #22 src\Import\ImportAsyncCommand.php(26): ScriptFUSION\Steam250\Import\ImportAsync->import('applist.json') #23 symfony\console\Command\Command.php(252): ScriptFUSION\Steam250\Import\ImportAsyncCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #24 symfony\console\Application.php(946): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #25 symfony\console\Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(ScriptFUSION\Steam250\Import\ImportAsyncCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #26 symfony\console\Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #27 src\Application.php(31): Symfony\Component\Console\Application->run() #28 bin\250(9): ScriptFUSION\Steam250\Application->start() #29 {main}  Next Amp\Artax\DnsException: Resolving the specified domain failed: 'example.com' in amphp\artax\lib\DefaultClient.php:422 Stack trace: #0 amphp\artax\lib\DefaultClient.php(201): Amp\Artax\DefaultClient->doWrite(Object(Amp\Artax\Internal\RequestCycle)) #1 [internal function]: Amp\Artax\DefaultClient->Amp\Artax\{closure}() #2 amphp\amp\lib\Coroutine.php(71): Generator->throw(Object(Amp\Dns\ConfigException)) #3 amphp\amp\lib\Failure.php(26): Amp\Coroutine->Amp\{closure}(Object(Amp\Dns\ConfigException), NULL) #4 amphp\amp\lib\Internal\Placeholder.php(122): Amp\Failure->onResolve(Object(Closure)) #5 amphp\amp\lib\Internal\Placeholder.php(151): Amp\Coroutine->resolve(Object(Amp\Failure)) #6 amphp\amp\lib\Coroutine.php(93): Amp\Coroutine->fail(Object(Amp\Dns\ConfigException)) #7 amphp\amp\lib\Failure.php(26): Amp\Coroutine->Amp\{closure}(Object(Amp\Dns\ConfigException), NULL) #8 amphp\amp\lib\Internal\Placeholder.php(122): Amp\Failure->onResolve(Object(Closure)) #9 amphp\amp\lib\Internal\Placeholder.php(151): Amp\Coroutine->resolve(Object(Amp\Failure)) #10 amphp\amp\lib\Coroutine.php(93): Amp\Coroutine->fail(Object(Amp\Dns\ConfigException)) #11 amphp\amp\lib\Failure.php(26): Amp\Coroutine->Amp\{closure}(Object(Amp\Dns\ConfigException), NULL) #12 amphp\amp\lib\Internal\Placeholder.php(122): Amp\Failure->onResolve(Object(Closure)) #13 amphp\amp\lib\Internal\Placeholder.php(151): Amp\Coroutine->resolve(Object(Amp\Failure)) #14 amphp\amp\lib\Coroutine.php(93): Amp\Coroutine->fail(Object(Amp\Dns\ConfigException)) #15 amphp\amp\lib\Internal\ResolutionQueue.php(51): Amp\Coroutine->Amp\{closure}(Object(Amp\Dns\ConfigException), NULL) #16 amphp\amp\lib\Failure.php(26): Amp\Internal\ResolutionQueue->__invoke(Object(Amp\Dns\ConfigException), NULL) #17 amphp\amp\lib\Internal\Placeholder.php(122): Amp\Failure->onResolve(Object(Amp\Internal\ResolutionQueue)) #18 amphp\amp\lib\Internal\Placeholder.php(151): Amp\Coroutine->resolve(Object(Amp\Failure)) #19 amphp\amp\lib\Coroutine.php(93): Amp\Coroutine->fail(Object(Amp\Dns\ConfigException)) #20 amphp\amp\lib\Failure.php(26): Amp\Coroutine->Amp\{closure}(Object(Amp\Dns\ConfigException), NULL) #21 amphp\amp\lib\Internal\Placeholder.php(122): Amp\Failure->onResolve(Object(Closure)) #22 amphp\amp\lib\Internal\Placeholder.php(151): Amp\Coroutine->resolve(Object(Amp\Failure)) #23 amphp\amp\lib\Coroutine.php(93): Amp\Coroutine->fail(Object(Amp\Dns\ConfigException)) #24 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(Object(Amp\Dns\ConfigException), Array) #25 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Array) #26 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, '# Copyright (c)...') #27 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve('# Copyright (c)...') #28 amphp\amp\lib\Internal\ResolutionQueue.php(51): Amp\Coroutine->Amp\{closure}(NULL, '# Copyright (c)...') #29 amphp\amp\lib\Success.php(33): Amp\Internal\ResolutionQueue->__invoke(NULL, '# Copyright (c)...') #30 amphp\amp\lib\Internal\Placeholder.php(122): Amp\Success->onResolve(Object(Amp\Internal\ResolutionQueue)) #31 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Object(Amp\Success)) #32 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #33 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #34 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #35 amphp\amp\lib\Coroutine.php(79): Amp\Coroutine->resolve(Object(Amp\Parallel\Worker\Internal\TaskSuccess)) #36 amphp\amp\lib\Internal\Placeholder.php(127): Amp\Coroutine->Amp\{closure}(NULL, 'dobe.com\r\n127.0...') #37 amphp\amp\lib\Deferred.php(41): class@anonymous->resolve('dobe.com\r\n127.0...') #38 amphp\byte-stream\lib\ResourceInputStream.php(100): Amp\Deferred->resolve('dobe.com\r\n127.0...') #39 amphp\amp\lib\Loop\Driver.php(112): Amp\ByteStream\ResourceInputStream::Amp\ByteStream\{closure}('bf', 'dobe.com\r\n127.0...') #40 amphp\amp\lib\Loop\Driver.php(70): Amp\Loop\Driver->tick() #41 amphp\amp\lib\Loop.php(76): Amp\Loop\Driver->run() #42 src\Import\ImportAsync.php(45): Amp\Loop::run(Object(Closure)) #43 src\Import\ImportAsyncCommand.php(26): ScriptFUSION\Steam250\Import\ImportAsync->import('applist.json') #44 symfony\console\Command\Command.php(252): ScriptFUSION\Steam250\Import\ImportAsyncCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #45 symfony\console\Application.php(946): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #46 symfony\console\Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(ScriptFUSION\Steam250\Import\ImportAsyncCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #47 symfony\console\Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #48 src\Application.php(31): Symfony\Component\Console\Application->run() #49 bin\250(9): ScriptFUSION\Steam250\Application->start() #50 {main}
[2018-03-25 11:36:39] Async.DEBUG: Importing app #5208 (3/53)...
[2018-03-25 11:36:39] Async.DEBUG: Completed app #5208 (3/53)...
...

Sometimes, an additional notice is shown.

Notice: Undefined offset: 2 in vendor\amphp\windows-registry\lib\WindowsRegistry.php on line 31

Call Stack:
    0.0010     353968   1. {main}() bin\250:0
    0.0270    1491112   2. ScriptFUSION\Steam250\Application->start() bin\250:9
    0.0270    1491112   3. Symfony\Component\Console\Application->run() src\Application.php:31
    0.0610    1804952   4. Symfony\Component\Console\Application->doRun() vendor\symfony\console\Application.php:148
    0.0610    1804952   5. Symfony\Component\Console\Application->doRunCommand() vendor\symfony\console\Application.php:248
    0.0610    1804952   6. Symfony\Component\Console\Command\Command->run() vendor\symfony\console\Application.php:946
    0.0610    1810224   7. ScriptFUSION\Steam250\Import\ImportAsyncCommand->execute() vendor\symfony\console\Command\Command.php:252
    0.0810    2552648   8. ScriptFUSION\Steam250\Import\ImportAsync->import() src\Import\ImportAsyncCommand.php:26
    0.1930   34252344   9. Amp\Loop::run() src\Import\ImportAsync.php:45
    0.1940   34263496  10. Amp\Loop\Driver->run() vendor\amphp\amp\lib\Loop.php:76
    0.3100   35574336  11. Amp\Loop\Driver->tick() vendor\amphp\amp\lib\Loop\Driver.php:70
    0.3100   35573960  12. Amp\Loop\NativeDriver->dispatch() vendor\amphp\amp\lib\Loop\Driver.php:130
    0.3100   35573960  13. Amp\Loop\NativeDriver->selectStreams() vendor\amphp\amp\lib\Loop\NativeDriver.php:68
    0.3110   35574464  14. Amp\Process\Internal\Windows\SocketConnector->onReadableExitCode() vendor\amphp\amp\lib\Loop\NativeDriver.php:172
    0.3110   35574936  15. Amp\Deferred->resolve() vendor\amphp\process\lib\Internal\Windows\SocketConnector.php:297
    0.3110   35574936  16. {anonymous-class:vendor\amphp\amp\lib\Deferred.php:18-23}->resolve() vendor\amphp\amp\lib\Deferred.php:41
    0.3110   35581272  17. Amp\Coroutine->Amp\{closure}() vendor\amphp\amp\lib\Internal\Placeholder.php:127
    0.3140   35552936  18. Amp\Coroutine->resolve() vendor\amphp\amp\lib\Coroutine.php:79
    0.3140   35560664  19. Amp\Coroutine->Amp\{closure}() vendor\amphp\amp\lib\Internal\Placeholder.php:127
    0.3140   35560664  20. Generator->send() vendor\amphp\amp\lib\Coroutine.php:74
    0.3140   35560664  21. Amp\WindowsRegistry\WindowsRegistry->Amp\WindowsRegistry\{closure}() vendor\amphp\amp\lib\Coroutine.php:74
kelunik commented 6 years ago

Could you please modify vendor/amphp/windows-registry/lib/WindowsRegistry.php:19 and add a var_dump($key, $lines); there? What does that output?

Bilge commented 6 years ago

Before or after the yield?


Edit: I guess it would have to be after, otherwise $lines wouldn't be initialized.

bwoebi commented 6 years ago

Obviously after the yield: before, $lines isn't defined yet.

Bilge commented 6 years ago

vendor\amphp\windows-registry\lib\WindowsRegistry.php:20: string(69) "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" vendor\amphp\windows-registry\lib\WindowsRegistry.php:20: array(29) { [0] => string(0) "" [1] => string(69) "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" [2] => string(37) " ICSDomain REG_SZ mshome.net" [3] => string(48) " SyncDomainWithMembership REG_DWORD 0x1" [4] => string(4) " " [5] => string(70) " NV Hostname REG_SZ MYPCDataBasePath REG_SZ " [6] => string(71) " ForwardBroadcastsREG_EXPAND_SZ %SystemRoot%\System32\drivers\etc" [7] => string(18) " NameServer " [8] => string(83) " IPEnableRouter REG_DWORD 0x0 REG_DWORD 0x0REG_SZ MYPC" [9] => string(0) "" [10] => string(24) " Domain REG_SZ " [11] => string(70) " Hostname EnableICMPRedirect SearchList REG_SZ " [12] => string(47) " UseDomainNameDevolution REG_DWORD 0x1" [13] => string(33) "REG_DWORD REG_DWORD 0x1" [14] => string(43) " DeadGWDetectDefault REG_DWORD 0x1" [15] => string(52) " DontAddDefaultGatewayDefault REG_DWORD 0x0" [16] => string(16) " EnableWsd0x1" [17] => string(6) "0xfffe" [18] => string(42) " TcpTimedWaitDelay REG_DWORD 0x1e" [19] => string(54) " QualifyingDestinationThreshold REG_DWORD 0x3" [20] => string(55) " EnableIPAutoConfigurationLimits REG_DWORD 0x1" [21] => string(89) " MaxUserPort REG_DWORD DhcpNameServer REG_SZ 212.158.248.5 83.146.21.5" [22] => string(0) "" [23] => string(78) "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Adapters" [24] => string(91) "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DNSRegisteredAdapters" [25] => string(80) "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces" [26] => string(86) "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\PersistentRoutes" [27] => string(77) "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Winsock" [28] => string(0) "" }

Bilge commented 6 years ago

Worth noting that it picks up the DNS server from my router (212.158.248.5 and 83.146.21.5) but I've overridden them in the IPv4 settings of the network adapter, which I guess it does not pick up. No idea how reliable those ISP servers are normally because I don't use them.

image

kelunik commented 6 years ago

Strange that MaxUserPort REG_DWORD DhcpNameServer REG_SZ 212.158.248.5 83.146.21.5 ends up in a single line.

The notice probably comes from the NameServer key, that exists but is empty.

kelunik commented 6 years ago

We could read ...\Tcpip\Linkage\Route for the order of network interfaces. Currently we just traverse the registry in the order the keys are printed out.

Bilge commented 6 years ago

Any movement on this? At first I thought it might be rare, but I find it's occurring more than 50% of all program runs, which is starting to become quite a hassle.

Bilge commented 6 years ago

Zombie process wrappers are starting to become endemic...

image

Bilge commented 6 years ago

Never mind, I updated my dependencies and it doesn't happen any more, so the bug wasn't even in the DNS library, I guess.

  • Updating amphp/byte-stream (v1.2.4 => v1.3.0): Downloading (100%)
  • Updating amphp/parallel (v0.2.3 => v0.2.5): Downloading (100%)
  • Updating amphp/file (v0.3.0 => v0.3.1): Downloading (100%)
  • Updating amphp/socket (v0.10.5 => v0.10.8): Downloading (100%)