I write tests for my company's application. One of these tests tries to upgrade the application from a previous version to a new version to make sure nothing breaks. When I am installing an old version of the application, some weird stuff starts to happen.
Sometimes everything goes Okay, and nothing is wrong, other times when trying to install I get this message (company app name censored):
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/XXX-amd64_Packages
E: The package lists or status file could not be parsed or opened.
Using the solutions provided in the questions similar to this one (like this). Do not help, and the problem keeps repeating itself once it happens the first time.
This has led me to believe something is wrong on the apt server where the package is being created, but searching these errors yields no information on anything beyond the "fix" suggested in the question I linked, the only other source of information I could find also did not help (here):
So I am asking for information;
- What is the actual problem?
- What causes the problem?
- What can fix the problem?
- This is not a duplicate of: How do I fix a "Problem with MergeList" or "status file could not be parsed" error when trying to do an update? I am trying to find the root cause of the problem to prevent that error from occurring.
Edit: Thanks to this great answer by Florian Diesch I was able to solve my problem. By tracing back the reason to being an actual malformation in the package, I then started trying to find out why it was malformed. The reason was that as part of our vigorous testing, I was doing many simultaneous operations, and it seems the file was being written into twice which was causing it sometimes to have bad sections.