Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Conversation

@mraleph
Copy link
Member

@mraleph mraleph commented Apr 16, 2019

Allows users to run flutter tools on old Mac's.

Fixes flutter/flutter#24916

…inary)

Allows users to run flutter tools on old Mac's.

Fixes flutter/flutter#24916
@mraleph mraleph requested review from a-siva and chinmaygarde April 16, 2019 15:10
@mraleph mraleph merged commit ce7b5c7 into flutter:master Apr 16, 2019
@mraleph mraleph deleted the lower-sse2-requirements branch April 16, 2019 19:55
@cpalanzo
Copy link

cpalanzo commented Apr 16, 2019

Sorry - I'm a bit of a newbie --- where can I download the ZIP for this updated code?
Basically can I download a zip - and unzip to the full Flutter SDK for MAC again?

@chinmaygarde
Copy link
Contributor

@cpalanzo This commit is being rolled into the engine in flutter/engine#8593. From there it will automatically get rolled into the framework once all tests pass. The commit messages made by the bots for such rolls say something like "Roll engine SHA1..SHA2 (n commits)". Once that happens, flutter upgrade should download the latest artifacts for you. This sort of a change to compiler flags is not typical and has to be rolled into a few repos. But it should finish propagating all the way to release but the end of the day today. Thanks for your patience.

@cpalanzo
Copy link

cpalanzo commented Apr 16, 2019

I can't use flutter upgrade - since my flutter install doesn't work (that's why I need this build).
I see this has been rolled in Master branch - but I can't download that as a zip? It is not in the dev build yet. I guess i have to clone this manually and trigger the SDK dependencies?
So this doesn't work... I did the following from the Flutter SDK release page / Master section:

git clone -b master https://github.com/flutter/flutter.git
--- seemed okay

./flutter/bin/flutter --version
resulted in Errors as follows:
`
===== CRASH =====
si_signo=Illegal instruction: 4(4), si_code=1, si_addr=0x103929da9

===== CRASH =====
si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0x1008
Aborting re-entrant request for stack trace.
./flutter/bin/flutter: line 42: 20438 Abort trap: 6 "$PUB" upgrade "$VERBOSITY"
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)
^Z
[1]+ Stopped ./flutter/bin/flutter --version`

@cpalanzo
Copy link

Since I can't use flutter upgrade - I tried again - pulling into a clean directory and using flutter to get dependencies - console log is below ( apologies - still a newbie at this...) but got a CRASH building the flutter tool....

iMac:FlutterProjects Charlie$ ls
iMac:FlutterProjects Charlie$ pwd
/Users/Charlie/FlutterProjects
iMac:FlutterProjects Charlie$  git clone -b master https://github.com/flutter/flutter.git
Cloning into 'flutter'...
remote: Enumerating objects: 75, done.
remote: Counting objects: 100% (75/75), done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 164640 (delta 31), reused 24 (delta 11), pack-reused 164565
Receiving objects: 100% (164640/164640), 58.84 MiB | 6.03 MiB/s, done.
Resolving deltas: 100% (125644/125644), done.
Checking out files: 100% (3453/3453), done.
iMac:FlutterProjects Charlie$ echo $PATH
/Users/Charlie/FlutterProjects/flutter/bin:/Users/Charlie/.nvm/versions/node/v7.10.1/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/Charlie/.rvm/gems/ruby-2.2.1/bin:/Users/Charlie/.rvm/gems/ruby-2.2.1@global/bin:/Users/Charlie/.rvm/rubies/ruby-2.2.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS:/Users/Charlie/.rvm/bin
iMac:FlutterProjects Charlie$ pwd
/Users/Charlie/FlutterProjects
iMac:FlutterProjects Charlie$ flutter
Downloading Dart SDK from Flutter engine 7af3f2b9e7c5f911ef4b1cff37aa5088fad6dbf5...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  119M  100  119M    0     0  2515k      0  0:00:48  0:00:48 --:--:-- 2408k
Building flutter tool...

===== CRASH =====
si_signo=Illegal instruction: 4(4), si_code=1, si_addr=0x1033d2da9

===== CRASH =====
si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0x1008
Aborting re-entrant request for stack trace.
/Users/Charlie/FlutterProjects/flutter/bin/flutter: line 42: 21200 Abort trap: 6           "$PUB" upgrade "$VERBOSITY"
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)

===== CRASH =====
si_signo=Illegal instruction: 4(4), si_code=1, si_addr=0x1002e2da9

===== CRASH =====
si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0x1008
Aborting re-entrant request for stack trace.
/Users/Charlie/FlutterProjects/flutter/bin/flutter: line 42: 21206 Abort trap: 6           "$PUB" upgrade "$VERBOSITY"
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (8 tries left)
^Z
[1]+  Stopped                 flutter
iMac:FlutterProjects Charlie$ 


@mraleph
Copy link
Member Author

mraleph commented Apr 17, 2019

@cpalanzo

So this configuration change did not fix the whole problem. Can you enable crash dumps by doing

$ ulimit -c unlimited 
$ flutter

$ ls -al /cores/
# There should be few core.PID files in /cores directory

Then you should be able to load these cores either in gdb or lldb:

$ lldb bin/cache/dart-sdk/bin/dart -c core.xyz

Here you would need to disassemble around the address where crash occurred, e.g. you look at

===== CRASH =====
si_signo=Illegal instruction: 4(4), si_code=1, si_addr=ABCDEF

and you disassemble around ABCDEF

(lldb) di -s ABCDEF-0x50 -e ABCDEF+0x50

@cpalanzo
Copy link

cpalanzo commented Apr 17, 2019

  • I am traveling and do not have time to learn how to disassemble them - and in fact - don't really have the knowledge to do that effectively - I'm hoping you can help.
  • I will check tomorrow when I return and see if I can dissassemble or post that here..

@cpalanzo
Copy link

Actually I took a moment and did the following - not sure at all how to interpret this:

Last login: Wed Apr 17 08:10:59 on ttys000
npm WARN npm npm does not support Node.js v7.10.1
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11, 12.
npm WARN npm You can find the latest version at https://nodejs.org/
iMac:~ Charlie$ echo $PATH
/Users/Charlie/FlutterProjects/flutter/bin:/Users/Charlie/.nvm/versions/node/v7.10.1/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/Charlie/.rvm/gems/ruby-2.2.1/bin:/Users/Charlie/.rvm/gems/ruby-2.2.1@global/bin:/Users/Charlie/.rvm/rubies/ruby-2.2.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS:/Users/Charlie/.rvm/bin
iMac:~ Charlie$ ulimit -c unlimited
iMac:~ Charlie$ flutter
Building flutter tool...

===== CRASH =====
si_signo=Illegal instruction: 4(4), si_code=1, si_addr=0x10b5a7da9

===== CRASH =====
si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0x1008
Aborting re-entrant request for stack trace.
^Z
[1]+  Stopped                 flutter
iMac:~ Charlie$ cd ..
iMac:Users Charlie$ cd ..
iMac:/ Charlie$ cd cores
iMac:cores Charlie$ ls
core.15923  core.15939  core.24865  core.27201
iMac:cores Charlie$ ls -l
total 5304208
-r--------  1 Charlie  admin   641M Apr 15 11:50 core.15923
-r--------  1 Charlie  admin   641M Apr 15 11:50 core.15939
-r--------  1 Charlie  admin   659M Apr 17 07:33 core.24865
-r--------  1 Charlie  admin   650M Apr 17 08:12 core.27201
iMac:cores Charlie$ lldb core.27201
(lldb) target create "core.27201"
warning: (x86_64) /cores/core.27201 load command 67 LC_SEGMENT_64 has a fileoff + filesize (0x28994000) that extends beyond the end of the file (0x28993000), the segment will be truncated to match
warning: (x86_64) /cores/core.27201 load command 68 LC_SEGMENT_64 has a fileoff (0x28994000) that extends beyond the end of the file (0x28993000), ignoring this section
Current executable set to 'core.27201' (x86_64).
(lldb) di -s 0x10b5a7d00 -e 0x10b5a7dff
core.27201[0x10b5a7d00]: addb   %cl, -0x9(%rcx,%rcx,4)
core.27201[0x10b5a7d04]: callq  0x10b90f3c0
core.27201[0x10b5a7d09]: testl  %eax, %eax
core.27201[0x10b5a7d0b]: je     0x10b5a7d2e
core.27201[0x10b5a7d0d]: leaq   0x37d7ad(%rip), %rsi
core.27201[0x10b5a7d14]: movl   $0x3, %edx
core.27201[0x10b5a7d19]: movq   %r14, %rdi
core.27201[0x10b5a7d1c]: callq  0x10b90f3c0
core.27201[0x10b5a7d21]: testl  %eax, %eax
core.27201[0x10b5a7d23]: je     0x10b5a7d2e
core.27201[0x10b5a7d25]: leaq   0x37ee1c(%rip), %rax
core.27201[0x10b5a7d2c]: jmp    0x10b5a7d39
core.27201[0x10b5a7d2e]: addq   $0x3, %r14
core.27201[0x10b5a7d32]: leaq   0x37542a(%rip), %rax
core.27201[0x10b5a7d39]: movq   %rax, -0x38(%rbp)
core.27201[0x10b5a7d3d]: subq   %r14, %r15
core.27201[0x10b5a7d40]: leaq   0x1(%r15), %rdi
core.27201[0x10b5a7d44]: movq   %rdi, -0x40(%rbp)
core.27201[0x10b5a7d48]: callq  0x10b90efac
core.27201[0x10b5a7d4d]: movq   %rax, %rbx
core.27201[0x10b5a7d50]: movq   %rax, %rdi
core.27201[0x10b5a7d53]: movq   %r14, %rsi
core.27201[0x10b5a7d56]: movq   %r15, %rdx
core.27201[0x10b5a7d59]: callq  0x10b90f3c6
core.27201[0x10b5a7d5e]: movb   $0x0, (%rbx,%r15)
core.27201[0x10b5a7d63]: movq   %rbx, %rdi
core.27201[0x10b5a7d66]: callq  0x10b90f3ba
core.27201[0x10b5a7d6b]: testq  %rax, %rax
core.27201[0x10b5a7d6e]: jle    0x10b5a8020
core.27201[0x10b5a7d74]: cmpq   $0x10, %rax
core.27201[0x10b5a7d78]: jae    0x10b5a7d8b
core.27201[0x10b5a7d7a]: xorl   %ecx, %ecx
core.27201[0x10b5a7d7c]: cmpb   $0x2d, (%rbx,%rcx)
core.27201[0x10b5a7d80]: je     0x10b5a8017
core.27201[0x10b5a7d86]: jmp    0x10b5a801b
core.27201[0x10b5a7d8b]: movq   %rax, %rcx
core.27201[0x10b5a7d8e]: andq   $-0x10, %rcx
core.27201[0x10b5a7d92]: xorl   %edx, %edx
core.27201[0x10b5a7d94]: movdqa 0x12d06c4(%rip), %xmm0
core.27201[0x10b5a7d9c]: nopl   (%rax)
core.27201[0x10b5a7da0]: movdqu (%rbx,%rdx), %xmm1
core.27201[0x10b5a7da5]: pcmpeqb %xmm0, %xmm1
core.27201[0x10b5a7da9]: pextrb $0x0, %xmm1, %esi
core.27201[0x10b5a7daf]: testb  $0x1, %sil
core.27201[0x10b5a7db3]: jne    0x10b5a7ec0
core.27201[0x10b5a7db9]: pextrb $0x1, %xmm1, %esi
core.27201[0x10b5a7dbf]: testb  $0x1, %sil
core.27201[0x10b5a7dc3]: jne    0x10b5a7ed4
core.27201[0x10b5a7dc9]: pextrb $0x2, %xmm1, %esi
core.27201[0x10b5a7dcf]: testb  $0x1, %sil
core.27201[0x10b5a7dd3]: jne    0x10b5a7ee9
core.27201[0x10b5a7dd9]: pextrb $0x3, %xmm1, %esi
core.27201[0x10b5a7ddf]: testb  $0x1, %sil
core.27201[0x10b5a7de3]: jne    0x10b5a7efe
core.27201[0x10b5a7de9]: pextrb $0x4, %xmm1, %esi
core.27201[0x10b5a7def]: testb  $0x1, %sil
core.27201[0x10b5a7df3]: jne    0x10b5a7f13
core.27201[0x10b5a7df9]: pextrb $0x5, %xmm1, %esi
(lldb) 

@mraleph
Copy link
Member Author

mraleph commented Apr 18, 2019

I looked into it a bit more, contrary to what I thought passing -msse2 does not lower minimal SSE support level to 2. After some research I figured out the correct way to do it

#235

@brianlinuxing
Copy link

I've got the same problem and followed it through from the previous bug report (#235)

Has a fix been rolled out yet? Or is there manual fix?

My setup:

iMac (mid-2007), El Capitan
Core 2 Duo

Flutter installation kit:

flutter_macos_v1.5.4-hotfix.2-stable

Errors:

flutter doctor -v

===== CRASH =====
si_signo=Illegal instruction: 4(4), si_code=1, si_addr=0x10ab89639

===== CRASH =====
si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0x1008
Aborting re-entrant request for stack trace.
/opt/flutter/bin/flutter: line 183: 19728 Abort trap: 6 "$DART" $FLUTTER_TOOL_ARGS "$SNAPSHOT_PATH" "$@"

@mraleph
Copy link
Member Author

mraleph commented Jun 7, 2019

@brianlinuxing flutter_macos_v1.5.4-hotfix.2-stable does not contain correct fix unfortunately. You will need to use newer version of flutter.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flutter doctor fails due to segmentation fault (OSX 10.11.6 El Capitan)

4 participants