Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mendeley: misc cleanup/fixes #33396

Closed
wants to merge 2 commits into from
Closed

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Jan 3, 2018

Motivation for this change
  • Don't crash every launch
  • propagate GConf to avoid missing gconf dbus service
  • use libsForQt56.callPackage
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

seccomp-bpf crash doesn't seem to negatively impact application (?)
but the error is ugly and can't imagine everything is "fine"
so workaround is to disable the sandbox.

Related:
* hipchat in Arch: https://aur.archlinux.org/packages/hipchat/
* hipchat in ubuntu: https://jira.atlassian.com/browse/HCPUB-3575
* Qt: https://bugreports.qt.io/browse/QTBUG-57709

gconf fix is based on same done w/guake in NixOS#16670.
See also:
NixOS#24709 (comment)
@@ -110,6 +118,7 @@ stdenv.mkDerivation {

wrapProgram $out/bin/mendeleydesktop \
--add-flags "--unix-distro-build" \
--set QTWEBENGINE_DISABLE_SANDBOX 1 \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this required (suddenly)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, to be honest. glibc update, maybe?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the error message/trace output?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joachifm sorry didn't see your message until now.

Error looks like this:

/build/qtwebengine-opensource-src-5.6.3/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall 0281
Received signal 11 SEGV_MAPERR 00000e003119
#0 0x7f55aa29181e <unknown>
#1 0x7f55aa291bf9 <unknown>
#2 0x7f55a5cbcdb0 <unknown>
#3 0x7f55aaac8cff <unknown>
#4 0x7f55aabddd4a <unknown>
#5 0x7f55a5cbcdb0 <unknown>
#6 0x7f55a5108a27 __GI_epoll_pwait
#7 0x7f55a46cd6e1 epoll_dispatch
#8 0x7f55a46c36b9 event_base_loop
#9 0x7f55aa28833e <unknown>
#10 0x7f55aa2c5344 <unknown>
#11 0x7f55aa2ae9b5 <unknown>
#12 0x7f55aa2ddeda <unknown>
#13 0x7f55aa2da21c <unknown>
#14 0x7f55a5cb22a5 start_thread
#15 0x7f55a51088af __GI___clone
  r8: 0000000000000002  r9: 0000000000000008 r10: 0000000000000000 r11: 0000000000000246
 r12: 00007f5591c2b3b4 r13: 0000000002244130 r14: 00007f5591c2b3f0 r15: 0000000002210690
  di: 0000000000000001  si: 00007f55ac497e31  bp: 00007f5591c2b3f0  bx: 0000000000000119
  dx: 000000000e000000  ax: 000000000e003119  cx: 00007f55a5cbba70  sp: 00007f5591c2b3b0
  ip: 00007f55aaac8cff efl: 0000000000010202 cgf: 002b000000000033 erf: 0000000000000006
 trp: 000000000000000e msk: 0000000000000000 cr2: 000000000e003119
[end of stack trace]

But I think this part of this PR should be removed in favor of #33434 .

@andir
Copy link
Member

andir commented Jan 4, 2018 via email

@dtzWill
Copy link
Member Author

dtzWill commented Jan 4, 2018

No functionality issues that I'm aware of, although that seems... strange/unlikely/...wrong?

Anyway I'm testing a different fix currently that I'm optimistic about, will report back once I'm done recompiling all the things to confirm. Thanks for pushing back on this [1].

[1] "Let's disable sandbox protections for a program intended to be fed large collections of internet-sourced documents" doesn't sound so good in retrospect 😇 .

dtzWill added a commit to dtzWill/nixpkgs that referenced this pull request Jan 4, 2018
Based on:
https://chromium.googlesource.com/chromium/src/+/4e8083b4ab953ba298aedfc4e79d464be15e4012

Fixes mendeley bug mentioned in NixOS#33396,
which links to related issues in other distributions and upstream Qt.
@dtzWill
Copy link
Member Author

dtzWill commented Jan 4, 2018

(since I like the discussion and comments, closing this PR and opening new one without the sandbox disable part)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants