Glitch rendering shadows around objects

For a while now I’ve been experiencing the following shadow artifacts:

131053-ue_shadowbug2.jpg

/storage/temp/131054-ue_shadowbug3.jpg

I’m not sure when started to happen, but I began noticing it when I moved the project from Windows to Linux (UE 4.14). I didn’t give much importance to it because I tought it was a problem with the AMD drivers in Linux. Now I have switched back to Windows and I’m using UE 4.15.1, and although it is probably less noticeable than in Linux, it is still there.

It happens in the editor and in Standalone mode. I have tried changing the Anti-aliasing method (FXAA, TemporalAA and MSAA), rebuilding light, and enabling/disabling Motion Blur and Light Shafts. The only thing that seems to get rid of it is to disable shadows. I wasn’t able to reproduce the problem in a new level with fewer geometry so I’m not sure what setting might be causing the problem. Any idea of what could be causing this?

These are my lightmass settings:

GPU: AMD R9 380x
Driver version: 17.2.1
OS: Windows

Never mind! I’ve found the problem. The artifact appears when at the main directional light I set “Contact Shadow Length” to something different than 0. It seems that at some point I have changed that.

Now that I know what it is, it might be related to this bug: [UE-38768] Unreal Engine Issues and Bug Tracker (UE-38768)