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

[REG] ICE when compiling on Windows with ldc-master #3702

Closed
Geod24 opened this issue Apr 18, 2021 · 8 comments
Closed

[REG] ICE when compiling on Windows with ldc-master #3702

Geod24 opened this issue Apr 18, 2021 · 8 comments

Comments

@Geod24
Copy link
Contributor

Geod24 commented Apr 18, 2021

When building agora on Windows I got greeted with:

agora ~master: building configuration "unittest"...
Type 'FlashValidatorAPI' implements more than one interface: make sure the one describing the REST server is the first one
Type 'FlashFullNodeAPI' implements more than one interface: make sure the one describing the REST server is the first one
0x00007FFB37EF9689 (0x0000FF657F4378FF 0x0000000000000000 0x0000000000000008 0x00007FF7B0EFE183), RaiseException() + 0x69 bytes(s)
0x00007FF7B0ED4558 (0x0000000000000000 0x0000000000000020 0x0000000000100000 0x0000000000000020)
0x00007FF7B0ED089F (0x0000000000000011 0x000001FE53C17FC8 0x000001FE53C17FB0 0x000001FE43F7AC10)
0x00007FF7B0ECCA4D (0x000000B7179FCA01 0x00007FF7AF82F5A8 0x0000000000000000 0x0000000000000000)
0x00007FF7ADF486F5 (0x000000B7179FC744 0x000001FE53C17F90 0x0000000000000000 0x000000000000002A)
0x00007FF7AF82F5A8 (0x000001FE53AA9870 0x0000000000000000 0x0000000000000000 0x0000000000000000)
0x00007FF7AFDC6AB1 (0x0000E88E04A1D90E 0x000001FE3B336EC0 0x000001FE3B38C080 0x0000E88E04A1DB8E)
0x00007FF7B0577A82 (0x0000000000000108 0x000001FE00000000 0x0000E88E04A1DBBE 0x0000000000000000)
0x00007FF7B0576A1E (0x000001FCF61C0000 0x00007FFB3BA4C37A 0x0000000000000008 0x000000B7179FCA50)
0x00007FF7B057618B (0x000001FDD98ED930 0x000001FE3B4027E0 0x000001FE3B38C010 0x000001FDEBF3DFF0)
0x00007FF7B0576BF9 (0x000001FDEBF3DFF0 0x00007FF7B057936D 0x000001FDF7524AD0 0x000001FDEBF3DFF0)
0x00007FF7B056F07B (0x0000000400000001 0x000001FE00000000 0x000001FE201AECA0 0x00007FF7AE07AB38)
0x00007FF7AF87A1A1 (0x000001FDD98EDA30 0x000001FE1E764620 0x000001FE207A2A70 0x00007FF7B26C10AE)
0x00007FF7AE5C3D1B (0x000000B7179FD220 0x000001FCF81A2EF0 0x0000000000000000 0x000000B7179FD220)
0x00007FF7AE5BD9D3 (0x003600380078002D 0x002D003400000000 0x005F00630064006C 0x0032002E00310076)
0x00007FF7B0E7221D (0x000001FE1B1840F0 0x000001FCF61C0000 0x000001FCF60C0EA0 0x0000000000008000)
0x00007FF7B0E6F79C (0x000000B7179FE198 0x00007FF7AE02B47E 0x000000B7179FDC70 0x0000000000000017)
0x00007FF7B0E40EB8 (0x000001FCF7F07BF0 0x0000000000000000 0x000001FCF60C11A0 0x0000000000008000)
0x00007FF7B0D9AA6B (0x000000B700000101 0x0000000000000000 0x000000000000000B 0x000001FCF82CF800)
0x00007FF7B0D2C11A (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x00007FFB3BA499E0)
0x00007FF7B0D96FDF (0x000001FC02000002 0x006D002D0000000D 0x0000000000000020 0x0000000000000004)
0x00007FF7B0EAF189 (0x0000000000000001 0x00007FFB37F17456 0x00007FF7B226EB83 0x0000000000000000)
0x00007FF7B0EAEE1D (0x000001FCF61D1BE8 0x0000000000000000 0x000000B7179FF520 0x0000000000000001)
0x00007FF7B0EAF114 (0x0000000000000002 0x000001FCF61D1BD0 0x000001FCF61D1BF2 0x000001FC00000000)
0x00007FF7B0D926B0 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000)
0x00007FF7B0EDAA94 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000)
0x00007FFB38E07974 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), BaseThreadInitThunk() + 0x14 bytes(s)
0x00007FFB3BA9A2D1 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000)
ldc2 failed with exit code -529697949.
Error: Process completed with exit code 2.

After merging, we got the following:

agora ~v0.x.x: building configuration "unittest"...
Type 'FlashValidatorAPI' implements more than one interface: make sure the one describing the REST server is the first one
Type 'FlashFullNodeAPI' implements more than one interface: make sure the one describing the REST server is the first one
 #0 0x00007ffbf7cf9689 (C:\Windows\System32\KERNELBASE.dll+0x39689)
 #1 0x00007ff793d04558 (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2f94558)
 #2 0x00007ff793d0089f (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2f9089f)
 #3 0x00007ff793cfca4d (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2f8ca4d)
 #4 0x00007ff790d786f5 (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x86f5)
 #5 0x00007ff79265f736 (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x18ef736)
 #6 0x00007ff792bf63a4 (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x1e863a4)
 #7 0x00007ff792bf67f6 (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x1e867f6)
 #8 0x00007ff7933a7a82 (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2637a82)
 #9 0x00007ff7933a6a1e (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2636a1e)
#10 0x00007ff7933a618b (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x263618b)
#11 0x00007ff7933a6bf9 (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2636bf9)
#12 0x00007ff79339f07b (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x262f07b)
#13 0x00007ff7926aa1a1 (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x193a1a1)
#14 0x00007ff7913f3d1b (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x683d1b)
#15 0x00007ff7913ed9d3 (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x67d9d3)
#16 0x00007ff793ca221d (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2f3221d)
#17 0x00007ff793c9f79c (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2f2f79c)
#18 0x00007ff793c70eb8 (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2f00eb8)
#19 0x00007ff793bcaa6b (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2e5aa6b)
#20 0x00007ff793b5c11a (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2dec11a)
#21 0x00007ff793bc6fdf (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2e56fdf)
#22 0x00007ff793cdf189 (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2f6f189)
#23 0x00007ff793cdee1d (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2f6ee1d)
#24 0x00007ff793cdf114 (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2f6f114)
#25 0x00007ff793bc26b0 (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2e526b0)
#26 0x00007ff793d0aa94 (C:\hostedtoolcache\windows\dc\ldc2-e6deb6c6\x64\ldc2-e6deb6c6-windows-multilib\bin\ldc2.exe+0x2f9aa94)
#27 0x00007ffbf8a27974 (C:\Windows\System32\KERNEL32.DLL+0x17974)
#28 0x00007ffbfb83a2d1 (C:\Windows\SYSTEM32\ntdll.dll+0x5a2d1)
ldc2 failed with exit code -529697949.

I don't have a Windows at hand so I can't reduce. Build steps are here. ldc-1.25 compiles fine, and 1.26 beta did last I tried.

@kinke
Copy link
Member

kinke commented Apr 19, 2021

Thx for the report, almost certainly something that crept in with #3698.

I don't have a Windows at hand so I can't reduce.

[-mtriple=x86_64-windows-msvc if linking isn't required].

@Geod24
Copy link
Contributor Author

Geod24 commented Apr 19, 2021

[-mtriple=x86_64-windows-msvc if linking isn't required].

Well the dependency to Vibe.d trips it:

agora 0.3.0+commit.26.gcea0c8f27: building configuration "server"...
submodules/eventcore/source/eventcore/drivers/posix/cfrunloop.d(17,7): Error: undefined identifier KqueueEventLoopBase
submodules/eventcore/source/eventcore/drivers/posix/cfrunloop.d(20,23): Error: undefined identifier CFFileDescriptorRef
submodules/eventcore/source/eventcore/drivers/posix/cfrunloop.d(21,22): Error: undefined identifier CFRunLoopSourceRef
submodules/eventcore/source/eventcore/drivers/posix/cfrunloop.d(38,16): Error: function eventcore.drivers.posix.cfrunloop.CFRunLoopEventLoop.doProcessEvents does not override any function
submodules/eventcore/source/eventcore/drivers/posix/cfrunloop.d(75,16): Error: function eventcore.drivers.posix.cfrunloop.CFRunLoopEventLoop.dispose does not override any function
submodules/eventcore/source/eventcore/drivers/posix/cfrunloop.d(84,32): Error: undefined identifier CFFileDescriptorRef
submodules/eventcore/source/eventcore/drivers/posix/cfrunloop.d(84,32): Error: undefined identifier CFOptionFlags
submodules/eventcore/source/eventcore/drivers/posix/cfrunloop.d(15,30): Error: template instance PosixEventDriver!CFRunLoopEventLoop template PosixEventDriver is not defined
Unrecognised C++ runtime library 'vcruntime140'

Because dub detects the platform and use a specific configuration based on that.

@kinke
Copy link
Member

kinke commented Apr 23, 2021

Can't reproduce with dub --compiler=C:\LDC\ninja-ldc\bin\ldc2.exe -c unittest -b unittest using a fresh LDC master build:

agora 0.5.0+commit.12.g41f5ab7c: building configuration "unittest"...
Type 'FlashValidatorAPI' implements more than one interface: make sure the one describing the REST server is the first one
Type 'FlashFullNodeAPI' implements more than one interface: make sure the one describing the REST server is the first one
Linking...
LINK : fatal error LNK1181: cannot open input file 'sqlite3.lib'
Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\link.exe failed with status: 1181
C:\LDC\ninja-ldc\bin\ldc2.exe failed with exit code 1.

@kinke
Copy link
Member

kinke commented Apr 23, 2021

I've also tried the latest CI build, same result with C:\LDC\ldc2-e6deb6c6-windows-x64\bin\dub.exe -c unittest -b unittest.

@kinke
Copy link
Member

kinke commented Apr 23, 2021

The ldc2 process compiling agora itself requires more than 7 GB of memory; insufficient memory for the CI box perhaps?

@Geod24
Copy link
Contributor Author

Geod24 commented Apr 23, 2021

The ldc2 process compiling agora itself requires more than 7 GB of memory; insufficient memory for the CI box perhaps?

Could be it, but we haven't had that problem before. If it triggers reliably with master and not the latest release, that hints at a performance regression. I will look more into it with your hindsight in mind.

@kinke
Copy link
Member

kinke commented Apr 23, 2021

Master has 2 commits more than v1.26.0-beta1, with one just affecting LLVM 12 and thus not the CI build. And the other little commit is from the PR linked above, which should only result in some additional allocas and not require any significant additional memory.

@Geod24
Copy link
Contributor Author

Geod24 commented Apr 26, 2021

Looks like we're seeing it with v1.25.1 too now, and it's probably just because we are indeed going over the limit. So closing as it's not an LDC bug. Thanks for looking into this @kinke !

@Geod24 Geod24 closed this as completed Apr 26, 2021
AndrejMitrovic added a commit to AndrejMitrovic/agora that referenced this issue Apr 27, 2021
See ldc-developers/ldc#3702
for more information. Build disabled
until workaround / fix in place.
AndrejMitrovic added a commit to AndrejMitrovic/agora that referenced this issue Apr 27, 2021
See ldc-developers/ldc#3702
for more information. Build disabled
until workaround / fix in place.
AndrejMitrovic added a commit to AndrejMitrovic/agora that referenced this issue Apr 27, 2021
See ldc-developers/ldc#3702
for more information. Build disabled
until workaround / fix in place.
AndrejMitrovic added a commit to AndrejMitrovic/agora that referenced this issue Apr 27, 2021
See ldc-developers/ldc#3702
for more information. Build disabled
until workaround / fix in place.
AndrejMitrovic added a commit to AndrejMitrovic/agora that referenced this issue Apr 29, 2021
See ldc-developers/ldc#3702
for more information. Build disabled
until workaround / fix in place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants