Bug 2518 - [Anolis 23 Preview][aarch64]多个qt5的软件包执行后会出现coredump
Summary: [Anolis 23 Preview][aarch64]多个qt5的软件包执行后会出现coredump
Status: RESOLVED BYDESIGN
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: BaseOS Packages (show other bugs) BaseOS Packages
Version: 23.0
Hardware: aarch64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: xuchunmei
QA Contact: bolong_tbl
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-24 16:45 UTC by gitpush
Modified: 2022-10-28 13:12 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gitpush alibaba_cloud_group 2022-10-24 16:45:53 UTC
[问题描述]:
以下几个包的help命令报错相同
qt5-assistant.aarch64
qt5-designer.aarch64
qt5-doctools.aarch64
qt5-linguist.aarch64
qt5-qdbusviewer.aarch64
qt5-qtdeclarative-devel.aarch64
qt5-qttools-devel.aarch64
qv4l2.aarch64

[root@iZbp10tndzn2fahsrwa0gnZ ~]# /usr/bin/assistant-qt5 --help
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted (core dumped)


[环境信息]:
内核信息:
# uname -r
5.10.134-12.1.an23.aarch64

操作系统信息:
# cat /etc/os-release
[root@VM20210305-13 tone]# cat /etc/os-release
NAME="Anolis OS"
VERSION="23"
ID="anolis"
VERSION_ID="23"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"

软件包信息:
[root@iZbp10tndzn2fahsrwa0gnZ ~]# yum info qt5-assistant.aarch64
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 1:23:27 ago on Mon Oct 24 15:20:44 2022.
Installed Packages
Name         : qt5-assistant
Version      : 5.15.5
Release      : 1.an23
Architecture : aarch64
Size         : 918 k
Source       : qt5-qttools-5.15.5-1.an23.src.rpm
Repository   : @System
From repo    : AppStream
Summary      : Documentation browser for Qt5
URL          : http://www.qt.io
License      : LGPLv3 or LGPLv2
Description  : Documentation browser for Qt5.


[问题发生概率]:必现




[复现步骤]:
/usr/bin/assistant-qt5 --help
Comment 1 xuchunmei alibaba_cloud_group 2022-10-24 17:30:38 UTC
通过ssh连接时需要设置DISPLAY环境变量。
比如export DISPLAY=xx.xx.xx.xx(ip):0.0
然后再执行assistant-qt5就不会出现coredump
Comment 2 gitpush alibaba_cloud_group 2022-10-25 10:30:55 UTC
export QT_QPA_PLATFORM=offscreen,就可以执行


root@iZbp10tndzn2fahsrwa0gnZ ~]# export QT_QPA_PLATFORM=offscreen
[root@iZbp10tndzn2fahsrwa0gnZ ~]# /usr/bin/assistant-qt5 --help
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Unknown option: --help


Usage: assistant [Options]

-collectionFile file       Uses the specified collection
                           file instead of the default one
-showUrl url               Shows the document with the
                           url.
-enableRemoteControl       Enables Assistant to be
                           remotely controlled.
-show widget               Shows the specified dockwidget
                           which can be "contents", "index",
                           "bookmarks" or "search".
-activate widget           Activates the specified dockwidget
                           which can be "contents", "index",
                           "bookmarks" or "search".
-hide widget               Hides the specified dockwidget
                           which can be "contents", "index"
                           "bookmarks" or "search".
-register helpFile         Registers the specified help file
                           (.qch) in the given collection
                           file.
-unregister helpFile       Unregisters the specified help file
                           (.qch) from the give collection
                           file.
-setCurrentFilter filter   Set the filter as the active filter.
-remove-search-index       Removes the full text search index.
-rebuild-search-index      Obsolete. Use -remove-search-index instead.
                           Removes the full text search index.
                           It will be rebuilt on next Assistant run.
-quiet                     Does not display any error or
                           status message.
-help                      Displays this help.
Comment 3 xuchunmei alibaba_cloud_group 2022-10-25 10:36:25 UTC
(In reply to gitpush from comment #2)
> export QT_QPA_PLATFORM=offscreen,就可以执行
> 
> 
> root@iZbp10tndzn2fahsrwa0gnZ ~]# export QT_QPA_PLATFORM=offscreen
> [root@iZbp10tndzn2fahsrwa0gnZ ~]# /usr/bin/assistant-qt5 --help
> QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
> Unknown option: --help
> 
> 
> Usage: assistant [Options]
> 
> -collectionFile file       Uses the specified collection
>                            file instead of the default one
> -showUrl url               Shows the document with the
>                            url.
> -enableRemoteControl       Enables Assistant to be
>                            remotely controlled.
> -show widget               Shows the specified dockwidget
>                            which can be "contents", "index",
>                            "bookmarks" or "search".
> -activate widget           Activates the specified dockwidget
>                            which can be "contents", "index",
>                            "bookmarks" or "search".
> -hide widget               Hides the specified dockwidget
>                            which can be "contents", "index"
>                            "bookmarks" or "search".
> -register helpFile         Registers the specified help file
>                            (.qch) in the given collection
>                            file.
> -unregister helpFile       Unregisters the specified help file
>                            (.qch) from the give collection
>                            file.
> -setCurrentFilter filter   Set the filter as the active filter.
> -remove-search-index       Removes the full text search index.
> -rebuild-search-index      Obsolete. Use -remove-search-index instead.
>                            Removes the full text search index.
>                            It will be rebuilt on next Assistant run.
> -quiet                     Does not display any error or
>                            status message.
> -help                      Displays this help.


预览版当前还不支持桌面,图形化相关的组件支持不全。默认使用的插件功能支持不完善。
并且assistant-qt5命令获取help应该是-help,不是--help。
Comment 4 xuchunmei alibaba_cloud_group 2022-10-28 13:12:07 UTC
可以通过设置环境变量的方式:export QT_QPA_PLATFORM=offscreen
来确保命令执行 -help成功。