Bug#1003168: qemu-user-static: fails to run lyx user directory configuation

2022-12-02 Thread Michael Tokarev

Control: tag -1 + moreinfo

Ok. This one, just like the other bug of this theme (#999421), seems to
be fixed in current qemu (7.1) in bookworm.  At least I can't reproduce
it anymore, and our reproducer (lyx install) succeeds now.

Andreas, can you verify it is fixed for you?

From the previous info, it looks like some wrong syscall emulation has
been fixed since.

Thanks,

/mjt



Bug#1003168: qemu-user-static: fails to run lyx user directory configuation

2022-05-01 Thread Michael Tokarev

Control: tag -1 + confirmed
Control: found -1 1:7.0+dfsg-2

I just tried to reproduce this and was able to see the same issue
with qemu-user-static 7.0.

However the issues here is not with python failing.

lyx does not even try to run the python script.
It first spawns /bin/sh -c "python3 -tt -V" in a separate process,
which appears to be successful, next it searches python3 in the $PATH again
(from lyx itself, not from /bin/sh), next it does this:

1790405 faccessat(AT_FDCWD, "/usr/bin/python3", X_OK) = 0
1790405 waitid(P_PIDFD, 2147483647, 0x7fff2c60db70, WNOHANG|WEXITED, NULL) = -1 
EBADF (Bad file descriptor)
...
1790405 ppoll([{fd=-1}, {fd=7, events=POLLIN}, {fd=9, events=POLLIN}, {fd=57157936, events=POLLIN}], 4, {tv_sec=180, tv_nsec=0}, NULL, 8) = 3 ([{fd=7, 
revents=POLLHUP}, {fd=9, revents=POLLHUP}, {fd=57157936, revents=POLLNVAL}], left {tv_sec=179, tv_nsec=98170})

...
1790405 fcntl(57157936, F_GETFL)= -1 EBADF (Bad file descriptor)
1790405 read(57157936, 0x5503682800, 152) = -1 EBADF (Bad file descriptor)
1790405 write(3, "\1\0\0\0\0\0\0\0", 8) = 8
1790405 close(57157936) = -1 EBADF (Bad file descriptor)
...
1790405 write(2, "support/Systemcall.cpp", 22) = 22

(the last one comes from
 support/Systemcall.cpp (276): Systemcall: 'python3 -tt "/usr/share/lyx/configure.py" 
--binary-dir="/usr/bin/"' finished with exit code -1
message).

(fd 57157936 is not referenced anywhere except at this place).

I dunno where this fd 57157936 comes from.
And apparently this makes lyx confused.

/mjt



Bug#1003168: qemu-user-static: fails to run lyx user directory configuation

2022-04-30 Thread Michael Tokarev

Control: tag -1 + moreinfo

On Thu, 13 Jan 2022 16:00:26 +0100 Andreas Beckmann  wrote:

On 11/01/2022 08.25, Michael Tokarev wrote:
> 1. try qemu 6.2 (qemu-user-static is self-contained, more or less, so
>     it can be installed on earlier debian releases too)

same behavior :-(

> 2. try to figure out what exactly is failing in there:
> 
>> support/Systemcall.cpp (276): Systemcall: 'python3 -tt 
>> "/usr/share/lyx/configure.py" --binary-dir="/usr/bin/"' finished with 
>> exit code -1


# t=$(mktemp -d) && cd $t && python3 -tt "/usr/share/lyx/configure.py" 
--binary-dir="/usr/bin/" ; cd -

Succeeds :-(

But if that command gets executed from lyx, we are in the realm of Qt::Process.
Perhaps if I find time, I can try to extract a minimized example only doing 
that call...


Hi Andreas!

Do you know if this issue still present with qemu 7.0?

Thanks,

/mjt



Bug#1003168: qemu-user-static: fails to run lyx user directory configuation

2022-01-13 Thread Andreas Beckmann

On 11/01/2022 08.25, Michael Tokarev wrote:

1. try qemu 6.2 (qemu-user-static is self-contained, more or less, so
    it can be installed on earlier debian releases too)


same behavior :-(


2. try to figure out what exactly is failing in there:

support/Systemcall.cpp (276): Systemcall: 'python3 -tt 
"/usr/share/lyx/configure.py" --binary-dir="/usr/bin/"' finished with 
exit code -1


# t=$(mktemp -d) && cd $t && python3 -tt "/usr/share/lyx/configure.py" 
--binary-dir="/usr/bin/" ; cd -

Succeeds :-(

But if that command gets executed from lyx, we are in the realm of Qt::Process.
Perhaps if I find time, I can try to extract a minimized example only doing 
that call...


Andreas



Bug#1003168: qemu-user-static: fails to run lyx user directory configuation

2022-01-10 Thread Michael Tokarev

On 05.01.2022 18:10, Andreas Beckmann wrote:

Package: qemu-user-static
Version: 1:6.1+dfsg-8
Severity: important

Hi,

I have a few foreign architecture chroots (for test-building packages
on an amd64 host) relying on foreign binfmt execution via
qemu-user-static.


Hi!

Unfortunately I'm not in a good position to debug qemu linux-user issues.
If you really need to address this, I suggest you the following steps:

1. try qemu 6.2 (qemu-user-static is self-contained, more or less, so
   it can be installed on earlier debian releases too)

2. try to figure out what exactly is failing in there:


support/Systemcall.cpp (276): Systemcall: 'python3 -tt "/usr/share/lyx/configure.py" 
--binary-dir="/usr/bin/"' finished with exit code -1


  I mean, what exactly is failing there. You can try to run this
  very command (python3..) manually, to start with.
  Please note it "finishes" with -1 - which is at least
  unusual exit code for a process, maybe Lynx can't even run it.

3. with the exact place where it is failing, you can write to
   qemu-users@ mailing list asking for help.

I'm sorry for being unhelpful here, but this is at least something
to start with, instead of just waiting for this bugreport forever.

Thanks,

/mjt



Bug#1003168: qemu-user-static: fails to run lyx user directory configuation

2022-01-05 Thread Andreas Beckmann
Package: qemu-user-static
Version: 1:6.1+dfsg-8
Severity: important

Hi,

I have a few foreign architecture chroots (for test-building packages
on an amd64 host) relying on foreign binfmt execution via
qemu-user-static.

mbrola fails to build in this environment (at least arm64, armhf,
ppc64el), I could reduce the failure to this reproducer (which works
fine in an arm64 chroot on a porterbox):

in a minimal sid arm64 chroot run
$ apt-get install lyx
$ t=$(mktemp -d) && lyx -userdir $t -E pdf $t/t.pdf $t/no.lyx
LyX: reconfiguring user directory
support/Systemcall.cpp (276): Systemcall: 'python3 -tt 
"/usr/share/lyx/configure.py" --binary-dir="/usr/bin/"' finished with exit code 
-1
LyX: Done!
LayoutFile.cpp (110): LayoutFileList::Read: unable to find textclass file  
`textclass.lst'.
LayoutFile.cpp (172): LayoutFileList::Read: no textclasses found!
ModuleList.cpp (128): unable to find modules file `lyxmodules.lst'.
No modules will be available.
CiteEnginesList.cpp (173): unable to find cite engines file `citeengines.lst'.
No cite engines will be available.
Error: Document class not found

The layout file:
article
could not be found. A default textclass with default
layouts will be used. LyX will not be able to produce
correct output.
Warning: Cite Engine not available

The cite engine basic has been requested by
this document but has not been found in the list of
available engines. If you recently installed it, you
probably need to reconfigure LyX.

LyX failed to load the following file: /tmp/tmp.DcNdlA0sNJ/no.lyx

But if I run the lyx/configure.py script manually, this works without
error:

$ cd $(mktemp -d) && python3 -tt "/usr/share/lyx/configure.py" 
--binary-dir="/usr/bin/"
checking for a Latex2e program...
+checking for "latex"...  no
+checking for "latex2e"...  no
checking for a DVI postprocessing program...
+checking for "pplatex"...  no
[...]
/usr/share/lyx/layouts/bicaption.module
/usr/share/lyx/layouts/algorithm2e.module
/usr/share/lyx/layouts/InStar.module
done
+checking list of cite engines...
/usr/share/lyx/citeengines/natbib.citeengine
/usr/share/lyx/citeengines/jurabib.citeengine
/usr/share/lyx/citeengines/biblatex.citeengine
/usr/share/lyx/citeengines/biblatex-natbib.citeengine
/usr/share/lyx/citeengines/basic.citeengine
done
+checking list of external templates...
/usr/share/lyx/xtemplates/xfig.xtemplate
/usr/share/lyx/xtemplates/vector_graphics.xtemplate
/usr/share/lyx/xtemplates/raster_image.xtemplate
/usr/share/lyx/xtemplates/pdfpages.xtemplate
/usr/share/lyx/xtemplates/lilypond.xtemplate
/usr/share/lyx/xtemplates/inkscape.xtemplate
/usr/share/lyx/xtemplates/gnumeric.xtemplate
/usr/share/lyx/xtemplates/dia.xtemplate
/usr/share/lyx/xtemplates/chess.xtemplate
done
checking LaTeX configuration...  default values
+checking list of textclasses...
done
+generating default list of packages...
done


Andreas