I investigated this problem and came up with a solution which I think is
sensible.  I submitted the fix as a pull-request to upstream, which can
be seen here:

https://github.com/phpmyadmin/sql-parser/pull/312

I was not able to pinpoint the exact reason this problem manifests
itself only on s390x, but in theory it could also happen in other
architectures, because it's an issue with the way the code deals with
reading input from stdin while marking it as non-blocking as well.

The approach I decided to take was to rewrite the function that reads
input and use stream_select (which is just a wrapper for select(2)) but
keep stdin as blocking.  Then, with the help of select's timeout
mechanism, we're still able to not block while reading input.

At the time of this writing, upstream, hasn't had the chance to review
the approach yet.  However, because of the upcoming feature freeze, I
think it's OK for us to go ahead and apply this patch to unblock
phpmyadmin-sql-parser and other packages in the proposed queue.

I'm attaching a debdiff with the proposed fix.  There's also a PPA with
the build here:

https://launchpad.net/~sergiodj/+archive/ubuntu/phpmyadmin-sql-parser-
ftbfs

Last, but not least, I ran autopkgtest and everything passes.

** Patch added: "fix-ftbfs-autopkgtest-non-blocking-stdin.patch"
   
https://bugs.launchpad.net/phpmyadmin-sql-parser/+bug/1890341/+attachment/5404959/+files/fix-ftbfs-autopkgtest-non-blocking-stdin.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1890341

Title:
  Intermittent autopkgtest failure with testStdinPipe (s390x)

To manage notifications about this bug go to:
https://bugs.launchpad.net/phpmyadmin-sql-parser/+bug/1890341/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to