A couple of days ago I shot a timelapse sequence of the sunset with the Sony a7s. I shot everything in speed priority mode so the camera gradually adjusts the aperture when it get's darker. It worked out fine except for some frames in the middle of the sequence: Those frames are overexposed although according to the EXIF data they have exactly the same settings (f/16, 10", ISO100) they have different exposure. I suspect that somehow the lens failed to stop down when told by the camera. What could be the reason? I was using a 17-40mm f4L by Canon adapted to E-mount by a Commlite adaptor, could that be the reason? Here are the two unedited images: The overexposed image doesn't show the lens spots that the correct one does and it has heavier chromatic aberration, so I think it was shot at f/4 despite the camera telling the lens to stop down to f/16. Is that a problem with the lens or does it have something to do with the adaptor?
With semiconductor electronics anything is possible. My guess, however, would be that the adapter you're using has been reverse engineered without access to Canon's proprietary information regarding exactly how their aperture control protocol works. You've likely discovered a bug in the firmware the adapter uses to translate the instructions from your Sony camera to the language understood by your Canon lens.
A quick google search leads to a few threads where similar issues have been experienced when using variously branded adapters with mostly older Canon EOS lenses. The EF 17-40mm f/4 L is a relatively old design, having been introduced in 2003. Other lenses commonly reported to have the same issue when using adapters with Sony E-mount cameras are the EF 50mm f/1.8 II (1990), EF 50mm f/1.4 (1993), EF 85mm f/1.8 (1992), etc. On the other hand, some users report successfully using the EF 28-135mm f/3.5-5.6 IS (1998) that predates the 17-40.
Quite often adapters must be initialized with camera and lens.
1) Turn on camera
2) Mount adapter
3) Turn camera off then back on
4) Mount lens
Same process is recommended for Metabones adapters to initialize the adapter.
I've taken thousands of photos using an EF 17-40mm f/4 L on Canon bodies and don't recall ever having had a case where the aperture appeared to have not stopped down properly. I've taken hundreds of thousands of photos with various other Canon lenses and don't recall ever having had a case where the aperture appeared to have not stopped down properly. The electronic aperture control used by the EOS system has, in my experience, been much more reliable and consistently accurate than previous mechanically linked apertures.
The last time I can recall having had a lens with an aperture not stopping down properly was with a Konica Hexanon 40mm f/1.8 sometime in the late 1980s or very early 1990s. I simply replaced it with a used Hexanon 50mm f/1.4 from B&H. Shortly after that I started using the all-electronic EOS system and have never looked back.