Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-29 Thread Anton Gladky
Hi Vincent,

thanks a lot for this deep dive into the problem!
Really appreciate it!

Best regards

Anton
-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-29 Thread Vincent Lefevre
Another thing: This problem actually appears even without FVWM's
ManualPlacement, i.e. if the window is displayed immediately. So
I suppose that it is likely to occur with other window managers.

A simple command to reproduce the issue:

  echo 'set terminal wxt; plot x' | gnuplot -persist

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-29 Thread Vincent Lefevre
On 2024-02-29 12:34:17 +0100, Vincent Lefevre wrote:
> Indeed, this was caused by the upgrade of the pango library. I've
> just posted on the upstream bug:
> 
> Actually, the problem also occurs with gnuplot 5. It has actually
> appeared with the 1.52 pango library: downgrading the pango packages
> to 1.51 makes the problem disappear, both with gnuplot 5 and 6. Now,
> I don't know whether this is a bug in pango or a bug in gnuplot that
> is triggered only with the new version of pango (for instance, it
> might be possible that pango 1.52 is faster than 1.51, making the
> problem appear, since it seems to be a race condition).

I've identified the "problematic" commit in Pango, and I would tend
to say that this is the reason:

https://gitlab.gnome.org/GNOME/pango/-/commit/89442dae443eba2aa0f0a526b4d6d39c0c9b13c6

According to the commit message, a new thread was created "for every
single fontconfig call". Now "a single fontconfig thread per fontmap"
is used. So I suppose that this makes Pango faster, triggering the
race condition in gnuplot.

I've updated the upstream gnuplot bug and opened a bug in Pango,
hoping confirmation:

https://gitlab.gnome.org/GNOME/pango/-/issues/784

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers


Processed: Re: Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-29 Thread Debian Bug Tracking System
Processing control commands:

> found -1 5.4.4+dfsg1-2
Bug #1064982 [gnuplot-qt] with GNUTERM=wxt, "gnuplot -persist" hangs if gnuplot 
cannot draw before stdin is closed, e.g. with FVWM's ManualPlacement
Marked as found in versions gnuplot/5.4.4+dfsg1-2.

-- 
1064982: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1064982
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-29 Thread Vincent Lefevre
Control: found -1 5.4.4+dfsg1-2

On 2024-02-29 03:43:33 +0100, Vincent Lefevre wrote:
> Now, I can reproduce the bug on my other machine. I upgraded some
> packages, and I don't know whether this is related (only pango1.0
> packages seem related).

Indeed, this was caused by the upgrade of the pango library. I've
just posted on the upstream bug:

Actually, the problem also occurs with gnuplot 5. It has actually
appeared with the 1.52 pango library: downgrading the pango packages
to 1.51 makes the problem disappear, both with gnuplot 5 and 6. Now,
I don't know whether this is a bug in pango or a bug in gnuplot that
is triggered only with the new version of pango (for instance, it
might be possible that pango 1.52 is faster than 1.51, making the
problem appear, since it seems to be a race condition).

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers


Processed: Re: Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-28 Thread Debian Bug Tracking System
Processing control commands:

> forwarded -1 https://sourceforge.net/p/gnuplot/bugs/2693/
Bug #1064982 [gnuplot-qt] with GNUTERM=wxt, "gnuplot -persist" hangs if gnuplot 
cannot draw before stdin is closed, e.g. with FVWM's ManualPlacement
Set Bug forwarded-to-address to 'https://sourceforge.net/p/gnuplot/bugs/2693/'.

-- 
1064982: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1064982
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-28 Thread Vincent Lefevre
Control: forwarded -1 https://sourceforge.net/p/gnuplot/bugs/2693/

I've reported the bug upstream.

On 2024-02-29 04:07:17 +0100, Vincent Lefevre wrote:
> For instance, if I run
> 
>   { echo 'plot x' ; sleep 3 ; } | gnuplot -persist
> 
> there are no issues if I place the window before the 3 seconds,
> but the problem appears if I wait for more than 3 seconds.

But note that ssh and strace make the problem disappear
(even if I wait for more than 3 seconds).

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers


Processed: Re: Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-28 Thread Debian Bug Tracking System
Processing control commands:

> retitle -1 with GNUTERM=wxt, "gnuplot -persist" hangs if gnuplot cannot draw 
> before stdin is closed, e.g. with FVWM's ManualPlacement
Bug #1064982 [gnuplot-qt] gnuplot-qt: gnuplot displays a window with nothing in 
it
Changed Bug title to 'with GNUTERM=wxt, "gnuplot -persist" hangs if gnuplot 
cannot draw before stdin is closed, e.g. with FVWM's ManualPlacement' from 
'gnuplot-qt: gnuplot displays a window with nothing in it'.

-- 
1064982: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1064982
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-28 Thread Vincent Lefevre
Control: retitle -1 with GNUTERM=wxt, "gnuplot -persist" hangs if gnuplot 
cannot draw before stdin is closed, e.g. with FVWM's ManualPlacement

On 2024-02-29 03:47:41 +0100, Vincent Lefevre wrote:
> On 2024-02-29 03:43:33 +0100, Vincent Lefevre wrote:
> > This can be reproduced with the following script:
> > 
> > #!/bin/sh
> > 
> > gnuplot -persist < > plot '-' using 1:2 t '' with line
> > 0 0
> > 10 10
> > e
> > EOF
> > 
> > No issues with GNUTERM=qt, but with GNUTERM=wxt, it doesn't work.
> 
> Or just:
> 
> $ echo 'plot x' | gnuplot -persist

This may be related to my window manager FVWM (and its configuration),
where I choose the window position before it appears:

  ManualPlacement (aka active placement).  The user is required to
  place every new window manually.  The window  only  shows  as  a
  rubber  band  until a place is selected manually.  The window is
  placed when a mouse button or any key except Escape is  pressed.
  Escape  aborts  manual  placement which places the window in the
  top left corner of the screen.  If mouse  button  2  is  pressed
  during the initial placement of a window (respectively Shift and
  mouse  button  1 in case Mwm emulation has been enabled with the
  Emulate command), the user is asked to resize the window too.

For instance, if I run

  { echo 'plot x' ; sleep 3 ; } | gnuplot -persist

there are no issues if I place the window before the 3 seconds,
but the problem appears if I wait for more than 3 seconds.

The problem seems to be due to the fact that the standard input gets
closed before gnuplot can actually draw. Indeed,

  { echo 'plot x' ; exec >&- ; sleep 3 ; } | gnuplot -persist

triggers the problem even if I place the window before the 3 seconds.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-28 Thread Vincent Lefevre
On 2024-02-29 03:43:33 +0100, Vincent Lefevre wrote:
> This can be reproduced with the following script:
> 
> #!/bin/sh
> 
> gnuplot -persist < plot '-' using 1:2 t '' with line
> 0 0
> 10 10
> e
> EOF
> 
> No issues with GNUTERM=qt, but with GNUTERM=wxt, it doesn't work.

Or just:

$ echo 'plot x' | gnuplot -persist

> I suspect a race condition, as using strace makes the problem
> disappear. Using ssh (even "ssh localhost", then the test script)
> also makes the problem disappear.

Ditto with the above command.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-28 Thread Vincent Lefevre
On 2024-02-28 15:01:17 -0800, Dima Kogan wrote:
> Can you see if other wxt applications work on a system that's
> exhibiting this problem?

The issue seems specific to gnuplot under particular conditions.
See below.

Now, I can reproduce the bug on my other machine. I upgraded some
packages, and I don't know whether this is related (only pango1.0
packages seem related).

This can be reproduced with the following script:

#!/bin/sh

gnuplot -persist < - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-28 Thread Dima Kogan
Can you see if other wxt applications work on a system that's exhibiting
this problem?

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-28 Thread Vincent Lefevre
On 2024-02-28 10:39:49 -0800, Dima Kogan wrote:
> Hi. I'd like to get more clarity.
> 
> - You see the issue when you try to plot anything at all?
> 
> - You say "plot x" and you get a plot window, but it's all white, or
>   something?
> 
> - Only with the "qt" terminal?

It was the wxt terminal (which I normally use all the time).

I'll do more tests tomorrow since I can't reproduce the problem
remotely (or locally on a different machine).

I could also look at the strace and xtrace output.

When I got the problem, using FVWM's Delete command to remove
the window did not have any effect (so this is not just a
display issue, the process was frozen in some state); FVWM's
Destroy command worked. These commands are described as follows:

Delete
Sends a message to a window asking that it remove itself,
frequently causing the application to exit.

Destroy
Destroys an application window, which usually causes the
application to crash and burn.

The problem occurred first at 2024-02-28T19:12:24 CET.
At that time, journalctl shows:

Feb 28 19:12:24 cventin dbus-daemon[1489]: [session uid=1000 pid=1489] 
Activating via systemd: service name='org.freedesktop.portal.Desktop' 
unit='xdg-desktop-portal.service' requested by ':1.27' (uid=1000 pid=7164 
comm="/usr/bin/gnuplot -persist")
Feb 28 19:12:25 cventin systemd[1462]: Starting xdg-desktop-portal.service - 
Portal service...
Feb 28 19:12:25 cventin dbus-daemon[1489]: [session uid=1000 pid=1489] 
Activating via systemd: service name='org.freedesktop.portal.Documents' 
unit='xdg-document-portal.service' requested by ':1.28' (uid=1000 pid=7168 
comm="/usr/libexec/xdg-desktop-portal")
Feb 28 19:12:25 cventin systemd[1462]: Starting xdg-document-portal.service - 
flatpak document portal service...
Feb 28 19:12:25 cventin dbus-daemon[1489]: [session uid=1000 pid=1489] 
Activating via systemd: service 
name='org.freedesktop.impl.portal.PermissionStore' 
unit='xdg-permission-store.service' requested by ':1.29' (uid=1000 pid=7174 
comm="/usr/libexec/xdg-document-portal")
Feb 28 19:12:25 cventin systemd[1462]: Starting xdg-permission-store.service - 
sandboxed app permission store...
Feb 28 19:12:25 cventin dbus-daemon[1489]: [session uid=1000 pid=1489] 
Successfully activated service 'org.freedesktop.impl.portal.PermissionStore'
Feb 28 19:12:25 cventin systemd[1462]: Started xdg-permission-store.service - 
sandboxed app permission store.
Feb 28 19:12:25 cventin dbus-daemon[1489]: [session uid=1000 pid=1489] 
Successfully activated service 'org.freedesktop.portal.Documents'
Feb 28 19:12:25 cventin systemd[1462]: Started xdg-document-portal.service - 
flatpak document portal service.
Feb 28 19:12:25 cventin xdg-document-portal[7174]: Ignoring invalid max threads 
value 4294967295 > max (10).
Feb 28 19:12:25 cventin xdg-desktop-por[7168]: Choosing gtk.portal for 
org.freedesktop.impl.portal.Lockdown as a last-resort fallback
Feb 28 19:12:25 cventin xdg-desktop-por[7168]: The preferred method to match 
portal implementations to desktop environments is to use the portals.conf(5) 
configuration file
Feb 28 19:12:25 cventin dbus-daemon[1489]: [session uid=1000 pid=1489] 
Activating via systemd: service name='org.freedesktop.impl.portal.desktop.gtk' 
unit='xdg-desktop-portal-gtk.service' requested by ':1.28' (uid=1000 pid=7168 
comm="/usr/libexec/xdg-desktop-portal")
Feb 28 19:12:25 cventin systemd[1462]: Starting xdg-desktop-portal-gtk.service 
- Portal service (GTK/GNOME implementation)...
Feb 28 19:12:25 cventin dbus-daemon[1489]: [session uid=1000 pid=1489] 
Activating via systemd: service name='org.a11y.Bus' 
unit='at-spi-dbus-bus.service' requested by ':1.31' (uid=1000 pid=7189 
comm="/usr/libexec/xdg-desktop-portal-gtk")
Feb 28 19:12:25 cventin systemd[1462]: Starting at-spi-dbus-bus.service - 
Accessibility services bus...
Feb 28 19:12:25 cventin dbus-daemon[1489]: [session uid=1000 pid=1489] 
Successfully activated service 'org.a11y.Bus'
Feb 28 19:12:25 cventin systemd[1462]: Started at-spi-dbus-bus.service - 
Accessibility services bus.
Feb 28 19:12:25 cventin at-spi-bus-launcher[7197]: dbus-daemon[7197]: 
Activating service name='org.a11y.atspi.Registry' requested by ':1.0' (uid=1000 
pid=7189 comm="/usr/libexec/xdg-desktop-portal-gtk")
Feb 28 19:12:25 cventin at-spi-bus-launcher[7197]: dbus-daemon[7197]: 
Successfully activated service 'org.a11y.atspi.Registry'
Feb 28 19:12:25 cventin at-spi-bus-launcher[7203]: SpiRegistry daemon is 
running with well-known name - org.a11y.atspi.Registry
Feb 28 19:12:25 cventin dbus-daemon[1489]: [session uid=1000 pid=1489] 
Successfully activated service 'org.freedesktop.impl.portal.desktop.gtk'
Feb 28 19:12:25 cventin systemd[1462]: Started xdg-desktop-portal-gtk.service - 
Portal service (GTK/GNOME implementation).
Feb 28 19:12:25 cventin rtkit-daemon[811]: Supervising 3 threads of 1 processes 
of 1 users.
Feb 28 19:12:25 cventin rtkit-daemon[811]: Supervising 3 threads of 1 processes 
of 1 

Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-28 Thread Dima Kogan
Hi. I'd like to get more clarity.

- You see the issue when you try to plot anything at all?

- You say "plot x" and you get a plot window, but it's all white, or
  something?

- Only with the "qt" terminal?

You can try to change your window manager, qt versions, etc, etc. If no
trigger is found, it would be good to bisect the gnuplot sources to find
the cause. Are you able to do that? I cannot reproduce at the moment, so
I cannot do it myself.

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-28 Thread Vincent Lefevre
On 2024-02-28 19:20:58 +0100, Vincent Lefevre wrote:
> Before the upgrade to gnuplot 6, everything was fine. But after
> the upgrade, I get a window where nothing is drawn, i.e. I just
> get what's *behind* the window. That's always reproducible on
> this machine.
> 
> I've tried GNUTERM=wxt only. I'll do more tests tomorrow.

Interesting. This is not reproducible when the display is on
another machine (i.e. I connect via ssh). Perhaps an issue
related to the local X server?

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#1064982: gnuplot-qt: gnuplot displays a window with nothing in it

2024-02-28 Thread Vincent Lefevre
Package: gnuplot-qt
Version: 6.0.0+dfsg1-1
Severity: grave
Justification: renders package unusable

Before the upgrade to gnuplot 6, everything was fine. But after
the upgrade, I get a window where nothing is drawn, i.e. I just
get what's *behind* the window. That's always reproducible on
this machine.

I've tried GNUTERM=wxt only. I'll do more tests tomorrow.

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 
'stable-security'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), 
(500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.6.15-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gnuplot-qt depends on:
ii  gnuplot-data 6.0.0+dfsg1-1
ii  libc62.37-15
ii  libcairo21.18.0-1+local1
ii  libedit2 3.1-20230828-1
ii  libgcc-s114-20240221-2.1
ii  libgd3   2.3.3-9+b1
ii  libglib2.0-0 2.78.4-1
ii  liblua5.4-0  5.4.6-3
ii  libpango-1.0-0   1.52.0+ds-1
ii  libpangocairo-1.0-0  1.52.0+ds-1
ii  libqt5core5a 5.15.10+dfsg-7
ii  libqt5gui5   5.15.10+dfsg-7
ii  libqt5network5   5.15.10+dfsg-7
ii  libqt5printsupport5  5.15.10+dfsg-7
ii  libqt5svg5   5.15.10-2+b1
ii  libqt5widgets5   5.15.10+dfsg-7
ii  libstdc++6   14-20240221-2.1
ii  libwebp7 1.3.2-0.4
ii  libwebpmux3  1.3.2-0.4
ii  libwxbase3.2-1   3.2.4+dfsg-3
ii  libwxgtk3.2-13.2.4+dfsg-3
ii  libx11-6 2:1.8.7-1

gnuplot-qt recommends no packages.

Versions of packages gnuplot-qt suggests:
ii  gnuplot-doc  6.0.0+dfsg1-1

-- no debconf information

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

-- 
debian-science-maintainers mailing list
debian-science-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers