[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54607] Native open/save file dialogs have poo
From: |
Stefan Brüns |
Subject: |
[Octave-bug-tracker] [bug #54607] Native open/save file dialogs have poor performance in KDE |
Date: |
Mon, 17 Feb 2020 09:48:36 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0 |
Follow-up Comment #54, bug #54607 (project octave):
The cause of the issue becomes quite obvious when using strace ('strace -tf
-etrace=%signal,%process octave --gui')
[pid 3329] 14:36:53 rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[],
sa_flags=SA_RESTORER, sa_restorer=0x7f43fde40030}, NULL, 8) = 0
[pid 3329] 14:36:53 kill(3351, SIGTERM) = 0
[pid 3329] 14:36:57 rt_sigaction(SIGCHLD, {sa_handler=0x7f43fa87efc0,
sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO|SA_NOCLDSTOP,
sa_restorer=0x7f43fde40030}, {sa_handler=0x7f43fcebfbb0, sa_mask=[],
sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f43fde40030}, 8) = 0
[pid 3329] 14:36:57 rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[],
sa_flags=SA_RESTORER, sa_restorer=0x7f43fde40030}, NULL, 8) = 0
[pid 3330] 14:36:57 exit(0 <unfinished ...>
[pid 3331] 14:36:57 exit(0 <unfinished ...>
[pid 3330] 14:36:57 <... exit resumed>) = ?
[pid 3331] 14:36:57 <... exit resumed>) = ?
[pid 3330] 14:36:57 +++ exited with 0 +++
[pid 3331] 14:36:57 +++ exited with 0 +++
[pid 3333] 14:36:57 exit(0) = ?
[pid 3333] 14:36:57 +++ exited with 0 +++
[pid 3334] 14:36:57 exit(0) = ?
[pid 3334] 14:36:57 +++ exited with 0 +++
[pid 3335] 14:36:57 exit(0) = ?
[pid 3335] 14:36:57 +++ exited with 0 +++
[pid 3336] 14:36:57 exit(0) = ?
[pid 3336] 14:36:57 +++ exited with 0 +++
[pid 3337] 14:36:57 exit(0) = ?
[pid 3337] 14:36:57 +++ exited with 0 +++
[pid 3329] 14:36:57 clone(child_stack=NULL,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLDstrace: Process 3356
attached
, child_tidptr=0x7f43f537cdd0) = 3356
[pid 3356] 14:36:57 rt_sigaction(SIGPIPE, {sa_handler=SIG_DFL,
sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f43fde40030},
{sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER,
sa_restorer=0x7f43fde40030}, 8) = 0
[pid 3356] 14:36:57 execve("/usr/bin/testparm", ["/usr/bin/testparm", "-d0",
"-s", "--parameter-name", "usershare path"], 0x7f43ac1b7c40 /* 106 vars */) =
0
[pid 3356] 14:36:57 arch_prctl(ARCH_SET_FS, 0x7fb2f255b900) = 0
[pid 3356] 14:36:57 rt_sigaction(SIGRTMIN, {sa_handler=0x7fb2f36dc6b0,
sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7fb2f36e92d0},
NULL, 8) = 0
[pid 3356] 14:36:57 rt_sigaction(SIGRT_1, {sa_handler=0x7fb2f36dc750,
sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7fb2f36e92d0}, NULL, 8) = 0
[pid 3356] 14:36:57 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
[pid 3356] 14:36:57 exit_group(0) = ?
[pid 3356] 14:36:57 +++ exited with 0 +++
[pid 3347] 14:36:57 <... rt_sigtimedwait resumed>{si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=3356, si_uid=1000, si_status=0, si_utime=1,
si_stime=0}, NULL, 8) = 17 (SIGCHLD)
[pid 3347] 14:36:57 rt_sigtimedwait([HUP INT QUIT PIPE ALRM TERM CHLD XCPU
XFSZ VTALRM], <unfinished ...>
[pid 3329] 14:37:27 kill(3356, SIGKILL) = 0
[pid 3329] 14:37:57 clone(child_stack=NULL,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLDstrace: Process 3395
attached
, child_tidptr=0x7f43f537cdd0) = 3395
[pid 3395] 14:37:57 rt_sigaction(SIGPIPE, {sa_handler=SIG_DFL,
sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f43fde40030},
{sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER,
sa_restorer=0x7f43fde40030}, 8) = 0
[pid 3395] 14:37:57 execve("/usr/bin/net", ["/usr/bin/net", "usershare",
"info"], 0x7f43ac1b7c40 /* 106 vars */) = 0
[pid 3395] 14:37:57 arch_prctl(ARCH_SET_FS, 0x7f4ee2795440) = 0
[pid 3395] 14:37:57 rt_sigaction(SIGRTMIN, {sa_handler=0x7f4ee39826b0,
sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f4ee398f2d0},
NULL, 8) = 0
[pid 3395] 14:37:57 rt_sigaction(SIGRT_1, {sa_handler=0x7f4ee3982750,
sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7f4ee398f2d0}, NULL, 8) = 0
[pid 3395] 14:37:57 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
[pid 3395] 14:37:57 exit_group(0) = ?
[pid 3395] 14:37:57 +++ exited with 0 +++
[pid 3347] 14:37:57 <... rt_sigtimedwait resumed>{si_signo=SIGCHLD,
si_code=CLD_EXITED, si_pid=3395, si_uid=1000, si_status=0, si_utime=3,
si_stime=1}, NULL, 8) = 17 (SIGCHLD)
[pid 3347] 14:37:57 rt_sigtimedwait([HUP INT QUIT PIPE ALRM TERM CHLD XCPU
XFSZ VTALRM], <unfinished ...>
[pid 3329] 14:38:27 kill(3395, SIGKILL) = 0
1. testparm is spawned
2. 30s timeout
3. 30s kill timeout
4. net is spawned
5. 30s timeout
6. 30s kill timeout
The processes are spawned by KDE the KIO SAMBA integration:
https://cgit.kde.org/kio.git/tree/src/core/ksambashare.cpp#n124
QProcess::waitForFinished() never gets the SIGCHLD signal as it is stolen by
sigwait (rt_sigtimedwait([... CHLD ...]).
This is a well known problem, see e.g.
https://bugreports.qt.io/browse/QTBUG-56338
Octave is actually using two handlers for SIGCHLD, once via sigaction from the
main thread, and once via sigwait from the interrupt watcher thread.
Even without QProcess coming into play the signal handling is indeterminate,
as each signal may be delivered either to the dedicated thread or to the main
thread.
As far as I can see, the fix is trivial - just disabling the signal watcher
thread solves the problem.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?54607>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54607] Native (KDE) open/save dialogs are not used, Kai Torben Ohlhus, 2020/02/14
- [Octave-bug-tracker] [bug #54607] Native open/save file dialogs have poor performance in KDE, Mike Miller, 2020/02/14
- [Octave-bug-tracker] [bug #54607] Native open/save file dialogs have poor performance in KDE, avlas, 2020/02/14
- Message not available
- [Octave-bug-tracker] [bug #54607] Native open/save file dialogs have poor performance in KDE,
Stefan Brüns <=
- [Octave-bug-tracker] [bug #54607] Native open/save file dialogs have poor performance in KDE, Stefan Brüns, 2020/02/17
- [Octave-bug-tracker] [bug #54607] Native open/save file dialogs have poor performance in KDE, Stefan Brüns, 2020/02/17
- [Octave-bug-tracker] [bug #54607] Native open/save file dialogs have poor performance in KDE, Kai Torben Ohlhus, 2020/02/17
- [Octave-bug-tracker] [bug #54607] Native open/save file dialogs have poor performance in KDE, Mike Miller, 2020/02/17
- [Octave-bug-tracker] [bug #54607] Native open/save file dialogs have poor performance in KDE, Stefan Brüns, 2020/02/17