[GH-ISSUE #1541] seccomp: kmail started to freeze with seccomp and tracelog #1029

Closed
opened 2026-05-05 07:19:35 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @msva on GitHub (Sep 8, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1541

I've just faced the problem that KMail freezing on start with it's current profile (with enabled seccomp and tracelog).
Disabling seccomp, but keeping tracelog makes it segfault (or whatever Received signal 11 SEGV_MAPERR 000000000338 means, and still be freezed),
Disabling tracelog keeping seccomp - change nothing (it still freezes on start)

Commenting both lines makes it start normally again.

Although, I'm not sure why do this started to happen only now, while both seccomp and tracelog exists in the kmail profile for more that year already...

Originally created by @msva on GitHub (Sep 8, 2017). Original GitHub issue: https://github.com/netblue30/firejail/issues/1541 I've just faced the problem that KMail freezing on start with it's current profile (with enabled `seccomp` and `tracelog`). Disabling `seccomp`, but keeping `tracelog` makes it segfault (or whatever `Received signal 11 SEGV_MAPERR 000000000338` means, and still be freezed), Disabling `tracelog` keeping `seccomp` - change nothing (it still freezes on start) Commenting both lines makes it start normally again. Although, I'm not sure why do this started to happen only now, while both seccomp and tracelog exists in the kmail profile for more that year already...
gitea-mirror 2026-05-05 07:19:35 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@netblue30 commented on GitHub (Sep 13, 2017):

I'll take a look, thanks.

<!-- gh-comment-id:329301462 --> @netblue30 commented on GitHub (Sep 13, 2017): I'll take a look, thanks.
Author
Owner

@curiosity-seeker commented on GitHub (Sep 19, 2017):

Same problem here. Kmail 17.04 on Fedora 26 runs well with

seccomp.keep futex,poll,epoll_wait,select,waitid,stat,ioctl,write,read,recvmsg,access,gettid,wait4,mmap,open,close,mprotect,getpid,writev,fstat,munmap,sendto,lstat,sendmsg,fdatasync,fcntl,getdents,socketpair,ftruncate,brk,socket,unlink,madvise,dup,connect,rt_sigaction,clone,shmdt,lseek,newfstatat,rename,prctl,readlink,set_robust_list,statfs,mkdir,execve,chmod,getrandom,memfd_create,getuid,fstatfs,inotify_add_watch,setpriority,flock,epoll_ctl,uname,geteuid,getsockname,getdents64,recvfrom,getegid,pread64,mlock,fadvise64,ppoll,getgid,pipe2,pipe,getpeername,getsockopt,rt_sigprocmask,bind,dup2,prlimit64,arch_prctl,epoll_create,shmat,eventfd2,setsockopt,shutdown,inotify_rm_watch,shmctl,unshare,inotify_init1,rt_sigreturn,shmget,getcwd,sysinfo,capset,set_tid_address,seccomp,creat,getresuid,getresgid,getpriority,openat,rmdir,capget,mremap,msync,kill,chdir,fchmod,umask,chroot,sched_getaffinity,clock_getres,inotify_init,chroot,getppid,getpgrp,exit,exit_group,dup3,setresuid,setresgid,setgid,setuid,nanosleep

and tracelog disabled. Once I enable it I got the same segfault as @msva :

Received signal 11 SEGV_MAPERR 000000000318
[4:4:0919/160130.366990:FATAL:zygote_host_impl_linux.cc(196)] Check failed: ReceiveFixedMessage(fds[0], kZygoteHelloMessage, sizeof(kZygoteHelloMessage), &real_pid). 
#0 0x7fc69293d4ce <unknown>
#1 0x7fc69294fb62 <unknown>
#2 0x7fc6925a3d3b <unknown>
#3 0x7fc6925a2df6 <unknown>
#4 0x7fc6925a339e <unknown>
#5 0x7fc69224fe02 <unknown>
#6 0x7fc692253312 <unknown>
#7 0x7fc692090d09 <unknown>
#8 0x7fc692091cb5 <unknown>
#9 0x7fc69202e1f9 QtWebEngineCore::BrowserContextAdapter::BrowserContextAdapter()
#10 0x7fc697d96b9a QWebEngineProfile::QWebEngineProfile()
#11 0x7fc69d065a5a MessageViewer::MailWebEngineView::MailWebEngineView()
#12 0x7fc69d011b35 <unknown>
#13 0x7fc69d01a4a1 <unknown>
#14 0x7fc69d006600 MessageViewer::Viewer::Viewer()
#15 0x7fc6a4566ce1 KMReaderWin::KMReaderWin()
#16 0x7fc6a45a590d KMMainWidget::createWidgets()
#17 0x7fc6a45af5cf KMMainWidget::KMMainWidget()
#18 0x7fc6a4563610 KMMainWin::KMMainWin()
#19 0x7fc6a4574d9c KMKernel::openReader()
#20 0x7fc6a45780ac KMKernel::action()
#21 0x7fc6a4579734 KMKernel::handleCommandLine()
#22 0x55ec4775bbb1 <unknown>
#23 0x55ec4775b811 <unknown>
#24 0x7fc69f39d50a __libc_start_main
#25 0x55ec4775b90a <unknown>

EDIT: After adding tgkill and alarm to seccomp.keep I get the following complete output:

Received signal 11 SEGV_MAPERR 000000000318
[4:4:0919/160928.391952:FATAL:zygote_host_impl_linux.cc(196)] Check failed: ReceiveFixedMessage(fds[0], kZygoteHelloMessage, sizeof(kZygoteHelloMessage), &real_pid). 
#0 0x7fb7e95494ce <unknown>
#1 0x7fb7e955bb62 <unknown>
#2 0x7fb7e91afd3b <unknown>
#3 0x7fb7e91aedf6 <unknown>
#4 0x7fb7e91af39e <unknown>
#5 0x7fb7e8e5be02 <unknown>
#6 0x7fb7e8e5f312 <unknown>
#7 0x7fb7e8c9cd09 <unknown>
#8 0x7fb7e8c9dcb5 <unknown>
#9 0x7fb7e8c3a1f9 QtWebEngineCore::BrowserContextAdapter::BrowserContextAdapter()
#10 0x7fb7ee9a2b9a QWebEngineProfile::QWebEngineProfile()
#11 0x7fb7f3c71a5a MessageViewer::MailWebEngineView::MailWebEngineView()
#12 0x7fb7f3c1db35 <unknown>
#13 0x7fb7f3c264a1 <unknown>
#14 0x7fb7f3c12600 MessageViewer::Viewer::Viewer()
#15 0x7fb7fb172ce1 KMReaderWin::KMReaderWin()
#16 0x7fb7fb1b190d KMMainWidget::createWidgets()
#17 0x7fb7fb1bb5cf KMMainWidget::KMMainWidget()
#18 0x7fb7fb16f610 KMMainWin::KMMainWin()
#19 0x7fb7fb180d9c KMKernel::openReader()
#20 0x7fb7fb1840ac KMKernel::action()
#21 0x7fb7fb185734 KMKernel::handleCommandLine()
#22 0x555817aabbb1 <unknown>
#23 0x555817aab811 <unknown>
#24 0x7fb7f5fa950a __libc_start_main
#25 0x555817aab90a <unknown>

*** KMail got signal 6 (Exiting)
*** Dead letters dumped.
QSocketNotifier: Invalid socket 9 and type 'Read', disabling...
QSocketNotifier: Invalid socket 11 and type 'Read', disabling...
QSocketNotifier: Invalid socket 18 and type 'Read', disabling...
KCrash: Application 'kmail' crashing...
KCrash: Attempting to start /usr/libexec/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0

Parent is shutting down, bye...
<!-- gh-comment-id:330550250 --> @curiosity-seeker commented on GitHub (Sep 19, 2017): Same problem here. Kmail 17.04 on Fedora 26 runs well with ``` seccomp.keep futex,poll,epoll_wait,select,waitid,stat,ioctl,write,read,recvmsg,access,gettid,wait4,mmap,open,close,mprotect,getpid,writev,fstat,munmap,sendto,lstat,sendmsg,fdatasync,fcntl,getdents,socketpair,ftruncate,brk,socket,unlink,madvise,dup,connect,rt_sigaction,clone,shmdt,lseek,newfstatat,rename,prctl,readlink,set_robust_list,statfs,mkdir,execve,chmod,getrandom,memfd_create,getuid,fstatfs,inotify_add_watch,setpriority,flock,epoll_ctl,uname,geteuid,getsockname,getdents64,recvfrom,getegid,pread64,mlock,fadvise64,ppoll,getgid,pipe2,pipe,getpeername,getsockopt,rt_sigprocmask,bind,dup2,prlimit64,arch_prctl,epoll_create,shmat,eventfd2,setsockopt,shutdown,inotify_rm_watch,shmctl,unshare,inotify_init1,rt_sigreturn,shmget,getcwd,sysinfo,capset,set_tid_address,seccomp,creat,getresuid,getresgid,getpriority,openat,rmdir,capget,mremap,msync,kill,chdir,fchmod,umask,chroot,sched_getaffinity,clock_getres,inotify_init,chroot,getppid,getpgrp,exit,exit_group,dup3,setresuid,setresgid,setgid,setuid,nanosleep ``` and `tracelog` disabled. Once I enable it I got the same segfault as @msva : ``` Received signal 11 SEGV_MAPERR 000000000318 [4:4:0919/160130.366990:FATAL:zygote_host_impl_linux.cc(196)] Check failed: ReceiveFixedMessage(fds[0], kZygoteHelloMessage, sizeof(kZygoteHelloMessage), &real_pid). #0 0x7fc69293d4ce <unknown> #1 0x7fc69294fb62 <unknown> #2 0x7fc6925a3d3b <unknown> #3 0x7fc6925a2df6 <unknown> #4 0x7fc6925a339e <unknown> #5 0x7fc69224fe02 <unknown> #6 0x7fc692253312 <unknown> #7 0x7fc692090d09 <unknown> #8 0x7fc692091cb5 <unknown> #9 0x7fc69202e1f9 QtWebEngineCore::BrowserContextAdapter::BrowserContextAdapter() #10 0x7fc697d96b9a QWebEngineProfile::QWebEngineProfile() #11 0x7fc69d065a5a MessageViewer::MailWebEngineView::MailWebEngineView() #12 0x7fc69d011b35 <unknown> #13 0x7fc69d01a4a1 <unknown> #14 0x7fc69d006600 MessageViewer::Viewer::Viewer() #15 0x7fc6a4566ce1 KMReaderWin::KMReaderWin() #16 0x7fc6a45a590d KMMainWidget::createWidgets() #17 0x7fc6a45af5cf KMMainWidget::KMMainWidget() #18 0x7fc6a4563610 KMMainWin::KMMainWin() #19 0x7fc6a4574d9c KMKernel::openReader() #20 0x7fc6a45780ac KMKernel::action() #21 0x7fc6a4579734 KMKernel::handleCommandLine() #22 0x55ec4775bbb1 <unknown> #23 0x55ec4775b811 <unknown> #24 0x7fc69f39d50a __libc_start_main #25 0x55ec4775b90a <unknown> ``` EDIT: After adding tgkill and alarm to seccomp.keep I get the following complete output: ``` Received signal 11 SEGV_MAPERR 000000000318 [4:4:0919/160928.391952:FATAL:zygote_host_impl_linux.cc(196)] Check failed: ReceiveFixedMessage(fds[0], kZygoteHelloMessage, sizeof(kZygoteHelloMessage), &real_pid). #0 0x7fb7e95494ce <unknown> #1 0x7fb7e955bb62 <unknown> #2 0x7fb7e91afd3b <unknown> #3 0x7fb7e91aedf6 <unknown> #4 0x7fb7e91af39e <unknown> #5 0x7fb7e8e5be02 <unknown> #6 0x7fb7e8e5f312 <unknown> #7 0x7fb7e8c9cd09 <unknown> #8 0x7fb7e8c9dcb5 <unknown> #9 0x7fb7e8c3a1f9 QtWebEngineCore::BrowserContextAdapter::BrowserContextAdapter() #10 0x7fb7ee9a2b9a QWebEngineProfile::QWebEngineProfile() #11 0x7fb7f3c71a5a MessageViewer::MailWebEngineView::MailWebEngineView() #12 0x7fb7f3c1db35 <unknown> #13 0x7fb7f3c264a1 <unknown> #14 0x7fb7f3c12600 MessageViewer::Viewer::Viewer() #15 0x7fb7fb172ce1 KMReaderWin::KMReaderWin() #16 0x7fb7fb1b190d KMMainWidget::createWidgets() #17 0x7fb7fb1bb5cf KMMainWidget::KMMainWidget() #18 0x7fb7fb16f610 KMMainWin::KMMainWin() #19 0x7fb7fb180d9c KMKernel::openReader() #20 0x7fb7fb1840ac KMKernel::action() #21 0x7fb7fb185734 KMKernel::handleCommandLine() #22 0x555817aabbb1 <unknown> #23 0x555817aab811 <unknown> #24 0x7fb7f5fa950a __libc_start_main #25 0x555817aab90a <unknown> *** KMail got signal 6 (Exiting) *** Dead letters dumped. QSocketNotifier: Invalid socket 9 and type 'Read', disabling... QSocketNotifier: Invalid socket 11 and type 'Read', disabling... QSocketNotifier: Invalid socket 18 and type 'Read', disabling... KCrash: Application 'kmail' crashing... KCrash: Attempting to start /usr/libexec/drkonqi from kdeinit sock_file=/run/user/1000/kdeinit5__0 Parent is shutting down, bye... ```
Author
Owner

@smitsohu commented on GitHub (Dec 9, 2017):

@msva and @curiosity-seeker, can one of you confirm it is working with latest commit on git?

<!-- gh-comment-id:350514204 --> @smitsohu commented on GitHub (Dec 9, 2017): @msva and @curiosity-seeker, can one of you confirm it is working with latest commit on git?
Author
Owner

@smitsohu commented on GitHub (Dec 10, 2017):

Reason for chroot is that KMail now has a sandboxed renderer process.

tracelog is also not working with the Chromium sandbox, see #197.

<!-- gh-comment-id:350516216 --> @smitsohu commented on GitHub (Dec 10, 2017): Reason for chroot is that KMail now has a [sandboxed](https://doc.qt.io/qt-5/qtwebengine-platform-notes.html#sandboxing-support) renderer process. `tracelog` is also not working with the Chromium sandbox, see #197.
Author
Owner

@curiosity-seeker commented on GitHub (Dec 18, 2017):

@smitsohu : I'm sorry that I'm not able to test it right now. You have to wait until January - sorry :-(

<!-- gh-comment-id:352459246 --> @curiosity-seeker commented on GitHub (Dec 18, 2017): @smitsohu : I'm sorry that I'm not able to test it right now. You have to wait until January - sorry :-(
Author
Owner

@smitsohu commented on GitHub (Dec 21, 2017):

@curiosity-seeker no worries! I just see that anyways your seccomp.keep already accounts for it (should have checked that earlier).

<!-- gh-comment-id:353487793 --> @smitsohu commented on GitHub (Dec 21, 2017): @curiosity-seeker no worries! I just see that anyways your `seccomp.keep` already accounts for it (should have checked that earlier).
Author
Owner

@chiraag-nataraj commented on GitHub (Aug 20, 2018):

These fixes made it into master, so I'm going to close this for now. If there are any issues, please feel free to re-open.

<!-- gh-comment-id:414354886 --> @chiraag-nataraj commented on GitHub (Aug 20, 2018): These fixes made it into master, so I'm going to close this for now. If there are any issues, please feel free to re-open.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1029
No description provided.