Bug 443364 - Meinproc5 issues multiple "I/O error" messages
Summary: Meinproc5 issues multiple "I/O error" messages
Status: REOPENED
Alias: None
Product: frameworks-kdoctools
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.85.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Documentation Editorial Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-05 19:48 UTC by David C. Bryant
Modified: 2023-10-22 22:14 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David C. Bryant 2021-10-05 19:48:58 UTC
SUMMARY
Program "meinproc5" sometimes terminates with a lot of strange I/O errors.

STEPS TO REPRODUCE
1. Open a terminal window and navigate to a documentation directory
2. Enter this command: meinproc5 index.docbook

OBSERVED RESULT
Here is some terminal output from 5 minutes ago.

davidb@localhost $ meinproc5 index.docbook
QIODevice::write (QFile, "index.html"): device not open
QIODevice::write (QFile, "introduction.html"): device not open
QIODevice::write (QFile, "five-minute-course.html"): device not open
QIODevice::write (QFile, "course-entering-todos.html"): device not open
QIODevice::write (QFile, "course-entering-journals.html"): device not open
QIODevice::write (QFile, "course-rescheduling-events.html"): device not open
QIODevice::write (QFile, "course-rescheduling-todos.html"): device not open
QIODevice::write (QFile, "course-conclusion.html"): device not open
QIODevice::write (QFile, "managing-data.html"): device not open
QIODevice::write (QFile, "managing-import-export.html"): device not open
QIODevice::write (QFile, "managing-get-hot-new-stuff.html"): device not open
QIODevice::write (QFile, "chapter-views-and-filters.html"): device not open
QIODevice::write (QFile, "categories-view.html"): device not open
QIODevice::write (QFile, "filters-view.html"): device not open
QIODevice::write (QFile, "search-view.html"): device not open
QIODevice::write (QFile, "entering-data.html"): device not open
QIODevice::write (QFile, "entering-data-to-do.html"): device not open
QIODevice::write (QFile, "entering-data-required-fields.html"): device not open
QIODevice::write (QFile, "group-scheduling.html"): device not open
QIODevice::write (QFile, "as-organizer.html"): device not open
QIODevice::write (QFile, "as-attendee.html"): device not open
QIODevice::write (QFile, "free-busy.html"): device not open
QIODevice::write (QFile, "examples.html"): device not open
QIODevice::write (QFile, "config.html"): device not open
QIODevice::write (QFile, "plugins-chapter.html"): device not open
QIODevice::write (QFile, "reference.html"): device not open
QIODevice::write (QFile, "other-features.html"): device not open
QIODevice::write (QFile, "other-features-drag-and-drop.html"): device not open
QIODevice::write (QFile, "faq.html"): device not open
QIODevice::write (QFile, "credits.html"): device not open
QIODevice::write (QFile, "glossary.html"): device not open

EXPECTED RESULT
I expect meinproc5 to run without errors. In this instance, it produced no html output at all; just a lot of error messages.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
I have learned that if I delete all the html output from a previous invocation of "meinproc5" from my working directory, the program wil (usually) run OK. But "meinproc5" never used to do this. It would delete the old html files automatically / overwrite them without prompting. I can work around this bug. But it's annoying, and wastes my time.
Comment 1 Luigi Toscano 2021-10-05 19:59:00 UTC
Does it always happen (I see a "sometimes") or does it always happen when existing html files are around? Without a precise reproducer it's quite difficult to understand what happens. I have never seen this error (not even now with Frameworks 5.86).
Comment 2 David C. Bryant 2021-10-05 22:24:53 UTC
No, it's nt consistent. It's one of those very inconvenient "intermittent" errors.

Just so you konow, Luigi, I recompiled the "kdoctools" package after this had happened a couple of times. After that, the problem recurred once. And then "meinproc5" started working correctly again. I have run the program nine times (without errors) since I first filed this bug report. If the problem recurs, I'll let you know. For now I consider it resolved.
Comment 3 David C. Bryant 2021-10-31 17:12:47 UTC
OK, I dug into this one some more. Here's what's going on.

1. Because of other problems (with Dolphin / Konqueror -- https://bugs.kde.org/show_bug.cgi?id=443259),  I devised a workaround that involved the creation of a second user account. I set up the working directory so that both User1 and User2 have read/write permissions.

2. This bug can be reproduced as follows: 
-- Set up a second user account.
-- Create a working directory that allows any user to have read/write access (use chmod, or Dolphin).
-- Clone a /docs directory into that working directory. The app doesn't matter, but I've been working on KOrganizer.
-- Log in as User1 and run meinproc5 index.docbook in the working directory.
-- Log out, then log in as User2. Run meinproc5 index.docbook against the working directory again. You will get the I/O errors.

I can work around this. And it only happens in the context of two users, both with r/w access to the directory in which the index.docbook file resides. If the existing .html files were created by the user who is currently logged in, meinproc5 overwrites the .html files with nary a whimper. But if the existing .html files were created by the other user, meinproc5 will not overwrite them, even though the file permissions say it's OK to do so.

I suspect the existing code implicitly assumes that only one user will ever be running meinproc5 in a particular working directory. The error message that is issued ("QIODevice::write (QFile, "index.html"): device not open") is not very informative. If there must be an error message in this context, it really ought to say something about file ownership. Better yet, meinproc5 should recognize that it has write access in the working directory, and overwrite the old files.
Comment 4 Jack 2021-10-31 17:25:19 UTC
Just to confirm - does the new user have write permissions on both the folder itself and to the existing files within?  As part of the workaround, you might want to try changing umask (to 0000?)  before running meinproc5 as the first user.  Or - can you just run meinproc5 as the new user?
Comment 5 Jack 2023-10-22 22:14:21 UTC
While I still have other issues with meinproc5, I haven't see any errors like this in recent memory.  David - Does it still occur for you?