Bug 16268 - OSError silently ignored in do_fetch
Summary: OSError silently ignored in do_fetch
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 5.0.19
Hardware: All Multiple
: Medium normal
Target Milestone: 6.1
Assignee: Anthony Squires
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-04-25 04:26 UTC by Anthony Squires
Modified: 2026-08-10 10:59 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Squires 2026-04-25 04:26:45 UTC
I encountered an issue during do_fetch where it silently failed due to an OSError being thrown and ignored. The task completed successfully but no file was downloaded and do_unpack subsequently failed. In my case it was Errno 36 but I think any OSError/IOError would encounter this.

Adding a "raise" on line 1934 of bitbake/lib/bb/fetch2/__init__.py resolved my issue and let me figure out the real error (that my filename was way too long).

```
 except IOError as e:
     if e.errno in [errno.ESTALE]:
         logger.error("Stale Error Observed %s." % u)
         raise ChecksumError("Stale Error Detected")
-
+    raise
 except BBFetchException as e:
```
ref:
https://git.yoctoproject.org/poky/tree/bitbake/lib/bb/fetch2/__init__.py?id=bdd2b0fee18c43597efc3493b9ac9ace9ccf7959#n1930

Happy to send a one-line patch if this is desired but figured a bug was a better place to start to provide context.
Comment 1 Richard Purdie 2026-04-28 16:37:21 UTC
Your fix looks correct to me, if you could submit a patch that would be appreciated, thanks!