[PATCH] gnu: lxqt-config: Add libkscreen as propagated-inputs.

  • Open
  • quality assurance status badge
Details
5 participants
  • Efraim Flashner
  • Hamzeh Nasajpour
  • Hamzeh Nasajpour via web
  • Ludovic Courtès
  • Reza Alizadeh Majd
Owner
unassigned
Submitted by
Hamzeh Nasajpour
Severity
normal
H
H
Hamzeh Nasajpour wrote on 13 Oct 2019 06:23
(address . guix-patches@gnu.org)
0204dc81-bfad-4efb-a88a-5f90e00678aa@www.fastmail.com
* gnu/packages/lxqt.scm (lxqt-config): Remove libkscreen from native-inputs to propagated-inputs for running the lxqt-config-monitor.
---
gnu/packages/lxqt.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm
index e5487d3ae4..a3c796d9e8 100644
--- a/gnu/packages/lxqt.scm
+++ b/gnu/packages/lxqt.scm
@@ -367,7 +367,6 @@ the operating system LXQt is running on.")
(inputs
`(("eudev" ,eudev)
("kwindowsystem" ,kwindowsystem)
- ("libkscreen" ,libkscreen)
("liblxqt" ,liblxqt)
("libqtxdg" ,libqtxdg)
("libxcursor" ,libxcursor)
@@ -382,6 +381,8 @@ the operating system LXQt is running on.")
`(("pkg-config" ,pkg-config)
("lxqt-build-tools" ,lxqt-build-tools)
("qttools" ,qttools)))
+ (propagated-inputs
+ `(("libkscreen" ,libkscreen)))
(arguments
'(#:tests? #f ; no tests
#:phases
--
2.23.0
L
L
Ludovic Courtès wrote on 14 Oct 2019 00:07
(name . Hamzeh Nasajpour)(address . h.nasajpour@pantherx.org)(address . 37725@debbugs.gnu.org)
87o8yk7103.fsf@gnu.org
Hi,

"Hamzeh Nasajpour" <h.nasajpour@pantherx.org> skribis:

Toggle quote (2 lines)
> * gnu/packages/lxqt.scm (lxqt-config): Remove libkscreen from native-inputs to propagated-inputs for running the lxqt-config-monitor.

In general, when adding a propagated input, could you add a comment in
the code itself explaining why it’s this way?

In this particular case, is the ‘lxqt-config-monitor’ command part of
libkscreen? Could we avoid propagation somehow?

Thanks,
Ludo’.
H
H
Hamzeh Nasajpour wrote on 14 Oct 2019 07:50
Re: [bug#37725] [PATCH] gnu: lxqt-config: Add libkscreen as pr opagated-inputs.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 37725@debbugs.gnu.org)
4877c727-7890-41ca-a817-ca8346011c38@www.fastmail.com
Hi,

The problem is crashing the `lxqt-config-monitor` when I want to run it(`segmentation fault`). I installed the `libkscreen` and the problem was resolved. So I change the `lxqt-config` package definition and remove the `libkscreen` from `inputs` to `propagated-inputs`, install it and everything was ok.

Regards,
Hamzeh.

On Mon, Oct 14, 2019, at 1:37 AM, Ludovic Courtès wrote:
Toggle quote (15 lines)
> Hi,
>
> "Hamzeh Nasajpour" <h.nasajpour@pantherx.org> skribis:
>
> > * gnu/packages/lxqt.scm (lxqt-config): Remove libkscreen from native-inputs to propagated-inputs for running the lxqt-config-monitor.
>
> In general, when adding a propagated input, could you add a comment in
> the code itself explaining why it’s this way?
>
> In this particular case, is the ‘lxqt-config-monitor’ command part of
> libkscreen? Could we avoid propagation somehow?
>
> Thanks,
> Ludo’.
>
L
L
Ludovic Courtès wrote on 14 Oct 2019 22:21
Re: [bug#37725] [PATCH] gnu: lxqt-config: Add libkscreen as propagated-inputs.
(name . Hamzeh Nasajpour)(address . h.nasajpour@pantherx.org)(address . 37725@debbugs.gnu.org)
87a7a3nkm3.fsf@gnu.org
Hi Hamzeh,

"Hamzeh Nasajpour" <h.nasajpour@pantherx.org> skribis:

Toggle quote (2 lines)
> The problem is crashing the `lxqt-config-monitor` when I want to run it(`segmentation fault`). I installed the `libkscreen` and the problem was resolved. So I change the `lxqt-config` package definition and remove the `libkscreen` from `inputs` to `propagated-inputs`, install it and everything was ok.

Do you have a simple ‘operating-system’ configuration and instructions
we could follow to reproduce the initial problem?

Thanks in advance,
Ludo’.
R
R
Reza Alizadeh Majd wrote on 16 Oct 2019 13:18
Re: [bug#37725] [PATCH] gnu: lxqt-config: Add libkscreen as pr opagated-inputs.
(address . 37725@debbugs.gnu.org)
38aa418c-7f64-452b-b49c-8f1b4d2d914e@www.fastmail.com
Hi,

maybe I could describe better about this patch file.

`libkscreen` is used by `lxqt-config-monitor` to modify
the desktop resolution in LXQt desktop.

the problem is that, during execution of `lxqt-config-monitor`
application crashes with "segmentation fault".

we had a review over `lxqt-config-monitor` source code,
but didn't find any unusual usage of `ksceen` library. just
a normal link during build process and binaries were made
successfully.

this issue might because of crash inside `libkscreen`, but we
didn't review that yet.

so as a quick workaround we find that adding the `libkscreen`
as a propagated input could fix this issue.

--
Regards
Reza Alizadeh Majd
PantherX Team
L
L
Ludovic Courtès wrote on 18 Oct 2019 11:54
Re: [bug#37725] [PATCH] gnu: lxqt-config: Add libkscreen as propagated-inputs.
(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)(address . 37725@debbugs.gnu.org)
87wod24bvw.fsf@gnu.org
Hi Reza,

"Reza Alizadeh Majd" <r.majd@pantherx.org> skribis:

Toggle quote (19 lines)
> maybe I could describe better about this patch file.
>
> `libkscreen` is used by `lxqt-config-monitor` to modify
> the desktop resolution in LXQt desktop.
>
> the problem is that, during execution of `lxqt-config-monitor`
> application crashes with "segmentation fault".
>
> we had a review over `lxqt-config-monitor` source code,
> but didn't find any unusual usage of `ksceen` library. just
> a normal link during build process and binaries were made
> successfully.
>
> this issue might because of crash inside `libkscreen`, but we
> didn't review that yet.
>
> so as a quick workaround we find that adding the `libkscreen`
> as a propagated input could fix this issue.

Thanks for explaining, I understand better now.

I think that it’s not satisfying to apply a workaround that we don’t
understand. That is, intuitively, I see now reason why propagating
libkscreen would “fix” a segfault.

Could you either (1) provide an ‘operating-system’ config and
instructions to reproduce the problem, or (2) grab a backtrace of the
segfaulted program with GDB?

Let us know if you need guidance.

Thanks,
Ludo’.
R
R
Reza Alizadeh Majd wrote on 18 Oct 2019 18:44
Re: [bug#37725] [PATCH] gnu: lxqt-config: Add libkscreen as pr opagated-inputs.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 37725@debbugs.gnu.org)
65f9ede0-d276-4b70-adf6-d536386d0985@www.fastmail.com
Hi Ludo,

Sure, here is a minimal operating system configuration that we used for a
minimal LXQt desktop on Guix:

```
(use-modules (gnu) (gnu system nss) (gnu packages kde-plasma))
(use-service-modules desktop networking ssh sddm dbus)
(use-package-modules ssh certs tls lxqt xorg)

(operating-system
(host-name "panther")
(timezone "Asia/Tehran")
(locale "en_US.utf8")

;; Boot in "legacy" BIOS mode
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(target "/dev/sda")))
(file-systems (cons (file-system
(device (file-system-label "my-root"))
(mount-point "/")
(type "ext4"))
%base-file-systems))
(users (cons (user-account
(name "user")
(password "1234")
(group "users")
(supplementary-groups '("wheel" "audio" "video"))
(home-directory "/home/user"))
%base-user-accounts))
(packages (cons* openssh nss-certs gnutls
lxqt lxqt-globalkeys
;; commented in order to re-produce the issue
; libkscreen
%base-packages))
(services (cons*
(sddm-service
(sddm-configuration
(minimum-uid 1000)
(theme "elarun")))
(elogind-service)
(udisks-service)
(dbus-service)
(colord-service)
(service polkit-service-type)
(service upower-service-type)
(service dhcp-client-service-type)
;; network configuration
(service openssh-service-type
(openssh-configuration
(port-number 22)
(permit-root-login #t)
(authorized-keys
`(("panther" ,(local-file "/etc/vagrant.pub"))
("root" ,(local-file "/etc/vagrant.pub"))))))
(service wpa-supplicant-service-type)
%base-services))
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))
```
the issue occurs when I try to execute `lxqt-config-monitor`.


here is also the GDB backtrace log that I received during application crash:

```
root@panther /home/panther# cat monitor.txt
Starting program: /gnu/store/k09wlkkmllwyr5d41bzn2mn9kvylgszr-profile/bin/lxqt-config-monitor
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/libthread_db.so.1".
[New Thread 0x7ffff3bfb700 (LWP 860)]
[New Thread 0x7ffff32d4700 (LWP 861)]
[Detaching after fork from child process 862]
[New Thread 0x7fffea615700 (LWP 863)]
[New Thread 0x7fffe9e14700 (LWP 864)]
[New Thread 0x7fffe9613700 (LWP 865)]
[New Thread 0x7fffe8e12700 (LWP 866)]

Thread 1 "lxqt-config-mon" received signal SIGSEGV, Segmentation fault.
0x00007ffff7fa1b01 in KScreen::GetConfigOperation::start() ()
from /gnu/store/ds7ib4ndgy48ac0hxrrsgc6xc4lsccva-libkscreen-5.15.1/lib/libKF5Screen.so.7
#0 0x00007ffff7fa1b01 in KScreen::GetConfigOperation::start() ()
from /gnu/store/ds7ib4ndgy48ac0hxrrsgc6xc4lsccva-libkscreen-5.15.1/lib/libKF5Screen.so.7
#1 0x00007ffff7fbe48d in KScreen::ConfigOperation::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
from /gnu/store/ds7ib4ndgy48ac0hxrrsgc6xc4lsccva-libkscreen-5.15.1/lib/libKF5Screen.so.7
#2 0x00007ffff6f28ad1 in QObject::event(QEvent*) () from /gnu/store/ahyi57vlk48cmzsvxjwhxlxg2fdhxl9w-qtbase-5.11.3/lib/libQt5Core.so.5
#3 0x00007ffff788214c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
from /gnu/store/ahyi57vlk48cmzsvxjwhxlxg2fdhxl9w-qtbase-5.11.3/lib/libQt5Widgets.so.5
#4 0x00007ffff7889280 in QApplication::notify(QObject*, QEvent*) ()
from /gnu/store/ahyi57vlk48cmzsvxjwhxlxg2fdhxl9w-qtbase-5.11.3/lib/libQt5Widgets.so.5
#5 0x00007ffff6efd4f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
from /gnu/store/ahyi57vlk48cmzsvxjwhxlxg2fdhxl9w-qtbase-5.11.3/lib/libQt5Core.so.5
#6 0x00007ffff6efff2b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
from /gnu/store/ahyi57vlk48cmzsvxjwhxlxg2fdhxl9w-qtbase-5.11.3/lib/libQt5Core.so.5
#7 0x00007ffff6f51643 in ?? () from /gnu/store/ahyi57vlk48cmzsvxjwhxlxg2fdhxl9w-qtbase-5.11.3/lib/libQt5Core.so.5
#8 0x00007ffff43ddb57 in g_main_context_dispatch () from /gnu/store/cgy82g6yv8l1chawgch47zh23b0jll3l-glib-2.56.3/lib/libglib-2.0.so.0
#9 0x00007ffff43ddd98 in g_main_context_iterate.isra () from /gnu/store/cgy82g6yv8l1chawgch47zh23b0jll3l-glib-2.56.3/lib/libglib-2.0.so.0
#10 0x00007ffff43dde3c in g_main_context_iteration () from /gnu/store/cgy82g6yv8l1chawgch47zh23b0jll3l-glib-2.56.3/lib/libglib-2.0.so.0
#11 0x00007ffff6f50caf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /gnu/store/ahyi57vlk48cmzsvxjwhxlxg2fdhxl9w-qtbase-5.11.3/lib/libQt5Core.so.5
#12 0x00007ffff3deb3c1 in ?? ()
from /gnu/store/ahyi57vlk48cmzsvxjwhxlxg2fdhxl9w-qtbase-5.11.3/lib/qt5/plugins/platforms/../../../libQt5XcbQpa.so.5
#13 0x00007ffff6efbe4a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /gnu/store/ahyi57vlk48cmzsvxjwhxlxg2fdhxl9w-qtbase-5.11.3/lib/libQt5Core.so.5
#14 0x00007ffff6f04740 in QCoreApplication::exec() () from /gnu/store/ahyi57vlk48cmzsvxjwhxlxg2fdhxl9w-qtbase-5.11.3/lib/libQt5Core.so.5
#15 0x000000000040f92c in main ()
Quit
quit

```

Best,
Reza



On Fri, Oct 18, 2019, at 1:24 PM, Ludovic Courtès wrote:
Toggle quote (38 lines)
> Hi Reza,
>
> "Reza Alizadeh Majd" <r.majd@pantherx.org> skribis:
>
> > maybe I could describe better about this patch file.
> >
> > `libkscreen` is used by `lxqt-config-monitor` to modify
> > the desktop resolution in LXQt desktop.
> >
> > the problem is that, during execution of `lxqt-config-monitor`
> > application crashes with "segmentation fault".
> >
> > we had a review over `lxqt-config-monitor` source code,
> > but didn't find any unusual usage of `ksceen` library. just
> > a normal link during build process and binaries were made
> > successfully.
> >
> > this issue might because of crash inside `libkscreen`, but we
> > didn't review that yet.
> >
> > so as a quick workaround we find that adding the `libkscreen`
> > as a propagated input could fix this issue.
>
> Thanks for explaining, I understand better now.
>
> I think that it’s not satisfying to apply a workaround that we don’t
> understand. That is, intuitively, I see now reason why propagating
> libkscreen would “fix” a segfault.
>
> Could you either (1) provide an ‘operating-system’ config and
> instructions to reproduce the problem, or (2) grab a backtrace of the
> segfaulted program with GDB?
>
> Let us know if you need guidance.
>
> Thanks,
> Ludo’.
>
H
H
Hamzeh Nasajpour wrote on 2 Apr 2020 21:17
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 37725@debbugs.gnu.org)
b636d951-727d-4bde-b9dd-2a3103d264bf@www.fastmail.com
Hi Ludo,

Have we any conclusion here? _Reza_ sent a configuration and backtrace.

Regards,
Hamzeh

On Mon, Oct 14, 2019, at 11:51 PM, Ludovic Courtès wrote:
Toggle quote (12 lines)
> Hi Hamzeh,
>
> "Hamzeh Nasajpour" <h.nasajpour@pantherx.org> skribis:
>
> > The problem is crashing the `lxqt-config-monitor` when I want to run it(`segmentation fault`). I installed the `libkscreen` and the problem was resolved. So I change the `lxqt-config` package definition and remove the `libkscreen` from `inputs` to `propagated-inputs`, install it and everything was ok.
>
> Do you have a simple ‘operating-system’ configuration and instructions
> we could follow to reproduce the initial problem?
>
> Thanks in advance,
> Ludo’.
>
L
L
Ludovic Courtès wrote on 22 Apr 2020 17:50
Re: [bug#37725] [PATCH] gnu: lxqt-config: Add libkscreen as propagated-inputs.
(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)(address . 37725@debbugs.gnu.org)
87tv1bv7sm.fsf@gnu.org
Hi Reza,

Sorry for the very late reply.

"Reza Alizadeh Majd" <r.majd@pantherx.org> skribis:

Toggle quote (3 lines)
> Sure, here is a minimal operating system configuration that we used for a
> minimal LXQt desktop on Guix:

I added a window manager to the global profile so that I could actually
log in, but then I don’t even know how to get a terminal… I think I’m
not well positioned to further debug this. Did you discuss it with
upstream?

Thanks,
Ludo’.
(use-modules (gnu) (gnu system nss) (gnu packages kde-plasma)) (use-service-modules desktop networking ssh sddm dbus) (use-package-modules ssh certs tls lxqt xorg openbox) (operating-system (host-name "panther") (timezone "Asia/Tehran") (locale "en_US.utf8") ;; Boot in "legacy" BIOS mode (bootloader (bootloader-configuration (bootloader grub-bootloader) (target "/dev/sda"))) (file-systems (cons (file-system (device (file-system-label "my-root")) (mount-point "/") (type "ext4")) %base-file-systems)) (users (cons (user-account (name "user") (password (crypt "1234" "$6$abc")) (group "users") (supplementary-groups '("wheel" "audio" "video")) (home-directory "/home/user")) %base-user-accounts)) (packages (cons* openssh nss-certs gnutls lxqt lxqt-globalkeys openbox ;; commented in order to re-produce the issue ; libkscreen %base-packages)) (services (cons* (sddm-service (sddm-configuration (minimum-uid 1000) (theme "elarun"))) (elogind-service) (udisks-service) (dbus-service) (colord-service) (service polkit-service-type) (service upower-service-type) (service dhcp-client-service-type) ;; network configuration (service openssh-service-type (openssh-configuration (port-number 22) (permit-root-login #t))) (service wpa-supplicant-service-type) %base-services)) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss))
E
E
Efraim Flashner wrote on 27 Apr 2020 18:39
(name . Hamzeh Nasajpour)(address . h.nasajpour@pantherx.org)
20200427163937.GP5243@E5400
On Thu, Apr 02, 2020 at 11:47:04PM +0430, Hamzeh Nasajpour wrote:
Toggle quote (22 lines)
>
> Hi Ludo,
>
> Have we any conclusion here? _Reza_ sent a configuration and backtrace.
>
> Regards,
> Hamzeh
>
> On Mon, Oct 14, 2019, at 11:51 PM, Ludovic Courtès wrote:
> > Hi Hamzeh,
> >
> > "Hamzeh Nasajpour" <h.nasajpour@pantherx.org> skribis:
> >
> > > The problem is crashing the `lxqt-config-monitor` when I want to run it(`segmentation fault`). I installed the `libkscreen` and the problem was resolved. So I change the `lxqt-config` package definition and remove the `libkscreen` from `inputs` to `propagated-inputs`, install it and everything was ok.
> >
> > Do you have a simple ‘operating-system’ configuration and instructions
> > we could follow to reproduce the initial problem?
> >
> > Thanks in advance,
> > Ludo’.
> >

I did some investigating myself and I think there's a regression in
qtbase somewhere.

guix environment --ad-hoc strace libkscreen lxqt-config -- strace -o ~/lxqt-config-monitor.strace lxqt-config-monitor
QApplication: invalid style override passed, ignoring it.
Available styles: Windows, Fusion
(0x7ffc74134b40) Warning: "Icon Theme not set. Fallbacking to Oxygen, if installed"
(0x7ffc74134b40) Warning: "Fallback Icon Theme (Oxygen) not found"

And no lxqt-config-monitor loaded. I've attached the strace, but it
shows it looking for the kscreen directory in qtbase/lib/qt5/plugins/kf5/kscreen
and lxqt-config/bin/kf5/kscreen. For the record it's in
libkscreen/lib/qt5/plugins/kf5/kscreen

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl6nCsYACgkQQarn3Mo9
g1F98g//fKX1t1WuQMJZqniNLlcMeP8Jcd/cCV/+nRqRPLdDmCQARvlSNIBHfwV3
xdajvQabKqzZlciBOwzQeiCsvUGPMkSLCh8zYtM6IW0RFeCtCXgjNsLGW3RyLcVt
gWZg2s5qit259C6nS0TbGHBA6SImPbYMcCl+DHe07TPRpzGUk2l3NdV1Hsmg0V52
l2Yu/ZXg/f4m7XPGpdBo1bmPmil18Q81IPEWKEh/cDPHwXUCnJgpbFYrBmBEaXKJ
/DohJER22JJQgPisQvztS79P8YxWuF5MeEjUzv7hLQEtAQUXS43CCZRtOP3oGX4t
fmVYWPq0LBxTCCYc6vGYgWG1O7VQNx88h7eBH3ES3HDNyw68ZfB7a0LQsDNs9S8W
fAad7cZCFI3paZFCJQMyta2Hvv79mIgs8Vvr6TEM+V8Yv4y0YFmM52gS/7uTTltq
5NC6+4N0pewp3rdSkYx9kUZaDFx78JO7lXBnzWFPZUjYJb+1pywYcUgpdtp7HwtF
Gnn2O21hGchZoP7z54yVqV4qTdBQueichgJVJyUfm7npPq0ONYD7+4BhVnVSThrv
MYpk+GH5qU3nV9tRNDoC3Asdw+E0SlVEIrbvJR8gk7mlPKb7U2LRKjkuVFd36k47
bI490NXLzgSMGiE7+68e02Kfv43NR+i67PvaSviSpWUUrGy4hUI=
=fd/s
-----END PGP SIGNATURE-----


H
H
Hamzeh Nasajpour via web wrote on 16 Sep 2020 10:40
[PATCH] gnu: lxqt-config: Add libkscreen as propagated-inputs.
(address . 37725@debbugs.gnu.org)
7f6cec63aa60.1c74a5ea44b25a07@guile.gnu.org
Hi,

Finally we can fix this issue with wrapping the `lxqt-config` and `lxqt-config-monitor` and add the `libkscreen` path to `PATH` environment path. I updated based on this patch and it fixed.

Toggle diff (22 lines)
diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm
index af452a9903..0ba1a0c7b3 100644
--- a/gnu/packages/lxqt.scm
+++ b/gnu/packages/lxqt.scm
@@ -418,7 +418,16 @@ the operating system LXQt is running on.")
(("\\$\\{LXQT_TRANSLATIONS_DIR\\}")
(string-append (assoc-ref outputs "out")
"/share/lxqt/translations")))
- #t)))))
+ #t))
+ (add-after 'install 'wrap-for-libkscreen
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (libkscreen (assoc-ref %build-inputs "libkscreen")))
+ (wrap-program (string-append out "/bin/lxqt-config")
+ `("PATH" ":" prefix (,(string-append libkscreen "/bin/"))))
+ (wrap-program (string-append out "/bin/lxqt-config-input")
+ `("PATH" ":" prefix (,(string-append libkscreen "/bin/"))))
+ #t))))))
(home-page "https://lxqt.github.io")
(synopsis "Tools to configure LXQt and the underlying operating system")
(description "lxqt-config is providing several tools involved in the
?