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

Analysis server crashes on recursive symlinks (possibly created by Flutter) #36919

Closed
CodeGather opened this issue May 10, 2019 · 10 comments
Closed
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@CodeGather
Copy link

Please review the below report for any information you do not wish to share and report to
https://github.com/dart-lang/sdk/issues/new

Exception from analysis server (running from VSCode / Dart Code)

What I was doing

(please describe what you were doing when this exception occurred)

Request

While responding to request: analysis.setAnalysisRoots

Versions

  • Flutter SDK 1.5.4-hotfix.2
  • Visual Studio Code 1.33.1
  • Dart Code 3.0.1

Analyzer Info

The analyzer was launched using the arguments:

/softSdk/flutter/bin/cache/dart-sdk/bin/snapshots/analysis_server.dart.snapshot
--client-id=Dart-Code.dart-code
--client-version=3.0.1

Exception

FileSystemException(path=/work/Project/flutter/fluwx-master/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/Flutter/App.framework/flutter_assets/packages/cupertino_icons/assets/Cuperti; message=Directory listing failed)

#0      _PhysicalFolder.getChildren (package:analyzer/file_system/physical_file_system.dart:334:7)
#1      _OverlayFolder.getChildren (package:analyzer/file_system/overlay_file_system.dart:334:10)
#2      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1144:32)
#3      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#4      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#5      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#6      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#7      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#8      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#9      ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#10     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#11     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#12     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#13     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#14     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#15     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#16     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#17     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#18     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#19     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#20     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#21     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#22     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#23     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#24     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#25     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#26     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#27     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#28     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#29     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#30     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#31     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#32     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#33     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#34     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#35     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#36     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#37     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#38     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#39     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#40     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#41     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#42     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#43     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#44     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#45     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#46     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#47     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#48     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#49     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#50     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#51     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#52     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#53     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#54     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#55     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#56     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#57     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#58     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#59     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#60     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#61     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#62     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#63     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#64     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#65     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#66     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#67     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#68     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#69     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#70     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#71     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#72     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#73     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#74     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#75     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#76     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#77     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#78     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#79     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#80     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#81     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#82     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#83     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#84     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#85     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#86     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#87     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#88     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#89     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#90     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#91     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#92     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#93     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#94     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#95     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#96     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#97     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#98     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#99     ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#100    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#101    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#102    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#103    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#104    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#105    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#106    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#107    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#108    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#109    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#110    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#111    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#112    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#113    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#114    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#115    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#116    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#117    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#118    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#119    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#120    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#121    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#122    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#123    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#124    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#125    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#126    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#127    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#128    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#129    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#130    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#131    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#132    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#133    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#134    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#135    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#136    ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1152:33)
#137    ContextManagerImpl._createContext (package:analysis_server/src/context_manager.dart:1158:25)
#138    ContextManagerImpl._createContexts (package:analysis_server/src/context_manager.dart:1191:16)
#139    ContextManagerImpl.setRoots (package:analysis_server/src/context_manager.dart:736:9)
#140    AnalysisServer.setAnalysisRoots (package:analysis_server/src/analysis_server.dart:521:22)
#141    AnalysisDomainHandler.setAnalysisRoots (package:analysis_server/src/domain_analysis.dart:390:14)
#142    AnalysisDomainHandler.handleRequest (package:analysis_server/src/domain_analysis.dart:324:16)
#143    AnalysisServer.handleRequest.<anonymous closure>.<anonymous closure> (package:analysis_server/src/analysis_server.dart:337:45)
#144    _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#145    AnalysisServer.handleRequest.<anonymous closure> (package:analysis_server/src/analysis_server.dart:333:50)
#146    _rootRun (dart:async/zone.dart:1124:13)
#147    _CustomZone.run (dart:async/zone.dart:1021:19)
#148    _runZoned (dart:async/zone.dart:1516:10)
#149    runZoned (dart:async/zone.dart:1500:12)
#150    AnalysisServer.handleRequest (package:analysis_server/src/analysis_server.dart:332:5)
#151    ByteStreamServerChannel._readRequest.<anonymous closure> (package:analysis_server/src/channel/byte_stream_channel.dart:174:16)
#152    _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#153    ByteStreamServerChannel._readRequest (package:analysis_server/src/channel/byte_stream_channel.dart:165:47)
#154    ByteStreamServerChannel.listen.<anonymous closure> (package:analysis_server/src/channel/byte_stream_channel.dart:110:26)
#155    _rootRunUnary (dart:async/zone.dart:1132:38)
#156    _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#157    _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#158    _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#159    _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#160    _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#161    _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#162    _StringAdapterSink.add (dart:convert/string_conversion.dart:236:11)
#163    _LineSplitterSink._addLines (dart:convert/line_splitter.dart:150:13)
#164    _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:125:5)
#165    StringConversionSinkMixin.add (dart:convert/string_conversion.dart:163:5)
#166    _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#167    _rootRunUnary (dart:async/zone.dart:1132:38)
#168    _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#169    _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#170    _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#171    _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#172    _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#173    _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#174    _StringAdapterSink.add (dart:convert/string_conversion.dart:236:11)
#175    _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:241:7)
#176    _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:312:20)
#177    _Utf8ConversionSink.add (dart:convert/string_conversion.dart:305:5)
#178    _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:72:18)
#179    _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#180    _rootRunUnary (dart:async/zone.dart:1132:38)
#181    _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#182    _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#183    _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#184    _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#185    _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#186    _StreamController._add (dart:async/stream_controller.dart:640:7)
#187    _StreamController.add (dart:async/stream_controller.dart:586:5)
#188    _Socket._onData (dart:io-patch/socket_patch.dart:1774:41)
#189    _rootRunUnary (dart:async/zone.dart:1136:13)
#190    _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#191    _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#192    _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#193    _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#194    _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#195    _StreamController._add (dart:async/stream_controller.dart:640:7)
#196    _StreamController.add (dart:async/stream_controller.dart:586:5)
#197    new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1323:33)
#198    _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:844:14)
#199    _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#200    _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#201    _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#202    _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)

Diagnostics requested after the error occurred are:

[
    {
        "name": "/work/Project/senkoo",
        "explicitFileCount": 0,
        "implicitFileCount": 0,
        "workItemQueueLength": 0,
        "cacheEntryExceptions": []
    },
    {
        "name": "/work/Project/python",
        "explicitFileCount": 0,
        "implicitFileCount": 0,
        "workItemQueueLength": 0,
        "cacheEntryExceptions": []
    },
    {
        "name": "/work/Project/flutter",
        "explicitFileCount": 1,
        "implicitFileCount": -1,
        "workItemQueueLength": 2,
        "cacheEntryExceptions": []
    }
]
@lrhn lrhn added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels May 10, 2019
@DanTup
Copy link
Collaborator

DanTup commented May 13, 2019

This paths seems to repeated repeatedly:

/work/Project/flutter/fluwx-master/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.symlinks/plugins/fluwx/example/ios/.

My guess is that there is a symlink that points back further up its own tree, making an infinite loop while following all the folders. If you remove the symlink does it stop?

@bwilkerson this looks a bit like Dart-Code/Dart-Code#1565. If we can't easily support symlinks, maybe we could detect this and send a server error with some info about the problem?

@bwilkerson
Copy link
Member

I don't know off-hand, how easy or hard it would be, but I know that we made a conscious decision to move away from symlinks when we moved from a packages directory (containing symlinks) to a .packages file. I don't know whether we want to start supporting symlinks more generally.

@stereotype441 @devoncarew for thoughts

@DanTup
Copy link
Collaborator

DanTup commented May 14, 2019

I think the concept of "supporting symlinks" is a little ambiguous. We're in some ways supporting them today, as we follow them, and if they don't loop, things work! However if they create loops, then we crash. Similarly, "not supporting" them could describe both deliberate skipping over them (eg. "you can't use them") as well as not doing any special handling of them.

I think there are potential issue in both cases (following them or not):

  • If we follow them (as we do), then loops cause crashes
  • If we don't follow them, we would break something that works today (putting a symlink to another folder that is not a loop)

I think the best we could do would be to raise a more obvious error. Maybe each time we enumerate a folder (I think this issue can only occur for folders) if it's a symlink, we resolve it and check whether that path is an ancestor (or otherwise in the set to analyze) and throw an error explaining we found a loop and providing the details of the symlink.

Whether it's worth the complexity, I don't know. It came up twice recently, but it doesn't seem like this has changed for a long time so my guess is it's not happening very often.

@CodeGather
Copy link
Author

CodeGather commented May 15, 2019

Thank you very much for your positive answers and help.

The problem has been solved. The reason for this problem is that I added a lot of projects using vscode. I guess it may be the conflict of dependencies between projects. I emptied the workspace of vscode and added an independent project to solve the problem.

@DanTup
Copy link
Collaborator

DanTup commented Jun 5, 2019

@bwilkerson @devoncarew this seems to be coming up a lot. It seems like something related to Flutter may be creating these symlink folders?

https://github.com/flutter/flutter/search?q=%22.symlinks%22&type=Code

I think we need to may need to do something (even if it's just skip folders named .symlinks?).

@DanTup DanTup reopened this Jun 5, 2019
@DanTup DanTup changed the title Exception from analysis server Analysis server crashes on recursive symlinks (possibly created by Flutter) Jun 5, 2019
@DanTup
Copy link
Collaborator

DanTup commented Jun 5, 2019

cc @dnfield - I saw your name on some symlinks code in Flutter, so maybe you understand why they're needed (and when they're created)?

@dnfield
Copy link
Contributor

dnfield commented Jun 5, 2019

Cocoapods uses symlinks, I believe after pod install. @jmagman is doing some Cocoapods related work right now and might have more details at front of mind than I do at the moment.

@devoncarew
Copy link
Member

devoncarew commented Jun 5, 2019

From the bug report, it looks like the recursion is happening here:

ContextManagerImpl._createContext.checkManifestFilesIn (package:analysis_server/src/context_manager.dart:1144:32)

and

package:analysis_server/src/context_manager.dart:1152

It looks like this recursion is happing during the AndroidManifest.xml check. This issue was addressed by a later code change - we no longer recurse into dot directories here. My guess is that the fix did not make it into the Flutter stable channel.

@keertip can you confirm?

@keertip
Copy link
Contributor

keertip commented Jun 5, 2019

The fix did not make it to the Flutter stable channel.

@DanTup
Copy link
Collaborator

DanTup commented Jun 6, 2019

Aha, I didn't realise this had been fixed (looks like 14d0949 is the fix). In that case I'll close this and advise those seeing it to switch to a different branch in the meantime. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

7 participants